Page 1 of 1

How can I increase construction times for all buildings?

Posted: Sat Aug 17, 2019 7:20 pm
by MrFactorio
Hi,

I would like to give buildings a specific construction time. With construction time I mean the time, a building needs to be placed on the ground (manually or with construction drones).
In multiplayer it shouldnt be possible to run around with dozens of towers in your backpack and instantly place them near the enemy base. This should take some time.

Is it possible? Is there a mod already?
How can I do this myself?


Thank you very much!

Re: How can I increase construction times for all buildings?

Posted: Sat Aug 17, 2019 7:25 pm
by DaveMcW
1. Create a global.final_tick table.
2. In on_built(), calculate the tick that construction will complete. Add the entity to the global.final_tick table at the tick index when it should finish.
3. In on_tick(), check global.final_tick for any entities to be finished this tick. Replace the constructing entity with the finished entity. Remember to set global.final_tick[event.tick] to nil at the end (garbage collection).

Re: How can I increase construction times for all buildings?

Posted: Sat Aug 17, 2019 7:31 pm
by MrFactorio
:( I am noob at lua programming. Can you give me some more hints? Maybe with an example? That would be very much appreciated :)

Re: How can I increase construction times for all buildings?

Posted: Sat Aug 17, 2019 8:00 pm
by darkfrei
I've made a mod where you need to repair buildings before they can work:
https://mods.factorio.com/mod/RepairToStart

The repairing needs some time, so you cannot just spam with turrets.

Re: How can I increase construction times for all buildings?

Posted: Sat Aug 17, 2019 8:34 pm
by MrFactorio
darkfrei wrote:
Sat Aug 17, 2019 8:00 pm
I've made a mod where you need to repair buildings before they can work:
https://mods.factorio.com/mod/RepairToStart

The repairing needs some time, so you cannot just spam with turrets.
That is great! I just tried it out and it would work perfectly. But the start until you have drones is very tough... any tips how I can make the start a bit easier? Especially repairing each belt manually would be a game breaker :(.

Re: How can I increase construction times for all buildings?

Posted: Sat Aug 17, 2019 8:38 pm
by darkfrei
MrFactorio wrote:
Sat Aug 17, 2019 8:34 pm
That is great! I just tried it out and it would work perfectly. But the start until you have drones is very tough... any tips how I can make the start a bit easier? Especially repairing each belt manually would be a game breaker :(.
After belts optimization in versions 0.16-0.17 all belts cannot be disabled anymore, they must be excepted from the disabling. But only 1 hp is nice to have for all types of entities.

Also https://mods.factorio.com/mod/ConstructionCar - the car has drones and you can repair all stuff near of it.

Re: How can I increase construction times for all buildings?

Posted: Sat Aug 17, 2019 9:04 pm
by MrFactorio
Thank you. I didnt knew that the belts still work with 1 hp. I also found out, that you can give some starting items which you can chose in PvP mode. So I can give each one a roboport at start :).

Re: How can I increase construction times for all buildings?

Posted: Sat Aug 17, 2019 9:23 pm
by Impatient
MrFactorio wrote:
Sat Aug 17, 2019 8:34 pm
... any tips how I can make the start a bit easier? ...
Sure. Spawn yourself some gear.

Easy Start Equipment

Re: How can I increase construction times for all buildings?

Posted: Sat Aug 17, 2019 9:30 pm
by mat1k
This one gives a good starting supply and helps with the repair issue.

Starter Bots