[MOD 0.18] Robot Army. v0.4.4

Topics and discussion about specific mods
SpeedyBrain
Long Handed Inserter
Long Handed Inserter
Posts: 77
Joined: Wed May 20, 2015 12:08 am
Contact:

Re: [MOD 0.12.29] Robot Soldiers. Updated to 0.1.1

Post by SpeedyBrain »

I was doing something like this back when I started the SupremeWarfare mod :)
Sadly if you want to fully automate it you will run soon into performance problems... (limited by modding API)
I am hoping that it will get better when version 0.13 is released^^

If you are interested in working on a 'RTS' Mod together drop me a line. I think the more people work on such a project the better it will turn out ;)
With a good amount of people you can focus on the quality of the mod.
ImageImageImageImage
kyranzor
Filter Inserter
Filter Inserter
Posts: 499
Joined: Fri Oct 31, 2014 4:52 pm
Contact:

Re: [MOD 0.12.29] Robot Soldiers. 0.1.2 Updated!

Post by kyranzor »

Version 0.1.2 release!
Recent Update: 0.1.2
Date: April 17, 2016
Changes: When a player places a droid unit, the droid unit is added to that player's unique "squad". This squad is commanded to follow the player at all times. Please play-test this functionality. One cool thing I saw while play testing was I had a personal robo-port with logistics bots and repair packs, and my drones where repairing my droid soldiers in the middle of combat. I was acting like a medic! It was cool and gives me more ideas.
Get the files in original post.

I am working on some code which is almost done which allows me to generate new squads if there are no nearby squads, or add droids to existing squad if it's close enough. Next after that is stable, is adding simple GUI buttons which will be along the lines of a button for: "guard here", "follow me", "set patrol A", "set patrol B", "begin patrol", "hunt", "disband". What these will eventually do is pretty self-explanatory.

Speedybrain: Hopefully with some good optimisation and as little table-scraping as possible it should be reasonably low impact on performance, up to a point of course. If Factorio gets Lua JIT we will be cheering! Could iterate 100,000 times in a millisecond or two! In terms of developing a full-on RTS mod, I certainly don't have time to do that, but I am trying to get some framework in place for handling squads of units, so the units can be anything and all of this can be expanded on later. I really do want to make some robot-assembler buildings which "Deploy"/spawn units and they auto-join/create a squad and maybe have a rallypoint or default order set from within the building itself. Being able to create units automatically is important for an RTS mod, can't rely on the player to have to place all the units!
DOSorDIE
Filter Inserter
Filter Inserter
Posts: 255
Joined: Sat Oct 11, 2014 3:43 pm
Contact:

Re: [MOD 0.12.29] Robot Soldiers. 0.1.2 Updated!

Post by DOSorDIE »

Get an error with 0.1.2
i can produce it but when i want to place it I get this.
Error.jpg
Error.jpg (12.75 KiB) Viewed 15707 times
Please fix!
kyranzor
Filter Inserter
Filter Inserter
Posts: 499
Joined: Fri Oct 31, 2014 4:52 pm
Contact:

Re: [MOD 0.12.29] Robot Soldiers. 0.1.2 Updated!

Post by kyranzor »

DOSorDIE wrote:Get an error with 0.1.2
i can produce it but when i want to place it I get this.
Error.jpg
Please fix!
Have you got a multiplayer name? start a multiplayer game by yourself and make sure you have a character name.
DOSorDIE
Filter Inserter
Filter Inserter
Posts: 255
Joined: Sat Oct 11, 2014 3:43 pm
Contact:

Re: [MOD 0.12.29] Robot Soldiers. 0.1.2 Updated!

Post by DOSorDIE »

I have try it in Multiplayer (and yes i have a name) but same error :(
Qon
Smart Inserter
Smart Inserter
Posts: 2164
Joined: Thu Mar 17, 2016 6:27 am
Contact:

Re: [MOD 0.12.29] Robot Soldiers. Updated to 0.1.1

Post by Qon »

I forgot to mention (0.1.1): If you attack a robot soldier they turn on you and try to kill you. Probably succeed also if you are in the middle of a hundred or so q:
My mods: Capsule Ammo | HandyHands - Automatic handcrafting | ChunkyChunks - Configurable Gridlines
Some other creations: Combinassembly Language GitHub w instructions and link to run it in your browser | 0~drain Laser
kyranzor
Filter Inserter
Filter Inserter
Posts: 499
Joined: Fri Oct 31, 2014 4:52 pm
Contact:

Re: [MOD 0.12.29] Robot Soldiers. 0.1.2 Updated!

Post by kyranzor »

Okay ill check out what's going on with the control lua error DOSorDIE.

Qon, yes they attack (only the one you shot btw) if you friendly fire them. Avoid spamming shotgun shots near them.
Qon
Smart Inserter
Smart Inserter
Posts: 2164
Joined: Thu Mar 17, 2016 6:27 am
Contact:

Re: [MOD 0.12.29] Robot Soldiers. 0.1.2 Updated!

Post by Qon »

kyranzor wrote:only the one you shot btw
False.
My mods: Capsule Ammo | HandyHands - Automatic handcrafting | ChunkyChunks - Configurable Gridlines
Some other creations: Combinassembly Language GitHub w instructions and link to run it in your browser | 0~drain Laser
kyranzor
Filter Inserter
Filter Inserter
Posts: 499
Joined: Fri Oct 31, 2014 4:52 pm
Contact:

Re: [MOD 0.12.29] Robot Soldiers. 0.1.2 Updated!

Post by kyranzor »

Qon wrote:
kyranzor wrote:only the one you shot btw
False.
Well maybe we had different situations going on because I had already found and played around with that "feature" and it was only the single guy who you shoot at that tries to kill you. Could you please test again and tell me what you do?
kyranzor
Filter Inserter
Filter Inserter
Posts: 499
Joined: Fri Oct 31, 2014 4:52 pm
Contact:

Re: [MOD 0.12.29] Robot Soldiers. 0.1.2 Updated!

Post by kyranzor »

Qon wrote:
kyranzor wrote:only the one you shot btw
False.
Well maybe we had different situations going on because I had already found and played around with that "feature" and it was only the single guy who you shoot at that tries to kill you. Could you please test again and tell me what you do?
Qon
Smart Inserter
Smart Inserter
Posts: 2164
Joined: Thu Mar 17, 2016 6:27 am
Contact:

Re: [MOD 0.12.29] Robot Soldiers. 0.1.2 Updated!

Post by Qon »

Well almost every time I do it all of them respond. I've tested several times. If the robots die instantly they don't tell the others and no one attacks back. If I hurt 1, every robot within a short distance (maybe 20 tiles radious or something) will then all attack me, always. I'm using shotgun, but even the guys behind me will attack me if I hurt one of their pals if they see me do it.
My mods: Capsule Ammo | HandyHands - Automatic handcrafting | ChunkyChunks - Configurable Gridlines
Some other creations: Combinassembly Language GitHub w instructions and link to run it in your browser | 0~drain Laser
kyranzor
Filter Inserter
Filter Inserter
Posts: 499
Joined: Fri Oct 31, 2014 4:52 pm
Contact:

Re: [MOD 0.12.29] Robot Soldiers. 0.1.2 Updated!

Post by kyranzor »

Qon wrote:Well almost every time I do it all of them respond. I've tested several times. If the robots die instantly they don't tell the others and no one attacks back. If I hurt 1, every robot within a short distance (maybe 20 tiles radious or something) will then all attack me, always. I'm using shotgun, but even the guys behind me will attack me if I hurt one of their pals if they see me do it.
I don't know what to say.. I just tested it again while fixing the issue DOSorDIE had with the crash. Only the robot I shoot at (I put mouse over him, use C to force fire) will shoot back at me. The other 24 just stood around watching.


HOTFIX RELEASED: Deals with undefined state of someone loading with the mod into a game which did not have the mod from the beginning. checks for player's unique table and creates it if it doesn't exist.

Sandbox testing results - The sandbox scenario "god controller" player can be followed by the squad of droids. This opens up more direct "RTS" style gameplay. Once I get GUI control buttons going it will be cool to play with having a disembodied character and building a factory and controlling an army.
LoSboccacc
Filter Inserter
Filter Inserter
Posts: 253
Joined: Wed Feb 20, 2013 9:35 pm
Contact:

Re: [MOD 0.12.29] Robot Soldiers. 0.1.2 HOTFIX

Post by LoSboccacc »

this mod is very interesting! how hard would it be to have them respond to basic order, like click on a radio item, map pops up, click on map and robots go there?
kyranzor
Filter Inserter
Filter Inserter
Posts: 499
Joined: Fri Oct 31, 2014 4:52 pm
Contact:

Re: [MOD 0.12.29] Robot Soldiers. 0.1.2 HOTFIX

Post by kyranzor »

LoSboccacc wrote:this mod is very interesting! how hard would it be to have them respond to basic order, like click on a radio item, map pops up, click on map and robots go there?
Not hard, that's the next round of features. I am very close (today maybe?) to releasing the new version which has full manufacture + deploy (spawn) + automatically sending them in groups to attack nearest biters. I need some GUI buttons for the squad orders functionality though so that might take some time.
LoSboccacc
Filter Inserter
Filter Inserter
Posts: 253
Joined: Wed Feb 20, 2013 9:35 pm
Contact:

Re: [MOD 0.12.29] Robot Soldiers. 0.1.2 HOTFIX

Post by LoSboccacc »

wonderful! attacking is the last part of the game that needs manual intervention can't wait to put that problem under logistic categoy :D
kiba
Filter Inserter
Filter Inserter
Posts: 344
Joined: Thu Jun 11, 2015 5:32 am
Contact:

Re: [MOD 0.12.29] Robot Soldiers. 0.1.2 HOTFIX

Post by kiba »

LoSboccacc wrote:wonderful! attacking is the last part of the game that needs manual intervention can't wait to put that problem under logistic categoy :D
Amateur talks tactics and strategies, professional talks logistics, or something like that.
kyranzor
Filter Inserter
Filter Inserter
Posts: 499
Joined: Fri Oct 31, 2014 4:52 pm
Contact:

Re: [MOD 0.12.29] Robot Soldiers. 0.1.3 squads hunt!

Post by kyranzor »

Version 0.1.3 released! New changes include fixed animations (muzzle flash, selection box) for droids, added building which deploys/places them, droids will join a nearby squad when they spawn (or create their own) and when they reach 5 members they will begin moving to hunt nearest biters/enemy players stuff. You can manually add more droids to an existing squad merely by placing more droids down close to the squad.

This is the main functionality I think most of you wanted - they don't follow you anymore, or stay still and guard (unless you place only 4 down! They will just wander/defend in that scenario which is kind of cool. ). You can now mass-produce these guys to swarm out and kill all biters.

When a squad dies, you will get a little message on the side (console print-out). This can be useful feedback to know if your squads are surviving much or not. if you end up with MANY small squads it may get annoying if they are getting pwned in the late-game a lot. Please test this and get back to me, it will be a quick fix in future if it is not wanted.
Qon
Smart Inserter
Smart Inserter
Posts: 2164
Joined: Thu Mar 17, 2016 6:27 am
Contact:

Re: [MOD 0.12.29] Robot Soldiers. 0.1.3 squads hunt!

Post by Qon »

Trying to deploy robot soldiers with a droid assembler:

Code: Select all

Error while running the event handler: __robotarmy__/prototypes/Squad.lua:41: attempt to index local 'newsquad' (a nil value)
Robot soldiers 0.1.3
Factorio 0.12.29

My guess:
So essentially you can only spawn soldiers after you have already spawned some or you will crash and burn ;)
My mods: Capsule Ammo | HandyHands - Automatic handcrafting | ChunkyChunks - Configurable Gridlines
Some other creations: Combinassembly Language GitHub w instructions and link to run it in your browser | 0~drain Laser
DOSorDIE
Filter Inserter
Filter Inserter
Posts: 255
Joined: Sat Oct 11, 2014 3:43 pm
Contact:

Re: [MOD 0.12.29] Robot Soldiers. 0.1.3 squads hunt!

Post by DOSorDIE »

Thats exacly what i want ... good Job ! :D
And now we need only T2 and T3 ;)
kyranzor
Filter Inserter
Filter Inserter
Posts: 499
Joined: Fri Oct 31, 2014 4:52 pm
Contact:

Re: [MOD 0.12.29] Robot Soldiers. 0.1.3 squads hunt!

Post by kyranzor »

Qon wrote:Trying to deploy robot soldiers with a droid assembler:

Code: Select all

Error while running the event handler: __robotarmy__/prototypes/Squad.lua:41: attempt to index local 'newsquad' (a nil value)
Robot soldiers 0.1.3
Factorio 0.12.29

My guess:
So essentially you can only spawn soldiers after you have already spawned some or you will crash and burn ;)
Ah that's an interesting condition! I'll get onto fixing that now :)

It seems that my util function "Shallowcopy" somehow returned nil, but that means that a globally declared table "global.SquadTemplate" somehow failed to copy, which doesn't make sense at all :(. How can some explicitly declared then completely fail to copy? A really weird bug for sure. Hopefully it's rare and I can find a workout, like as you say placing a droid down first (which will indeed set up a few tables if they didn't exist but it's strange this bug happens).
Post Reply

Return to “Mods”