FORUM ARCHIVED

So I got inspired enough to create a mod in about an hour and it crashes

Discussion in 'Modding' started by Aegho, May 8, 2012.

  1. Aegho

    Aegho Member

    Without any skills(and no spelldb) it loads. Then I added the first one, and its matching spelldb, and it crashes again.

    Code:
    <skillDB>
     
    <skill name="Circus Freak" id="412" type="rogue" description="Unlike some, you ran away from the circus, instead of to it.">
      <art icon="skills/skill_deadshot.png"/>
      <loadout type="armour" subtype="Plastic Shoes" always="1" />
      <loadout type="armour" subtype="Pleather Armour" always="1" />
      </skill>
     
    <ability name="Circus Freak" icon="skills/skill_deadshot.png" skill="412" startSkill="1">
      <description text="Unlike some, you ran away from the circus, instead of to it."/>
      </ability>
     
    <ability name="Person Vault" icon="skills/spells/spell_air4_64.png" skill="412" level="0">
      <description text="It's like polevaulting, but with people. You give them a good whack too for good measure."/>
      <secondarybuff id="6" amount="4"/> <!-- dodge -->
      <spell name="Whack"/>
      </ability>
     
    </skillDB>
    Code:
    <spellDB>
     
    <!-- Called upon effects -->
     
    <spell name="Up and Over" type="template" templateID="31" anchored="1" icon="skills/rogue/skill_lockpicking2_32.png" >
      <description text="Go over their heads."/>
      <effect type="teleport" />
      </spell>
     
    <!-- Activated Abilities -->
     
    <spell name="Whack" type="template" templateID="30" anchored="1" attack="1" downtime="4" icon="skills/wizard/spell_air4_32.png" wand="0">
      <effect type="trigger" spell="Up and Over" after="1" />
      <description text="Hit someone while you vault them." />
      </spell>
     
    </spellDB>
    Btw not the first time I've had crash issues with template types...
     
  2. NaiDriftlin

    NaiDriftlin Member

    I think we may have our culprit, then. Lets take a look.


    After="1", maybe?

    Change "After" to "amount="1""

    Then try again.
     
  3. Aegho

    Aegho Member

    Tried that, and tried with it simply edited out. Crashes in both cases. I'm suspecting the problem is in the <spell line.
     
  4. NaiDriftlin

    NaiDriftlin Member


    Maybe. Strip the spell addition to the skill in SkillDB, then move the spellDB again and see if it still crashes. If it doesn't you can narrow it down to the spell. If it does, it means its the skill.
     
  5. Null

    Null Will Mod for Digglebucks

    Add an anim. You can use sprites/sfx/null for none. In general always include animations with templates or stuff breaks miserably.
     
    FaxCelestis likes this.
  6. Aegho

    Aegho Member

    Removing the spell, and the spell addition in skillDB, removes the crash. So the problem is in spellDB.
     
  7. NaiDriftlin

    NaiDriftlin Member

    Certainly wouldn't hurt.

    I wonder how that skill would work, though, with a teleport targeting a template? Is the teleport and template smart enough to not allow him to occupy a space with another creature?
     
  8. Aegho

    Aegho Member

    That helped... but there's still something wrong. It avoided the crash as long as the skill didn't call upon the spell, but when I edited that in again it crashed again.
     
  9. NaiDriftlin

    NaiDriftlin Member

    Did you get an error message that time, or still he same generic crash?
     
  10. Aegho

    Aegho Member

    Nope, and it shouldn't matter, I've been teleported on top of creatures before without crashing the game(by way of teleporting levers), although if you KILL the monster you're on top of, by using ranged attacks, the game crashes.
     
  11. Aegho

    Aegho Member

    Same generic crash.
     
  12. Aegho

    Aegho Member

    Another failed experiment

    Code:
    <skillDB>
     
    <skill name="Circus Freak" id="412" type="rogue" description="Unlike some, you ran away from the circus, instead of to it.">
      <art icon="skills/skill_deadshot.png"/>
      <loadout type="armour" subtype="Plastic Shoes" always="1" />
      <loadout type="armour" subtype="Pleather Armour" always="1" />
      </skill>
     
    <ability name="Circus Freak" icon="skills/skill_deadshot.png" skill="412" startSkill="1">
      <description text="Unlike some, you ran away from the circus, instead of to it."/>
      </ability>
     
    <ability name="Person Vault" icon="skills/spells/spell_air4_64.png" skill="412" level="0">
      <description text="It's like polevaulting, but with people. You give them a good whack too for good measure."/>
      <secondarybuff id="6" amount="4"/> <!-- dodge -->
      <spell name="Whack and Vault"/>
      </ability>
     
    </skillDB>
    Code:
    <spellDB>
     
    <spell name="Up and Over" type="template" templateID="31" anchored="1" icon="skills/rogue/skill_lockpicking2_32.png" >
        <anim sprite="sprites/sfx/psionic_generic/psionic_generic" frames="5" framerate="60" centerEffect="0" sfx="batty_die" />
      <description text="Go over their heads."/>
      <effect type="teleport" />
      </spell>
     
    <spell name="Whack and Vault" type="adjacent" attack="1" downtime="4" icon="skills/wizard/spell_air4_32.png" >
        <anim sprite="sprites/sfx/psionic_generic/psionic_generic" frames="5" framerate="60" centerEffect="0" sfx="batty_die" />
      <effect type="trigger" spell="Up and Over"  />
      <description text="Hit someone while you vault them." />
      </spell>
     
    </spellDB>
    I stole the animation/soundeffect line from the moonwalker mod, since it's doing something very similar(minus the attack).

    Same crash.
     
  13. Aegho

    Aegho Member

    Tried some alternative solutions with no luck. Heading to bed, hoping someone can point me in the right direction by morning.
     
  14. Aegho

    Aegho Member

    Well, couldn't get to sleep quite yet. Anyway there's something very strange going on here, because this still crashes:

    Code:
    <skillDB>
     
    <skill name="Circus Freak" id="412" type="rogue" description="Unlike some, you ran away from
     
    the circus, instead of to it.">
      <art icon="skills/skill_deadshot.png"/>
      <loadout type="armour" subtype="Plastic Shoes" always="1" />
      <loadout type="armour" subtype="Pleather Armour" always="1" />
      </skill>
     
    <ability name="Circus Freak" icon="skills/skill_deadshot.png" skill="412" startSkill="1">
      <description text="Unlike some, you ran away from the circus, instead of to it."/>
      </ability>
     
    <ability name="Person Vault" icon="skills/spells/spell_air4_64.png" skill="412" level="0">
      <spell name="Whack and Vault"/>
      <description text="It's like polevaulting, but with people. You give them a good whack too
     
    for good measure."/>
      <secondarybuff id="6" amount="4"/> <!-- dodge -->
      </ability>
     
    </skillDB>
    Code:
    <spellDB>
     
    <spell name="Whack and Vault" type="targetfloor" downtime="4" icon="skills/bees32.png" >
        <anim sprite="sprites/sfx/null" />
      <effect type="teleport" />
      <description text="Hit someone while you vault them." />
      </spell>
     
    </spellDB>
    EDIT: Changing all icons in skillDB to skills/skill_placeholder.png made it get past the crash, but the skill crashes on use.
     
  15. Aegho

    Aegho Member

    Well I found the problem, using any icons other than skills/skill_placeholder.png and skills/skill_placeholder_small.png seem to crash it. In fact the whole big original file(after the obvious bugs were also fixed) works if all icons are placeholder icons. And the person vault skill does exactly what I wanted it to.
     
  16. NaiDriftlin

    NaiDriftlin Member

    Awesome.

    You were running out of things to check, so you were bound to find it eventually. :p
     
  17. Essence

    Essence Will Mod for Digglebucks

    Sweet. Now go through and very carefully check the spelling and underscores and capitalization on every icon name you were using, and put them back. Do the top half, test. If it works, do 50% of what remains and test. If not, delete 50% of what's there and test. So forth until you figure out where the problem is. :)