[MOD] Choose the race of your crew V2.2

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

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

Alkeena
Posts: 603
Joined: Tue, 15. May 07, 20:43
x4

Re: [MOD] Choose the race of your crew V2

Post by Alkeena » Tue, 6. Apr 21, 14:27

BlackRain wrote:
Tue, 6. Apr 21, 14:10
Alkeena wrote:
Tue, 6. Apr 21, 13:35
Could we not get into the arms race of always trying to get your mod to load last with 'zzzzz' shenanigans? If you need to load after something then set the dependencies accordingly in your content file.

Speaking of which, shouldn't this have a dependency on CoH given the explicit Terran call outs?
I already tried to add a dependency for the Split DLC and it didn't work, and no it doesn't need a dependency on COH. It only needs a dependency for the SPLIT dlc. Maybe I did something wrong by accident, I didn't have time last night and was rushing. By the way, I don't need your snarky comments. Do you really think I need you telling me what to do? Maybe you meant well or I am misunderstanding your intent, but your post sounds quite condescending.
Not at all my intent. Just trying to point out a means of setting load order without every mod available being prepended with 20 zs, as I've seen happen in other communities. Sorry if I offended.

BlackRain
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 7411
Joined: Mon, 15. Dec 03, 18:53
x4

Re: [MOD] Choose the race of your crew V2

Post by BlackRain » Tue, 6. Apr 21, 14:30

Alkeena wrote:
Tue, 6. Apr 21, 14:27
BlackRain wrote:
Tue, 6. Apr 21, 14:10
Alkeena wrote:
Tue, 6. Apr 21, 13:35
Could we not get into the arms race of always trying to get your mod to load last with 'zzzzz' shenanigans? If you need to load after something then set the dependencies accordingly in your content file.

Speaking of which, shouldn't this have a dependency on CoH given the explicit Terran call outs?
I already tried to add a dependency for the Split DLC and it didn't work, and no it doesn't need a dependency on COH. It only needs a dependency for the SPLIT dlc. Maybe I did something wrong by accident, I didn't have time last night and was rushing. By the way, I don't need your snarky comments. Do you really think I need you telling me what to do? Maybe you meant well or I am misunderstanding your intent, but your post sounds quite condescending.
Not at all my intent. Just trying to point out a means of setting load order without every mod available being prepended with 20 zs, as I've seen happen in other communities. Sorry if I offended.
Alright, it came off bad to me but I misread then. It isn't like I am some noob at modding but I do sometimes make simple mistakes just from forgetting stuff. Setting a dependency is as simple as putting <dependency name="Split Vendetta" id="ego_dlc_split" optional="false"/> in the content file right? I don't know why it didn't work for me, maybe I need to add the optional part.

Alkeena
Posts: 603
Joined: Tue, 15. May 07, 20:43
x4

Re: [MOD] Choose the race of your crew V2

Post by Alkeena » Tue, 6. Apr 21, 14:37

BlackRain wrote:
Tue, 6. Apr 21, 14:30
Alright, it came off bad to me but I misread then. It isn't like I am some noob at modding but I do sometimes make simple mistakes just from forgetting stuff. Setting a dependency is as simple as putting <dependency name="Split Vendetta" id="ego_dlc_split" optional="false"/> in the content file right? I don't know why it didn't work for me, maybe I need to add the optional part.
No worries, I should probably be more liberal with emoticons as tone can be hard. Really just trying to help--I know quite well how grating incessant requests from third parties can seem :oops:

Here's an example that I know to work:

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<content id="ws_2425386267" name="Longer Production (VRO)" author="Allectus" version="110" date="2021-03-17" save="false" enabled="0" description="This mod slows the production of ships such that S take 10x, M 8x, L take 6x, and XL take 4x time to produce. Xenon/KHK build times unchanged. Shipyards are now constantly working at full load. Gives Xenon a head start in the war.  Based off of Spiny's original Slow production of ships mod (https://www.nexusmods.com/x4foundations/mods/393?tab=description)" sync="false" lastupdate="1615954490">
  <dependency id="ego_dlc_split" optional="false" name="Split Vendetta"/>
  <dependency id="ego_dlc_terran" optional="false" name="Cradle of Humanity"/>
  <dependency id="ws_1696862840" optional="false" name="Variety and Rebalance Overhaul"/>
</content>

BlackRain
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 7411
Joined: Mon, 15. Dec 03, 18:53
x4

Re: [MOD] Choose the race of your crew V2

Post by BlackRain » Tue, 6. Apr 21, 14:38

Looks like that worked, this is why I shouldn't do things late at night when I am half asleep. I got it to work correctly with the dependency so later I will upload again with the change in folder name.

BlackRain
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 7411
Joined: Mon, 15. Dec 03, 18:53
x4

Re: [MOD] Choose the race of your crew V2

Post by BlackRain » Tue, 6. Apr 21, 14:38

Alkeena wrote:
Tue, 6. Apr 21, 14:37
BlackRain wrote:
Tue, 6. Apr 21, 14:30
Alright, it came off bad to me but I misread then. It isn't like I am some noob at modding but I do sometimes make simple mistakes just from forgetting stuff. Setting a dependency is as simple as putting <dependency name="Split Vendetta" id="ego_dlc_split" optional="false"/> in the content file right? I don't know why it didn't work for me, maybe I need to add the optional part.
No worries, I should probably be more liberal with emoticons as tone can be hard. Really just trying to help--I know quite well how grating incessant requests from third parties can seem :oops:

Here's an example that I know to work:

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<content id="ws_2425386267" name="Longer Production (VRO)" author="Allectus" version="110" date="2021-03-17" save="false" enabled="0" description="This mod slows the production of ships such that S take 10x, M 8x, L take 6x, and XL take 4x time to produce. Xenon/KHK build times unchanged. Shipyards are now constantly working at full load. Gives Xenon a head start in the war.  Based off of Spiny's original Slow production of ships mod (https://www.nexusmods.com/x4foundations/mods/393?tab=description)" sync="false" lastupdate="1615954490">
  <dependency id="ego_dlc_split" optional="false" name="Split Vendetta"/>
  <dependency id="ego_dlc_terran" optional="false" name="Cradle of Humanity"/>
  <dependency id="ws_1696862840" optional="false" name="Variety and Rebalance Overhaul"/>
</content>
yeah, I didn't have the optional code in there, that seems to have fixed the problem. I forgot about that. I guess it was treating it as optional, rather than forcing the change

SilverNixon
Posts: 31
Joined: Thu, 10. Nov 05, 19:12
x4

Re: [MOD] Choose the race of your crew V2

Post by SilverNixon » Tue, 6. Apr 21, 14:53

I think you missed a split 'spy' finally becoming a pilot. I can probably fix this myself but just letting you know. They are rare though. Not sure if this is caused by my other mods. Perhaps try at your end.

Marines are TER. Service Crews still the same issue as always. Pilots are TER but I got 2 Split pilots out of 5 ships built.

Order many ships and check if you get split pilots.

Come to think of it, in an ideal situation, it sould be nice to add choosable weights to the player faction. Something like 90% TER (with TER Human models and ARG human models combined, 75:25 % distribution), 5% TEL (merchants, reminds me of the Ferengi), the rest Paranid, Split and very rare Yaki Pilots with cybernetics. That way we dont get bored of the TER limited clothing choice.

Edit: Found the culprit. Split DLC character.xml includes faction.player in split trader and manager groups.

Code: Select all

<character id="trader_split_random" group="split.trader">
      <category tags="[crew, pilot, aipilot, traderpilot, masstraffic]" faction="[split, freesplit, fallensplit, court, faction.player]" race="split"/>
So a replace for that groups is needed.
“Not just beautiful, though - the stars are like the trees in the forest, alive and breathing. And they're watching me.”
― Haruki Murakami, Kafka on the Shore

BlackRain
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 7411
Joined: Mon, 15. Dec 03, 18:53
x4

Re: [MOD] Choose the race of your crew V2

Post by BlackRain » Tue, 6. Apr 21, 15:11

SilverNixon wrote:
Tue, 6. Apr 21, 14:53
I think you missed a split 'spy' finally becoming a pilot. I can probably fix this myself but just letting you know. They are rare though. Not sure if this is caused by my other mods. Perhaps try at your end.

Marines are TER. Service Crews still the same issue as always. Pilots are TER but I got 2 Split pilots out of 5 ships built.

Order many ships and check if you get split pilots.

Come to think of it, in an ideal situation, it sould be nice to add choosable weights to the player faction. Something like 90% TER (with TER Human models and ARG human models combined, 75:25 % distribution), 5% TEL (merchants, reminds me of the Ferengi), the rest Paranid, Split and very rare Yaki Pilots with cybernetics. That way we dont get bored of the TER limited clothing choice.

Edit: Found the culprit. Split DLC character.xml includes faction.player in split trader and manager groups.

Code: Select all

<character id="trader_split_random" group="split.trader">
      <category tags="[crew, pilot, aipilot, traderpilot, masstraffic]" faction="[split, freesplit, fallensplit, court, faction.player]" race="split"/>
So a replace for that groups is needed.
Hmm, I don't think those should be recruitable though. They should not be chosen as pilots. Did you change the name of the folder? If you changed the name of the folder, then it won't work properly and you will get split. At least until I upload the new one with the dependency added correctly.

SilverNixon
Posts: 31
Joined: Thu, 10. Nov 05, 19:12
x4

Re: [MOD] Choose the race of your crew V2

Post by SilverNixon » Tue, 6. Apr 21, 15:15

Ahh, that is probably why, I just used your file to replace mine in my own mod. Seems I just learnt something new about load order of mods. The name of my mod starts with "c" so does it mean that it gets loaded before the ego_dlc_xx files?
“Not just beautiful, though - the stars are like the trees in the forest, alive and breathing. And they're watching me.”
― Haruki Murakami, Kafka on the Shore

BlackRain
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 7411
Joined: Mon, 15. Dec 03, 18:53
x4

Re: [MOD] Choose the race of your crew V2

Post by BlackRain » Tue, 6. Apr 21, 15:19

SilverNixon wrote:
Tue, 6. Apr 21, 15:15
Ahh, that is probably why, I just used your file to replace mine in my own mod. Seems I just learnt something new about load order of mods. The name of my mod starts with "c" so does it mean that it gets loaded before the ego_dlc_xx files?
Yes, so it wasn't working. However, the new one I am about to upload should work fine but I didn't do a lot of testing. I just did some minimal testing and it seemed to be working properly. Just make sure to delete the folder you already have before putting in the new one. The new folder will have the original name but it should work .

BlackRain
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 7411
Joined: Mon, 15. Dec 03, 18:53
x4

Re: [MOD] Choose the race of your crew V2.1

Post by BlackRain » Tue, 6. Apr 21, 15:27

Alright, uploaded version 2.1 which fixes the dependency issue. MAKE SURE TO DELETE ALL PREVIOUS FOLDERS. Then just add this and your good to go

idragon
Posts: 39
Joined: Fri, 17. Mar 17, 15:37
x4

Re: [MOD] Choose the race of your crew V2

Post by idragon » Tue, 6. Apr 21, 15:37

BlackRain wrote:
Tue, 6. Apr 21, 14:12
idragon wrote:
Tue, 6. Apr 21, 13:34
The npc_instantiation is a mess, not sure how good is now, i haven't tested properly, my old code, changed everything to a faction in npc_instantiation similar to security stations, but i had to use a custom config for players to change faction, now i use temporarily, modified egosoft code.

For player shipyards, you have to remove faction.player tag from all characters id that you dont want to spawn at your shipyards, thats why i had a special file for each faction, since a custom variable couldn't be inserted instead of faction.player like $customfaction for example.

Of course, only modifying characters.xml not sure if is enough, never tested without my modification in npc_instantiation file.
As I already said, the way I did it works perfectly. You can create any combination of NPCs you want to be able to recruit just by adding the faction.player into the correct spot of the npcs. You don't need to do anything else and I didn't borrow any code. I have already messed around with characters.xml plenty but I forgot that I could do it this way.
Oh no worries BlackRain, i am glad somebody did it, and from what i saw, you did it better than me :)

Xenon_Slayer
EGOSOFT
EGOSOFT
Posts: 13093
Joined: Sat, 9. Nov 02, 11:45
x4

Re: [MOD] Choose the race of your crew V2.1

Post by Xenon_Slayer » Tue, 6. Apr 21, 16:17

Just a heads up, this will be improved in the next version. When building ships at your own shipyards, the crew will be based on what habitation you have there.
Come watch me on Twitch where I occasionally play several of the X games

BlackRain
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 7411
Joined: Mon, 15. Dec 03, 18:53
x4

Re: [MOD] Choose the race of your crew V2.1

Post by BlackRain » Tue, 6. Apr 21, 16:18

Xenon_Slayer wrote:
Tue, 6. Apr 21, 16:17
Just a heads up, this will be improved in the next version. When building ships at your own shipyards, the crew will be based on what habitation you have there.
Thanks, I knew it was in the works but had no idea when it would happen. Glad to see it will happen soon and then we don't need this anymore.

Arrean
Posts: 2
Joined: Sat, 1. Dec 18, 15:03
x4

Re: [MOD] Choose the race of your crew V2.1

Post by Arrean » Tue, 6. Apr 21, 16:21

I just wanted to say thank you to everyone involved in this thread. I greatly appreaciate the effort that went into this, and also wanted to report that it appears to work on my save game without any issues. Out of ~100 ships build for testing not a single one had incorrect crew, and I wasn't able to spot any other issues either.

Thank you! Now I can finally drop the crew transfer shenanigans and get back to bulding up my fleets

SilverNixon
Posts: 31
Joined: Thu, 10. Nov 05, 19:12
x4

Re: [MOD] Choose the race of your crew V2.1

Post by SilverNixon » Tue, 6. Apr 21, 21:13

I have ensured I installed correctly and all seem to be working as intended except service crews. I still need to hire marines and switch to service crew. Thank you. Do let me know if service crew is working on your own tests. However, I look forward to an official patch so i can tick that off the list of what would make me play with no mods. I await news of ventures before going back to my un-moded save.

I also modified your file and added pioneers faction recruitable crews for a mixture of pilots and marines with the blue clothing and other pioneer outfits. I like the variety. can be seen immersively as rankings. I do wonder how they implement the habitation. Will it allow all terrans both POI and TER or will it be fixed to white clothed TER.

Anyway, thats 2 days worth of modding for me, now to enjoy my 2 week easter break from teaching and playing X4 manging stations and crews and exploring for hidden vistas.
“Not just beautiful, though - the stars are like the trees in the forest, alive and breathing. And they're watching me.”
― Haruki Murakami, Kafka on the Shore

BlackRain
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 7411
Joined: Mon, 15. Dec 03, 18:53
x4

Re: [MOD] Choose the race of your crew V2.1

Post by BlackRain » Tue, 6. Apr 21, 21:27

SilverNixon wrote:
Tue, 6. Apr 21, 21:13
I have ensured I installed correctly and all seem to be working as intended except service crews. I still need to hire marines and switch to service crew. Thank you. Do let me know if service crew is working on your own tests. However, I look forward to an official patch so i can tick that off the list of what would make me play with no mods. I await news of ventures before going back to my un-moded save.

I also modified your file and added pioneers faction recruitable crews for a mixture of pilots and marines with the blue clothing and other pioneer outfits. I like the variety. can be seen immersively as rankings. I do wonder how they implement the habitation. Will it allow all terrans both POI and TER or will it be fixed to white clothed TER.

Anyway, thats 2 days worth of modding for me, now to enjoy my 2 week easter break from teaching and playing X4 manging stations and crews and exploring for hidden vistas.
You must have done something wrong or there is a conflict, it is working 100% perfectly.

chh2tx
Posts: 15
Joined: Mon, 15. Mar 21, 05:13
x4

Re: [MOD] Choose the race of your crew V2.1

Post by chh2tx » Thu, 8. Apr 21, 07:28

Awesome to find the update. I took a few days away from the game and hadn't seen the more recent fixes. I somewhat thought it was being abandoned.

This has made my day. I really appreciate everyone's efforts. It's working perfectly here.

kaneeden
Posts: 10
Joined: Sat, 27. Feb 21, 04:33
x4

Re: [MOD] Choose the race of your crew V2.1

Post by kaneeden » Tue, 13. Apr 21, 02:15

Thank you so much for this mod.
It works perfectly.
In the first post with the link you mentioned "follow the instructions" so I wonder where to find those.
There seems to be no readme file or anything similar in the dropbox files.
Furthermore, I would like to ask why it is named "choose" the race of the crew or how to do that.
I tried it with the pioneer Terran start and it works well, all crew created with the ships at my wharves are now Terran but was that chosen by my game start selection or by the type of habitats connected to the wharf or not chosen at all and I have to do a different thing to get for example Argons along with the Terrans or Argons alone?
Thanks again for this great mod

BlackRain
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 7411
Joined: Mon, 15. Dec 03, 18:53
x4

Re: [MOD] Choose the race of your crew V2.1

Post by BlackRain » Tue, 13. Apr 21, 02:44

kaneeden wrote:
Tue, 13. Apr 21, 02:15
Thank you so much for this mod.
It works perfectly.
In the first post with the link you mentioned "follow the instructions" so I wonder where to find those.
There seems to be no readme file or anything similar in the dropbox files.
Furthermore, I would like to ask why it is named "choose" the race of the crew or how to do that.
I tried it with the pioneer Terran start and it works well, all crew created with the ships at my wharves are now Terran but was that chosen by my game start selection or by the type of habitats connected to the wharf or not chosen at all and I have to do a different thing to get for example Argons along with the Terrans or Argons alone?
Thanks again for this great mod
You need to go into the script itself to read the instructions, it is easy to do. Open the characters.xml file in the libraries folder with a program like notepad++ or something and read the instructions in there.

kaneeden
Posts: 10
Joined: Sat, 27. Feb 21, 04:33
x4

Re: [MOD] Choose the race of your crew V2.1

Post by kaneeden » Tue, 13. Apr 21, 03:42

BlackRain wrote:
Tue, 13. Apr 21, 02:44
kaneeden wrote:
Tue, 13. Apr 21, 02:15
Thank you so much for this mod.
It works perfectly.
In the first post with the link you mentioned "follow the instructions" so I wonder where to find those.
There seems to be no readme file or anything similar in the dropbox files.
Furthermore, I would like to ask why it is named "choose" the race of the crew or how to do that.
I tried it with the pioneer Terran start and it works well, all crew created with the ships at my wharves are now Terran but was that chosen by my game start selection or by the type of habitats connected to the wharf or not chosen at all and I have to do a different thing to get for example Argons along with the Terrans or Argons alone?
Thanks again for this great mod
You need to go into the script itself to read the instructions, it is easy to do. Open the characters.xml file in the libraries folder with a program like notepad++ or something and read the instructions in there.
Thank you for the quick reply.
By adding the Argon to the Terrans will the weight of both be 50% or a completely random distribution?
Is it possible to somehow connect the variety/weighting to habitats?

Post Reply

Return to “X4: Foundations - Scripts and Modding”