奥拓星球 / Autonauts

奥拓星球 / Autonauts

34 个评价
SameNameSameWork
2
   
奖励
收藏
已收藏
取消收藏
标签: auto
文件大小
发表于
更新日期
28.058 KB
2021 年 3 月 4 日 上午 7:33
2021 年 6 月 19 日 下午 9:15
3 项改动说明 ( 查看 )

订阅以下载
SameNameSameWork

描述
注意:SameNameSameWork, SameLeaderSameWork 和 SameGroupSameWork 是同一个问题的不同解决方式,不能同时使用,选一个喜欢的方式用吧。

在这游戏中,常常需要从一台机器人复制同样的指令到另一台,然而实际执行非常麻烦,要更新指令的时候也只能一台一台更新,就不能自动同步吗? SameNameSameWork试图让这件事情变得简单一点。

SameNameSameWork会复制同样名称的正在执行的机器人的指令给同名的停止中的机器人,以此实现同步。若要更新指令,先停止同名的所有机器人,然后选择任何一台机器人,更新指令后启动他,就能自动同步到所有同名的机器人。

注意:这个mod会同步所有同名的机器人,无论他们是不是在同一个团队中,如果你有同名但不同团队的机器人在做不同的事情,请先改名后使用。

希望能有帮助。

设定:
AutoStart(预设: true) 同步指令后自动启动机器人
AutoSync(预设: true) 虽然自动同步很方便,但在机器人较多时(400~500)时,这个mod的同步可能会导致lag,如果问题严重,可以把AutoSync关掉,改用SyncHotKey进行同步。
checkInterval(预设: 1秒) 自动同步的频率,若遇到lag可以试着延长同步的频率,但是时间拉太长操作感会变得奇怪。
SyncHotKey(预设: "1")立刻同步指令


不喜欢一直复制贴上名称?试试 https://psteamcommunity.yuanyoumao.com/sharedfiles/filedetails/?id=2413170786
要停止全部机器人只能一个一个选起来停很麻烦?试试 https://psteamcommunity.yuanyoumao.com/sharedfiles/filedetails/?id=2419248933
30 条留言
Sunyata 2024 年 2 月 13 日 下午 10:32 
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 2023 年 7 月 6 日 上午 6:13 
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 2022 年 12 月 27 日 下午 12:46 
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 2022 年 12 月 26 日 上午 7:43 
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 2022 年 12 月 26 日 上午 7:33 
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 2021 年 6 月 23 日 上午 4:51 
@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  [作者] 2021 年 6 月 23 日 上午 2:56 
@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 2021 年 6 月 22 日 上午 9:22 
@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  [作者] 2021 年 6 月 21 日 下午 9:09 
@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 2021 年 6 月 21 日 下午 8:05 
@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