Tank Immune to Trees?
- Ranakastrasz
- Smart Inserter
- Posts: 2174
- Joined: Thu Jun 12, 2014 3:05 am
- Contact:
Tank Immune to Trees?
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?
My Mods:
Modular Armor Revamp - V16
Large Chests - V16
Agent Orange - V16
Flare - V16
Easy Refineries - V16
Modular Armor Revamp - V16
Large Chests - V16
Agent Orange - V16
Flare - V16
Easy Refineries - V16
Re: Tank Immune to Trees?
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.
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.
- Ranakastrasz
- Smart Inserter
- Posts: 2174
- Joined: Thu Jun 12, 2014 3:05 am
- Contact:
Re: Tank Immune to Trees?
Wow. That.... Thats kinda a hack, honestly, but I suppose that worksBilka 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.
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.
My Mods:
Modular Armor Revamp - V16
Large Chests - V16
Agent Orange - V16
Flare - V16
Easy Refineries - V16
Modular Armor Revamp - V16
Large Chests - V16
Agent Orange - V16
Flare - V16
Easy Refineries - V16
Re: Tank Immune to Trees?
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.Ranakastrasz wrote:Wow. That.... Thats kinda a hack, honestly, but I suppose that works.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.
If you want to get ahold of me I'm almost always on Discord.
Re: Tank Immune to Trees?
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?
That seems like more of a hack than the 2 if lines Rseding added: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.
Code: Select all
if (!this->getPrototype()->immuneToTreeImpacts || !entity->isTree())
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.
Re: Tank Immune to Trees?
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.
- Ranakastrasz
- Smart Inserter
- Posts: 2174
- Joined: Thu Jun 12, 2014 3:05 am
- Contact:
Re: Tank Immune to Trees?
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.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.
My Mods:
Modular Armor Revamp - V16
Large Chests - V16
Agent Orange - V16
Flare - V16
Easy Refineries - V16
Modular Armor Revamp - V16
Large Chests - V16
Agent Orange - V16
Flare - V16
Easy Refineries - V16
Re: Tank Immune to Trees?
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.
If you want to get ahold of me I'm almost always on Discord.
- Ranakastrasz
- Smart Inserter
- Posts: 2174
- Joined: Thu Jun 12, 2014 3:05 am
- Contact:
Re: Tank Immune to Trees?
Hey, it works, but it still feels like a hack. Not objecting.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.
My Mods:
Modular Armor Revamp - V16
Large Chests - V16
Agent Orange - V16
Flare - V16
Easy Refineries - V16
Modular Armor Revamp - V16
Large Chests - V16
Agent Orange - V16
Flare - V16
Easy Refineries - V16