FORUM ARCHIVED

Alright, what am I doing wrong here?

Discussion in 'Modding' started by Verendus, Aug 30, 2012.

  1. Verendus

    Verendus Member

    I'm trying to make a stance-type ability; you can turn it on to boost your strength and block and gain an on-hit special attack at the cost of nimbleness, and then turn it off whenever you want. In-game, the ability appears in the level-up tome, but the spell doesn't appear in the spell bar on the bottom. I haven't the faintest idea of what's causing this.
    Here's the skill code:

    <ability name="You Are the Brute Squad" icon="skills/armourer0_64.png" skill="241" level="3">
    <description text="It's not your fault being the biggest and the strongest. You don't even exercise."/>
    <spell name="Specializing in Groups"/>
    <secondarybuff id="2" amount="3"/>
    </ability>

    and the spell:

    <spell name="Different Moves" type="area" radius="1"/>
    <effect type="damage" crushingF=".1" primaryScale="0"/> <!--Burliness-->
    <anim sprite="sprites/blastB/blastB" frames="4" framerate="35"/>
    </spell>

    <spell name="Specializing in Groups" type="self" icon="skills/armourer0_32.png" downtime="1">
    <buff useTimer="0" stacksize="1" allowstacking="0" removable="1" bad="0"
    icon="skills/armourer0_64.png">
    <halo name="sprites/hero_glow/hero_glow" first="0" num="3" framerate="100"/>
    <targetHitEffectBuff percentage="100" name="Different Moves"/>
    <secondarybuff id="2" amount="2"/> <!--melee-->
    <secondarybuff id="7" amount="10"/> <!--block-->
    <secondarybuff id="18" amount="-2"/> <!--sight-->
    <primarybuff id="2" amount="-15"/> <!--Nimbleness-->
    <primarybuff id="4" amount="5"/> <!--Stubbornness-->
    </buff>
    <anim sprite="sprites/null0000.png" frames="1" framerate="80" centereffect="0" sfx="crushing"/>
    <description text="You use different moves when you're fighting half a dozen people than when you only have to be worried about one."/>
    </spell>

    Everything before the two works fine, and everything after (except the </spellDB> and </skillDB> has been <!-- -->'d out. Help would be awesome.
    edit: I just checked, and all of the later abilities which are supposed to grant spells act the same way.
     
    OmniaNigrum likes this.
  2. Have you checked it with the mod XML validator? (I haven't looked through it yet, I'll do that in a moment)

    That tends to catch the most obvious errors.

    ETA: Your anim sprite code is wrong, you shouldn't have the 0000.png (compare to your halo code, for example) on there; the game fills that stuff in.

    I'm not SURE if that would break things like you're seeing though?

    But yeah generally it sounds like the error you're getting is there's something broken and so the game isn't actually loading this spell and all the ones that come after it in the spellDB
     
    OmniaNigrum likes this.
  3. Syphonix

    Syphonix Member

    Your skillDB entry, bolded and underlined areas are fixed areas (or nitpicks):


    <ability name="You Are the Brute Squad" icon="skills/warrior/armourer0_64.png" skill="241" level="3">
    <description text="It's not your fault being the biggest and the strongest. You don't even exercise."/>
    <spell name="Specializing in Groups"/>
    <secondarybuff id="2" amount="3"/>
    </ability>



    Here's an edited version of your spellDB entry, same deal:



    <spell name="Different Moves" type="area" radius="1">
    <effect type="damage" crushing="1" crushingF="0.1" primaryScale="0"/> <!--Burliness-->
    <anim sprite="sprites/sfx/blastB/blastB" frames="4" framerate="80"/>
    </spell>

    <spell name="Specializing in Groups" type="self" icon="skills/warrior/armourer0_32.png" downtime="1">
    <buff useTimer="0" stacksize="1" allowstacking="0" removable="1" bad="0"
    icon="skills/warrior/armourer0_64.png" smallicon="skills/warrior/armourer0_32.png">
    <halo name="sprites/sfx/hero_glow/hero_glow" first="0" num="3" framerate="100"/>
    <targetHitEffectBuff percentage="100" name="Different Moves"/>
    <secondarybuff id="2" amount="2"/> <!--melee-->
    <secondarybuff id="7" amount="10"/> <!--block-->
    <secondarybuff id="18" amount="-2"/> <!--sight-->
    <primarybuff id="2" amount="-15"/> <!--Nimbleness-->
    <primarybuff id="4" amount="5"/> <!--Stubbornness-->
    </buff>
    <anim sprite="sprites/sfx/null" frames="2" framerate="80" centereffect="0" sfx="crushing"/>
    <description text="You use different moves when you're fighting half a dozen people than when you only have to be worried about one."/>
    </spell>



    I probably didn't catch it all, but that should give you a good idea.

    for the <crushing="1"> part, maybe you intend it to do no base damage. If that's the case I would try <crushing="0"> instead.
     
    OmniaNigrum likes this.
  4. Actually the Crushing=1 isn't necessary (at least, I'm preeetty sure it's not. You might need crushing="0" though????), and may not be desired.

    But yeah bad paths would definitely create the errors you're seeing.
     
    OmniaNigrum likes this.
  5. Verendus

    Verendus Member

    Thanks! Good catches. Unfortunately, they didn't work. (that may come off as sarcastic? unintentional. thanks are wholehearted.) Will pursue further. As for why the asset paths were so messed up: I was under the impression that any assets used, even if they appeared in the vanilla files, had to be stuck in the mod folders. So I copied them all into the mod folders and pathed to those. Judging from the fact that

    <ability name="You Are the Brute Squad" icon="skills/armourer0_64.png" skill="241" level="3">

    caused the icon to appear just fine in the skill tome, I had assumed it worked.
     
    OmniaNigrum likes this.
  6. Yeah if you have your own assets it'll use those first. Although there's not much reason to have your own file if you're using an entirely unmoddified version of core files.

    Get the mod validator though, it'll tell you if there's missing images being referred to, which generally makes finding your errors a LOT easier.
     
    OmniaNigrum likes this.
  7. Verendus

    Verendus Member

    Ah. The curse of owning a mac.
     
    OmniaNigrum likes this.
  8. Syphonix

    Syphonix Member

    Maybe we are missing something in the translation here. If you're willing to upload your spellDB.xml file, I could look at it.
     
    OmniaNigrum likes this.
  9. I'm pretty sure I saw a validator for mac? Maybe there isn't yet :(
     
    OmniaNigrum likes this.
  10. Verendus

    Verendus Member

    By all means, go for it! Thanks in advance.
     

    Attached Files:

    OmniaNigrum likes this.
  11. Okay you're Prepare To Die description tag isn't closed, different moves has /> after the spell definition, and Rotten Miracle's buff tag doesn't close the quote.

    Code:
    C:\Users\[...]\Documents\Storybook Story\mod\spellDB.xml
    5 error(s) found.
    Line 51, Position: 2 -- The required attribute 'smallIcon' is missing.
     
    Line 63, Position: 2 -- The required attribute 'icon' is missing.
     
    Line 85, Position: 2 -- The required attribute 'smallIcon' is missing.
     
    Line 93, Position: 2 -- The required attribute 'smallIcon' is missing.
     
    Line 95, Position: 156 -- 'aetherial' is not a valid attribute for this element.
     
     
     
    C:\Users\[...]\Documents\Storybook Story\mod\spellDB.xml
    8 error(s) found.
    Line 49, Position: 62 -- The file, 'skills//spell_fire9_32.png', was not found.
     
    Line 18, Position: 40 -- The file, 'skills/warior/armourer0_32.png', was not found.
     
    Line 52, Position: 7 -- The animation, 'sprites/burnD/burnD', was not found.
     
    Line 27, Position: 7 -- The animation sprite of a non-missile spell cannot be a PNG.
     
    Line 50, Position: 7 -- The animation, 'sprites/combust_hit/combust_hit', was not found.
     
    Line 71, Position: 7 -- The animation, 'sprites/null', was not found.
     
    Line 110, Position: 7 -- The animation, 'sprites/impact_divine/impact_divine', was not found.
     
    Line 113, Position: 24 -- The spell, 'Power of True Love', was not found.
    
    Is the output of the mod validator after the syntax errors are fixed.

    A few of those are pretty simple: aetherial should be aethereal, and I think some of those are typos.

    Your sprites still need to point to sfx though because you still have that in your folder. (or move them OUT of the sfx folder in sprites). And you need both large and small icons defined for buffs.
     
    OmniaNigrum likes this.
  12. Syphonix

    Syphonix Member

    EDIT: Ok I'm way late on this. See above.

    Ok so I went through the files. A Princess Bride mod eh? Brilliant, sir. I edited out any errors I saw. I ran into a problem initially, seeing as you are on a Mac and I am not. The file was quite jumbled. I would upload the version I have, but I suspect you would run in to the same problem I did. So, I'll just copy/paste the file here, and you can just copy/paste to the file to avoid that whole mess, if you wish. Or you can just read over it.

    skillDB.xml:



    Code:
    <skillDB>
     
    <skill name="Storybook Hero" id="241" type="rogue" description="When I was your age, television was called books. And this is a special book.">
        <art icon="skills/spells/pure_righteousness64.png"/>
    </skill>
     
    <ability startSkill="1" name="Storybook Hero" icon="skills/spells/pure_righteousness64.png" skill="241">
        <description text="With the power of brains, strength, steel, and true love, you vanquish your enemies and delight audiences of all ages."/>
    </ability>
     
    <ability name="As You Wish" icon="skills/stat_chr64.png" skill="241" level="0">
        <description text="You have a chance to charm enemies with your smoldering good looks... wait, this isn't a kissing book, is it?"/>
        <playerHitEffectBuff percentage="20" name="In Love"/>
    </ability>
     
    <ability name="Inconceivable!" icon="skills/rogue/skill_perception1_64.png" skill="241" level="1">
        <description text="You've worked hard to become this way. Your abilities baffle even dizzying intellects."/>
        <damagebuff existential="1"/>
        <secondarybuff id="18" amount="1"/>
        <secondarybuff id="12" amount="7"/>
    </ability>
     
    <ability name="Immunity to Iocane Powder" icon="skills/alcohol_poisoning64.png" skill="241" level="2">
        <description text="Odorless, tasteless, dissolves instantly in liquid, and is among the more deadly poisons known to man. Of course it comes from
     
    Australia."/>
        <resistbuff putrefying="2" asphyxiative="2" toxic="2"/>
    </ability>
     
    <ability name="You Are the Brute Squad" icon="skills/warrior/armourer0_64.png" skill="241" level="3">
        <description text="It's not your fault being the biggest and the strongest. You don't even exercise."/>
        <spell name="Specializing in Groups"/>
        <secondarybuff id="2" amount="3"/>
    </ability>
     
    <ability name="Dread Pirate Roberts" icon="skills/spell_fire9_64.png" skill="241" level="4">
        <description text="If only you had a holocaust cloak."/>
        <spell name="Come for Your Souls!"/>
    </ability>
     
    <ability name="There's Not a Lot of Money in Revenge" icon="skills/skill_avenge_your_father.png" skill="241" level="5">
        <description text="You killed my father. Prepare to die."/>
        <secondarybuff id="4" amount="5"/>
        <secondarybuff id="9" amount="5"/>
        <spell name="Prepare to Die"/>
    </ability>
     
    <ability name="Only Mostly Dead" icon="skills/spell_water5_64.png" skill="241" level="6">
        <description text="Mostly dead is still partly alive."/>
        <secondarybuff id="0" amount="5"/>
        <spell name="Miracle Pill"/>
    </ability>
     
    </skillDB>

    spellDB.xml:


    Code:
    <spellDB>
     
    <!--As You Wish-->
     
    <spell name="In Love" type="target">
        <effect type="charm" turns="2"/>
    </spell>
     
    <!--Brute Squad-->
     
    <spell name="Different Moves" type="area" radius="1">
        <effect type="damage" crushing="1" crushingF="0.1" primaryScale="0"/> <!--Burliness-->
        <anim sprite="sprites/sfx/blastB/blastB" frames="4" framerate="80"/>
    </spell>
     
    <spell name="Specializing in Groups" type="self" icon="skills/warrior/armourer0_32.png" downtime="1">
        <anim sprite="sprites/sfx/null" frames="2" framerate="80" centereffect="0" sfx="crushing"/>
        <description text="You use different moves when you're fighting half a dozen people than when you only have to be worried about one."/>
        <buff useTimer="0" stacksize="1" allowstacking="0" removable="1" bad="0" icon="skills/warrior/armourer0_64.png"
     
    smallicon="skills/warior/armourer0_32.png">
        <halo name="sprites/sfx/hero_glow/hero_glow" first="0" num="3" framerate="100"/>
        <targetHitEffectBuff percentage="100" name="Different Moves"/>
        <secondarybuff id="2" amount="2"/> <!--melee-->
        <secondarybuff id="7" amount="10"/> <!--block-->
        <secondarybuff id="18" amount="-2"/> <!--sight-->
        <primarybuff id="2" amount="-15"/> <!--Nimbleness-->
        <primarybuff id="4" amount="5"/> <!--Stubbornness-->
        </buff>
    </spell>
     
    <!--Dread Pirate-->
     
    <spell name="Pirate Damage" type="self">
        <effect type="damage" conflagratory="10" affectsCaster="1"/>
    </spell>
     
    <spell name="Firey Pirate" type="self">
        <effect type="trigger" spell="Pirate Damage" requirebuffontrigger="1" requirebuffontriggername="Come for Your Souls!"/>
    </spell>
     
    <spell name="Memory Jog" type="area" radius="12">
        <effect type="fear" turns="6" amount="2"/>
    </spell>
     
    <spell name="Run Away" type="self">
        <effect type="trigger" spell="Memory Jog" requirebuffontrigger="1" requirebuffontriggername="Come for Your Souls!"/>
    </spell>
     
    <spell name="Come for Your Souls!" downtime="20" type="self" icon="skills/wizard/spell_fire9_32.png">
        <anim sprite="sprites/sfx/combust_hit/combust_hit" frames="9" framerate="90" sfx="flame"/>
        <description text="Set yourself on fire to frighten away enemies!"/>
        <buff useTimer="1" time="10" stacksize="1" allowstacking="0" removable="1" bad="0" icon="skills/wizard/spell_fire9_64.png"
     
    smallicon="skills/wizard/spell_fire9_64.png">
        <halo name="sprites/sfx/burnD/burnD" first="0" num="5" framerate="100"/>
        <effect type="dot" amount="10" spell="Run Away"/>
        <effect type="dot" amount="10" spell="Firey Pirate"/>
        <damagebuff conflagratory="3"/>
        </buff>
    </spell>
     
    <!--Prepare to Die-->
     
    <spell name="Stop Saying That!" type="target">
        <buff useTimer="1" time="20" allowstacking="0" stacksize="1" icon="skills/spells/sight64.png" smallicon="skills/spells/sight32.png">
        <secondarybuff id="6" amount="-40"/> <!--dodge-->
        <secondarybuff id="7" amount="-40"/> <!--block-->
        <secondarybuff id="8" amount="-40"/> <!--counter-->
        </buff>
    </spell>
     
    <spell name="Prepare to Die" downtime="40" type="target" icon="skills/revenge_32.png">
        <anim sprite="sprites/sfx/null" frames="2" framerate="80" centerEffect="0" sfx="slashing"/>
        <effect type="trigger" spell="Stop Saying That!"/>
        <effect type="suction"/>
        <description text="The next time you face him, you will not fail."/>
    </spell>
     
    <!--Mostly Dead-->
     
    <spell name="Healing Love" type="self">
        <effect type="heal" amount="6"/>
    </spell>
     
    <spell name="Miracle" type="self">
        <description text="Takes fifteen minutes for full potency. You probably shouldn't go swimming for at least an hour."/>
        <buff useTimer="1" time="15" stacksize="1" allowstacking="0" removable="0" bad="0" icon="skills/wizard/spell_white7_64.png"
     
    smallicon="skills/wizard/spell_white7_32.png">
        <effect type="dot" spell="Healing Love" amount="15"/>
        <secondarybuff id="13" amount="10"/> <!--hp regen-->
        <secondarybuff id="0" amount="6"/> <!--hp-->
        </buff>
    </spell>
     
    <spell name="The Power of True Love" type="self">
        <description text="Perhaps you have the strength after all…"/>
        <buff useTimer="1" time="3" stacksize="1" allowstacking="0" removable="0" bad="0" icon="skills/wizard/spell_white4_64.png"
     
    smallicon="skills/wizard/spell_white4_64.png">
        <secondarybuff id="10" amount="5"/> <!--armor-->
        <resistbuff piercing="5" hyperborean="5" conflagratory="5" voltaic="5" toxic="5" righteous="5" necromantic="5" acidic="5" putrefying="5"
     
    transmutative="5" aetherial="5" asphyxiative="5" existential="5"/>
        </buff>
    </spell>
     
    <spell name="Rotten Miracle" type="self">
        <description text="You rush a miracle man, you get a rotten miracle."/>
        <buff useTimer="1" time="15" stacksize="1" allowstacking="0" removable="0" bad="1" icon="skills/wizard/spell_water5_64.png"
     
    smallicon="skills/wizard/spell_water5_32.png">
        <primarybuff id="0" amount="-10"/> <!--Burliness-->
        <primarybuff id="2" amount="-10"/> <!--Nimbleness-->
        <primarybuff id="3" amount="-10"/> <!--Caddishness-->
        </buff>
    </spell>
     
    <spell name="Miracle Pill" downtime="200" type="self" icon="skills/spell_white7_32.png">
        <anim sprite="sprites/sfx/impact_divine/impact_divine" frames="5" framerate="50" centereffect="1" sfx="eat"/>
        <effect type="uncurse"/>
        <effect type="trigger" spell="Miracle"/>
        <effect type="trigger" spell="Power of True Love"/>
        <effect type="trigger" spell="Rotten Miracle" amount="1" percent="5"/>
        <description text="The chocolate coating makes it go down easier."/>
    </spell>
     
    </spellDB>
    Some common mistakes. You should have seen my first mess. My words of advice are to very carefully watch your lines. The format is very very picky, and a single "/" out of place is enough to shut down every spell under it.

    Also your fear effect from dread pirate didn't have a 'turns="X"' tag attached to it. It's important to status effects.
     
    OmniaNigrum likes this.
  13. Verendus

    Verendus Member

    Hey! It worked! Awesome! I went the read over route, teach a man to fish and all that. Again, huge thanks, to both. Now it's crashing, instead of simply refusing to appear. Which is actually much better, because I can actually identify where it goes wrong.

    Also: if turns="X" tells the game how many turns to induce fear, what does amount="X" do?
     
    OmniaNigrum likes this.
  14. Syphonix

    Syphonix Member

    Scratch that about fear, you're right, it should be amount="X". It's paralyze that uses turns="x" to determine how long it lasts. I get that confused some times.
     
    OmniaNigrum likes this.
  15. Essence

    Essence Will Mod for Digglebucks

    +1 for a Princess Bride mod for DoD. That's super fly.
     
    OmniaNigrum and Warthog2k like this.