Install Steam
login
|
language
简体中文 (Simplified Chinese)
繁體中文 (Traditional Chinese)
日本語 (Japanese)
한국어 (Korean)
ไทย (Thai)
Български (Bulgarian)
Čeština (Czech)
Dansk (Danish)
Deutsch (German)
Español - España (Spanish - Spain)
Español - Latinoamérica (Spanish - Latin America)
Ελληνικά (Greek)
Français (French)
Italiano (Italian)
Bahasa Indonesia (Indonesian)
Magyar (Hungarian)
Nederlands (Dutch)
Norsk (Norwegian)
Polski (Polish)
Português (Portuguese - Portugal)
Português - Brasil (Portuguese - Brazil)
Română (Romanian)
Русский (Russian)
Suomi (Finnish)
Svenska (Swedish)
Türkçe (Turkish)
Tiếng Việt (Vietnamese)
Українська (Ukrainian)
Report a translation problem
- 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.
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.
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.
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
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
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 ^-^
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
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
I have finished reading it, and I probably understand your design
If you don’t want to publish, I can try to fork from the current version to a version that considers the group name and mention your contribution. How about that?
The more troublesome part is probably AutoSync, because you have to load the game to check if there are duplicate groups, but AutoSync can only be set outside the game
Your approach is to use shortcut keys to switch AutoSync in the game, but there is no way to check which shortcut keys will do in the game. This makes me very unwilling to use shortcut keys.
https://pastebin.com/mBPzZjHz
See GetGroups() function for your question. It was my solution. Maybe it's too much and reduce the "many bots" threshold, but, meh! it was fine to me.
I don't specially want to publish my script. It was just for me. I used your codes (2-3 mods), learned modding for autonauts "for the fun", make my own version and "it work like a want", that's it :p Plus, I don't want to maintain this (specially when I'm **not** playing the game)
But, I don't know :shrug, if you want and if my script helps you , note my name somewhere :p
How can I tell if there are two groups with the same name? When I test, if two groups are called "aaa", ModBot.GetBotGroupNames() will get ["aaa"] instead of ["aaa", "aaa"], please share your version, thanks.
In addition, if you want, you can fork a version that has a group name, as long as you refer to this mod.
I modified your mod a month ago, for my own use. And indeed. The API don't provide us the ability to get group id. Instead we can only get names.
If two or more groups have the exact same name. The code "merge" these groups to one and we get all their bots, when we use their id for synchronisation.
Personally, I used a popup to warn me when groups have the same name
(If you want, I can share my "edit" with you)
When I was making this mod, I imagined that you only need to do some ordinary operations, modify the name, modify the code, and do not need to press any shortcut keys.
Of course, the ideal situation is that I only synchronize once when changing the name/code, but there is no such type of event as "when..." in the mod file of autonauts, so I can only check and sync every second.
If there is no performance problem, I don't even want to set the AutoSync switch, so I want to keep AutoSync turned on by default. This is also to let people who have installed this mod not feel that this mod suddenly fails.
As for the part of the group name you mentioned, I just checked the file and tested it. If there are two groups with the same name, I cannot tell them apart. I think this will cause more confusion. Even if you don’t consider performance issues, using group names does not seem to be a good way.
I'm sorry, but getting the group name will reduce the performance of this mod, and it is currently known to have performance issues when the number of robots is large.
When I use it myself, I use a naming method like this
In the wheat group
wheat-harvest
wheat-planting
wheat-watering
I will add a reminder that this mod will affect all robots with the same name
But I realized after that my groups have sometimes the same name (deeply nested xD), that's the issue.
*Since we can only get name's groups and not id, the script loops the same group multiple times
If i'm not wrong, a warning in the description could be nice :)
The method currently in mind is to reduce the frequency of checking/synchronization, but I am not sure if this method will have other problems