FORUM ARCHIVED

Need help on some Liquid Metal Bugs

Discussion in 'Modding' started by Arron Syaoran, Jul 21, 2014.

  1. Arron Syaoran

    Arron Syaoran Member

    First off: The Code:
    Code:
    <spell name="Steel Skin" type="self" icon="skills/skill_placeholder_small.png">
        <buff useTimer="1" time="22" stacksize="1" allowstacking="0" icon="skills/droid_armour64.png" smallicon="skills/droid_armour32.png">
        <secondarybuff id="10" amount="2"/>
        <secondarybuff id="7" amount="6"/>
        <resistbuff piercing="1"/>
        </buff>
        <description text="Your Skin is made of Steel. That's what happens when your body becomes completely made out of Liquid Metal."/>
        </spell>
     
    <spell name="Spiked Punch" type="adjacent" attack="1" downtime="8" icon="skills/monstrous_rage32.png">
        <effect type="damage" piercing="5" />
        <effect type="trigger" spell="Spiky Fists" amount="0" />
        <description text="You turn your fists into spikes, and you punch enemies while hitting them. And yes, the Diggle Juice comes spiked. No Diggle Juice for you though."/>
        </spell>
     
    <spell name="Spiky Fists" type="self" icon="skills/placeholder32.png">
        <buff useTimer="1" time="20" stacksize="3" allowstacking="1" icon="skills/placeholder64.png" smallicon="skills/placeholder32.png">
        <secondarybuff id="8" amount="4"/>
        <damagebuff piercing="1"/>
        </buff>
        <description text="Your Fists are now very Sharp and Spiky. Don't poke your eyes out."/>
        </spell>
     
    <spell name="Quicksilver Invisibility" type="self" downtime="75" icon="skills/droid_stealth_small.png">
        <buff useTimer="1" time="15" stacksize="1" allowstacking="0" icon="skills/droid_stealth.png" smallicon="skills/droid_stealth_small.png">
        <invisible amount="1"/>
        <sightbuff amount="-1"/>
        </buff>
        <description text="You secrete a light-bending substance called quicksilver from deep inside your brain. This may or may not be the same quicksilver known as mercury. Either way, let's pretend both quicksilvers are metal and let's make you invisible."/>
        </spell>
     
        <!-- Give this an eating sound effect. This shouldn't heal without consumption of reagents first. -->
    <spell name="Ingot Eater" type="item" consumeItem="1" consumeItemType="reagent" downtime="32" icon="skills/diglet32.png">
        <!-- It Scales Correctly off of Block. Remove this line when Android Insurrection is complete. -->
        <effect type="heal" amount="24" amountF=".35" secondaryScale="7"/>
        <description text="You can eat metal reagents to restore health. For some reason, you can still eat powders, mechanisms, ores and plastic, but they don't taste as good. Those Gorn(or was it Gorogon?) people like to eat rocks, and thats what you should do too."/>
        </spell>
     
    <spell name="Spiky Body Explosion" type="self" downtime="17" icon="skills/placeholder32.png">
        <effect type="trigger" percent="100" spell="Spiky Body Explosion Effect" />
        <effect type="trigger" percent="100" spell="Spawn Spike Grenade" />
        <description text="You explode into several spike shards, only to reform as whole once your liquid metal recombines. Damage scales to counter chance and smithing. Comes with a throwable leftover."/>
        </spell>
     
    <spell name="Spiky Body Explosion Effect" type="template" templateID="13" anchored="1" downtime="17" icon="skills/placeholder32.png">
        <effect type="damage" piercing="6" piercingF="5" secondaryScale="19"/>
        <effect type="damage" piercingF=".55" secondaryScale="8"/>
        <anim sprite="sprites/combust_hit/combust_hit" frames="9" framerate="80" centerEffect="1" sfx="blast"/>
        </spell>
    
    <spell name="Spawn Spike Grenade" type="self">
        <effect type="spawnitemfromlist">
            <option name="Frag Bomb"/>
            </effect>
        </spell>
     
    <spell name="Spiked Fortress" type="self" downtime="96" icon="skills/droid_armour32.png">
        <buff useTimer="1" time="38" destroyonmove="1" stacksize="1" allowstacking="0" icon="skills/droid_armour64.png" smallicon="skills/droid_armour32.png">
        <damagebuff piercing="7"/>
        <secondarybuff id="10" amount="6"/>
        <primarybuff id="2" amount="-5"/>
        <secondarybuff id="8" amount="20"/>
        <secondarybuff id="7" amount="25"/>
        <secondarybuff id="13" amount="4"/>
        </buff>
        <description text="You can stand still and turn your body into a deadly, impenetrable spike fortress. You have to disassemble this fortress in order to walk, making this defense only usable if you stand still."/>
        </spell>
     
    <spell name="Architectural Erosion" type="template" templateID="830" anchored="1" downtime="16" icon="skills/monstrous_rage32.png">
        <effect type="dig" regengfx="1"/>
        <effect type="trigger" percent="100" spell="Recently Superheated"/>
        <description text="You can turn yourself into liquid, heat yourself up, and erode at the walls by seeping through the cracks. Doing so damages you with heat, makes you effectively blind, and makes you weak againste heat, cold and electricity for a short time."/>
        </spell>
     
    <spell name="Recently Superheated" type="self" icon="skills/placeholder32.png">
        <effect type="damage" conflagratory="20"/>
        <buff useTimer="1" time="16" stacksize="1" allowstacking="0" icon="skills/placeholder64.png" smallicon="skills/placeholder32.png" bad="1">
        <resistbuff voltaic="-3"/>
        <resistbuff conflagratory="-3"/>
        <resistbuff hyperborean="-3"/>
        <secondarybuff id="18" amount="-2"/>
        <secondarybuff id="13" amount="7"/>
        </buff>
        <description text="After melting your body for erosive digging, your eyesight and resistances have suffered until your body cools down."/>
        </spell>
    
    Second, don't worry about the fact that these spells don't have icons.
    Third, the Bugs and the intent:
    1. Spiked Punch doesn't deal the Extra 5 Piercing Damage it's supposed to.
    2. Recently Superheated doesn't deal Conflagratory Damage to the Player.
    3a. Blocking(triggering Steel Skin) while Spiked Fortress is active causes Steel Skin to overwrite Spiked Fortress with Spiked Fortress's Duration sometimes.
    3b. Blocking(triggering Steel Skin) while Spiked Fortress is active causes Spiked Fortress to overwrite Steel Skin with Steel Skin's Duration sometimes.
    3c. Basically Steel Skin and Spiked Fortress Buffs overwrite each other, which is not supposed to happen. The 2 buffs are supposed to work side by side in parallel.
    4. Iron Eater doesn't consume anything at all, not even Reagents/Ingots.
    5. Iron Eater triggers it's healing effect on any item, even when nothing is consumed. It's not supposed to heal if it fails to consume the item; it should only heal if it successfully consumes an ingot.
    6. Spell Descriptions in the Skill Bar use the same description as the Skill Tree Menu, leaving the Spell's Description unused.(This might be intended by Gaslamp)

    Liquid Metal is a new Warrior Skill for my Android Rogue Mod. I've already fixed a few bugs(There was once this bug where I could cast Spiky Body Explosion and Architectural Erosion from afar, which was fixed by adding anchored="1").

    Ingot/Iron Eater is supposed to consume Ingots to trigger a spell that restores health that scales on block chance.

    Liquid Metal(Warrior):

    Level 1 - Steel Skin: Gives +3 Block Passive, +1 AA Passive and -2 Dodge Passive. Gives a move called Steel Skin that gives +2 AA, +6 Block and +1 Pierce resist for 22 turns whenever you block.

    Level 2 - Spiked Punch: Attack for +5 Piercing on top of Melee Damage, and casts Spiky, which gives +4 counter and +1 Piercing damage for 20 turns. Stacks up to 3 times. 8 Turn Cooldown.

    Level 3 - Quicksilver Invisibility: Gives +6 Sneakiness Passive, + 2 Trap Sight Radius Passive and -1 Eye Sight Radius Passive. Makes you invisible for 15 turns. 75 turn cooldown.

    Level 4 - Iron Eater: Gives +1 Smithing Passive. Instantly restores 24 HP + 0.35 * Block value when you eat a Metal Ingot. 32 Turn Cooldown.

    Level 5 - Living Spike Bomb(Template 13): Gives -1 Voltaic Resistance Passive. Explodes your body into a spike bomb, dealing 6 Piercing + 5 * Smithing + 0.55 * Counter Damage to enemies around you. 17 Turn Cooldown, spawns a Frag Grenade where you stand when you use it.

    Level 6 - Spiked Fortress: When cast, gives +7 Piercing Damage, +6 AA, -5 Nimbleness, +20 Counter, +25 Block and +4 Health Regen. Lasts until you walk one space or until 38 turns run out. 96 turn cooldown.

    Level 7 - Architectural Erosion(Template 830): Dig spell that gives -3 Voltaic Resist, -3 Conflagratory Resist, -3 Hyperborean Resist, -2 Eye Sight Radius, Damages you for 20 Conflagratory and gives +7 health regen for 16 turns. 16 Turn Cooldown.

    Edit: I will move this Thread to my Android Rogue Mod thread IF RELEVANCE IS DESIRED, but most people don't usually check my mod for updates.

    Edit Again: How do I get Template Spells to Target the Wall?
     
    Last edited: Jul 22, 2014
  2. bluehinter

    bluehinter Member

    I'm pretty sure you can't make a template spell target a wall. All you can do is have an adjacentwall spell that triggers a template, if that makes any sense.

    If you're trying to make something that specifically targets walls (and only walls) x number of spaces away... I don't think it's possible given current modding restraints. At least I never could get it to work with my Squareness Gun.
     
  3. Arron Syaoran

    Arron Syaoran Member

    I fixed bugs 2 and 3 recently(by changing Steel Skin/Spiked Fortress Icons and by removing conflagratory damage and health regen from Architectural Erosion while making the resistance penalty much more devastating with longer duration)
    But the bugs I'm worried about is:
    1. Spiked Punch still won't do additional damage on top of Melee Attack.(Using a buff may not work if one-turn damagebuffs don't work)
    4. Ingot/Iron Eater doesn't consume anything.(Should consume Ingots, but not projectiles/food/traps/potions/booze/armour)
    5. Ingot/Iron Eater heals even when it fails to consume an ingot.(Should only heal if it consumes an ingot successfully)
    Bug 6. Doesn't matter as much, I just need confirmation if this description mechanic is intended or not. Alot of times I don't know whether to include a description to a spell or not, especially if it isn't a buff spell.

    Edit: About 4. and 5. - Allstaire helped me on what to do for those bugs(in my Android Rogue Mod Topic); it involved dummy buffs and foodbuff tag and stuff. Didn't quite understand how to implement what he said though. I don't think i've ever used dummy buffs before, and I certainly have never used dummy monsters either.
     
    Last edited: Jul 27, 2014
  4. Arron Syaoran

    Arron Syaoran Member

    I think I figured it out. Lucky for me, the template targets an adjacent tile as well as other tiles:
    Code:
    <spell name="Architectural Erosion" type="adjacentwall" downtime="16" icon="skills/metal_erosion32.png">
        <effect type="trigger" percent="100" spell="Wall Erosion"/>
        <effect type="trigger" percent="100" spell="Recently Superheated"/>
        <description text="You can turn yourself into liquid, heat yourself up, and erode at the walls by seeping through the cracks. Doing so makes you weak against heat, cold, electricity and acid, and makes you effectively blind."/>
        </spell>
       
    <spell name="Wall Erosion" type="template" templateID="830" anchored="1" downtime="16" icon="skills/metal_erosion32.png">
        <effect type="dig" regengfx="1"/>
        <anim sprite="sprites/digging_ray_hit/digging_ray_hit" frames="9" framerate="90" sync="1" sfx="magic" centerEffect="1"/>
        </spell>
    
    Template 830:
    .X.
    .X.
    XXX
    .$.
    X = Affected tile, $ = Player, . = Empty Space
     
  5. Alistaire

    Alistaire Member

    HTML:
    <itemDB>
        <item name='"Edible" Metal' iconFile='items/ingot_iron.png'>
            <price amount='0'/>
            <potion spell='you_just_ate_metal'/>
            <description text='Tasty'/>
        </item>
    </itemDB>
    
    <craftDB>
        <craft hidden='1'>
            <output skill='0' name='"Edible" Metal'/>
            <tool tag='smithing'/>
            <input name='Iron Ingot'/>
        </craft>
    </craftDB>
    
    <skillDB>
        <!-- (...) -->
        <ability name='Metal Eater' icon='sprites/placeholder3_64.png' skill='??' level='??' learnrecipe='"Edible" Metal' giveitem='"Edible" Metal'>
            <description text='Eat it'/>
            <consumeBuff name='you_can_digest_metal'/>
        </ability>
        <!-- (...) -->
    </skillDB>
    
    <spellDB>
        <spell name='Choke' type='self'>
            <effect type='damage' asphyxiative='2'/>
        </spell>
        <spell name='good_buff' type='self'>
            <effect type='heal' amount='24' amountF='.35' secondaryScale='7'/>
        </spell>
        <spell name='bad_buff' type='self'>
            <buff useTimer='1' time='8' self='1' allowstacking='1' bad='1' icon='skills/you_cant_digest_this_64.png' smallicon='skills/you_cant_digest_this_32.png'>
                <secondarybuff id='0' amount='-10'/>
            </buff>
            <effect type='dot' spell='Choke' amount='8'/>
            <description text="That wasn't very smart now was it"/>
        </spell>
        <spell name='its_a_set!' type='self'>
            <effect type='trigger' spell='good_buff'/>
            <effect type='removebuffbyname' name='bad_buff' amount='1'/>
        </spell>
        <spell name='you_just_ate_metal' type='self'>
            <buff useTimer='1' time='1' self='1' allowstacking='0' bad='0' icon='skills/placeholder1_64.png' smallicon='skills/placeholder1_32.png'>
            </buff>
            <description text="You're not supposed to hover over these dummy buffs, ya know?"/>
                <effect type='trigger' amount='1' affectsCorpses='0' requirebuffonNOTtrigger='1' requirebuffonNOTtriggername='good_buff' spell='bad_buff'/>
                <effect type='trigger' amount='1' affectsCorpses='0' requirebuffontrigger='1' requirebuffontriggername='you_can_digest_metal' spell='its_a_set!'/>
        </spell>
        <spell name='you_can_digest_metal' type='self'>
            <buff useTimer='1' time='1' self='1' allowstacking='0' bad='0' icon='skills/placeholder2_64.png' smallicon='skills/placeholder2_32.png'>
            </buff>
            <description text="You're not supposed to hover over these dummy buffs, ya know?"/>
                <effect type='trigger' amount='1' affectsCorpses='0' requirebuffonNOTtrigger='1' requirebuffonNOTtriggername='good_buff' spell='bad_buff'/>
                <effect type='trigger' amount='1' affectsCorpses='0' requirebuffontrigger='1' requirebuffontriggername='you_just_ate_metal' spell='its_a_set!'/>
        </spell>
    </spellDB>
    This would be the basic set up. Every dummy buff needs a unique icon, because if there's two buffs with the same icon active, at any time, the game crashes (in my experience).