Force changing affected by prototype flags?

Place to post guides, observations, things related to modding that are not mods themselves.
Post Reply
User avatar
FreeER
Smart Inserter
Smart Inserter
Posts: 1266
Joined: Mon Feb 18, 2013 4:26 am
Contact:

Force changing affected by prototype flags?

Post by FreeER »

I was playing around with forces and repairing and logistics and noticed that I couldn't change the force of a tree to be the players (or repair them, because of the force). Looked at the prototype and noticed that they are not "placeable-player" or "player-creation" (which makes sense), then tried the fish and noticed the same issue. No problem with transport belts though so it must be the "placeable-player" flag. Now I've no reason to really want to change the force of a tree, just something I noticed but it was something I hadn't realized before and it brought a question to mind.

Is this intended or simply a side effect of something? If intended I'd like to mention that you can make the transport belts force equal to the enemy's, even though they do not have the "placeable-enemy" flag (and I don't think enemy-creation is a flag yet lol).
<I'm really not active any more so these may not be up to date>
~FreeER=Factorio Modding
- Factorio Wiki
- My Factorio Modding Guide
- Wiki Modding Guide
Feel free to pm me :)
Or drop into #factorio on irc.esper.net

SilverWarior
Filter Inserter
Filter Inserter
Posts: 559
Joined: Mon Mar 04, 2013 9:23 am
Contact:

Re: Force changing affected by prototype flags?

Post by SilverWarior »

Wait you want to be able to repair trees? :shock:
Reparing trees/player was actually posible in version 0.8 but that was clasified as bug and got fixed in 0.8.1
https://forums.factorio.com/forum/vie ... =11&t=1795

So if you want to be able to repair trees you will have to change their "not-repairable" flag

kovarex
Factorio Staff
Factorio Staff
Posts: 8078
Joined: Wed Feb 06, 2013 12:00 am
Contact:

Re: Force changing affected by prototype flags?

Post by kovarex »

Actually, trees can't have the owner(force) specified.

User avatar
FreeER
Smart Inserter
Smart Inserter
Posts: 1266
Joined: Mon Feb 18, 2013 4:26 am
Contact:

Re: Force changing affected by prototype flags?

Post by FreeER »

So if I for some reason wanted to repair trees (and fish, I suppose) I'd have to create a roboport with a neutral force instead of changing the force of the trees/fish... I'm guessing, haven't tried it. As to why someone would want to repair them..idk but theoretically if trees start taking damage when absorbing pollution, then repairing the trees would allow greater absorption of pollution.
<I'm really not active any more so these may not be up to date>
~FreeER=Factorio Modding
- Factorio Wiki
- My Factorio Modding Guide
- Wiki Modding Guide
Feel free to pm me :)
Or drop into #factorio on irc.esper.net

SilverWarior
Filter Inserter
Filter Inserter
Posts: 559
Joined: Mon Mar 04, 2013 9:23 am
Contact:

Re: Force changing affected by prototype flags?

Post by SilverWarior »

FreeER wrote:So if I for some reason wanted to repair trees (and fish, I suppose) I'd have to create a roboport with a neutral force instead of changing the force of the trees/fish...
No. There was a new flag introduced in version 0.8.1 which determines if an entity can be repaired or not. So you would have to change this flag first.

User avatar
FreeER
Smart Inserter
Smart Inserter
Posts: 1266
Joined: Mon Feb 18, 2013 4:26 am
Contact:

Re: Force changing affected by prototype flags?

Post by FreeER »

SilverWarior wrote:No. There was a new flag introduced in version 0.8.1 which determines if an entity can be repaired or not. So you would have to change this flag first.
...
demo entities wrote:--player flags
flags = {"pushable", "placeable-player", "placeable-off-grid", "breaths-air", "not-repairable"},
--tree flags
flags = {"placeable-neutral", "placeable-off-grid", "breaths-air"},
Hm...notice something missing here? Like I said in the OP, I had checked the prototypes, seeing "not-repairable" on the trees would have been a big tip off. :D
<I'm really not active any more so these may not be up to date>
~FreeER=Factorio Modding
- Factorio Wiki
- My Factorio Modding Guide
- Wiki Modding Guide
Feel free to pm me :)
Or drop into #factorio on irc.esper.net

Post Reply

Return to “Modding discussion”