Search found 294 matches
- Sun Aug 28, 2016 6:12 pm
- Forum: Modding help
- Topic: surface.get_chunks() iterator single call ?
- Replies: 11
- Views: 2734
Re: surface.get_chunks() iterator single call ?
if global.refresh_chunk == nil then global.refresh_chunks = surf.get_chunks() end global.refresh_chunk = global.refresh_chunks(nil, nil) if global.refresh_chunk ~= nil then local chunk = global.refresh_chunk local a = {{chunk.x * 32, chunk.y * 32}, {chunk.x * 32 + 32, chunk.y * 32 + 32}} gives you ...
- Sun Aug 28, 2016 5:21 pm
- Forum: Modding help
- Topic: surface.get_chunks() iterator single call ?
- Replies: 11
- Views: 2734
Re: surface.get_chunks() iterator single call ?
According to https://wiki.factorio.com/index.php?tit ... _Lifecycle functions can be serialized but cannot contain upvalues (closures) which I believe iterators have to do to maintain state across function calls.
- Sun Aug 28, 2016 4:52 pm
- Forum: Modding help
- Topic: surface.get_chunks() iterator single call ?
- Replies: 11
- Views: 2734
Re: surface.get_chunks() iterator single call ?
The following is how I got around the iterator in Rampant. function onChunkGenerated(event) if (event.surface.index == 1) then chunks[#chunks+1] = event end end so when a chunk is generated you store that into a list in global. local surface = game.surfaces[1] for chunk in surface.get_chunks() do on...
- Fri Aug 26, 2016 9:04 pm
- Forum: Mods
- Topic: [MOD 0.13.17+] Rampant
- Replies: 648
- Views: 320137
Re: [MOD 0.13.17] Rampant - 0.0.5
In my current game I have a group of probably 200+ that were scared of me after killing a few. I think you should have a threshold, if the group is a certain size, it gets harder for them to retreat. The threshold to retreat. OR maybe have a random kamikaze where they all out attack, to try an over...
- Fri Aug 26, 2016 8:17 pm
- Forum: Mods
- Topic: [MOD 0.13.17+] Rampant
- Replies: 648
- Views: 320137
Re: [MOD 0.13.17] Rampant - 0.0.5
Here's a video [1] at 54% evolution with the retreat oscillation. This happened about 15-20 times before I decided to record the video. Eventually they decided to attack but by then their numbers were thinned substantially (you can see the pile of bodies from the previous oscillations). That swarm ...
- Thu Aug 25, 2016 10:16 pm
- Forum: Modding help
- Topic: [Solved]Multiplayer Desyncing
- Replies: 1
- Views: 745
Re: [Solved]Multiplayer Desyncing
It turns out that I had a local reference declared at the top of the module to math.random (i.e.)
local mRandom = math.random
This was causing different values to be generated between the clients and the changes didn't manifest until the command was issued which resulted in a desync.
local mRandom = math.random
This was causing different values to be generated between the clients and the changes didn't manifest until the command was issued which resulted in a desync.
- Thu Aug 25, 2016 5:03 pm
- Forum: Modding help
- Topic: [Solved]Multiplayer Desyncing
- Replies: 1
- Views: 745
[Solved]Multiplayer Desyncing
I'm looking for some assistance at understanding and fixing the desync issue that seems to keep happening when issuing commands to entities or unit groups. in the attached file the two following commands: aiAttack.squadAttackLocation, aiBuilding.formSquads consistently desync when the command is iss...
- Thu Aug 25, 2016 2:07 am
- Forum: Mods
- Topic: [MOD 0.13.17+] Rampant
- Replies: 648
- Views: 320137
Re: [MOD 0.13.17] Rampant - 0.0.5
As an aside, do you know if it is vanilla, NE, or your mod that triggers nest attacks when a tree is chopped down? I can predictably control waves of enemies by avoiding tree hacking. That is NE. The retreating is based on the evolution level, so the higher it goes the more killing that is required.
- Thu Aug 25, 2016 12:18 am
- Forum: Mods
- Topic: [MOD 0.13.17+] Rampant
- Replies: 648
- Views: 320137
Re: [MOD 0.13.17] Rampant - 0.0.4
So after thinking about it, I'm going to make the Big Wooden Pole from Bio Industries act like the rail that regenerates. My logic, the biters thinks its a tree :) http://i.imgur.com/ZARrAS7.png Sounds like a plan to me I played a little last night with NE+Rampant+RSO. There are two observations--t...
- Tue Aug 23, 2016 5:24 am
- Forum: Mods
- Topic: [MOD 0.13.17+] Rampant
- Replies: 648
- Views: 320137
Re: [MOD 0.13.17] Rampant - 0.0.4
TheSAguy: You noted future plans for tunnelers.. For some reason I'm just not the biggest fan of that. Maybe if I see it in action. But that got me thinking, you could implement the following. When the biters attack, some could bury themselves. This could give those biters very high resistances, th...
- Tue Aug 23, 2016 3:13 am
- Forum: Mods
- Topic: [MOD 0.13.17+] Rampant
- Replies: 648
- Views: 320137
[MOD 0.13.17+] Rampant
Rampant [*] Name: Rampant [*] Factorio-Version: 0.13.17+ [*] Description: Factorio Mod - Improves the enemies tactics by using potential fields/pheromones allowing probing of defenses, retreats, reinforcements, counterattacking, breaching, raids, rallying death cry, and player hunting. Uses nonhomi...
- Wed Aug 03, 2016 3:38 am
- Forum: Modding help
- Topic: Turning off enemy force AI
- Replies: 2
- Views: 1076
Re: Turning off enemy force AI
If I set ai_controllable to false and kill all the units, no additional base seem to form, but unit groups still attack polluted areas. Changing the expansion flags works for preventing new bases as well. At the moment, I am just using the peaceful mode to prevent all actions, so I can program my own.
- Mon Aug 01, 2016 9:47 pm
- Forum: Modding help
- Topic: Tile Replacement Question
- Replies: 4
- Views: 1223
Re: Tile Replacement Question
If you use
surface.set_tiles(New_tiles, false)
then it wont try to correct the tiles surrounding the changed tiles, but it may lead to the tiles looking funny.
surface.set_tiles(New_tiles, false)
then it wont try to correct the tiles surrounding the changed tiles, but it may lead to the tiles looking funny.
- Mon Aug 01, 2016 12:05 am
- Forum: Modding help
- Topic: Turning off enemy force AI
- Replies: 2
- Views: 1076
Turning off enemy force AI
Is it possible to turn off the biter ai?
I found the force ai_controllable boolean and switched it to false, however, it doesn't seem to prevent biter unit group formations when nest are exposed to pollution.
I found the force ai_controllable boolean and switched it to false, however, it doesn't seem to prevent biter unit group formations when nest are exposed to pollution.