Variable game tick based on location

Place to ask discuss and request the modding support of Factorio. Don't request mods here.
Post Reply
Brambor
Fast Inserter
Fast Inserter
Posts: 125
Joined: Thu May 07, 2015 1:52 pm
Contact:

Variable game tick based on location

Post by Brambor »

My question is: Can a mod affect game ticks?
That is: Can I (hopefuly a future modder) acess game ticks? Can I make the game to update normaly (60 ticks/s) everyvhere and then make one chunk, or rectangle, or list of entities to simulate faster or slower? such as 90 ticks/s, 2520 ticks/s, 1 tick/s ?
That was the first question, whether it is possible to manipulate and redistribute the game ticks un-evenly. What I'm trying to achieve is to make zone in which there will be faster time, so I don't care whether game has to have unified ticks, that is fine with me. When I'm writing 2520 ticks/s I'm interested in simulating 42 times the normal speed, not in counting the ticks themselves.

The one way to achieve my goal is to alow entities to acess more ticks. That would be the easiest and probably the slowest way (in performace view), but it would as well be the logical way, because I want to implement game speed based on the game speed of the player.

examples:
  • 1) Player steps into 10x5 (rectangular) zone with speed 15 ticks/s. Now the player feels like he still is in a zone with 60 ticks/s but everything outside that zone, which regulary has 60 ticks/s now has 240 ticks/s.
    2) Turrets are in a 600 ticks/s zone so any incoming bitter (in regular zone) sees them as if they are shooting at him ten times faster.
The other way is to have a list of entities that are in a zone and modify their stats, respectively, every relevant entity (so not chests) will have a rational number describing how fast do they exist.

examples:
  • 1) Player steps into 10x5 (rectangular) zone with speed of existing 0.25. Now everything outside the zone, every stat, (electricity consumption, speed of belts, bitters and trains, coal consumption...) is multiplied by four to make the player speed of existing experience like 1.
    2) Turrets are in a zone with speed of existing 10 so their speed of shooting is multiplied by ten relative to regular speed of existing 1.

Post Reply

Return to “Modding interface requests”