Autonauts

Autonauts

32 ratings
SameNameSameWork
2
   
Award
Favorite
Favorited
Unfavorite
Tags: auto
File Size
Posted
Updated
28.058 KB
4 Mar, 2021 @ 7:33am
19 Jun, 2021 @ 9:15pm
3 Change Notes ( view )

Subscribe to download
SameNameSameWork

Description
Caution: SameNameSameWork, SameLeaderSameWork and SameGroupSameWork are different solutions to the same problem and cannot be used at the same time. Choose the one you like.

In this game, it is often necessary to copy the same instructions from one robot to another. However, the actual execution is very troublesome. When you want to update the instructions, you can only update one by one. Can't it be automatically synchronized? SameNameSameWork tries to make this thing a little easier.

SameNameSameWork will copy the instructions of the executing robot of the same name to the stopped robot of the same name to achieve synchronization. To update instructions, first stop all robots with the same name, then select any robot, start it after updating the instruction, and it will automatically synchronize to all robots with the same name.

Note: This mod will synchronize all robots with the same name, whether they are in the same team or not. If you have robots with the same name but different teams doing different things, please change the name first.

Hope it helps.

set up:
AutoStart (default: true) Automatically start the robot after synchronization command
AutoSync (default: true) Although automatic synchronization is very convenient, when there are many robots (400~500), the synchronization of this mod may cause lag. If the problem is serious, you can turn off AutoSync and use SyncHotKey to synchronize. .
checkInterval (default: 1 second) The frequency of automatic synchronization. If you encounter lag, you can try to extend the frequency of synchronization, but if the time is too long, the operation will become strange.
SyncHotKey (default: "1") Sync command immediately


Don't like to keep copying and pasting names? Try https://gtm.steamproxy.vip/sharedfiles/filedetails/?id=2413170786
To stop all the robots, it is troublesome to select them one by one? Try https://gtm.steamproxy.vip/sharedfiles/filedetails/?id=2419248933
30 Comments
Sunyata 13 Feb, 2024 @ 10:32pm 
This mod was great in older days, but now Bot Databse is enhanced and easy to use. Further more, I experienced a problem using this mod in current game version. A container was stuck and I can't put something in or out so I had to reload the game. I guess this mod may caused it, I'm not sure though.
Rushin 6 Jul, 2023 @ 6:13am 
I'm a little confused, isn't this exactly what the bot database does in vanilla? Was this mod created before it even existed or is it helping achieve something else?
Ohmere 27 Dec, 2022 @ 12:46pm 
Possible bugs:
- Doesn't seem to work across different bot tiers
- Doesn't seem to work on bot tiers other than the lowest.

This is likely because I'm using another mod "BotUpgrade" to change T0 bots to T1 and above

I shall test this.
Ohmere 26 Dec, 2022 @ 7:43am 
Or, another idea.

I have a farming area where bots each have a 1x10 slice next to each other.
Each new bot i add I use the SameName thing then change the name afterwards so I can move the search area of each new bot up by one.

Maybe you could find a way to include "shifting" into the name, so each new bot has the SameName but a syntax in the name can have them "shift" by whatever is written like... I dunno Berry Farmer <Z+1>

Maybe you could make it so each new bot added "counts" how many with the SameName there are already and "shifts" that number of times.
Ohmere 26 Dec, 2022 @ 7:33am 
May I suggest a idea:

A few options where you can toggle what aspects to ignore when copying scripts.

Things like storing locations, bot search locations, what building to use, player set values in scripts etc...

For example, two bots storing two different things at two locations.
You don't want to sync their search or storing location but what they do when the storage container is full, so you toggle the search location and store location to be ignored.

Of course I'm not asking for a perfect solution, I still expect having to tweak some values back to what they were, but I just think this might help just a little bit.
Megümin · Arkäne 23 Jun, 2021 @ 4:51am 
@windthunder310
Yeah, same here ^^

Anyway, I would like to say, good luck & thanks for your mods. ^^
And don't push to hard, a new feature is coming to "register a bot to a script" (auto sync). But, it can be released in 2 months or 2 years, we don't know :D
windthunder310  [author] 23 Jun, 2021 @ 2:56am 
@Arch-kain

I’m not familiar with lua. In fact, this is my first mod.

I have not done the performance analysis of this mod, so I don’t know what is the main reason for the performance problem, I guess it is in ModBot.GetScriptSavegameFormat() and ModBot.SetScriptSavegameFormat(), if it is really the problem of these two functions , There is probably no way to solve it, because the number of uses of these two functions cannot be reduced.

I have to find out how to check the running time of lua before testing
Megümin · Arkäne 22 Jun, 2021 @ 9:22am 
@windthunder310
No worries! I have issues with english, and use google translate too :p

People can forget what the shortcut is indeed ^^ But they can re-read the mod's description instead. Set their own shortcut helps to remember (for F5 make sense to me)
That apart, using a shortcut to temporary pause/play auto sync is not ideal, yes x) But it was my solution to my design and, to the "lack of api"

In your case, for the performance concerns, (and i know too much loops can cause performance issues sometimes) , I don't know if 2 loops (register script ; set script) is "too much" or not. But it is necessary. Instead, this is maybe a game performance issue
I don't think either that adding a shortcut is useful in this case

But! (i'm way **not** a lua expert xD), maybe instead of 2 loops, using just one can improve performances:
- register script if its not already (re-check this bot later if no script)
- otherwise, set script
'just a thought, I don't know ^-^
windthunder310  [author] 21 Jun, 2021 @ 9:09pm 
@Arch-kain

Sorry for my bad English, although it is ok to read the file, but I can’t write, so I use Google Translate

Regarding the shortcut key part, I mean for the player, if he forgets what the shortcut key is for a certain operation in the game, he can’t check it in the game, he can only go back to the main screen and go to the mod setting to find it. I think this is bad.

So if the performance problem can be solved, I hope there is no need to set the AutoSync switch and shortcut keys (Always AutoSync)

But in this version of yours, there should be no way to remove the shortcut keys
Megümin · Arkäne 21 Jun, 2021 @ 8:05pm 
@windthunder310

I can try to fork from the current version to [...]
If it's a question, if you want, do as you like! :D
but (like i said, if i helped), yeah, i would like a mention of me somewhere, why not, and that would be nice of you ^-^

For the rest, I'm not sure if I understand very well what you mean :thinking: but let's try!

The more troublesome[...] (it's a fact)
Yes, indeed

"which shortcut", I suppose you mean " the player don't know what the shortcut do" ?
[But in case : NO]
We (you & me) don't need to know what the shortcut's value is (it's 1, 3 or something else ?),
we just need its name (eg. my "Toggle auto sync")

[YES] When I wrote this, I thought a description :
<shortcut name> do <this>. Please, check if it's not already used (we can only use 1-9, it's very limited)
I recommend <this shortcut>* ; in your case, you can use it


* My own shortcuts was
"Sync bots now" : F5
"Toggle auto sync" : F6 (or Ctrl+F5) -ish