FORUM ARCHIVED

A few modding questions.

Discussion in 'Modding' started by lccorp2, Feb 9, 2012.

  1. lccorp2

    lccorp2 Member

    Hey, all. As the title says, I have a few modding questions--I have a few ideas, but I'm not quite sure if they can be implemented, so I'm throwing them out here.

    First off, I'd like to create a grab bag item, which on use spawns one from a list of items, or if the player doesn't feel like risking it in case of a bad result, sell it to Brax. That's not so hard in itself, but I'm not sure what kind of item to make it. The item needs to be findable on the ground, but not amazingly common. That presents a number of problems:

    -If I make it a food item, it'll turn up in vending machines, and I don't want that. Even if it somehow didn't turn up in those, it'd still be too common for my liking.
    -If I make it a mushroom, I think it can be grown using fungal lore.
    -If I make it a throwing weapon, it'll again turn up in vending machines.
    -If I give it the special="1" flag, it won't spawn on the ground.

    I'm not sure what to do. Right now my plan is to try and make it a wand with a maximum and minimum of one charge--do you guys think that could work?

    Also, second question. Is there anywhere I can find a list of triggers which can be applied to equipment and buffs? I know that the on-melee-hit and on-player-melee-hit triggers can be called from equipment and buffs, but I'm not so sure about the others, which seem like they can only be called from skills; I know on-kill triggers don't work when put into buffs but do when on equipment (hexaxe), and I haven't tried trigger-on-dodge or trigger-on-cast yet.

    Thanks for the help in advance.
     
  2. r_b_bergstrom

    r_b_bergstrom Will Mod for Digglebucks

    You could always make it a wand set it to special="1" and craftoutput="1" (so it doesn't spawn at all) and then create a new room that automatically spawns it. Set the new room to appear no more than once per level (also accomplished with special="1", it works differently on rooms) and make it available on all floors (minLevel="0" maxLevel="14"). Experience suggests that if the room is relatively small and has doors on all 4 sides it should show up around 12 or 13 times across the 15 floors of the dungeon.

    Of course that would still only really work with a wand, as the other types would still end up in vending machines.
     
  3. lccorp2

    lccorp2 Member

    Thanks, Bergstrom! You've given me an idea for a set of special rooms.

    My second question still stands, though, and I'd like to add another one to the list: when using the "spawnitemfromlist" command, does anyone know if repeating the same item more than once will increase the odds of that item spawning when the effect is triggered? Or is there another way to rig the chances of each item coming out of the grab bag?
     
  4. r_b_bergstrom

    r_b_bergstrom Will Mod for Digglebucks

    You're welcome.

    I wish I knew of a list of triggers and which items they work on to refer you to. Have you checked the item guide that Aquaman was putting together? Off the top of my head I can't recall if it had such a list or not, but you might check there.

    The handful of triggers I do know of are inconsistently applied, and item type matters significantly. The one that's supposed to trigger when you're hit, for example, clearly doesn't work on amulets even though it's intended to (the Spiked Leather Collar never seems to trigger). So anything you want to implement will probably need some playtesting.

    I've tried it myself on an item coming up in Interior Dredmorating 1.2. Anecdotal evidence suggests that yes, repeating the item on the list does make it come up more often. I can't say that with absolute certainty, though, as I'd need to test it about 1,000 more times to get numbers that are in any way statistically significant. The game's random number generator is a little prone to delivering streaks of the same or similar results and I can't rule that out as the source of what I observed.
     
  5. Essence

    Essence Will Mod for Digglebucks

    I can confirm with 100% certainty that spawnitemfromlist chooses one item randomly from the entire list, so if you fill up the list with Sewer Brew x19 and put in one Bolt of Mass Destruction, you'll get a BoMD on 5% of triggers. :)