Page 1 of 1

Tank Immune to Trees?

Posted: Fri Dec 15, 2017 4:20 pm
by Ranakastrasz
Does anyone know how this works? Did they change the damage mechanic, such that instead of dropping damage to 1/(armor-Damage) or whatever it was, to (max(Armor-damage,0)) or something?

Re: Tank Immune to Trees?

Posted: Fri Dec 15, 2017 6:42 pm
by Bilka
The added a property (immune_to_tree_impacts = true). If it's enabled and the tank hits a tree it doesnt take damage. Simple as that.

Re: Tank Immune to Trees?

Posted: Sat Dec 16, 2017 2:21 am
by Ranakastrasz
Bilka wrote:The added a property (immune_to_tree_impacts = true). If it's enabled and the tank hits a tree it doesnt take damage. Simple as that.
Wow. That.... Thats kinda a hack, honestly, but I suppose that works

Shame it isn't more mutable, but at least my robots will stop commiting suicide or hang back where I ran through a forest....

Also I don't have to use the tank flamer anymore, aside from avoiding the slowdown from trees.

Re: Tank Immune to Trees?

Posted: Sat Dec 16, 2017 5:54 am
by Rseding91
Ranakastrasz wrote:
Bilka wrote:The added a property (immune_to_tree_impacts = true). If it's enabled and the tank hits a tree it doesnt take damage. Simple as that.
Wow. That.... Thats kinda a hack, honestly, but I suppose that works.
Why's it a hack? We didn't want the tank to take damage from hitting trees so we made it not take damage from hitting trees.

Re: Tank Immune to Trees?

Posted: Sat Dec 16, 2017 8:12 am
by BlakeMW
I think the "non-hack" approach would be to give a "hardened armor" property that shrugs off small amounts of damage (for a given damage type) regardless of the source.

Re: Tank Immune to Trees?

Posted: Sat Dec 16, 2017 9:03 am
by Bilka
BlakeMW wrote:I think the "non-hack" approach would be to give a "hardened armor" property that shrugs off small amounts of damage (for a given damage type) regardless of the source.
That seems like more of a hack than the 2 if lines Rseding added:

Code: Select all

if (!this->getPrototype()->immuneToTreeImpacts || !entity->isTree())
In front of the damageReceived code and that was it.

Re: Tank Immune to Trees?

Posted: Sat Dec 16, 2017 12:48 pm
by BlakeMW
I'm not talking about in terms of code, but in terms of game rules. There's no particular reason why a small amount of damage from running over a tree should be shrugged off, whereas say the damage from running over a small biter shouldn't be shrugged of.

Re: Tank Immune to Trees?

Posted: Sat Dec 16, 2017 3:27 pm
by Ranakastrasz
BlakeMW wrote:I'm not talking about in terms of code, but in terms of game rules. There's no particular reason why a small amount of damage from running over a tree should be shrugged off, whereas say the damage from running over a small biter shouldn't be shrugged of.
Exactly. Exceptions like that are a bad idea. If it were a specific filter for entities flaged as trees, sure, but having a trait that specifically ignores tree collision damage isnt.

Re: Tank Immune to Trees?

Posted: Sat Dec 16, 2017 3:29 pm
by Rseding91
Think what you want. We decided we didn't want the tank to take damage from hitting trees so I made it not take damage from hitting trees. Just like how cars don't take any damage from hitting cliffs.

Re: Tank Immune to Trees?

Posted: Sat Dec 16, 2017 3:32 pm
by Ranakastrasz
Rseding91 wrote:Think what you want. We decided we didn't want the tank to take damage from hitting trees so I made it not take damage from hitting trees. Just like how cars don't take any damage from hitting cliffs.
Hey, it works, but it still feels like a hack. Not objecting.