I want to modify Small Floor Spike's damage output

Jan 31, 2019
4
4
3
Hello! A friend of mine and I are currently creating race tracks on barren planets for use with the Rideable Glitch Horse mod!

To make it fun, I'm trying to come up with hazards that will destroy your horse upon contact. Through my testing I've found that while mounted, the horse is generally invulnerable (it even swims through lava) except for when coming into contact with a Small Floor Spike. It immediately takes 1dmg, and will continuously do so over maybe every 20 seconds or so.

Now this is by no means enough to destroy the horse and force an unmount ofc, so I was wondering if there was a way I could modify the spawnitem command for smallfloorspike with a greater damage output, preferably to achieve a 1HKO?
 

Arsyn

Starbound Modder
Jan 21, 2019
7
5
3
The reason why the horse is invulnerable to most kinds of damage is because it has a damageTeam of "passive"
( vehicle.setDamageTeam({type = "passive"}), taken from the script of the horse)
I admit I haven't tested how this type interacts with environmental hazards, so you'll have to try around.

It also takes reduced damage because of this:
( local damage = damageRequest.damage / 16 , taken from the script of the horse)
Meaning it takes 16 times less damage than it normally should

The reason why the spike was able to damage the horse is because it used the "IgnoresDef" damageType, which is one of the more exploit-y ones that are able to bypass protections on certain entities. (Others include "indiscriminate", that damage entities that shouldn't normally be damaged, etc)

The bad news is that you can't really modify the spike's damage/damageType as far as I'm aware.
I think it's possible to mess with one of the projectile dispensers from one of the tech trials (the ones from the dash iirc), so you might want to look into that and edit its' projectile.
Cheers.
 
Dec 2, 2018
60
16
8
Alter this parameter of the json and you should be good. Set it to something ridiculously high, if you don't know the horse's HP.



If this does not work for you, try using a sprinkler with a very deadly projectile instead.


Edit: after testing this, I have indeed confirm that the orientations parameter is not read, so I recommend a different approach. You will want to use a sprinkler, which is basically a silent projectile dispenser. For the projectile parameters part, set the damage type to IgnoresDef, and the damage team to friendly. If this is too complicated, I can provide an example to you in game.
 
Last edited:

Arsyn

Starbound Modder
Jan 21, 2019
7
5
3
Changing those params client side doesn't work usually onserver. If it did, people wouldn't use the <color> directive trick to use drawables on objects.
 
Jan 31, 2019
4
4
3
Ah, thanks for the replies! I'm not entirely sure about digging through file structures and stuff yet. I was hoping for something I could spawn using an edited command, but if that's not possible, it's fine. :)