Request to SD for Spell modding support

Revamp on spells

I'd like to request, for the sanity of modders, to have the spells and spellbook xml and code changed to remove the Node references. Right now if three folks right spells and give the same node ID to the book two of the spell will be lost. It would be great to have one XML that names the spellbooks (provided a tag for spells to latch on to) and then add the other tags needed like type (fire), cost or tech or anything else that would help define the use of the book/school.

Spells: These would be pretty much as they are with level, at start, learn time, spellbook (could be more then one), and then the rest of the spell definitions. This would allow for any number of spells to be written and not have any lost. Add in allow for effects to move with caster, effect at a location(s), tactical summoning, and we can start to really add in a ton of magic to the game. These definitions for spells would also need to be directly addressable by items and creatures as active or passive abilities. This would remove the need for copied spelldefs in the abilities XML.

Thanks. B)

6,000 views 13 replies
Reply #1 Top

I feel that this applies to Tech trees as well.

If SD necessarily needs a "spellbooknode" type list for programming reasons (ie - reasons I don't know about, like loading in a certain order or saving memory or whatnot), they can build one out of all the spells made available - after the mods have been loaded. Since it's such a basic list, it should be an easy task to generate a list. The term procedural generation comes to mind.

Reply #2 Top

Quoting Heavenfall, reply 1
I feel that this applies to Tech trees as well.

If SD necessarily needs a "spellbooknode" type list for programming reasons (ie - reasons I don't know about, like loading in a certain order or saving memory or whatnot), they can build one out of all the spells made available - after the mods have been loaded. Since it's such a basic list, it should be an easy task to generate a list. The term procedural generation comes to mind.
End of Heavenfall's quote


Chances are, they're just artifacts from earlier in the design process. I can't tell you how often I look at something I'm coding halfway through a design cycle and think, "Was I high when I wrote that?"

Even so, I definitely agree wholeheartedly - it would be wonderful if I could add my "Wall of Earth" spell to my mod (in the Earth spellbook) without having to worry about conflicts with other mods.

Gnilbert

Reply #3 Top

I guess to add one other thing. It would be nice to have a way to set a valid casting location. Say I want to make a spell to summon a swamp thing. It would be helpful to have a tag for valid casting location. If omitted any location (strategic or tactical) is okay but if I set it to "Swamp" the spell is only castable in that terrain my caster is in. I have several spell ideas that are stuck because the location tags we have all focus on destination and none cover source location.

If I'm missing this someone let me know. I've been coming files for an example.

Thanks. B)

Reply #4 Top

Does anyone have any more details on the upcoming changes to the Spell system from the Stardock crew? I'm holding off on Spell modding until 108 is released in hope a number of these issues are hammered out. Perhaps Python support will allow for the tweaks needed too. B)

Reply #5 Top

I think they'll agree.  Has anyone tried doing one without a node to see what happens?

Reply #6 Top

Quoting Istari, reply 5
I think they'll agree.  Has anyone tried doing one without a node to see what happens?
End of Istari's quote
Thanks for the response! I gave it a shot just now with the following section in my spellbooks mod file:

<Spellbook InternalName="EarthSpellbook">
    <SpellbookNode>
      <SpellDef>SummonFireGiant</SpellDef>
      <StartingResearch>1</StartingResearch>
      <StartingKnown>1</StartingKnown>
    </SpellbookNode>
</Spellbook>

    I started a new game, created a new Sovereign with only the Earth spellbook. He didn't have the Fire Giant spell either already known or available for research (the latter isn't suprising, just including to be thorough).

Gnilbert

Reply #7 Top

Wouldn't you also have to put the spell name in the spell book also? You defined the spell but not the spellbook.?

Reply #8 Top

SummonFireGiant is a core spell.

Basically, Istari suggested trying construct a spellbook without using <NodeID> for the spellbook nodes. That's what gnillbert did.

Reply #9 Top

I've tested without node ID's both in and out of a spellbook and as a separate new spell and book entry with no luck. You gave to define a spell in a book with a valid node ID or it's a no-show. And the SpellDef has to be in a file separate from the books to be seen even though the main Tag of Spell is used in both. Odd and I hope it gets a revamp in 1.08. I would also like to define the amount of mana used in a spell. For example, have Teleport cost 1 mana per 5 range. Also be nice to scale damage with caster level (may be able to do that now via gamemod calculations).

B)  

Reply #10 Top

Whoa,  :omg:   missed the gnillbert line there. Does he haveXML code to look at? I know you can do a spell definition as an item/creature power without node id's. Done that. New spells in a book I'd love to see. B)

Reply #11 Top

Quoting Capn, reply 10
Whoa,     missed the gnillbert line there. Does he haveXML code to look at? I know you can do a spell definition as an item/creature power without node id's. Done that. New spells in a book I'd love to see.
End of Capn's quote
Sure thing - in my mod (grab it HERE) I created a book of "Unholy" spells. The spells are defined in Gnilbert_UNHOLY_Spells.xml and the spellbook itself is defined in Gnilbert_UNHOLY_Book.xml.

Good luck!
Gnilbert

Reply #12 Top

Whoops, should have said new spells in a book not using Nodes I'd love to see. I've done a free standing book with noded spells and added new nodes to existing books. I guess the trick is getting SD to kill the nodes and just list the spells found for a given book tag. Without that we all still run the chance of having a node 07 air spell we've all made justing getting overwritten in someones mod folder.

Still a great mod by Glilbert!

B)  

Reply #13 Top

Quoting Gnilbert, reply 2
Chances are, they're just artifacts from earlier in the design process. I can't tell you how often I look at something I'm coding halfway through a design cycle and think, "Was I high when I wrote that?"
End of Gnilbert's quote

nothing contructive to add, just my appreciation for this quote... i too cant count how many times ive had to reuse legacy code, and wonder what in the world i was thinking when i initially wrote my code... ;)