FORUM ARCHIVED

TargetKillBuff with multiple Taxa's Problem

Discussion in 'Modding' started by SubatomicBroton, Jun 24, 2012.

  1. Hey everyone, I've run into an issue that I would really appreciate some advice on.

    A quick run down of what I want to do:

    I have an idea for a skill tree that involves a chance of harvesting various consumable items from monsters with different taxa's. The overall plan is to have the number of types you can harvest increase with skill levels while the potency of the items increases as well. I also want to implement some kind of withdrawal system to encourage continually using them (if you're anything like me, you hold onto everything "for when you need it"). There's a lot here that I'm sure I'll struggle with, but I'd like to take it a step at a time.

    So, problem #1:

    My current idea is to have an ability with a targetKillBuff spell that will spawn an item, similar to plunder and butchery. However, I was hoping to have a different effect go off depending on the taxa of the killed target. According to the wikis spell effects page, any effect can have a taxa, but it seems to be ignored. A simple example of the spell being called is...

    Code:
    <spell name="Test Spell" type="targetfloor"  icon="sprites/skills/test32.png">
        <effect affectsCorpses="0" type="spawnitemfromlist" taxa="Animal">
            <option name="Offal"/>
        </effect>
        <effect affectsCorpses="0" type="spawnitemfromlist" taxa="Other">
            <option name="Steak"/>
        </effect>
        <description text="Test variable taxa based item spawning"/>
    </spell>
    No matter what is killed, both of these items drop. I tried changing type from "targetfloor" to "target", but this didn't seem to have any impact at all. I'm sure I'm fundamentally misunderstanding something here (still quite new to this, and as I'm sure you're aware, documentation is fairly limited at this time).

    As a side note, I was able to use two level 0 abilities to sort of get the desired effect (as mentioned in the sneaky tricks thread), but in doing that I would have to start maintaining many additional spells as well. Ideally, I want to use just one spell that will behave differently depending on skill level. This way I can have consistent pop-up text as well.

    If any of you can think of anything that will help make my approach workable, or even if you think I'm going about this all wrong, your input would be highly valued!

    Thank you!
     
    OmniNegro likes this.
  2. Kazeto

    Kazeto Member

    Change it so that this spell doesn't spawn items, but triggers another two spells that spawn appropriate items. Taxa will work then (when you use it as a parameter for the triggering effect).
    So, to sum it up:
    1. "Test Spell" triggers "Test Spell A" for animal taxa and "Test Spell B" for other taxa.
    2. "Test Spell A" spawns offal.
    3. "Test Spell B" spawns steak.
    If you want help with the one about multiple effect, I suggest elaborating on the outline of your skill tree - that will make it easier to provide you with more detailed answer.
     
    OmniNegro likes this.
  3. Great, thanks so much for the quick response!

    The next thing I was going to be looking at is increasing the number of types that you can harvest, ideally out of the same spell. I was thinking requirebuffontrigger is probably the way to do this.

    For example, at level one you can harvest "animals" and "other". Starting at, say, level 3, you can now harvest "constructs" for another kind of consumable. Do you think some kind of permanent buff that you acquire at level 3 would be the best way to control this? I also want the lower level consumables to become more potent as you level the skill, and I figure the same permanent buff could facilitate this.

    Thanks again for the help.
     
    OmniNegro likes this.
  4. FaxCelestis

    FaxCelestis Will Mod for Digglebucks

    You can put <targetKillBuff /> as a subordinate tag of an <ability /> in skillDB.xml.
     
    OmniNegro and Kazeto like this.