Well whaddya know?

Discussion in 'ToEE Toolset Project Documentation' started by Shiningted, Jul 2, 2005.

Remove all ads!
  1. Gaear

    Gaear Bastard Maestro Administrator

    Joined:
    Apr 27, 2004
    Messages:
    10,996
    Likes Received:
    23
    A relatively easy way to test slides without fighting anybody or ending the game

    Add the movie number(s) as defined in modules/ToEE/movies/movies.mes that refer to the slides you want to test via this console code:

    Code:
    game.moviequeue_add(xxx)
    If you want to add every endslide in the game for example, you'll have to enter all of them separately. After inputting one, just hit the up arrow in the console to bring up the last command, and modify it with the next movie number.

    When that's done, enter this in the console:

    Code:
    game.moviequeue_play()
    All the queued movies will play, and the game will just go back to where you were when it's done.

    The only sad and silly thing about this is that the movies added to the queue don't seem to be stored in saved games, so this method is good for testing one time. Then you have to do it all again. Still, it's better than fighting the end boss each time.
     
  2. Gaear

    Gaear Bastard Maestro Administrator

    Joined:
    Apr 27, 2004
    Messages:
    10,996
    Likes Received:
    23
    Fact: sector visibility 'enders' (the svb tile types that tell the game to stop showing svb extenders wherever they're placed) only work overtop total blocking tiles.

    Example: you have an outdoor map with a cliff, simulating different elevations (even though there are no elevations in ToEE). If you place total blocking tiles where the cliff is, then place svb tile extenders up to the edge to simulate being able to see to the edge of the cliff from below but not over the top of it, then place svb ending tiles at the limit of the extender tiles, the game will appropriately limit the player's range of vision to the edge of the cliff, no matter how close you get to it and how much further your normal range of sight should allow. If, however, you want the blocking tiles to be flyover tiles, which would mean flying critters could cross them and PCs and enemies could exchange ranged fire, the svb ending tiles will not function as desired and the player will be able to see clear overtop the 'cliff.'

    Bummer.
     
  3. Shiningted

    Shiningted I want my goat back Global Moderator

    Joined:
    Oct 23, 2004
    Messages:
    11,746
    Likes Received:
    29
    Flying critters can't fly over flyover tiles, only missile fire etc. Even bigger bummer :(

    But I digress. I just noticed the following:

    Each spell starts off in its OnBeginSpellCast section with something like

    game.particles( "sp-divination-conjure", spell.caster )

    However, a quick check of the various partsys.tabs revealed no such particle effects exist!

    And yet... we've all seen our wizards wave their hands around before each and every spell and get a school-appropriate particle effect, independent of anything requested by the specific spell script.

    It would seem the game draws this not from the spell XXX - spell.py file, but rather from the XXX - Spell.txt in rules / spells. This file inevitably has a School section, and having just tested this I can tell you, changing that school likewise changes the spell effect particles.

    Very annoying if you want a different particle effect for aesthetic reasons, but there you go. Also, if you 'fix' the spell.py file by putting in something that actually works, like game.particles( "cast-Abjuration-conj", spell.caster ), you get both.
     
  4. Sitra Achara

    Sitra Achara Senior Member

    Joined:
    Sep 1, 2003
    Messages:
    2,645
    Likes Received:
    67
    Did you know that you can directly access the Protos.tab definitions as Python objects?

    You can also manipulate them even, using the standard obj_set_int, so that new spawns will inherit the altered properties.

    The tricky part, of course, is to get a handle on them without using a debugger :p

    Also, note that if you modify any proto object, the effect will persist in memory across all saves; but only for that game session. (restarting the game will reset the changes as it will overwrite from the protos.tab file)

    Example usage:
    Code:
    PyObjHandle( long ( [PyObj_Handle_in_Hex] ) )
    
     
  5. Gaear

    Gaear Bastard Maestro Administrator

    Joined:
    Apr 27, 2004
    Messages:
    10,996
    Likes Received:
    23
    Just verified that you can indeed go higher than 1000. (Portrait slot 10000 worked a charm.) This effectively means that there is no limit to ToEE portraits.
     
  6. Sitra Achara

    Sitra Achara Senior Member

    Joined:
    Sep 1, 2003
    Messages:
    2,645
    Likes Received:
    67
    FYI - Spell Numbers -

    Above spell 729, ToEE seems to have a problem with spell removal. It directly compares the spell index (e.g. 1 for aid) to 729 and jumps to a "WARNING: no spell remove function defined..." section if above it.

    Also, the range of normal spells is considered to be up to spell 600. 600-700 seems to be considered a special range. (this is from the DLL)
     
  7. Sitra Achara

    Sitra Achara Senior Member

    Joined:
    Sep 1, 2003
    Messages:
    2,645
    Likes Received:
    67
    An interesting discovery: game.global_vars[x] simply accesses the memory address at [ [103073B8]+x*4]. No more, no less. Can you think of how to abuse it? I do.
     
    Last edited: Mar 19, 2015
  8. DarkStorm

    DarkStorm Established Member

    Joined:
    Oct 2, 2003
    Messages:
    482
    Likes Received:
    1
    Haha. please don't! :D
    Abusing buffer overflows for modding! We can do better!
     
  9. Sitra Achara

    Sitra Achara Senior Member

    Joined:
    Sep 1, 2003
    Messages:
    2,645
    Likes Received:
    67
    A while back we discovered that obj_f_npc_pad_i_3 can be non-zero for some NPCs.

    That is because it is in fact used for storing joinable NPCs' loot share type (normal, half_share_money_only, all_arcane_scrolls_nothign_else, one_third_of_all, one_fifth_of_all, nothing). Furthermore this property is accessible by
    Code:
    obj.loots
    I'm guessing it was a last minute addition and they forgot to rename it in the DLL, as is the case with other fields too.

    On that note I'm pretty sure I saw one of the critter_f_pad fields used too, but I forgot which. Maybe 5.
     
    Last edited: Mar 26, 2015
  10. Sitra Achara

    Sitra Achara Senior Member

    Joined:
    Sep 1, 2003
    Messages:
    2,645
    Likes Received:
    67
    Another cool thing: it seems you can prevent the "Stockhold Syndrome" and messing with duplicate NPCs by changing the NPC's "origin" property. E.g.
    Code:
    attachee.origin = 5001 # makes the NPC park itself in Hommlet
    You should exercise some caution when changing this property though - be sure the NPC gets assigned a Standpoint first (which will determine its x,y coordinates within the map). In particular, if you change its origin to the map it is on, it will probably start going to that standpoint at that instant.

    Not sure yet how this interacts with daynight xfer stuff.
     
  11. Shiningted

    Shiningted I want my goat back Global Moderator

    Joined:
    Oct 23, 2004
    Messages:
    11,746
    Likes Received:
    29
    Domains

    I had a surprising bit of difficulty working out how to access Domains from script - not a lot, just surprising because I expected none. Anyways, doubtless this has been listed many time by people asking, "how do I change my domains?" and console-savvy players explaining, but I generally tune out such things so I am going to pretend I saw this first and post it here.

    To check for a domain:

    target.stat_level_get(stat_domain_1)

    target.stat_level_get(stat_domain_2)

    This returns a number that can be compared to the following list. They seem to be alphabetical, anyway here is a list with the ones I tested listed normally, and the ones I am filling in alphabetically (untested) in italics. I am not at liberty to check if there is an actual "Domains.mes" file on this PC, but I will and will adjust accordingly.

    1 = Air Domain
    2 = Animal Domain
    3 = Chaos Domain

    4 = Death Domain
    5 = Destruction Domain
    6 = Earth Domain
    7 = Evil Domain
    8 = Fire Domain
    9 = Good Domain
    10 = Healing Domain
    11 = Knowledge Domain
    12 = Law Domain
    13 = Luck Domain

    14 = Magic Domain
    15 = Plant Domain
    16 = Protection Domain
    17 = Strength Domain
    18 = Sun Domain
    19 = Travel Domain
    20 = Trickery Domain
    21 = War Domain

    22 = Water Domain
     
Our Host!