Rather, creating something that gives a ranged opponent time to dodge or react before the impact/explosion.
The specific instance I have in mind is a Doom monster, say an imp or a caccodemon, that is firing projectiles that take multiple turns.
I know that you cannot simply create ‘projectiles’ that take more than 1 turn to arrive. But you can create a mob that will home in on a target and suicide. How can I get the game to create such a thing upon use/attack/etc.
Other alternatves that occur to me are using weaker projectiles a turn, or somehow creating a ‘grenade’ where the projectile hits that will explode in a turn or something.
I suppose I could just give weak flame ranged attacks to them, they would function like a turret’s gun would. but then we have to make fake guns and fake ammo and balance that out. And oc, they run out of their ammo.
The grenade option would be the closest to doable.
You could create an ammo type with “RECOVER_1” and “ACT_ON_RANGED_HIT”. That would make it drop and activate itself on drop.
“JET” flag would allow it to have no impact damage and yet not stop instantly, if that’s useful.
“NO_AMMO” flag should prevent ammo consumption (it will still require at least 1 ammo to avoid 0 ammo check).
But then, that would suffer from the current range extension issue: it would continue past its target until it reached maximum range.
{
“type” : “MONSTER”,
“id” : “mon_revenant”,
“name”: “revenant”,
“species”:“ABERRATION”,
“default_faction”:“doom”,
“symbol”:“R”,
“color”:“WHITE”,
“size”:“MEDIUM”,
“material”:“bone”,
“diff”:20,
“aggression”:80,
“morale”:100,
“speed”:95,
“melee_skill”:6,
“melee_dice”:3,
“melee_dice_sides”:10,
“melee_cut”:3,
“dodge”:3,
“armor_bash”:9,
“armor_cut”:13,
“armor_stab”:25,
“armor_acid”:4,
“armor_fire”:1,
“vision_day”:45,
“vision_night”:5,
“hp”:130,
“death_function”:[“NORMAL”],
“special_attacks”:[[“RANGED_PULL”, 20], [“GRENADIER”, 20], [“GRENADIER_ELITE”, 20]],
“starting_ammo” : {“bot_manhack_missile”: 16},
“description”:“A gaunt figure with translucent flesh, this backbone of the demonic army sports a salvo of homing rockets on each shoulder. Its punch is easily more powerful than any humans.”,
“flags”:[“SEES”, “HEARS”, “NO_BREATHE”, “ATTACKMON”]
},
By using the two grenadier attacks I can set it to pop out pairs of manhack-like rockets that will independently track targets. I did have to create an item for this and then an extra monster, but meh.
Fireball?
This may not be jsonable, but how about something like… A mob that spews flame fields on it’s immediate surroundings (1 or 2 block range), that has a special attack that makes it explode when it is adjacent to it’s target? The only problem is that it may be more homing than prefered, unless you hardcode a behavior to move to a specific tile and then activate said detonation special attack if it reaches the destination or is obstructed.
The explosive flag is ungodly strong, so I should be able to make an ammo that drops itself on hit and then exploses in a small radius of not-so-OP.
My major issue with making a sentient fireball is the homing and that monsters dont tend to prioritize based on danger or ease but on proximity…
Pedit:
jaa, so actonhit and recover_[high number] make it drop and activate. I can use_action transform it into an explosive, but trying to make the ammo itself explode does’t work so well.
You can use explosion data (similar to explosion iuse) in bombs that aren’t on the ground by specifying a CUSTOM_EXPLOSION flag on the ammo. This allows setting all explosion stats precisely.
I think the tank shell has an example of it - it has an ultra-powerful explosion with small radius.
I PR’d a documentation for the new explosions here: https://github.com/CleverRaven/Cataclysm-DDA/pull/16332
You can check out the diffs in the PR or copy the 120mm HEAT projectile, which also specifies a custom explosion.
Im having a field day. shame I cant force acid/napalm to hit BPs like corrosives do
Pedit: I cant quite make them spew forth fire or acid. I am able to use the premade flags, but that makes the firebomb a little on the strong side.
but I can still use transforms into bombs if it becomes an issue
It will still inherit the explosion data from ammo. If you don’t give the ammo the flag, it won’t detonate, unless fired by a gun that will add the flag to it.