Take On Mars

Take On Mars

评价数不足
Fix Sample Replication
   
奖励
收藏
已收藏
取消收藏
Item Type: Modification
Dependencies: Standard
文件大小
发表于
更新日期
81.166 KB
2020 年 8 月 12 日 下午 6:35
2020 年 8 月 12 日 下午 6:52
2 项改动说明 ( 查看 )

订阅以下载
Fix Sample Replication

描述
Fixes an existing bug(as of build 39544) where survey tools fail to replicate to non-host clients information regarding where a sample was taken. This resulted in sample analysis results failing to replicate to said clients.

Mod changes one of the methods in the controller scripts for the soil scoop, drill and atmospheric sample collector. I'm not aware of any mods also changing these, however.
9 条留言
RA2lover  [作者] 2020 年 9 月 16 日 下午 6:54 
Main branch. Haven't checked for differences in the test branch.
Mr. Monochrome [Hood Certified] 2020 年 9 月 16 日 下午 1:36 
@RA2lover

Is this for the main or test branch of the game? I ask because maybe this was fixed in the test branch. A lot of players don't know there are two branches still for this game the main and test branch. The latter has more updates then what the main branch has. The issue *might* be fixed there.
ryan_ 2020 年 8 月 23 日 上午 4:22 
Clear. More and more communicating with the creators of mods, I come to the conclusion that Dram (the lead developer) did not do anything. Since the problems are solved with a simple copy-paste of entire sections of scripts.
RA2lover  [作者] 2020 年 8 月 22 日 下午 6:59 
Sort of. While you can get a high-level understanding of how the controller scripts work by reading them, I just didn't bother checking whether you can make a mod change only specific methods within a class, and included the entire classes when writing this mod. If there's a way to only include the modified methods within a modified class, just let me know how and i'll update the mod to do that.

The only change made within each modified class was adding a line calling SynchGenVec within CreateSample after the created sample entity is fed with data telling where the sample was taken.

As for surface type check, it's contained within UpdateAuger, which is kind of a god method within the soil scoop controller class. Similar logic is present in UpdateDrilling on the hand drill controller class, but including ice and snow material enums.
ryan_ 2020 年 8 月 22 日 下午 6:14 
SO you don't understand how scripts work. You stupidly copy them as they are. Without changing anything about them. Right ?
RA2lover  [作者] 2020 年 8 月 22 日 下午 6:12 
what do you mean by that?

I don't have documentation on the full API mods have access to - only the existing examples. This mod also copies the entire controller script from the hand tools - so it would probably be incompatible with other mods affecting these.

The controllers should have a list of valid surface materials - fixing that to include ice would solve that issue, but i'm not exactly aware of which surface types exist and where they do within map locations.
ryan_ 2020 年 8 月 22 日 下午 12:58 
UFF. I See. Concerns multiplayer. And I thought that the bug with taking a sample was fixed. There is such a problem. On maps where there is a lot of ice, such as South Polar Cap, you can't take a Soil sample. However, I have already found a way to fix this bug. Do you have a full description of the script programming developer ?
RA2lover  [作者] 2020 年 8 月 22 日 上午 9:05 
@ryan_: Multiplayer mode has a bug you can reproduce by:
1 - Joining a server as a client
2 - Taking a sample from a survey tool(soil scoop/hand drill/atmospheric collector)

Within the perspective of a client, that sample will be unnanotated instead of having a label indicating where it was collected. If that sample gets analyzed, the map resource view doesn't update for those clients.

Why? The server, when creating the sample, forgets to tell to other players where the sample was collected in. The fact a sample was created is passed on to clients, but because it forgot to tell them where it was taken, the clients don't know it and can't act on it.

The mod changes these tools, adding a script line telling the server to tell clients where the sample was taken. This not only provides label location info, but also lets them know which sectors to update in the map resource view once the sample gets analyzed. Without this fix, they'd need to leave the server and rejoin to get updates.
ryan_ 2020 年 8 月 21 日 下午 2:40 
And in more detail ? Nothing is clear from the description. What exactly has been changed. What exactly did this lead to