[MOD 0.18] Robot Army. v0.4.4

Topics and discussion about specific mods
Post Reply
kyranzor
Filter Inserter
Filter Inserter
Posts: 499
Joined: Fri Oct 31, 2014 4:52 pm
Contact:

Re: [MOD 0.12.35] Robot Soldiers. 0.1.4 Released!

Post by kyranzor »

Well your biter settings and how much you have aggro'd them will determine your fate. In any case use the Droid Activity Module which outputs how many droids are alive to limit production and deployment to something reasonable.

wahming
Fast Inserter
Fast Inserter
Posts: 190
Joined: Sun May 17, 2015 8:30 pm
Contact:

Re: [MOD 0.12.35] Robot Soldiers. 0.1.4 Released!

Post by wahming »

What do you think of the ideas I posted?

kyranzor
Filter Inserter
Filter Inserter
Posts: 499
Joined: Fri Oct 31, 2014 4:52 pm
Contact:

Re: [MOD 0.12.35] Robot Soldiers. 0.1.4 Released!

Post by kyranzor »

wahming wrote:What do you think of the ideas I posted?
They are good ideas, but not new ones. I have already planned on some kind of simulated ammo/fuel supply for squads and a resupply building where they deposit alien artifacts they collect (collection will be simulated though.. will still be artifacts on the ground because I don't want to have to actually detect and remove them for later depositing because if the squad dies ill have to spawn the items back in again as dropped loot)

As for revealing 3x3 I've tried doing that but the reveal chunk API seems strange and is not acting how it should. I will increase it in the next patch though.

Edit: honestly in my sort of mid-game with biters on high (not max though) my SMG droid spamming doesn't get me far and the evolution % goes up terribly fast so that it self-balances. Let's hope your base defences can handle the sudden jump in biter evo!

wahming
Fast Inserter
Fast Inserter
Posts: 190
Joined: Sun May 17, 2015 8:30 pm
Contact:

Re: [MOD 0.12.35] Robot Soldiers. 0.1.4 Released!

Post by wahming »

kyranzor wrote: They are good ideas, but not new ones. I have already planned on some kind of simulated ammo/fuel supply for squads and a resupply building where they deposit alien artifacts they collect (collection will be simulated though.. will still be artifacts on the ground because I don't want to have to actually detect and remove them for later depositing because if the squad dies ill have to spawn the items back in again as dropped loot)
Don't bother spawning the items back in, and you could just have your mod modify the spawner nests so they don't drop any in the first place. I know if my bots are collecting artifacts for me I'm not going to the effort of farming them myself! Or check to see if the nest was killed by droids or player and turrets, only spawn in the latter case.

British_Petroleum
Filter Inserter
Filter Inserter
Posts: 321
Joined: Tue Dec 23, 2014 7:21 am
Contact:

Re: [MOD 0.12.35] Robot Soldiers. 0.1.4 Released!

Post by British_Petroleum »

Can you adjust the squad size & search radius in game? Last time i tried this mod it needed adjusting in the config file

flabort
Inserter
Inserter
Posts: 25
Joined: Wed May 11, 2016 2:57 am
Contact:

Re: [MOD 0.12.35] Robot Soldiers. 0.1.4 Released!

Post by flabort »

kyranzor wrote:(collection will be simulated though.. will still be artifacts on the ground because I don't want to have to actually detect and remove them for later depositing because if the squad dies ill have to spawn the items back in again as dropped loot)
You could give the bots actual inventories, so you don't HAVE to simulate collection. Pretty sure that anything with an inventory moving over an artifact causes that artifact to be inserted into the inventory. I'm not 100% certain on this, though, so don't quote me on it. While I'm at it, though, if it worked then the problem of dropping the items when the squad dies would also be solved, as the inventory would automatically drop the loot like a deconstructed/destroyed chest.

I doubt you could open the unit up like a chest for manual removal of items, which I am basing off of what I know of multiplayer play: you can insert items into other players' inventories, but can't take them out. However, that makes me realize a dead player doesn't drop their loot, so perhaps a bot would not drop theirs when dead. However, what I am saying is that if giving the bots a small inventory similar to the player-character entity's, you would only have to code a way for a machine to remove the items from the bot's inventory.

wahming
Fast Inserter
Fast Inserter
Posts: 190
Joined: Sun May 17, 2015 8:30 pm
Contact:

Re: [MOD 0.12.35] Robot Soldiers. 0.1.4 Released!

Post by wahming »

flabort wrote:
kyranzor wrote:(collection will be simulated though.. will still be artifacts on the ground because I don't want to have to actually detect and remove them for later depositing because if the squad dies ill have to spawn the items back in again as dropped loot)
You could give the bots actual inventories, so you don't HAVE to simulate collection. Pretty sure that anything with an inventory moving over an artifact causes that artifact to be inserted into the inventory. I'm not 100% certain on this, though, so don't quote me on it. While I'm at it, though, if it worked then the problem of dropping the items when the squad dies would also be solved, as the inventory would automatically drop the loot like a deconstructed/destroyed chest.

I doubt you could open the unit up like a chest for manual removal of items, which I am basing off of what I know of multiplayer play: you can insert items into other players' inventories, but can't take them out. However, that makes me realize a dead player doesn't drop their loot, so perhaps a bot would not drop theirs when dead. However, what I am saying is that if giving the bots a small inventory similar to the player-character entity's, you would only have to code a way for a machine to remove the items from the bot's inventory.
Simulation is still the easiest way, so you don't need to direct the bot to walk over the artifacts. Just increment a variable everytime they kill a spawner.

On a different note, how do you manage droids across multiple outposts? Say I've got a new outpost deep in enemy territory, but I've got another squad standing around in my main base. How do I get the assembler and combinator to spawn more droids in my outpost but not my base?

Qon
Smart Inserter
Smart Inserter
Posts: 2091
Joined: Thu Mar 17, 2016 6:27 am
Contact:

Re: [MOD 0.12.35] Robot Soldiers. 0.1.4 Released!

Post by Qon »

wahming wrote:Simulation is still the easiest way, so you don't need to direct the bot to walk over the artifacts. Just increment a variable everytime they kill a spawner.
But then
  • The number of artifacts picked up doesn't correspond to the number dropped.
  • If a mod changes droprate or adds in new loot then that wont be picked up.
  • The items will be left on the ground. More items on the ground might affect performance, savetime and so on. It also mean the artifacts can be "picked up" twice.

wahming
Fast Inserter
Fast Inserter
Posts: 190
Joined: Sun May 17, 2015 8:30 pm
Contact:

Re: [MOD 0.12.35] Robot Soldiers. 0.1.4 Released!

Post by wahming »

Qon wrote: But then
  • The number of artifacts picked up doesn't correspond to the number dropped.
    - It's random to begin with. As long as the average drop rate more or less corresponds, that's fine.
  • If a mod changes droprate or adds in new loot then that wont be picked up.
    - True. But not every mod can work seamlessly with another. And many don't. Add explicit support for the major mods if needed. AFAIK not many mods modify spawner drops anyway, at the moment.
  • The items will be left on the ground. More items on the ground might affect performance, savetime and so on. It also mean the artifacts can be "picked up" twice.
    - If you refer back to my earlier suggestion, auto-pick was meant to be implemented together with no-drop. So spawners killed by bots would drop nothing on the ground.

Qon
Smart Inserter
Smart Inserter
Posts: 2091
Joined: Thu Mar 17, 2016 6:27 am
Contact:

Re: [MOD 0.12.35] Robot Soldiers. 0.1.4 Released!

Post by Qon »

Please do proper quoting. I was almost skipping over your post because you had nothing to say.
wahming wrote: - If you refer back to my earlier suggestion, auto-pick was meant to be implemented together with no-drop. So spawners killed by bots would drop nothing on the ground.
Is this possible? I really doubt the API can do real time loot manipulation based on who the killer is. You might be able to change drop of all spawners at once, at load time with no real time manipulation and no differentiation based on killer. Would not the technical solution be to use the API to find all artifacts on the ground and delete them?
And then when doing that you can also simply count them. Sounds to me like giving the bots an inventory with the actual loot instead of simulated looting might actually be easier to implement in the end and avoids all the other issues I mentioned too. Just remove items from the ground and add them to the inventory.
wahming wrote: - True. But not every mod can work seamlessly with another. And many don't. Add explicit support for the major mods if needed. AFAIK not many mods modify spawner drops anyway, at the moment.
Not all mods can be compatible, but you don't have to go out of your way to make it incompatible either. It might sound like a simpler solution at first, but is it really?

wahming
Fast Inserter
Fast Inserter
Posts: 190
Joined: Sun May 17, 2015 8:30 pm
Contact:

Re: [MOD 0.12.35] Robot Soldiers. 0.1.4 Released!

Post by wahming »

Qon wrote:Please do proper quoting. I was almost skipping over your post because you had nothing to say.
wahming wrote: - If you refer back to my earlier suggestion, auto-pick was meant to be implemented together with no-drop. So spawners killed by bots would drop nothing on the ground.
Is this possible? I really doubt the API can do real time loot manipulation based on who the killer is. You might be able to change drop of all spawners at once, at load time with no real time manipulation and no differentiation based on killer. Would not the technical solution be to use the API to find all artifacts on the ground and delete them?
And then when doing that you can also simply count them. Sounds to me like giving the bots an inventory with the actual loot instead of simulated looting might actually be easier to implement in the end and avoids all the other issues I mentioned too. Just remove items from the ground and add them to the inventory.
wahming wrote: - True. But not every mod can work seamlessly with another. And many don't. Add explicit support for the major mods if needed. AFAIK not many mods modify spawner drops anyway, at the moment.
Not all mods can be compatible, but you don't have to go out of your way to make it incompatible either. It might sound like a simpler solution at first, but is it really?
Fair enough points. A lot probably depends on the extent of the available LUA at this point. Back when I was dabbling with modding in 0.11+, it was severely limited in terms of creative mod applications. I know things have gotten a lot better since then but I don't know how much.

kyranzor
Filter Inserter
Filter Inserter
Posts: 499
Joined: Fri Oct 31, 2014 4:52 pm
Contact:

Re: [MOD 0.12.35] Robot Soldiers. 0.1.4 Released!

Post by kyranzor »

Some comments about the Lua API and limitations to this implementation, which is why I said "simulate" -

First, "Unit" type entities which is what all of the droid soldiers are, cannot have inventories currently. So that means we cannot do the auto-pickup when they walk over the alien artifacts. Even if they could, relying on them to do so would be sketchy at best, their AI isn't going to care about alien artifacts.

I could use the "on_entity_died" event to try and check for a nearby squad within x tiles, and if there is one, do a killCount +1 kind of thing. Then, as the kill counts rise, I can either immediately generate an alien artifact back at base in some kind of single-build-only building that acts as a supply center for robot army units, or I can have the squad (if they survive! This is actually not a common thing, having a squad survive any reasonable time, in my experience) return for refuel/rearm and only then generate alien artifacts based on their squad's killcount, and reset it back to 0 or whatever.

Having a complicated set of logic trigger every single time an entity dies, is going to slow down the game especially if it's got a lot of death happening. The best way is to do it slowly, perhaps by area-scanning around squads occasionally in a large radius (~20-30 tiles) for alien artifacts and then deleting those, and adding them to the "supply center" building or the unit's simulated pick-up counter. It won't be as precise, but it is way better in terms of computation load and not being death-dependant, rather number-of-squads dependent and the radius of searching. Large radii can be slow, so it would have to be a pretty tight circle. Perhaps it being tight radius search for artifacts on the ground, with insta-teleporting of artifacts into the supply center, is the most efficient and simplest implementation I can achieve with the current API.

Qon
Smart Inserter
Smart Inserter
Posts: 2091
Joined: Thu Mar 17, 2016 6:27 am
Contact:

Re: [MOD 0.12.35] Robot Soldiers. 0.1.4 Released!

Post by Qon »

The search radius can be very small if you only check around the position of the unit that died, if the on_entity_died supplies unit id with a position and who killed it. Wouldn't be that surprised if it didn't though since not even the radar gives position of the scanned chunk in 0.12 `\(-_^)/`
Having them walk over the artifacts seems like overkill. If you know it was a spawner that died, and it was killed by a robot, then you know it is fairly close to your robot army and it's acceptable to pick it up at that range I think.

kyranzor
Filter Inserter
Filter Inserter
Posts: 499
Joined: Fri Oct 31, 2014 4:52 pm
Contact:

Re: [MOD 0.12.35] Robot Soldiers. 0.1.4 Released!

Post by kyranzor »

if the only thing done on a on_entity_died event was checking if it's a spawner, that's not bad. If that is "true" then some more code to find the nearest squad (within X radius), and assume it was killed by them, that's not computationally bad.

The on_entity_died event does not include who/what killed it.

ArtyD
Burner Inserter
Burner Inserter
Posts: 18
Joined: Wed Jun 01, 2016 7:43 pm
Contact:

Re: [MOD 0.12.35] Robot Army. 0.1.4 Released!

Post by ArtyD »

I'm about to test out a large pack of terminators.

Will update with after pic later.

http://prntscr.com/bhlfjz

This is oddly satisfying as they murder their way around the world...

kyranzor
Filter Inserter
Filter Inserter
Posts: 499
Joined: Fri Oct 31, 2014 4:52 pm
Contact:

Re: [MOD 0.12.35] Robot Army. 0.1.4 Released!

Post by kyranzor »

ArtyD wrote:I'm about to test out a large pack of terminators.

Will update with after pic later.

http://prntscr.com/bhlfjz

This is oddly satisfying as they murder their way around the world...
Last night I added the mod Misanthrope to my mid-game save, where biter evo was at 0.63 (starting to get large biters, large amounts of medium spitters). I only have mass production for Clockwork riflebots, and my defences were very spreadout, incoherent gun turrets with regular ammo and only up to level 2 gun turret upgrades.. Shit went down-hill pretty quickly, and my defences were tested and squads of droids were running back and forth defending my base as the world collapsed around me. It was great. I wish I had terminators to help defend me!

I had a huge blob of 200 clockwork bots rampaging on the biter bases but after only 2-3 big nests the big-worms and medium spitters had slaughtered all my bots.

There is definitely strength in numbers, and the clockwork bot spam kind of makes me imagine russian soldier hordes.

ArtyD
Burner Inserter
Burner Inserter
Posts: 18
Joined: Wed Jun 01, 2016 7:43 pm
Contact:

Re: [MOD 0.12.35] Robot Army. 0.1.4 Released!

Post by ArtyD »

Couldn't keep up with the robot speedster horde... got my car... drove after them... got to an area with too many trees to drive thru... got out... car blowed up...

kyranzor
Filter Inserter
Filter Inserter
Posts: 499
Joined: Fri Oct 31, 2014 4:52 pm
Contact:

Re: [MOD 0.12.35] Robot Army. 0.1.4 Released!

Post by kyranzor »

ArtyD wrote:Couldn't keep up with the robot speedster horde... got my car... drove after them... got to an area with too many trees to drive thru... got out... car blowed up...
Yeah the terminator's movement speed is simulating that they have exoskeleton style speedy-legs

johnnyBgoode
Inserter
Inserter
Posts: 42
Joined: Thu Mar 24, 2016 7:12 pm
Contact:

Re: [MOD 0.12.35] Robot Army. 0.1.4 Released!

Post by johnnyBgoode »

Tried using this today using the 0.1.4 version in the OP. I'm building the bots and they seem to be not grouping up with each other or hunting for really far away hives. They just sit near the droid assembler. there was one squad that formed up and hunted biters but after that squad died the rest just didnt move from the droid assembler. Config.lua doesnt seem to have information on how big the tilesize they search for so im stumped.

kyranzor
Filter Inserter
Filter Inserter
Posts: 499
Joined: Fri Oct 31, 2014 4:52 pm
Contact:

Re: [MOD 0.12.35] Robot Army. 0.1.4 Released!

Post by kyranzor »

johnnyBgoode wrote:Tried using this today using the 0.1.4 version in the OP. I'm building the bots and they seem to be not grouping up with each other or hunting for really far away hives. They just sit near the droid assembler. there was one squad that formed up and hunted biters but after that squad died the rest just didnt move from the droid assembler. Config.lua doesnt seem to have information on how big the tilesize they search for so im stumped.
Please lower DEFAULT_SQUAD_RADIUS to 10 and increase the distance for joining nearby squads SQUAD_CHECK_RANGE to 20 and it will work better. I actually just did that myself when i had the same issue.

What happens is the droids are spawning and the first one makes a squad and then starts "wandering" but the droid doesn't actually have to move for the underlying factorio representation of a "unitgroup" to change position. The squad default radius is tied in with how far the squad wanders while idle. The problem stems from the representation of the squads position wandering away after the first droid spawns and creates the squad and because of the staggered spawning behaviour droids may or may not actually be close enough to join a squad each time, or when they do it might not be the first squad anymore because another smaller one was closer. So the result is a bunch of small under-sized squads standing around because none of them are large enough to start hunting. If you press F6 while looking at the clump you will see many circles (representing unitgroup "squad" positions) slowly moving around the droids. If you want, compare the movement of the circles before and after the fix (after making some new squads).

To fix the ones you have deployed now, either pick them all up and deploy them by hand (can do this before config fix, just spawn them close together and quickly) or let them be deployed by assembler again (after the config fix).

An alternative fix which avoids having to pick up the ones already spawned is to get some more droids and hand spawn them one or two at a time in the blob and you will see them join the undersized squads and trigger the hunting behaviour. It will help if you have already increased the squad check radius when doing this.

Post Reply

Return to “Mods”