Cosmoteer: Starship Architect & Commander

Cosmoteer: Starship Architect & Commander

Not enough ratings
Remote Power Patch Example
   
Award
Favorite
Favorited
Unfavorite
Tags: Mods
File Size
Posted
118.246 KB
3 Nov, 2022 @ 11:52am
1 Change Note ( view )

Subscribe to download
Remote Power Patch Example

Description
This mod is an example mod showing how to allow cross mod interaction and how to add Remote Power support either directly to your mod, or in a separate patch mod (useful if you don't want to depend on Remote Power).

Specifically this example shows how to add the PowerPlacebo buff directly to a Part definition, additionally it shows how to use a special field I am calling "ModParts" that is created in the terran.rules to allow other mods to interact with the parts defined in a mod. Using this intermediary you can directly add the PowerPlacebo buff to the parts supported buff, this is what allows patch mods to work.

Keep in mind that Cosmoteer now loads mods in order according to their ID. So you may require the patch mod to have an ID that would sort after both your own mod and the Remote Power mod (which is csdgn.wifi_power). Prefixing it with a z should be sufficient.
6 Comments
Vrishnak92™ 26 Nov, 2022 @ 4:47am 
...so why did @焱缪_猫猫兔[yan miu] essentially google translate the mod page into simplified chinese?
maomaotu 25 Nov, 2022 @ 10:34pm 
这个mod是一个示例mod,展示了如何允许跨mod交互,以及如何将远程电源支持直接添加到mod中,或在单独的补丁mod中(如果您不想依赖远程电源,则很有用)。



具体来说,这个例子展示了如何将PowerPlacebo buff直接添加到Part定义中,另外它还展示了如何使用我称为“ModParts”的特殊字段,该字段是在人族中创建的。允许其他mod与mod中定义的部件交互的规则。使用这个中介,您可以直接将PowerPlacebo buff添加到支持部件的buff中,这就是补丁模块能够工作的原因。



请记住,Cosmteer现在根据其ID按顺序加载mod。因此,您可能需要补丁mod具有一个ID,该ID将按照您自己的mod和远程电源mod(即csdgn.wifi_Power)进行排序。用z前缀应该就足够了。
Chase  [author] 22 Nov, 2022 @ 11:00pm 
Please note that Remote Power contains a script that can be used to create patches. It's not perfect but can do most of the heavy lifting.
Vrishnak92™ 22 Nov, 2022 @ 9:23pm 
"Keep in mind that Cosmoteer now loads mods in order according to their ID."

A poor decision really... thanks for the headsup though
Star_Code000 5 Nov, 2022 @ 8:58am 
Thanks
tantananan 4 Nov, 2022 @ 2:38am 
Nice! Cheers!