The Limits of ToEE Modding

Discussion in 'Tech Guides and Help Threads' started by Shiningted, May 9, 2009.

Remove all ads!
  1. Shiningted

    Shiningted I want my goat back Global Moderator

    Joined:
    Oct 23, 2004
    Messages:
    12,085
    Likes Received:
    124
    This is based on a recent request by a modder to know what exactly the limits are in terms of what we can and can't do (since many bugs or effects may look easily fixed / replicated, but apparently aren't).

    The Basics The game functions by several basic building blocks:

    - "the engine": the basic engine of the game, contained primarily in Temple.dll. We do not have the source code, and any changes to the .dll have to be done through decompiling then reverse-engineering the .dll to find the bug and hopefully fix it. Even more difficult than it sounds. Done occasionally by legendary modders to fix a variety of bugs. VERY difficult to add new content this way, but also done on occasion via Herculean modding efforts. There are no .dll-hacking modders currently active.

    - "the scripts": scripts for NPCs, spells, traps, random encounters etc and 'subroutines' accessed by them. Found in data / scr. Written in Python, moddable with Notepad or its more complicated cousins (Notepad++ etc).

    - the .tab files: spreadsheet files containing data about NPCs, items and objects (protos.tab), graphical effects (partsys.tab), AI (strategy.tab) and information (help.tab, feats.tab etc). Moddable with ProtoEd or ToEEWB, though not always fully understood.

    - dialogue: contained in .dlg files that are controlled by and can access the scripts in a corresponding .py file. Moddable in Notepad: straightforward.

    - the .mes files: files that control what text appears in the game at various times. Text is easily changed (and even added) but changing the text has no effect on whatever produced the text (eg changing the floating text "negative energy!" to "positive energy!" has no effect on the fact you just got hit by negative energy: it just causes a contradictory floatline to appear in the game. Moddable in Notepad. A few, such as ground.mes, addmesh.mes etc, contain file paths: others, such as InvenSource.mes, contain lists of data that the game parses at necessary moments. Screwing up those particular files causes a CTD or failure to even load, so .mes files really are all or nothing.

    - the sound and movie files: movies are BINKs, sound files are .mp3s or .wavs. Moddable, by those inclined, with appropriate tools. Can be added via scripts or through the control files (voices, effects, ambient music etc). Some limits: eg ambient sounds can't be changed halfway through a game, some files (such as NPC voices) will cause others to be muted.

    - graphical files: appear in various places. Background maps are .jpgs and can be easily modified in photoshop etc. Portraits and icon files (of inventory items) are .tgas and can likewise be modded in Photoshop, as are various game function images (buttons being pushed, cursors, the Worldmap etc). The font for the main titles is Scurlock. The 3d critter and item models are a combination of skeletal models (.skms), skeletal animations (.skas), meshes and addmeshes (.tgas) plus various control files (.mdfs etc). Animated models can be modded with XVicious' tool (see below), meshes can be repainted, and 'single-bone' models can be modded with Leksey's 3d modelling plug-in (hence we have new melee weapons etc). Effects are based on sprites and can be viewed with V2Brute, modded through the partsys.tab files (complicated) and draw on basic .tga files that can be modded.

    - maps: can be added and modified up to a point. The way the PCs interact with the map is based on what is called "sectoring", which is adding .sec files that indicate which areas are off limits, which provide cover, which produce what sound when stepped on, lighting, embedded items such as doors, scenery such as trees, stair icons etc. Coupled with .svbs (sector visibility blocking - what you can & can't see through on a fogged map, and when models should be grayed due to running behind things), globalt.li(gh)t(ing) and .hsd files (depth: mainly for water). All moddable thanks to Agetian's World Builder tool. Not currently moddable are the clipping files, which work off the .dag files (depth art geometry?) and indicate which parts of the map are fully 3d and clip models that pass behind them (door frames clipping doors, pillars that block characters from view etc). These are the same proprietary 3d format as the NPC etc models and are very tricky to mod for, usually, not a lot of return.

    Core Combat Very little to do with this can be modded. There are no scripts for the modders to change: pretty much everything you can do in combat, whether it happens automatically (such as movement and attacking when you point-&-click) or is chosen of the radial menu, is then a call sent straight to the engine and there are no scripts involved for us to play with. Hence we can't easily fix things like the 'charge does non-lethal damage' bug, or rewrite the engine so polearms do damage in a donut instead of a circle. Also, we can't easily add new radial menu options to the combat section, such as 'bullrush' or 'sunder' or 'grapple' or 'disarm' (and even if we could, we couldn't then add the animations). Pity. Plus various other things that go on behind the scenes leading up to combat, such as Initiative rolls and Spot checks, can't be modded (though we could do Spot and Listen checks manually thruogh NPC heartbeat files, but thats a hassle).

    Spells Spells are all controlled by script, as are spell-like abilities and many other things that aren't really spells but have to be treated as spells to get them to work. Hence spells can be modded. BUT... many spells look like this:

    - find target
    - set duration, DC etc
    - add spell condition to target
    - end

    What is the spell condition? Well, thats a call to the engine, and we can't change it. Nor are conditions removable: even things like Dispel Magic and Remove Fear simply add new conditions to the target, they don't remove existing ones in the script. Hence while we can achieve a lot with spells since they are direct calls to scripts, there are some basics we can't easily change. We can pervert spell conditions to our own ends though: for instance, Cat's Grace does not give a scripted bonus to Dexterity: it just adds a spell condition that calls a subroutine in the engine that gives a bonus to Dexterity. Hence Ray of Clumsiness was achieved by granting the Cat's Grace spell condition, but setting it to grant a negative amount (conditions have conditional numbers that may or may not be moddable). There are other conditions besides spell ones: Prone or Fallen come to mind. The presence of conditions can be measured, but it can be very hit and miss: I have not found a way to check whether a character is stunned (usually achieved by adding the Sound Burst spell condition). Annoying, that. Others, though, are easily checked for: Eg, Dimension Door checks for the presence of the Dimensional Anchor condition before doing anything.

    Area of Effect spells add an invisible object to the screen (and, if necessary, to the Initiative) and the spell condition and area animations are then added to that object: the object should be destroyed when the spell expires. This makes it doubly hard to try to mod what is going on, and if the effect gets 'left behind' on a critter after the spell expires, then you get persistent spell bugs.

    PCs PCs don't have their own scripts, so while there are some things we want the players to be able to do that can be achieved through scripts, we can't normally hang those scripts directly on the PCs. I'll leave you to think about that. There are a few exceptions, such as on map changes and at the end of combat, where a PC can be the 'attachee' of a script and fire it: these have been used to good but limited effect. Workarounds are things like the Concentrated Search tool added in KotB, or the Monk's Belt, or changing other things: eg the Far Shot feat was added not by adding a script to the PC with the feat, but adding a script to every ranged weapon in the game to check for the feat.

    NPCs do have their own scripts, and they can be scripted to do just about anything. This is handy.

    Items can be given various bonuses, so adding a bonus to a PC (such as when Analyse Dwoemer grants a bonus to Spellcraft checks) means adding an item with that bonus to the critter's inventory. Necessary if there is no spell condition similar to what you want (see Spells above). Bonuses are hard-coded to the engine, so we can't change the 'Fragarach' bonus, for instance, and we can't add new ones.

    Skills New skills can be added using Spellslinger's 'Feats and Skills' tool, which activates these. The value of doing this then has to be incorporated into the game by the modders. Some will never work: Swim and Jump are the obvious ones, while Balance is of dubious benefit since things like Grease are just spell conditions added to area effect objects and are scripted for the target. Again, a pity.

    Feats (borrowed from another thread...) The game recognises every feat in the PHB but nothing over lvl 10 has any sort of implementation. Some things are already in the engine, and hence just have to be activated: mainly weapon proficencies, and associated feats such as new weapon proficiencies - they all run off the same part of the engine, so we can activate whips, nets etc if it takes our fancy, which it doesn't since we can't do the attack stuff, animations etc. Other feats, such as Deft Hands or Leadership, can be activated but do absolutely nothing and in the latter case does not even recognise its prerequisites (lvl 6). Unfortunately anything over lvl 10 seems to be out of the question, unless we can somehow script the effects rather than have them through the engine, which is a tall order in most cases.

    Feel free to discuss, ask questions, or call me on anything I got wrong (I am not an expert on many areas I have spoken about here).
     
    Last edited: Sep 11, 2013
  2. Spider Dwarf

    Spider Dwarf Spider

    Joined:
    Apr 15, 2010
    Messages:
    155
    Likes Received:
    0
    Is there perchance a posting the describes, somewhat, the Description.MES and Long_Description.MES files. I was thinkin' of one similar to this posting about the Protos.TAB file. And if there is another one more detailed I would appreciate it. I'm working on something, I'll save it for later this week, and need a decent online set of URLs. The posting this is linked to is one that suited my needs greatly, thanks kindly for it. Gaear was kind enough to point it out to me.
     
  3. XVicious

    XVicious Established Member

    Joined:
    Jun 21, 2013
    Messages:
    426
    Likes Received:
    5
    "-The 3d critter and item models are a combination of
    skeletal models (.skms), skeletal animations (.skas),
    meshes and addmeshes (.tgas) plus various control files
    (.mdfs etc). Animated models are in a proprietary format
    not released to us and can't be modded, but meshes can
    be repainted, and 'single-bone' models can be modded with
    Leksey's 3d modelling plug-in (hence we have new melee
    weapons etc). Effects are based on sprites and can be viewed
    with V2Brute, modded through the partsys.tab files (complicated)
    and draw on basic .tga files that can be modded."

    http://www.co8.org/forum/showthread.php?p=124399#post124399


    this limit of modding has been broken by me

    example human female skm has 91 bones
    the spike chain has 36 bones

    [​IMG]
    [​IMG]
    [​IMG]
    [​IMG]
    [​IMG]
    [​IMG]


    http://www.co8.org/forum/showthread.php?p=124399#post124399
    muhahahaha
     
    Last edited: Oct 12, 2014
  4. Gehennis

    Gehennis Established Member

    Joined:
    Sep 15, 2012
    Messages:
    685
    Likes Received:
    15
    Don't suppose there is any chance that the source code will ever become public domain is there?
     
  5. XVicious

    XVicious Established Member

    Joined:
    Jun 21, 2013
    Messages:
    426
    Likes Received:
    5
    ....
     
    Last edited: Sep 11, 2013
  6. Shiningted

    Shiningted I want my goat back Global Moderator

    Joined:
    Oct 23, 2004
    Messages:
    12,085
    Likes Received:
    124
    To answer your question Gehennis, I'd say no - Atari are not known for doing such things, (they are known for NOT doing such things) and there are multiple trademark and copyright issues regarding who owns what within the sourcecode.
     
  7. sirchet

    sirchet Force for Goodness Moderator Supporter

    Joined:
    Dec 6, 2003
    Messages:
    3,721
    Likes Received:
    48
    Are you aware that Atari recently auctioned off a great deal, if not all, of it's assets to satisfy the claims of it's financial backers.

    Who knows who might end up actually owning the rights to TOEE, my assumption is it will become part of a "package deal".
     
  8. Batmanzero

    Batmanzero Member

    Joined:
    Apr 11, 2015
    Messages:
    1
    Likes Received:
    0
    Is there a way to edit the progression of feats?? I want my feat progression to be like pathfinder (every odd level).
     
  9. SharkD

    SharkD Established Member

    Joined:
    Jul 7, 2009
    Messages:
    218
    Likes Received:
    0
    Would it be possible to switch to d20 Modern?
     
Our Host!