So I'm trying to make a mod which adds a new item "the d20 die" which, when you roll it, will give you a buff based on a roll on the d20. currently all I've scripted is the natural 1 and natural 20, but I can't test them yet because everytime I use my mod the game doesn't even start up. I know the problem is in my mod because the game works fine otherwise. Attached is my mod, if some experienced modder could help me out and explain to me what I've done wrong. This is my first mod, so please be nice
I don't know if it's any related (I don't think so) but the proper mod zip packaging is to put the folders directly inside the zip, not in another folder named after the mod.
Your xml files are full of formatting errors. In itemDB: The initial '<item blahblah' should end with just '>' instead of '/>'. OverrideClassName should go into the item's opening line rather than in its own '< >' tags later on. You've missed the closing '>' on your '<potion etc.' lines. In spellDB: You've missed a closing " for one of the secondary buffs. You've written target="target" instead of type="target". There's also references to several test pngs that don't exist. I'll leave fixing all those as an exercise to the student. Until you're familiar with the formatting I'd really, really suggest using the Mod XML Validator to check for these kinds of errors on your own. Bonus Tip: there's no need to create several items in order to simulate rolling the D20. There's an effect type "triggerfromlist" that can be used to randomly pick a spell (roll) for the player each time they use the same D20 item. Search through the game's spellDB file and you should be able to find an example with the formatting.
<effect type="triggerfromlist"> <option name="1"/> <option name="2"/> ... <option name="20"/> </effect>