FORUM ARCHIVED

Ranged "dropitem" spell effect.

Discussion in 'Modding' started by Shreeper, Dec 3, 2012.

  1. Shreeper

    Shreeper Member

    To make a long story short I've decided to try and have a go at modding myself, namely because I want a personal refference point for when dealing with other peoples mods and one of the ideas I came up with was a "trapmaster" kind of class which is meant to enhance the usefulness of traps.

    So far I've decided that I want the skill to have 3 primary goals, namely granting a minor XP-boost when disarming traps, using a number of "Rune of Exploding" styled spells that scale with :trap_level: and maybe :savvy: and finally have a skill that let's you drop the traps that you pick up at range, maybe disarm at range too, problem though is that while the former two goals should be trivial'ish the latter is giving me a headache even thinking about it and therefore I ask you: Is it even possible to affect traps and drop items from range?

    EDIT: It's not crucial for the upcomming mod but it would be a neat touch, hence why I ask.
     
    Vitellozzo likes this.
  2. Not really, but there are couple of ways you could partially fake it. Traps on the ground are affected by spells the same as any other item, so you could eg. create a spell that targeted an item on the floor and knocked it away from you, restricted by a taxa that no monster actually uses. (That, of course, would make it easy to avoid most traps that aren't yours as well.) Simply picking a target tile and spawning a trap there would be trivial and you could even remove an item from the player in exchange - just, not actually a meaningfully targeted inventory item, and the created trap wouldn't change by dungeon floor so you might want to add your own custom trap that heavily scales with the player's stats (or floorScaleF, if that works for damage?). A more convoluted possibility could be to have the player teleport to a target empty tile, drop a random item from their belt (inform the player via spell description to load traps there), then teleport the player away again ... but it would take some serious trigger shenanigans to get the player back where they started if that's even possible.

    Disarming a trap at range is a simple matter of spawning a sacrificial diggle to set off the trap and triggering its death the turn in case it survives, but that's probably not what you had in mind, so no.
     
  3. Essence

    Essence Will Mod for Digglebucks

    Disarming it isn't that easy, because traps are triggered when stepped onto. Spawning a mob on a trap won't trigger it, and there's no way to control the wandering of a mob once it's spawned.

    This is a clever idea, but it's not going to be easy to code by any stretch.
     
  4. Well, if you used a mob without spells, summoned it hostile and type="shout"ed at it you could allow the player to pick any tile within their LoS and predict pretty easily where the mob would step before it splattered, but my assumption was that Shreeper wanted the traps ... intact after using the skill.
     
  5. Null

    Null Will Mod for Digglebucks

    Well you can actually disarm traps with a targetemptyfloor triggering destroyobject or whatever it is. Only traps would be considered empty and still affected.
     
  6. Essence

    Essence Will Mod for Digglebucks

    Oh, yeah, I forgot about destroyitem. And with Nicholas having fixed the door bug in the new alpha, it's not even crashy anymore. :)
     
  7. Shreeper

    Shreeper Member

    Pardon me for being an idiot but how exactly would that work ingame and would it require a lot of coding? I'm kinda new to this whole modding thing, very new in fact.
     
  8. Essence

    Essence Will Mod for Digglebucks

    Grab CES and look up Kung Fu's first level spell for an example.