[MOD] Mining/Trading Fleet ver0.03

The place to discuss scripting and game modifications for X4: Foundations.

Moderators: Moderators for English X Forum, Scripting / Modding Moderators

pesoda
Posts: 16
Joined: Thu, 13. Dec 18, 19:45
x4

Re: [MOD] Mining/Trading Fleet ver0.03

Post by pesoda » Sun, 6. Jan 19, 14:28

"Fly and Wait" issue, subordinates frequently do that, was probably solved (thanks to Jebinator in Nexus). Now you can watch your fleets calmly.
The cause was MoveWait order which is called in lib.recall.subordinates.xml. Thus MoveWait order will be skipped if the commander and subordinates have a same default order.

Here, a test version was uploaded.
https://www.mediafire.com/file/lvjubflx ... 04_exp.rar

Behaviour of not MTF wings can also be affected from this change. Maybe some adjustment or restriction are necessary.

* * *

Procedure
  1. The language file (t/0001-L044.xml) was searched by using a keyword, "Fly and Wait". The text-id was identified.
  2. Full-text search was executed by using the text-id in aiscripts. MoveWait order was identified (order.move.wait.xml).
  3. Anyway, all MoveWait orders in aiscripts that related to subordinates were removed.
  4. It was confirmed that the problem doesn't occur.
  5. Candidates were narrowed down. Consequently, above code was obtained.
Edit:
Added procedure.

g_BonE
Posts: 153
Joined: Thu, 28. Aug 03, 11:37
x4

Re: [MOD] Mining/Trading Fleet ver0.03

Post by g_BonE » Fri, 18. Jan 19, 17:54

Testing this currently with the latest TaterTrader release and found that some settings of the "lead ship" are not copied over to the subordinates. "check distance" flag and "scan speed" are reset to default values immediately and do not reflect what has been set in the leader. Also most of the ships seem to be sitting around idle and not do anything while they are subordinates.
(x|x) .oO[ Fenster fährt mich Nüsse !!! ]

taintedxodus
Posts: 28
Joined: Fri, 2. Mar 07, 00:58
x4

Re: [MOD] Mining/Trading Fleet ver0.03

Post by taintedxodus » Fri, 29. Mar 19, 15:37

Its in need of updating for game version 2.20, orders to mine no longer get set on subordinates.

Misunderstood Wookie
Posts: 377
Joined: Mon, 15. Mar 04, 08:07
x4

Re: [MOD] Mining/Trading Fleet ver0.03

Post by Misunderstood Wookie » Tue, 9. Apr 19, 13:55

Bugger I was about to install.
I am seriously starting to get frustrated with doing it the way base game tells me and only solution to see what is going on is to shove all traders in a wing manually and configure the behaviours ship by ship.
*modified*
*X3 LiteCube User*
MOD GemFX Real Space Shaders
MOD Variety and Rebalance Overhaul Icon Pack
I lost my Hans and should not be flying Solo.
Image

Vectorial1024
Posts: 224
Joined: Mon, 30. Jul 18, 04:16
x4

Re: [MOD] Mining/Trading Fleet ver0.03

Post by Vectorial1024 » Wed, 7. Aug 19, 17:17

Seeing that this mod has gone inactive, as a somewhat experienced programmer and modder myself, I have updated this mod to be compatible with vanilla game v2.50. It is available here: viewtopic.php?f=181&t=418144

The <run_script/> XML tag has been heavily [s]abused[/s] utilized to simulate function calls inside aiscripts. This allows the internal code to be more modular and tidied.

The update also responded to the original mod's problems:
pesoda wrote:
Sat, 22. Dec 18, 01:19
  • Partially solved. Real-time updating of wares and distances. detail
Still adopts the dock-sync approach, but also allowed subordinates to sync with their commanders when they subordinates dock.
pesoda wrote:
Sat, 22. Dec 18, 01:19
  • In progress. Subordinates frequently take a coffee break (“Fly and Wait”) between tasks (eventually they return to work, so may not a problem). detail
    - According to the report, “Fly and Wait” may directs the commander’s position.
Subordinates are excluded from the commander's Recall Subordinates if they are part of the "civilian fleet".
pesoda wrote:
Sat, 22. Dec 18, 01:19
  • Subordinates can only have same default order as the commander. E.g. They cannot protect ships in the same wing.
    - For now, you can request unassigned ships or different wings to escort them.
    - I think one of the solutions is that adding assignment commands to the right click menu of ships. (Alternative idea is also welcome.)
The updated version utilizes the Right Click API. Subordinates intended to perform trading or mining activities should be assigned to their commanders using the new "form/join [...] fleet" buttons. UI scripts are used to force normally impossible "trade" and "mining" assignments onto such ships. This allows the game to signal fighters to protect the commander as usual, while allowing civilian ships to work in the same fleet doing something else.
pesoda wrote:
Sat, 22. Dec 18, 01:19
  • Compatibility with many order mods.
    - In order to solve it fundamentally, the basal framework of this mod should be changed over from aiscripts to UI because the function for enumerating order-params is only provided to UI.
Partially responded; used Right Click API and UI scripts to handle assignments, but still used aiscripts to actually give assignments. I think it is impossible to avoid using aiscripts, as they are the only way for us to intercept certain events without needing to know the event target before hand, compared to MD scripts (and aiscripts work).
The future awaits.

X4 Foundations mods:
Civilian Fleets: Managing your civilian ships has never been easier.
Station Logistics: Managing your station networks has never been easier.
Scrap Delivery Coordination: No more starving scrap processors.

Post Reply

Return to “X4: Foundations - Scripts and Modding”