I have already removed this local reference for safety from the desync magic. And now I thoughtfully look at the local variables outside functions
![Neutral :|](./images/smilies/icon_neutral.gif)
Code: Select all
local autoRepair = {
"straight-rail" = true,
"curved-rail" = true,
"electric-pole" = true
}
-- this code would be in the onDeath event. Auto repair things like rails, and signals. Also by destroying the entity the enemy retargets.
if (event.force == game.forces.enemy) and autoRepair[event.entity.name] then
local repairPosition = event.entity.position
local repairName = event.entity.name
local repairForce = event.entity.force
local repairDirection = event.entity.direction
event.entity.destroy()
local entityRepaired = game.surfaces[1].create_entity({position=repairPosition,
name=repairName,
direction=repairDirection,
force=repairForce})
-- forces enemy to disperse
local enemies = game.surfaces[1].find_entities_filtered({area = {{x=repairPosition.x-20, y=repairPosition.y-20},
{x=repairPosition.x+20, y=repairPosition.y+20}},
type = "unit",
force = game.forces.enemy})
for i=1, #enemies do
local enemy = enemies[i]
enemy.set_command({type=defines.command.wander,
distraction=defines.distraction.by_enemy})
end
end
sent you a PMVeden wrote:Would you be willing to share your save for the sake of mod improvement?
The short version is yes. If you are interested in the long answer I can type that up.Nerchio wrote:As you could see there is a few gigantic groups of biters on the map which you called "an artifact of the game engine". It seems that maybe instead of sending attack waves they are joining big groups instead
If you have time then feel free to talk about it. The most interesting part to me, is it easy to fix?Veden wrote:I'm actually using your save to tune the frequency of attacks towards endgame, so there should be in update here shortly.
The short version is yes. If you are interested in the long answer I can type that up.Nerchio wrote:As you could see there is a few gigantic groups of biters on the map which you called "an artifact of the game engine". It seems that maybe instead of sending attack waves they are joining big groups instead
The biggest thing about your save game is the buildups already exist, and I haven't added anything to wipe all biters out.Nerchio wrote:If you have time then feel free to talk about it. The most interesting part to me, is it easy to fix?
Thanks glad you are enjoying it, currently Rampant does not change the expansion mechanics from vanilla.Bizobinator wrote:Excellent mod! It's definitely keeping me on my toes.
A question: Right now, I'm playing With Natural Evolution (all mods), which is making the aliens spread like kudzu all over the map. Does Rampant do that as well? In my next game, I want Rampant's difficulty, but I don't want to insane level of base expansion; it's just become tedious whenever I have to expand to new resource patches.
Nope, not intended. It is just the vanilla game trying to get a unit to speed up to catch to the actual unit group, sometimes it glitches out and the units going flying across the screen.Bizobinator wrote:I do have a small question about the biter behaviors: So, periodically, some of the aliens will zoom at incredibly fast speeds towards their destination. This has lead to a few.... interesting.... experiences. Is this something that's intended? Is it other mods interacting with Rampant?
So currently the ai only switches between two states randomly and random intervals and those are peace and aggressive.Peter34 wrote:I really liked the "horror aspect" of the Scary Nights mod, that caused the planet's natives to primarily attack during the night. But that mod is no longer getting updated, so can't be used with 0.15, and it had some problems with massive CPU usage anyway.
But... I like the idea. Is there any chance that a functionality, somewhat similar to that, can be added to this mod?