Vectorial1024 / v1024_civilian_fleets

Create civilian fleets to help manage your traders and miners.
https://www.nexusmods.com/x4foundations/mods/335
MIT License
18 stars 10 forks source link

Git clone or steam download cannot run the mod #39

Closed calpa closed 4 years ago

calpa commented 4 years ago

Hello, this is my second day in x4. And I find that I cannot make a Civilian Fleets using the mod in Steam. So I git clone the whole folder and put them in extensions folder,

Error Log:

[General] 60580.73 ======================================
[=ERROR=] 60580.73 File I/O: Could not find file '.\extensions\v1024_civilian_fleets-master\md\civilianfleets_signals.xml.sig'
[General] 60580.73 ======================================
[General] 60580.73 File I/O: Failed to verify the file signature for file '.\extensions\v1024_civilian_fleets-master\md\civilianfleets_signals.xml' (error: 14)
[General] 60580.73 ======================================
[=ERROR=] 60580.73 Skipping patch because sinceversion value 0 is invalid. MD script 'extensions\v1024_civilian_fleets-master\md\civilianfleets_signals.xml', line 30
[General] 60580.73 ======================================
[General] 60580.73 ======================================
[=ERROR=] 60580.73 File I/O: Could not find file '.\extensions\v1024_civilian_fleets-master\md\v1024cf_sirnukes_api.xml.sig'
[General] 60580.73 ======================================
[General] 60580.73 File I/O: Failed to verify the file signature for file '.\extensions\v1024_civilian_fleets-master\md\v1024cf_sirnukes_api.xml' (error: 14)
[General] 60580.73 ======================================
[=ERROR=] 60580.73 File I/O: Could not find file '.\extensions\v1024_civilian_fleets-master\md\v1024_civilian_fleets.xml.sig'
[General] 60580.73 ======================================
[General] 60580.73 File I/O: Failed to verify the file signature for file '.\extensions\v1024_civilian_fleets-master\md\v1024_civilian_fleets.xml' (error: 14)
[General] 60580.73 ======================================
[=ERROR=] 60580.73 Script warning: MD script 'CivilianFleets_Signals' references non-existing AI order 'TaterTrade' via <create_order>
[General] 60580.73 ======================================
[General] 60580.76 ======================================
[=ERROR=] 60580.76 Error while executing onEvent script for event: Lua_Loader.Load.
Errormessage: [string "ui/addons/ego_debug/Lua_Loader.lua"]:52: module 'extensions.v1024_civilian_fleets.civilian_fleets' not found:
    no field package.preload['extensions.v1024_civilian_fleets.civilian_fleets']
    no file 'extensions\v1024_civilian_fleets\civilian_fleets.txt'
    no file '.\extensions\v1024_civilian_fleets\civilian_fleets.lua'
    no file 'E:\SteamLibrary\steamapps\common\X4 Foundations\lua\extensions\v1024_civilian_fleets\civilian_fleets.lua'
    no file 'E:\SteamLibrary\steamapps\common\X4 Foundations\lua\extensions\v1024_civilian_fleets\civilian_fleets\init.lua'
    no file 'ui\core\lualibs\extensions\v1024_civilian_fleets\civilian_fleets_64.dll'
    no file 'ui\core\lualibs\extensions_64.dll'
Vectorial1024 commented 4 years ago

I uploaded a new version of the mod a few minutes ago.

[=ERROR=] 60580.73 Skipping patch [...]

This bug about an empty patch tag is now fixed in that version.

[=ERROR=] 60580.73 File I/O: Could not find file ' [...] .xml.sig'

This is a common "error" among X4 mods, and is harmless.

[=ERROR=] 60580.76 Error while executing onEvent script for event: Lua_Loader.Load. [...]

Ah... this... is your computer Win7? I think I encountered this kind of problem from users before.

calpa commented 4 years ago

Thank you for your quick response, and I am using win10.

calpa commented 4 years ago

I had renamed the folder name from v1024_civilian_fleets-master to v1024_civilian_fleets solve that folder problem, but here are more errors...

[General] 60580.73 ======================================
[=ERROR=] 60580.73 File I/O: Could not find file '.\extensions\v1024_civilian_fleets\md\civilianfleets_signals.xml.sig'
[General] 60580.73 ======================================
[General] 60580.73 File I/O: Failed to verify the file signature for file '.\extensions\v1024_civilian_fleets\md\civilianfleets_signals.xml' (error: 14)
[General] 60580.73 ======================================
[=ERROR=] 60580.73 Script warning: MD script 'CivilianFleets_Signals' references non-existing AI order 'TaterTrade' via <create_order>
[General] 60605.22 ======================================
[=ERROR=] 60605.22 Error in MD cue md.CivilianFleets_Signals.Signal_SyncOrders<inst:9d8c6>: Property lookup failed: $object
* Expression: $object
* Action: <create_order>, line 469
[General] 60605.22 ======================================
[General] 60605.22 ======================================
[=ERROR=] 60605.22 Error in MD cue md.CivilianFleets_Signals.Signal_SyncOrders<inst:9d8c6>: Evaluated value 'null' is not of type component
* Expression: $object
* Action: <create_order>, line 469
[General] 60605.22 ======================================
[General] 60661.53 ======================================
[=ERROR=] 60661.53 Error in MD cue md.CivilianFleets_Signals.Signal_SyncOrders<inst:a5b01>: Property lookup failed: $object
* Expression: $object
* Action: <create_order>, line 469
[General] 60661.53 ======================================
[General] 60661.53 ======================================
[=ERROR=] 60661.53 Error in MD cue md.CivilianFleets_Signals.Signal_SyncOrders<inst:a5b01>: Evaluated value 'null' is not of type component
* Expression: $object
* Action: <create_order>, line 469
[General] 60661.53 ======================================
[General] 60665.58 ======================================
[=ERROR=] 60665.58 Error in MD cue md.CivilianFleets_Signals.Signal_SyncOrders<inst:a6386>: Property lookup failed: $object
* Expression: $object
* Action: <create_order>, line 469
[General] 60665.58 ======================================
[General] 60665.58 ======================================
[=ERROR=] 60665.58 Error in MD cue md.CivilianFleets_Signals.Signal_SyncOrders<inst:a6386>: Evaluated value 'null' is not of type component
* Expression: $object
* Action: <create_order>, line 469
[General] 60665.58 ======================================
[General] 60698.60 ======================================
[=ERROR=] 60698.60 Error in MD cue md.CivilianFleets_Signals.Signal_SyncOrders<inst:aac16>: Property lookup failed: $object
* Expression: $object
* Action: <create_order>, line 469
[General] 60698.60 ======================================
[General] 60698.60 ======================================
[=ERROR=] 60698.60 Error in MD cue md.CivilianFleets_Signals.Signal_SyncOrders<inst:aac16>: Evaluated value 'null' is not of type component
* Expression: $object
* Action: <create_order>, line 469
[General] 60698.60 ======================================

By reading the code, I find that $fromShip_DefaultOrder.id maybe undefined. How to debug this?

Vectorial1024 commented 4 years ago

I had renamed the folder name from v1024_civilian_fleets-master to v1024_civilian_fleets solve that folder problem

Ah yes... I forgot about them. Thanks for the findings! I have updated the Steam instructions a bit.

[General] 60605.22 ======================================
[=ERROR=] 60605.22 Error in MD cue md.CivilianFleets_Signals.Signal_SyncOrders<inst:9d8c6>: Property lookup failed: $object
* Expression: $object
* Action: <create_order>, line 469
[General] 60605.22 ======================================

By reading the code, I find that $fromShip_DefaultOrder.id maybe undefined. How to debug this?

The default order being null should be impossible because I specified in the event conditions that the default order of fromShip has to be non-null before the rest of the event is executed...

What is happening is that Civilian Fleets tried to sync orders, but the order of the parent ship is not known by the mod, so it goes to the very bottom of the do_else block. If it really be fromShip_DefaultOrder being null, the error message would look more like this:

Cannot read property of null: $fromShip_DefaultOrder.id

While the $object variable is really unintended, and should be replaced by $toShip, but to really solve the problem at the root, I will need to know what default behavior your parent ship is running, so that I can handle that case. Most people are using either the vanilla AutoTrade or the TaterTrade mod, so it is not usual to have found this problem (or, this problem is not obvious in the first place...).

Could it be that your parent ship is a resupplier ship?

calpa commented 4 years ago

The parent ship is a transport ship, which is using RandomTrade mod as its default value.

FYI: I am using Better Kill Credit, Better Kill Credit, RandomTrade, AnotherExplorerV2, TradeSubscriptionExplorer, TradeSubscriptionExplorer, MultiRename, SirNukes Mod Support APIs, SatelliteDropper, Mules, Supply and Warehouses Extended, No Fog, Crystal Rarities and Escape Teleport mods.

RandomTrade: https://steamcommunity.com/sharedfiles/filedetails/?id=1684361910

Vectorial1024 commented 4 years ago

Then I understand why the bug occurred. Regarding RandomTrade, because the maker of RandomTrade claimed to have their own order-syncing feature inside their Random* mods (e.g., RandomTrade https://www.nexusmods.com/x4foundations/mods/300 , see the page description "v1.17" "update subordinates option"), I did not include them into our order-sync scheme. See #37 as a related discussion.

Luckily the $object being null means that the original intended "set follow" fallback behavior is not executed and so really nothing is done to RandomTrade subordinates, for example.

Perhaps I should enable the Random* fleets here? This I may think a bit first, because it is frustrating on this side that RandomTrade do not have obvious documentation that they have order-syncing on their side, only brief mentions... Really don't want to reinvent something.

calpa commented 4 years ago

I finally figure out this is a Random Trade problem, the default order id of fromship and toship are defined. Maybe I should remove random fleets and use TaterTrade.

fromShip_DefaultOrder.id: RandomTrade
toShip_DefaultOrder.id: TradeRoutine

Anyway, thanks.

calpa commented 4 years ago

I still cannot find the GUI of this package: image

image

Related code:

<language id="88">
    <page id="221024" title="CivFleetsUI" descr="Text needed by this mod for GUI" voice="no">
        <!-- DO NOT CHANGE THE $ID$ PART, that part is used to fill the fleet number. -->
        <t id="1">民用 $ID$</t>
        <t id="1000">成立/加入貿易艦隊</t>
        <t id="1001">貿易艦隊</t>
        <t id="1002">派貨艦隊</t>
        <t id="1101">TaterTrade艦隊</t>
        <t id="1201">Distribution Mule艦隊</t>
        <t id="1202">Station Mule艦隊</t>
        <t id="1203">Travel Mule艦隊</t>
        <t id="1204">Supply Mule艦隊</t>
        <t id="2000">成立/加入開採艦隊</t>
        <t id="2001">開採艦隊</t>
        <t id="100000">(SirNukes Modding API menu category)Civilian Fleets</t>
        <t id="100001">自動更新民用艦隊名稱</t>
        <t id="100002">民用艦隊應否自動更新其所屬艦隊的名稱?\(只適用於以後自動改名的時候\)\n\n預設為開啟;當此設定被更改時,新設定將即時生效。</t>
    </page>
</language>

Related Error message:

[General] 0.00 File I/O: Failed to verify the file signature for file '.\extensions\v1024_civilian_fleets\t\0001-l088.xml' (error: 14)

[General] 60900.53 File I/O: Failed to verify the file signature for file '.\extensions\v1024_civilian_fleets\aiscripts\order.dock.xml' (error: 14)

[General] 60900.53 File I/O: Failed to verify the file signature for file '.\extensions\v1024_civilian_fleets\aiscripts\order.mining.routine.xml' (error: 14)
Vectorial1024 commented 4 years ago
[General] 0.00 File I/O: Failed to verify the file signature for file '.\extensions\v1024_civilian_fleets\t\0001-l088.xml' (error: 14)

These kind of errors are normal for mods. Actually, if you see something like this:

[General] [XX.XX] File I/O: Failed to verify the file signature for file [...] (error: 14)

You can ignore them. It simply means you cannot use Ventures, and your main screen will have a "modified"/"已修改" orange text below the version number.

Vectorial1024 commented 4 years ago

Ah actually, I did not answer GUI.

Seems that we can both read Chinese, so I try to answer in Chinese.

感覺上大家都看得懂中文,我就試着用中文答吧。

「成立/加入貿易艦隊」其實是本mod舊版按鈕的文字,現在已經棄用了。

現在要成立/加入貿易艦隊的話,就好像平時「分配職務」一樣,只需選擇成員,再在艦長右按滑鼠,不過這裡我們會按新增的「貿易商」按鈕(這是遊戲本身的翻譯,我沒改的),然後就可以成立/加入貿易艦隊了。(其實你應該成功了一次...?我看到圖中「民用1」的字樣,似乎成功成立艦隊了)

calpa commented 4 years ago

I successfully create a 民用艦隊 using TaterTrade as the from ship, but I find that there is another question. I cannot change the ship role once I turn a ship into 防禦 mode in the behaviour, the only way to add 貿易商 is in the list of the ship.

The problem in this question is solved, you may close now.

Vectorial1024 commented 4 years ago

I cannot change the ship role once I turn a ship into 防禦 mode in the behaviour, the only way to add 貿易商 is in the list of the ship.

Yes, it is true. I think it should possible to modify that limitation, but I do not have much time, and there are other ways to add 貿易商 (e.g. the method you said about).

Closing this now.