View Single Post
  #1  
Old March 3rd, 2007, 01:45 PM
DrPraetorious's Avatar

DrPraetorious DrPraetorious is offline
Major General
 
Join Date: Feb 2005
Location: Lake of Hali, Aldebaran, OH
Posts: 2,474
Thanks: 51
Thanked 67 Times in 27 Posts
DrPraetorious is on a distinguished road
Default Spell Modding - Guide Version 0.11

IMPORTANT TIP ON SPELL TESTING: When testing a spell, DO NOT simply paste in an additional block of researchlevel etc. information. The replacement will *appear* to work, however, the spell itself will be busted.

Attached file includes the bare bones information you need to use the effects and special abilities not documented in the manual. All of this is probably going to be redundant when KO finishes the documentation - but I'm entertaining myself. If you can't wait to make a spell that turns all of your sacred undead into hasted tramplers - well, now you can do that.

Several features are included in the binary but do not appear to be currently accessible to modders. The most notable is the ability to give a spell a "secondary effect" - another spell that goes off at the same time (e.g. the shock wave from thunderstrike.) Ir'a immediately obvious from the executable code-dump how this works (there's a field with a spellID in it), so I'd bet dollars to... er... krone, right? that this capability will be added in a future patch.

Rather than trying to explore every possible effect/damage #/special ability combination and see what it does (by which time Sol will be a brown husk), I'm trying to code-dive and see what we can figure out from the existing spells.

It's possible that some of these flags are historical - does anyone know where I could get a list of which spells were *added* in each version of dominions? Maybe the older ones have older forms of flags or bitmasks grandfathered in?

ALL of the actual findings are now in the attached .zip file. It's simply too much data to fit into the main body of a post.

Anyway I'll update this post as I continue working - anyone else who figures out anything in this file, feel free to post your findings. Take this stuff and repost it. Use the knowledge for your own sick, twisted purposes. Call my mother a whore. Do I care what you do? No.

UPDATE: added the results of the first round of experimentation. Also, fixed a typo in one of the spreadsheets. Added a spreadsheet for easy calculation/interpretation of bitmasks.

MINOR UPDATE: Improved bitmasker spreadsheet. Confirmed a few #spec bitmask assignments.

UPDATE: Considerably improved bitmasker spreadsheet. Figured out what (almost?) all of the bitmasks for effects 10, 11 and 23 do - some have no obvious effect but might do something. Misc improvements in text and organization. Version 0.1.

FYI: This isn't in the attachment, and I don't want to make another version just for this.
Bytes 40+ of the spell record represent additional instructions of some kind or another.
Bytes 60-63 are the *argument* for the instruction found in bytes 40-43 - 64-67 for 44-47 ... 77-79 (the end of the record) presumably for 57-59.
No spell ever has more than three of these additional instructions, however.
These are of purely academic interest since you can't mod them directly.

The additional instruction types that seem to exist are:
code 278 - restricted spell. Argument is nation # + 100 that gets the spell.

Of interest - the regular divine spells (which Ermor doesn't get) have no special values in this field. This means that the "everybody except you" spell feature may be hard-coded, and thus never become available to modders.

dreams of R'lyeh, the various site-searching spells and faery trod also have values these fields, with instructions in the 40x range - but on those few examples and with no ability to change them (except by hex-editing the executable and I don't want to go there) I have no idea what they do.

The inability to put instructions in those fields may be what makes homebrewed site searching spells behave oddly (or I may just not have been being careful.)
Attached Files
File Type: zip 500776-Spells2.zip (220.9 KB, 857 views)
__________________
If you read his speech at Rice, all his arguments for going to the moon work equally well as arguments for blowing up the moon, sending cloned dinosaurs into space, or constructing a towering *****-shaped obelisk on Mars. --Randall Munroe

Last edited by Edi; August 27th, 2008 at 05:21 PM.. Reason: Prefix
Reply With Quote
The Following 2 Users Say Thank You to DrPraetorious For This Useful Post: