.com.unity Forums

.com.unity Forums (http://forum.shrapnelgames.com/index.php)
-   Scenarios, Maps and Mods (http://forum.shrapnelgames.com/forumdisplay.php?f=146)
-   -   Utility: Spell Modding - Guide Version 0.11 (http://forum.shrapnelgames.com/showthread.php?t=33588)

DrPraetorious March 3rd, 2007 01:45 PM

Spell Modding - Guide Version 0.11
 
1 Attachment(s)
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.)

Gandalf Parker March 3rd, 2007 05:02 PM

Re: Spell Modding - Guide Rough Draft
 
You might want to drop it into a word processor and set the screen wrap shorter. Otherwise its hard to respond to.

Impressive work. When you finish it I will gladly host it if you'd like. Then you can link to it in the "tools" stickie here.

DrPraetorious March 3rd, 2007 06:04 PM

Re: Spell Modding - Guide Rough Draft
 
Oh, I already added it to the tools thread.

DrPraetorious March 6th, 2007 10:09 PM

Re: Spell Modding - Guide Rough Draft
 
New version.

Jack_Trowell March 7th, 2007 10:49 AM

Re: Spell Modding - Guide Rough Draft
 
Oh, nice.

If I understand, to make a new site-searching spell for Holy sites, I should use the effect 10048 with damage 8 for holy/priest, correct ?

DrPraetorious March 7th, 2007 06:33 PM

Re: Spell Modding - Guide Rough Draft
 
I believe so, yes.

But you might also need certain values in the #spec field - trying copying the value from an existing site searching spell and see if that makes a difference.

Psientist March 11th, 2007 03:19 PM

Re: Spell Modding - Guide Rough Draft
 
Well, I post this mostly just for discussion sake. I decided that the Death school of magic needs some form of "Dome" spell, since it appears to be the only school without one. So, I tried mixing and matching the listed Dome effect numbers with other spells like Soul Slay and 7Year Fever and the like, all with no luck whatsoever. In my test games, I could cast the spell, and it shows as a protective spell for that province - but nothing ever triggers it. In fact, recreating the Dome of Flaming Death (listed below) but no remote attack spell I try ever triggers it either. Thoughts appreciated.

Quote:




#newspell
#name "Veil of Shadows"
#descr "A magical spell trap is placed over the caster's provice. Enemy spells that attack the protected province rend the veil and expose the attacker to dark energies from the Plane of Shadows. While the Veil will not stop incoming spells, it may remove the attacker as a threat through the infliction of a death spell. The Veil fades if the caster dies."
#school 4
#researchlevel 5
#path 0 5
#pathlevel 0 3
#effect 10082
#fatiguecost 1000
#damage 60
#end

Note - effect 10082 creates a temporary dome (based upon the number of gems invested), 10084 creates one that appears to last until triggered.

DrPraetorious March 11th, 2007 06:14 PM

Re: Spell Modding - Guide Rough Draft
 
I can't figure that one out either.

The only possible way in which your spell *might* differ from Dome of Flaming Death is in the sound and graphics fields, which I haven't quite figured out yet.

In the field that "Acid Bolt" has at 10070 (flyspr?) dome of Flaming Death has a value of -1 (or 65535, if it's unsigned.)

In the field that "Acid Bolt" has at 10130 (explspr?) dome of Flaming Death likewise has a -1.

So you could try setting the flyspr and explspr fields to -1 and see if that helps.

What about the other dome spells? Do they work? It ought to be easy to check if the effect # for Dome of Solid Air works or not.

Psientist March 15th, 2007 02:44 PM

Re: Spell Modding - Guide Rough Draft
 
I had tried Solid Air, and the Blood Magic equivalent as well, with no luck! Too bad, I was hoping one could really come up with some interesting dome effects by matching other spells as effects.

Psientist March 22nd, 2007 03:09 PM

Re: Spell Modding - Guide Rough Draft
 
Curious - has anyone ever come across the bitmasks for "awe" or "animal awe"? "fear" is covered quite well already.


All times are GMT -4. The time now is 06:20 PM.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©1999 - 2024, Shrapnel Games, Inc. - All Rights Reserved.