[HELP]Adding factions that have working shipyards and licenses

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

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

Post Reply
ned228
Posts: 29
Joined: Sun, 15. Jun 14, 21:20
x4

[HELP]Adding factions that have working shipyards and licenses

Post by ned228 » Fri, 27. Mar 20, 19:45

I am trying to make a mod that adds a new faction. However I can not figure out how to get it to have working shipyards and licenses. I have licensees listed for the faction and it has shipyards spawn but neither the ships yards or licensed do anything. How would you fix this?

DeadAirRT
Posts: 1021
Joined: Fri, 25. Jan 19, 03:26
x4

Re: [HELP]Adding factions that have working shipyards and licenses

Post by DeadAirRT » Fri, 27. Mar 20, 21:39

you have to go through wares.xml, ships.xml, shipgroups.xml and add the appropriate entries for your faction.

ned228
Posts: 29
Joined: Sun, 15. Jun 14, 21:20
x4

Re: [HELP]Adding factions that have working shipyards and licenses

Post by ned228 » Fri, 27. Mar 20, 22:15

I have the ships in the universe. What I want is to have the ships purchasable at shipyards and to have working licensees. Currently I have shipyards for my faction, but they do not give me the option to buy ships from them. Also licenses are not purchasable because there is no faction representative for the faction. This is what i want to fix.

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

Re: [HELP]Adding factions that have working shipyards and licenses

Post by BlackRain » Fri, 27. Mar 20, 23:38

ned228 wrote:
Fri, 27. Mar 20, 22:15
I have the ships in the universe. What I want is to have the ships purchasable at shipyards and to have working licensees. Currently I have shipyards for my faction, but they do not give me the option to buy ships from them. Also licenses are not purchasable because there is no faction representative for the faction. This is what i want to fix.
He already gave you part of the answer, you need to define all of those things in those files, plus more. You need to also add code to provide faction representatives for them in factionlogic.xml

ned228
Posts: 29
Joined: Sun, 15. Jun 14, 21:20
x4

Re: [HELP]Adding factions that have working shipyards and licenses

Post by ned228 » Fri, 27. Mar 20, 23:55

Okay. The ships spawn in the universe. What do i have to do in those files to get the rest of what I am trying to do as I am unfamiliar with what parameters I have to change. I am hoping to have a shipyard that is owned by my custom faction. Also how would you add a faction representive in a script.

DeadAirRT
Posts: 1021
Joined: Fri, 25. Jan 19, 03:26
x4

Re: [HELP]Adding factions that have working shipyards and licenses

Post by DeadAirRT » Mon, 30. Mar 20, 07:58

In factions.xml you need to set up your faction with licenses it can grant, licenses it grants to other factions by default, and licenses granted from other factions.

In faction logic, you need to set up your faction parameters similar to how others are set up. You need to add in a part that controls the creation of hq and faction representative for your faction.

In ships, you need to define what ships your faction will use (ideally only ones they can build themselves or via a granted license from other faction)

In ship groups, you need to set up groups of ships that the tag system in jobs.xml uses.

In wares.xml you need to set ownership for your faction on the ships, Modules, equipment, drones, and consumables/software

ned228
Posts: 29
Joined: Sun, 15. Jun 14, 21:20
x4

Re: [HELP]Adding factions that have working shipyards and licenses

Post by ned228 » Tue, 31. Mar 20, 02:52

I have done that. in the faction logic file i have copied the parameters from the vanillia faction logic file and modified them to spawn my faction representative. How ever I still do not have a faction representative. I am i missing something?

Post Reply

Return to “X4: Foundations - Scripts and Modding”