This was working for me in 2.0, now my ships being produced at the capital shipyard in 2.10 are not getting "units" such as drones nor a ship captain. I can place an order for a ship with no units, then land on it and give it a captain, then it move out of the shipyard and works normally. Could be the patch or another extension causing the problem, but my extensions have not changed since 2.0.
It works ... just very weird. Sometimes NPC's are not added, sometimes they are. I am not the mod author but seeing as I love this mod, I am trying to "make" it work for personal use.
make sure you unzip the contents of the archive to ..\X rebirth\extensions\
you should end up with the following files: ..\X Rebirth\extensions\Premium Ship Trader\content.xml ..\X Rebirth\extensions\Premium Ship Trader\md\NPC_shiptrader.xml
if that looks good make sure the mod is turned on at the main menu:
Main menu-->Extensions-->Premium Ship Trader(00.02.02) ON
Ive got Ignore JumpDrive Fuel, and ImprvedEngineer, and yours. (the one I had was the latest one w/ the Fuel added) I've not tried any of the new ones as i've been w/o net for a few days. I'll give the new ones a shot
Same problem for me, it only assign captain, engineer and def. officer to L ships but not for XL ships, have tried Arawn and construction ship on XL and the same result = No crew. Though it worked flawlessly for Balor and a L cargo ship (can't remember the name of it).
Note: Have only tried the shipyard in Darned hot air and have tried both versions of the mod.
As you said, it might be a mod conflict. I currently running the following mods: MCE NESA Hull engineer complete Core shields Ignore jumpdrive fuel Better highways Realistic highways Reduced masstraffic Smart miner Tasteful Yisha Upclose detail monitor better speed control
I have looked into almost all of the mods you mentioned and there shouldn't be a conflict with them. I will probably change it to an add statement instead of a replace statement this might fix the problem
I tested this with only another extension (a debug command mod) activated. No other mods/modified files were present. I did this for both current 1.17 patch and 1.18 HF #1 beta patch. Apparently, there is either an issue within the script itself or with the game as generating crew members upon ship completion with 5 stars on all skills does not work. Each crew member's PRIMARY skills (the 3 topmost skills when you ask them to show you their skills please) are set to 5 stars but their SECONDARY skills all seem to cap out at 3. I modified the values within the script and set all secondary skills to values >5 but it did not work - all SECONDARY skills cap at 3 stars. I cant test earlier versions as I got rid of them. I will comment out the additional drone code at the top and bottom to see if it makes a difference.
EDIT: Did not make a difference on my end. Still a hard-cap of 3 stars on SECONDARY skills present. Perhaps this is a good thing. Having 5 stars on everything might be overkill and 3 stars on secondaries makes more sense vs. having engineers with 5 stars in combat or some crap.
Thanks for your work! But in the Beginning it worked now there is no Crew any more in the new ship, and there is no docking sign. Just the 300 drones are available when I use the second mod. I´m sorry for that cause it´s a real nice mod. I think it might be a Problem with other mods. I use now: Helpful directions, Hull Engineer, Ignore fuel, Manual Command Extension, NESA, osr target Extension, UFO, Warning System Extension.
Thanks for your mod, but i have a few things to report:
-When the ship is built, i can't give him any order if i'm currently in space, the squares are unclickable (don't know if this word exists, i'm french sorry), but if i dock in, i can finnally give him orders.
-Another problem is that in the ship (after docking), i don't see the crew, i mean, the avatars (normally there should be the three of them in the docking bay). So for the commander, i can call him, but for the engineer and the defence officer, i can't talk to them.
-And finally, the fice stars are just fort one trait, they have 0 for all other, can you put five for each trait plz? (i know it's like a cheat but i'm just trying to have some fun, untill the game is fully playable!)
Sorry for my bad english, hope you've understood me! And thanks again for your job
Wow that is very impressive, good work all around. If you don't mind I will have to borrow some of the ideas in this code. Obviously will cite you on it.
Starting a new comment. Found out that one of the closing </do_if> in the entire script was glitched or something in notepad++. Went ahead and loaded up a fresh copy of your modified NPC_Shiptrader.xml file and pasted my added functions in. The </do_if> closing arguments were fine in this copy. Trying same code. See if this works.
Aye. Will like it that way better but was just nagging at me that I couldn't get this figured out lol. But now I did. Good for documentation though just in case for future use.
Not sure if this might help but I figured out the format the drone names have to be in for the <add_ammo_> function. Here is an example for 15 construction drones: <add_ammo object="$ship" macro="macro.units_size_xs_welder_drone_macro" amount="15" />
I added that after the <do_if value="$droneplan"> function or whatever that is for adding drones from the in-game construction page so it looks like this:
I also tested it by adding a few addition misc drones of random choice from the in-game construction page along with building a ship with no drones chosen. It worked both times.
Thank you I will add this, just looking up cargo drones I thought they were "macro.ware.unit_drp_cargolifter". but I will look in xs ships for something like "macro.units_size_xs_cargo_drone_macro". [edit] however adding them to the shipbuilders drone list might be more effective. gives the player choices ie: add 300 of every drone type to the ship trader every time you build something.
It actually works. Problem is the checks don't work so if I build a sequana, it gets the arawn's drone loadout too giving it a total of 600 drones instead of the pre-determined 300. Its something though. I put it at the end, underneath the </do_all> of the $droneplan function or whatever.
EDIT: Also, those show_help functions both return as 1 meaning any sequana I build is marked as both an arawn and sequana according to the checks I put in which is obviously wrong. Not really sure how to properly go about doing that but just thought I might help you out on that end. Let us know here if you have better luck adding drones to the shipbuilder himself instead.
If anything else, that actually sounds like a better option versus pre-determined loadouts in the file.
Tried what you recommended but the show_help functions kept on returning a value of 1 for both checks and the sequanas ship continued being delivered with the drone loadouts of itself and the arawn. Would this work and is this proper syntax?
EDIT: Nevermind. It didnt' work lol. Both checks didn't even run. Interesting though: although I placed these checks for drones after the code that adds fuel to the cargo, if the checks fail and don't run at all, the ship is not loaded with fuel and the addition of crewmembers fails.
I changed do_else_if to doelse_if and left the rest untouched but the check didn't even seem to run and because it failed, so did the rest of the script. No crewmembers were added or fuel. Kinda weird. Not sure why a failed check to the ship added at the bottom of the rest of the functions would cause the rest of the script to fail.
EDIT: Also, I added this line right after the <check object> function to see if any input would be returned. It looks like this:
<check_object object="$ship"> <show_help force="true" custom="'What is this ship? - '+ $ship"/> <do_if> ...
That show_help function should return some sort of value but id doesn't which can only mean the entire process fails right at the beginning with the first <check object>. Might this be related to an earlier <check object> function in the script that checks to see if the ship is a construction vessel to add an architect to it? Should that check be cleared first before additional checks are run? Not sure how that process itself works really.
52 comments
make sure you unzip the contents of the archive to ..\X rebirth\extensions\
you should end up with the following files:
..\X Rebirth\extensions\Premium Ship Trader\content.xml
..\X Rebirth\extensions\Premium Ship Trader\md\NPC_shiptrader.xml
if that looks good make sure the mod is turned on at the main menu:
Main menu-->Extensions-->Premium Ship Trader(00.02.02) ON
the current version is 00.02.05 altho it says 00.02.02
Note: Have only tried the shipyard in Darned hot air and have tried both versions of the mod.
As you said, it might be a mod conflict. I currently running the following mods:
MCE
NESA
Hull engineer complete
Core shields
Ignore jumpdrive fuel
Better highways
Realistic highways
Reduced masstraffic
Smart miner
Tasteful Yisha
Upclose detail monitor
better speed control
Cheers!
EDIT: Did not make a difference on my end. Still a hard-cap of 3 stars on SECONDARY skills present. Perhaps this is a good thing. Having 5 stars on everything might be overkill and 3 stars on secondaries makes more sense vs. having engineers with 5 stars in combat or some crap.
But in the Beginning it worked now there is no Crew any more in the new ship, and there is no docking sign. Just the 300 drones are available when I use the second mod. I´m sorry for that cause it´s a real nice mod.
I think it might be a Problem with other mods.
I use now: Helpful directions, Hull Engineer, Ignore fuel, Manual Command Extension, NESA, osr target Extension, UFO, Warning System Extension.
-When the ship is built, i can't give him any order if i'm currently in space, the squares are unclickable (don't know if this word exists, i'm french sorry), but if i dock in, i can finnally give him orders.
-Another problem is that in the ship (after docking), i don't see the crew, i mean, the avatars (normally there should be the three of them in the docking bay). So for the commander, i can call him, but for the engineer and the defence officer, i can't talk to them.
-And finally, the fice stars are just fort one trait, they have 0 for all other, can you put five for each trait plz? (i know it's like a cheat but i'm just trying to have some fun, untill the game is fully playable!)
Sorry for my bad english, hope you've understood me! And thanks again for your job
Sorry I don't know French or else I would type it in French.
No worries I love modding this game.
I'll test it and come back to give you some feedback
And i have no problem to understand english, i'm just worried about my english, if people can understand me^^
<do_if value="$ship.macro == macro.units_size_xl_capital_destroyer_1_macro">
<add_ammo object="$ship" macro="macro.units_size_drone_attackdrone_impulse_mk2_macro" amount="78"/>
<add_ammo object="$ship" macro="macro.units_size_drone_attackdrone_plasma_mk2_macro" amount="78"/>
<add_ammo object="$ship" macro="macro.units_size_drone_missiledrone_dumbfire_mk2_macro" amount="78"/>
<add_ammo object="$ship" macro="macro.units_size_xs_wardrone_macro" amount="51"/>
<add_ammo object="$ship" macro="macro.units_size_xs_welder_drone_macro" amount="15"/>
</do_if>
<do_elseif value="$ship.macro == macro.units_size_l_ice_collector_macro">
<add_ammo object="$ship" macro="macro.units_size_drone_rubble_collector_mk2_macro" amount="71"/>
<add_ammo object="$ship" macro="macro.units_size_xs_transp_empty_macro" amount="214"/>
<add_ammo object="$ship" macro="macro.units_size_xs_welder_drone_macro" amount="15"/>
</do_elseif>
<do_elseif value="$ship.macro == macro.units_size_xl_capital_destroyer_2_macro">
<add_ammo object="$ship" macro="macro.units_size_drone_attackdrone_impulse_mk2_macro" amount="45"/>
<add_ammo object="$ship" macro="macro.units_size_drone_attackdrone_plasma_mk2_macro" amount="45"/>
<add_ammo object="$ship" macro="macro.units_size_drone_missiledrone_dumbfire_mk2_macro" amount="45"/>
<add_ammo object="$ship" macro="macro.units_size_xs_welder_drone_macro" amount="15"/>
</do_elseif>
<do_elseif value="$ship.macro == macro.units_size_xl_cargo_hauler_3_macro">
<add_ammo object="$ship" macro="macro.units_size_drone_liquid_collector_mk2_macro" amount="33"/>
<add_ammo object="$ship" macro="macro.units_size_drone_rubble_collector_mk2_macro" amount="33"/>
<add_ammo object="$ship" macro="macro.units_size_xs_transp_empty_macro" amount="69"/>
<add_ammo object="$ship" macro="macro.units_size_xs_welder_drone_macro" amount="15"/>
</do_elseif>
<do_elseif value="$ship.macro == macro.units_size_xl_builder_ship_dv_macro">
<add_ammo object="$ship" macro="macro.units_size_xs_transp_empty_macro" amount="75"/>
<add_ammo object="$ship" macro="macro.units_size_xs_welder_drone_macro" amount="75"/>
</do_elseif>
<do_elseif value="$ship.macro == macro.units_size_l_kit_carrier_02_macro or $ship.macro == macro.units_size_l_kit_carrier_01_macro">
<add_ammo object="$ship" macro="macro.units_size_drone_attackdrone_impulse_mk2_macro" amount="37"/>
<add_ammo object="$ship" macro="macro.units_size_drone_attackdrone_plasma_mk2_macro" amount="37"/>
<add_ammo object="$ship" macro="macro.units_size_drone_missiledrone_dumbfire_mk2_macro" amount="36"/>
<add_ammo object="$ship" macro="macro.units_size_xs_wardrone_macro" amount="25"/>
<add_ammo object="$ship" macro="macro.units_size_xs_welder_drone_macro" amount="15"/>
</do_elseif>
<do_elseif value="$ship.macro == macro.units_size_l_kit_container_01_macro or $ship.macro == macro.units_size_l_kit_energy_01_macro">
<add_ammo object="$ship" macro="macro.units_size_xs_transp_empty_macro" amount="135"/>
<add_ammo object="$ship" macro="macro.units_size_xs_welder_drone_macro" amount="15"/>
</do_elseif>
<do_elseif value="$ship.macro == macro.units_size_l_crystal_collector_macro or $ship.macro == macro.units_size_l_kit_bulk_01_macro">
<add_ammo object="$ship" macro="macro.units_size_drone_rubble_collector_mk2_macro" amount="33"/>
<add_ammo object="$ship" macro="macro.units_size_xs_transp_empty_macro" amount="102"/>
<add_ammo object="$ship" macro="macro.units_size_xs_welder_drone_macro" amount="15"/>
</do_elseif>
<do_elseif value="$ship.macro == macro.units_size_l_hydrogen_collector_macro or $ship.macro == macro.units_size_l_ions_collector_macro or $ship.macro == macro.units_size_l_kit_liquid_01_macro">
<add_ammo object="$ship" macro="macro.units_size_drone_liquid_collector_mk2_macro" amount="33"/>
<add_ammo object="$ship" macro="macro.units_size_xs_transp_empty_macro" amount="102"/>
<add_ammo object="$ship" macro="macro.units_size_xs_welder_drone_macro" amount="15"/>
</do_elseif>
EDIT: And it did not ;(
also on the show_help try:
<check_object object="$ship">
<show_help force="true" custom="'What is this ship? - %1'.[$ship]"/>
<do_if value="$ship.macro == macro.units_size_xl_capital_destroyer_1_macro">
<add_ammo object="$ship" macro="macro.units_size_drone_attackdrone_impulse_mk2_macro" amount="78"/>
<add_ammo object="$ship" macro="macro.units_size_drone_attackdrone_plasma_mk2_macro" amount="78"/>
<add_ammo object="$ship" macro="macro.units_size_drone_missiledrone_dumbfire_mk2_macro" amount="78"/>
<add_ammo object="$ship" macro="macro.units_size_xs_wardrone_macro" amount="51"/>
<add_ammo object="$ship" macro="macro.units_size_xs_welder_drone_macro" amount="15"/>
</do_if>
<do_elseif value="$ship.macro == macro.units_size_l_ice_collector_macro">
<add_ammo object="$ship" macro="macro.units_size_drone_rubble_collector_mk2_macro" amount="71"/>
<add_ammo object="$ship" macro="macro.units_size_xs_transp_empty_macro" amount="214"/>
<add_ammo object="$ship" macro="macro.units_size_xs_welder_drone_macro" amount="15"/>
</do_elseif>
Worked like a charm. The sequanas only got drones designated for it.
now just need a way to add those to the ship traders inventory and you can buy them, so its less cheatish
<add_ammo object="$ship" macro="macro.units_size_xs_welder_drone_macro" amount="15" />
I added that after the <do_if value="$droneplan"> function or whatever that is for adding drones from the in-game construction page so it looks like this:
<do_if value="$droneplan">
<do_all exact="$droneplan.count" counter="$i">
<add_ammo object="$ship" macro="macro.{$droneplan.{$i}.{1}}" amount="$droneplan.{$i}.{2}" />
</do_all>
</do_if>
<add_ammo object="$ship" macro="macro.units_size_xs_welder_drone_macro" amount="15" />
I also tested it by adding a few addition misc drones of random choice from the in-game construction page along with building a ship with no drones chosen. It worked both times.
[edit]
however adding them to the shipbuilders drone list might be more effective. gives the player choices ie: add 300 of every drone type to the ship trader every time you build something.
EDIT: Get this:
<check_object result="$isarawn" object="$ship">
<match_content macro="units_size_xl_capital_destroyer_1_macro" min="1"/>
</check_object>
<show_help force="true" custom="'TEST'+ $isarawn" />
<check_object result="$issequana" object="$ship">
<match_content macro="units_size_l_ice_collector_macro" min="1"/>
</check_object>
<show_help force="true" custom="'TEST'+ $issequana" />
<do_if value="$isarawn">
<add_ammo object="$ship" macro="macro.units_size_drone_attackdrone_impulse_mk2_macro" amount="78"/>
<add_ammo object="$ship" macro="macro.units_size_drone_attackdrone_plasma_mk2_macro" amount="78"/>
<add_ammo object="$ship" macro="macro.units_size_drone_missiledrone_dumbfire_mk2_macro" amount="78"/>
<add_ammo object="$ship" macro="macro.units_size_xs_wardrone_macro" amount="51"/>
<add_ammo object="$ship" macro="macro.units_size_xs_welder_drone_macro" amount="15"/>
</do_if>
<do_if value="$issequana">
<add_ammo object="$ship" macro="macro.units_size_drone_rubble_collector_mk2_macro" amount="71"/>
<add_ammo object="$ship" macro="macro.units_size_xs_transp_empty_macro" amount="214"/>
<add_ammo object="$ship" macro="macro.units_size_xs_welder_drone_macro" amount="15"/>
</do_if>
It actually works. Problem is the checks don't work so if I build a sequana, it gets the arawn's drone loadout too giving it a total of 600 drones instead of the pre-determined 300. Its something though. I put it at the end, underneath the </do_all> of the $droneplan function or whatever.
EDIT: Also, those show_help functions both return as 1 meaning any sequana I build is marked as both an arawn and sequana according to the checks I put in which is obviously wrong. Not really sure how to properly go about doing that but just thought I might help you out on that end. Let us know here if you have better luck adding drones to the shipbuilder himself instead.
If anything else, that actually sounds like a better option versus pre-determined loadouts in the file.
<check_object result="$isarawn" object="$ship">
<match macro="units_size_xl_capital_destroyer_1_macro"/>
</check_object>
<check_object result="$issequana" object="$ship">
<match macro="units_size_l_ice_collector_macro"/>
</check_object>
working on changing the ship traders inventory this is what I found:
<do_all exact="md.$ShiptraderDroneList.count" counter="$i">
<remove_inventory entity="$actor" ware="md.$ShiptraderDroneList.{$i}.{1}.id" exact="$amountactorhas"/>
<add_inventory entity="$actor" ware="md.$ShiptraderDroneList.{$i}.{1}.id" exact="300"/>
</do_all>
just need to find $amountactorhas
<check_object object="$ship">
<do_if match macro="units_size_xl_capital_destroyer_1_macro">
<add_ammo object="$ship" macro="macro.units_size_drone_attackdrone_impulse_mk2_macro" amount="78"/>
<add_ammo object="$ship" macro="macro.units_size_drone_attackdrone_plasma_mk2_macro" amount="78"/><add_ammo object="$ship" macro="macro.units_size_drone_missiledrone_dumbfire_mk2_macro" amount="78"/><add_ammo object="$ship" macro="macro.units_size_xs_wardrone_macro" amount="51"/>
<add_ammo object="$ship" macro="macro.units_size_xs_welder_drone_macro" amount="15"/>
</do_if>
<do_else_if match macro="units_size_l_ice_collector_macro">
<add_ammo object="$ship" macro="macro.units_size_drone_rubble_collector_mk2_macro" amount="71"/>
<add_ammo object="$ship" macro="macro.units_size_xs_transp_empty_macro" amount="214"/>
<add_ammo object="$ship" macro="macro.units_size_xs_welder_drone_macro" amount="15"/>
</do_else_if>
</check_object>
EDIT: Nevermind. It didnt' work lol. Both checks didn't even run. Interesting though: although I placed these checks for drones after the code that adds fuel to the cargo, if the checks fail and don't run at all, the ship is not loaded with fuel and the addition of crewmembers fails.
and yea I don't see why that wouldn't work
EDIT: Also, I added this line right after the <check object> function to see if any input would be returned. It looks like this:
<check_object object="$ship">
<show_help force="true" custom="'What is this ship? - '+ $ship"/>
<do_if> ...
That show_help function should return some sort of value but id doesn't which can only mean the entire process fails right at the beginning with the first <check object>. Might this be related to an earlier <check object> function in the script that checks to see if the ship is a construction vessel to add an architect to it? Should that check be cleared first before additional checks are run? Not sure how that process itself works really.
<check_object object="$ship">
<show_help force="true" custom="'What is this ship? - %1'.$ship"/>
also should be <do_elseif> not <doelse_if>