X4: Foundations

X4: Foundations

Better supplies
27 Comments
arshiba  [author] 27 Jul @ 7:40am 
@kurohamu61. Not directly. The ship type allows order (default behavior) "Supply Fleet", which in turn allows trade offers. Originally trade offers are disabled when the order is canceled. I have changed this - the offers remain after the cancellation.
Have you done (as indicated in the description) "For existing ships, you need to set default behavior "Supply Fleet" and cancel it (once)."?
kurohamu61 27 Jul @ 2:54am 
Thanks for your reply.
Does this mean that the offer applies if the relevant section of the macro file is <ship type="carrier"/>?
Argon's Colossus is an “aircraft carrier,” but it seems that some ships do not offer trade.
Please tell me the conditions under which you will not make a offer.
arshiba  [author] 24 Jul @ 12:17am 
@mazdamundi, I don't know. First try to disable this mod and check the ships' behavior. Probably the problem is not related to the mod, then you need to ask on the official forum.
mazdamundi 23 Jul @ 2:45am 
how do i fix ships not repairing when there is a Aux in the fleet they are in?
arshiba  [author] 20 Jul @ 12:36am 
@kurohamu61. The order becomes available based on the ship type (for 'carrier' and 'resupplier'), not the class. The ship type does not affect the actual ability to be a carrier. Strictly speaking, absolutely all ships in the game are "carriers", because they have at least a XS deck (for spacesuits), and in ascending order - M ships have S decks and so on.
To check the ship type, look at its macro, which is located in the file ...\assets\units\size_??\macros\*.xml at xpath /macros/macro/properties/ship[@type]
kurohamu61 19 Jul @ 4:02am 
Thanks for the great mod!
I am playing with X4RE and there are some carriers that reflect trade offers and some that do not. If the ship class alone determines the ability to do this, then this phenomenon should not be possible. At least all those ships were working fine as carriers.

It does not work on my personally created aircraft carrier either. I would like some advice.
Stroichik 27 Apr @ 11:11am 
Also noticed, that fleet fighters from other carriers sometimes land on Aux ship for ressuply, but dont undock and go back to their respective carriers afterwards if fleet is not in battle. Have seen aux with all docks occupied by fighters and his traders could not dock on Aux to bring wares for cap ship repair.
Stroichik 26 Apr @ 8:21pm 
Sometimes, although not often, but there is a problem with that behaviour.
If carrier approaches station that has fighters on defence and they are currently fighting and in need of resupplying - they will land on carrier, instead of station. But since they are on defence duty, if carrier flyies away from station - fighters will not launch from carrier on their own, since there is no enemy around carrier. Its same thing if you try to assign fighters on station, while they are docked to a Wharf, they simply wont go, unless u manually make them undock from station they are currently docked to.
Stroichik 25 Apr @ 2:52am 
Oh, i see. Thanks.
arshiba  [author] 25 Apr @ 2:48am 
@Stroichik. No. This behavior is what I've reworked. In my point of view, this is a more logical - to resupply on the nearest available ship, rather than to travel a hundred or two kilometers to the home ship through the enemy sector. You can adapt, I believe :steamhappy:
Stroichik 23 Apr @ 2:21am 
Ok i tested missile resupply - it works great. This mod is simply amazing for SWI.
Only issue i see is that fighters will try to resupply from nearest carrier instead of just one they are assigned to. Which might lead to a landing clutter possibly.

But i suppose its a vanilla behaviour and can't be changed to prioritize resupply from leader fighter is assigned to?
Stroichik 23 Apr @ 1:21am 
Thanks, i'll try shooting my fighter and see where he'll go for repairs to check things out.
arshiba  [author] 23 Apr @ 12:42am 
@Stroichik. Supply capabilities are determined by ship types/classes. If mod ships have the right types, everything will work.
The "Supply Fleet" order does exactly two things: it enables trade offers; it implicitly runs the follow commander order.
Stroichik 22 Apr @ 5:10pm 
at least trade offers exist and my mules supply my carriers pretty good. but i wonder if fighters will actually use carriers for resupply if they are not set for Supply fleet behaviour?
Stroichik 22 Apr @ 3:05pm 
I tried it out on SWI. so far it seems to be working pretty well. With supply mules mod - even better
Stroichik 22 Apr @ 1:17pm 
Looks amazing. But i wonder if it can be patched to work with SWI mod? Many Star Wars ships are carriers and have ability to repair fighters, but lack those trade offers to actually have goods on board for resupply
arshiba  [author] 17 Apr @ 11:10am 
This mod is from the category what I did only for myself, but shared it for everyone, so I didn't think about the "selling" text. Actually, I formulated in general what the mod is for only now. Updated the description.
Arthur Revan 17 Apr @ 10:04am 
"The Auxiliary and the Carrier ships are free to take any role in the fleet and receive any tactical orders. Trade offers to buy resources are open all the time."

If this works as advertise, then THIS should be the selling point of the mod.
If they both can actively engage in battles and at the same time receive M/S traders with resources, this is HUGE.:steamhappy:
Arthur Revan 17 Apr @ 9:54am 
I know, what I meant is:

Without mod:
Only Auxiliary ship can make the trade orders to buy resources, and Carrier need to be told to manually transfer resources from Auxiliary, in order to make missiles for the fighters.
Or player can just resupply the fighters at the Auxiliary ship.

With mod:
The Carrier ship also can make Trade offers to buy resources, and will now have the resources resupply the fighters himself, bypassing the Auxiliary ship.
arshiba  [author] 17 Apr @ 9:44am 
@Arthur Revan. Not exactly.
"Carrier ... gets stuff from Auxiliary ship" is impossible, the auxiliary ship doesn't sell its resources. Only if you manually transfer the wares.
"Carrier buys Stuff himself" (order Get Supplies), I didn't touch it (IMHO a huge carrier prowling between trading stations is a very weird sight). You just don't do it.
Without mod.
The auxiliary ship must be assigned to the fleet with the "Supply Fleet" behavior. It cannot receive any other orders (for example, tactically retreat to the rear), otherwise the buy offers are canceled (and incoming traders are screwed).
The carrier ship couldn't buy resources at all.
With mod.
The auxiliary and the carrier ships are free to take any role in the fleet and receive any tactical orders. Trade offers to buy resources are open all the time.

As for the resupply logic, I don't remember the details now, but there are some non-obvious specific bugs in the original script. I just rewrote that part of code.
Arthur Revan 15 Apr @ 2:09pm 
As you're more familiar with the logic, is this statement correct?
Without mod:
Fighter needs Missiles -> Carrier needs stuff to make them -> gets stuff from Auxiliary ship.
With mod:
Fighter needs Missiles -> Carrier needs stuff to make them -> Carrier buys Stuff himself.
Злоба 6 Feb @ 6:12am 
Спасибо. Теперь понятно для чего этот мод и что он делает. Я не понял описание.:steamthumbsup:
arshiba  [author] 5 Feb @ 11:32pm 
@Злоба. Каких именно команд? Больше подробностей.
Единственная команда (она одна) это "снабжать флот", которая должна быть доступна авианосцу. И даже она - не главное в моде. А главное это то, что авианосцы теперь снабжаются торговцами всё время и видны для кораблей в том же флоте как место для перевооружения. Всё это работает пассивно.
Злоба 5 Feb @ 7:28pm 
Не работает 7.1. Нету команд.
Barracuda 2 Jan @ 2:45pm 
Just found out that exact work around last night! Thanks for that idea, still trying to work out how to consistently get it to work especially if I want the carrier to be the leader.
arshiba  [author] 2 Jan @ 12:38am 
@Barracuda. No, unfortunately. The assignment of a group in a fleet is not in aiscripts, but is part of the UI. I can't just make a patch in the right place in the lua script - I'll have to replace the entire file and update the mod with each minor fix from egosoft. I am not ready for such support.
But a solution is possible with the help of other mods that add advanced trade commands and assign themselves to the fleet. For example, I use the "Mules, Supply and Warehouses Extended" mod and the supply mule perfectly fulfills this role.
Barracuda 1 Jan @ 8:09am 
Is the "Trade for Commander" assignment available for Carriers as well?