FORUM ARCHIVED

Need help coding spells for bard class

Discussion in 'Modding' started by Bohandas, Aug 25, 2012.

  1. Bohandas

    Bohandas Member

    Ok can somebody tell me how I would go about making spells that do the following things:

    1.) I need a spell that turns a food item into a random different food item for the "no brown m&ms" ability.

    2.) I need a spell that revives a dead monster and charms it for the class' capstone ability, "Bigger than Jesus"

    3.) I Need another spell that creates a loaf of sliced bread and a piece of lutefisk (also for "Bigger than Jesus")

    EDIT: Additional Questions

    -If an item appears multiple times on the list for "spawnitemfromlist" will that make it that much more likely to be spawned, or will the extra occurrences simply be ignored (or will they cause errors like a raw duplication in Dwarf Fortress)?
     
  2. Vitellozzo

    Vitellozzo Member

    I cannot help you directly, but I can point similar spells to you so you can see them yourself.
    1) There is a similar spell for the third level of Fungal Arts: Moldsmith. This spell transmute a mushroom into another one (the same or a different one, it's random);
    2) There is the rewrited Zombyfication spell in the Essence's Core Change, which revives a corpse directly instead of transforming it into a Zomby, as for the vanilla spell;
    3) I don't remember if there still are spells which directly spawn items into your backpack (like Spores and Lockpicks did, once before this last patch and olders), but there is a spell from the Arcanist skill tree: Cornucopia, which spawn on the ground a serie of beverages and sweets.
     
  3. The fungal arts one I'm pretty sure is a specific randomize mushroom thing. Though you could approximate the effect with a spawnitemfromlist list.

    2) You can use the "resurrection" effect I think (see eg core skill "Corpse Reviver") and then just target a charm on the same square. Uh, it might honestly be as simple as putting the two in the same spell?

    3) Use the "spawn" effect (or "spawnitematlocation" if you want them to appear on the ground) Also yes there still are spells that do that, see: Fungal Arts. :p
     
  4. Vitellozzo

    Vitellozzo Member

    Right, the fungal bloom is just a spawnitemfromlist like others, so there's vanilla also for this.
    You know, Bohandas, you can just create a list using the <option name="itemname"/>, so basically you can spawn every kind of specific item.
    For the moldsmith effect, you are right also for this, tentacled one. Maybe there is an itemname="randomfood"?
    For the resurrection, maybe this is the easiest road. I didn't see the Essence rebalance, and now the files aren't online anymore. Btw, the corpse reviver is in the xml for no reason, right? Or, maybe, just for the mobs to cast, but i cannot see any vampire reviving deads.
     
  5. Ruigi

    Ruigi Will Mod for Digglebucks

    2 and 3 are easy to do, I don't think it's possible to do 1 with mods.
     
  6. If you use a 'spawnitemfromlist' thing you can get pretty close though I think?
     
  7. Ruigi

    Ruigi Will Mod for Digglebucks

    you can't create a spell that targets a specific item, So it's not really possible. What you could do is use spawnitemfromlist to give you a random food item.
     
  8. OmniaNigrum

    OmniaNigrum Member

    How does "It Belongs in a Museum" work then? I have not used it in ages, but I could swear it targets a single, specific item and cannot work any other way.
     
  9. Kazeto

    Kazeto Member

    It uses an effect specifically tailored for this one skill. And the whole effect is hard-coded, because "because".
     
    OmniNegro likes this.
  10. I'm pretty sure you can make spells that target an item? Like maybe there's some complication I don't know of, but there's an "item" spell type.

    Like eg here:
    Code:
     
      <spell name="Gem Transmutation" type="item" downtime="20" consumeItem="1" consumeItemType="gem"  icon="skills/rogue/alchemy2_32.png" >
      <description text="Convert a gem into another more different gem."/>
      <effect type="spawn" itemname="randomgem"/>
      <anim sprite="sprites/sfx/glintA/glintA" frames="5" framerate="60" sfx="ping" />
      </spell>
     
    <spell name="Mushroom Transmutation" type="item" downtime="24" consumeItem="1" consumeItemType="mushroom" icon="skills/rogue/fungus2_32.png" >
      <description text="Convert mushrooms into other mushrooms."/>
      <effect type="spawn" itemname="randommushroom"/>
      <anim sprite="sprites/sfx/glintA/glintA" frames="5" framerate="60" sfx="ping" />
      </spell>
    
    I'd assume you could change the item type to "food" and the spawn into an spawnitemfromlist thing.
     
  11. Ruigi

    Ruigi Will Mod for Digglebucks

    that's all hardcoded.

    It targets only gems and selects a gem class item from the list of gems that arent flagged as special.
    Same for mushrooms.
    there is no analagous food effect.
     
  12. Bohandas

    Bohandas Member

    OK, I figured out how to do #3. I based it on the Make Puffballs spell. I still don't know what visual effect, if any, to accompany it with (hence the question marks on the last line):

    <spell name="Loaves and Fishes" type="self" downtime="32" icon="?">
    <effect type="spawn" itemname="Lutefisk" amount="1" />
    <effect type="spawn" itemname="Sliced Bread" amount="1" />
    <anim sprite="?" frames="?" framerate="?" centerEffect="?"/>
    </spell>

    Can someone suggest an animation? And could someone tell me if 32 turns seems like a reasonable cooldown?

    EDIT: I also still don't have an icon for it
     
  13. Bohandas

    Bohandas Member

    Additional Question:

    If an item appears multiple times on the list for "spawnitemfromlist" will that make it that much more likely to be spawned, or will the extra occurrences simply be ignored (or will they cause errors like a raw duplication in Dwarf Fortress)?
     
  14. Raw duplication in DF is what happens when you have duplicate item definitions, since spawnitemfromlist isn't defining the items to be spawned you're pretty safe there.

    Anyway yeah you can have multiple copies of an entry (and in fact, need to if you want your outputs to be weighted at all)
     
  15. Ruigi

    Ruigi Will Mod for Digglebucks

    the first thing you said