[MOD] Player Owned Ship Production

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

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

Post Reply
aftokinito
Posts: 229
Joined: Sun, 30. Mar 08, 17:29
x4

[MOD] Player Owned Ship Production

Post by aftokinito » Sun, 2. Dec 18, 18:46

Player Owned Ship Production

https://puu.sh/CfUUZ/61fe12e1fa.png

Description
Player Owned Ship Production (aka Afto's Player Shipyards) is a mod that allows players to build their own Shipyards, Wharves and Equipment Docks using the same tools already available in the game, namely the station and ship configurator UIs.
In order to be able to build the required station modules, players must first research the Build Module tech at their HQ and then scan the AI's build modules (XL/L/M/S Fabrication/Maintenance Bays) to get the required blueprints.

After acquiring the necessary blueprints, players will be able to build those modules at any of their stations EXCEPT for the HQ (this is already enforced in vanilla since it breaks the HQ's map icon otherwise).
Once the build modules have been built, a shiptrader NPC will automatically be added to the station (might take a few minutes) that will enable the ship building/upgrading/repairing functionality as well as changing the station's icon to the appropriate one.

The ship configurator UI has been modified to fix the issue that Egosoft encountered when dealing with player owned shipyards (GetContainerBuilderMacros returning garbage because the player faction has no licenses) and players can now build any ship they have a blueprint for.
At the start of the game, the player won't have any ship blueprint learned and, therefore, the player won't be able to build any ship in their own facilities.
Players can acquire new ship blueprints in the usual way, by talking to the Faction Representative and purchasing the corresponding blueprint from the list of the available ones.
Some blueprints require the player to have certain license but these requires are shared with those of the regular ship building mechanic so, as a rule of thumb, if the player can build certain ship from the corresponding faction's facilities, the blueprint of that ship should also be available for purchase.

Source:
https://bitbucket.org/aftokinito/x4-playershipyards

Latest version download:
https://bitbucket.org/aftokinito/x4-pla ... pyards.zip

Addons:
Changelog
---v1.10---
  • Initial public release
---v1.11---
  • Fixed typo in cat/dat name (was 01, correct name is ext_01)
---v1.20---
  • Fixed mod for game version 1.50
  • Fixed issue that prevented mixed building facilities (XL/L+M/S/XS) from properly working. Players should now be able to mix and match as desired and the ship configurator should only show the ships the station is capable of building.
  • Added ship blueprint support
---v1.21---
  • Changed the way I get rid of noplayerblueprint via XPath to be SLIGHTLY less autistic. Should fix crashes occurring due to unexpected ship wares added by third party mods. Thanks UniTrader!
  • Made the station_equip_lxl and station_equip_sm licenses available. If you've got the cash (as in, you're literally sweating money) you can now buy the appropriate licenses from your favourite faction representative and outright purchase the blueprints for the buildmodules like any other station module.
---v1.23---
  • Added support for Mobile Ship Production
  • Fixed spacesuit blueprints being available for purchase
---v1.24---
  • Fixed bug that caused inventory items to be captured by wares xml patch.
---v1.25---
  • Fixed some known CTDs.
Last edited by aftokinito on Fri, 4. Jan 19, 00:13, edited 16 times in total.

aftokinito
Posts: 229
Joined: Sun, 30. Mar 08, 17:29
x4

Re: [WIP] Player Owned Ship Production

Post by aftokinito » Sun, 2. Dec 18, 18:52

RESERVED

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

Re: [WIP] Player Owned Ship Production

Post by BlackRain » Sun, 2. Dec 18, 19:48

Not trying to be annoying, just curious if you know they plan to implement shipyard building for players? Anyway, would be cool to have it already

aftokinito
Posts: 229
Joined: Sun, 30. Mar 08, 17:29
x4

Re: [WIP] Player Owned Ship Production

Post by aftokinito » Sun, 2. Dec 18, 20:04

Yeah, I know but by the time Egosoft adds all the content the game is missing I'm already flying the hidden #deca with kyon emitters:
Image

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

Re: [WIP] Player Owned Ship Production

Post by BlackRain » Sun, 2. Dec 18, 20:15

They might be planning something different for player shipyards, like research or something. Maybe that is why they are taking longer. Just a guess

Melraki
Posts: 48
Joined: Tue, 29. Dec 09, 12:08
x4

Re: [WIP] Player Owned Ship Production

Post by Melraki » Sun, 2. Dec 18, 20:41

Like reverse engineering! We have to dismantle 4-5 ships to learn the frame, and some research to create our own part and gear.

aftokinito
Posts: 229
Joined: Sun, 30. Mar 08, 17:29
x4

Re: [WIP] Player Owned Ship Production

Post by aftokinito » Sun, 2. Dec 18, 23:38

BlackRain wrote:
Sun, 2. Dec 18, 20:15
They might be planning something different for player shipyards, like research or something. Maybe that is why they are taking longer. Just a guess
And when that comes, circa 2020, this mod will be useless. Meanwhile, I'm gonna build my huge empire without giving a penny to those nasty Teladi.
I get your point, I'm just impatient.

JJJJ222
Posts: 32
Joined: Tue, 8. Dec 15, 00:00
x4

Re: [WIP] Player Owned Ship Production

Post by JJJJ222 » Mon, 3. Dec 18, 02:44

can I test is mod.
Just curious :D

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

Re: [WIP] Player Owned Ship Production

Post by BlackRain » Mon, 3. Dec 18, 03:19

carmaster wrote:
Sun, 2. Dec 18, 23:38
BlackRain wrote:
Sun, 2. Dec 18, 20:15
They might be planning something different for player shipyards, like research or something. Maybe that is why they are taking longer. Just a guess
And when that comes, circa 2020, this mod will be useless. Meanwhile, I'm gonna build my huge empire without giving a penny to those nasty Teladi.
I get your point, I'm just impatient.
I wasn't trying to discourage you, I will use this for now too if you put something out, or just make my own. I was just speculating

Azran_Zala
Posts: 69
Joined: Tue, 13. Mar 18, 00:25
x4

Re: [WIP] Player Owned Ship Production

Post by Azran_Zala » Mon, 3. Dec 18, 11:48

I'd love access to such mod.
I was deeply disappointed that this has been left out at release.

My play style requires it (Player vs. Everyone).
I usually start building Stations from the top down for ship production, and once it have minimum resource chain in place, I turn my xenophobic fleets loose on the universe.

(some more pirate factions/sectors/bases) to pick on early game, would have been nice too, and if I were making a xmas list: Arawn carrier from XR in x4 would be cherries and icing sugar.)

EmperorDragon
Posts: 380
Joined: Sat, 13. Apr 13, 14:45
x4

Re: [WIP] Player Owned Ship Production

Post by EmperorDragon » Mon, 3. Dec 18, 15:55

So they left out player shipbuilding again? I really did not expect that considering the demand for it since X3, I thought they've learnt by now.

In Rebirth, dependence on NPC shipyards led me to become Plutarch's closest ally and HoA's worst enemy, my copilot was completely out of place!

Your mod will be another day one mod for me I reckon, provided that it's ready to play by the 19th. Thanks very much for your early efforts!
“To be the first to enter the cosmos, to engage, single-handed, in an unprecedented duel with nature - could one dream of anything more?” - Yuri Gagarin

User avatar
mr.WHO
Posts: 8549
Joined: Thu, 12. Oct 06, 17:19
x4

Re: [WIP] Player Owned Ship Production

Post by mr.WHO » Mon, 3. Dec 18, 19:35

I was furious that Egosoft has left this feature out of release versions, but now, even if they for some reason won't implement it back, we have this mod as a backup plan.

aftokinito
Posts: 229
Joined: Sun, 30. Mar 08, 17:29
x4

Re: [WIP] Player Owned Ship Production

Post by aftokinito » Mon, 3. Dec 18, 19:58

I still need help with the shiptrader's macro list: viewtopic.php?f=181&t=403612&p=4762909#p4762909

I've narrowed it down to menu_ship_configuration.lua:1752 onwards and NPC_Shiptrader.xml:67 but I'm having a hard time figuring out how C.GetNumContainerBuilderMacros(menu.container) gets its return data.

StormMagi
Posts: 1335
Joined: Sat, 17. Mar 07, 03:53
x4

Re: [WIP] Player Owned Ship Production

Post by StormMagi » Mon, 3. Dec 18, 22:17

mr.WHO wrote:
Mon, 3. Dec 18, 19:35
I was furious that Egosoft has left this feature out of release versions, but now, even if they for some reason won't implement it back, we have this mod as a backup plan.
I don't know the exact issue but from what I have seen on the forums, there was an 11th hour issue with player shipyards that they couldn't fix by launch. It will still be coming out.
MOD XR Show Skills

Flying spaceships since 1993.

Cpt. H. Elmes
Posts: 46
Joined: Sun, 21. Sep 08, 00:07
x4

Re: [WIP] Player Owned Ship Production

Post by Cpt. H. Elmes » Mon, 3. Dec 18, 23:18

Saw a post on reddit that they left player shipbuilding out for release because it was too buggy, but are working hard on it.

Hopefully is the case!

Azran_Zala
Posts: 69
Joined: Tue, 13. Mar 18, 00:25
x4

Re: [WIP] Player Owned Ship Production

Post by Azran_Zala » Tue, 4. Dec 18, 15:02

Cpt. H. Elmes wrote:
Mon, 3. Dec 18, 23:18
Saw a post on reddit that they left player shipbuilding out for release because it was too buggy, but are working hard on it.

Hopefully is the case!
Hope so soon, my game is too peaceful.. if these Care bears don't start murdering each other soon, I'm going bribe the union bosses and instigate civil unrest among their workers. When they pull the patriot act on my standings - I'll require my own access to cap-ships to continue the good fight, in Unifying the galaxy under my fascist single galaxy government - the GU.
Spoiler
Show
Image

StormMagi
Posts: 1335
Joined: Sat, 17. Mar 07, 03:53
x4

Re: [WIP] Player Owned Ship Production

Post by StormMagi » Tue, 4. Dec 18, 16:19

Azran_Zala wrote:
Tue, 4. Dec 18, 15:02
Cpt. H. Elmes wrote:
Mon, 3. Dec 18, 23:18
Saw a post on reddit that they left player shipbuilding out for release because it was too buggy, but are working hard on it.

Hopefully is the case!
Hope so soon, my game is too peaceful.. if these Care bears don't start murdering each other soon, I'm going bribe the union bosses and instigate civil unrest among their workers. When they pull the patriot act on my standings - I'll require my own access to cap-ships to continue the good fight, in Unifying the galaxy under my fascist single galaxy government - the GU.
Spoiler
Show
Image
Doesn't that just mean it is time for workers to liberate their vessels from their oppressive masters? (AKA: Hoist the Jolly Roger, it's time fer a boardin` party lads!)
MOD XR Show Skills

Flying spaceships since 1993.

Azran_Zala
Posts: 69
Joined: Tue, 13. Mar 18, 00:25
x4

Re: [WIP] Player Owned Ship Production

Post by Azran_Zala » Tue, 4. Dec 18, 16:25

StormMagi wrote:
Tue, 4. Dec 18, 16:19
Azran_Zala wrote:
Tue, 4. Dec 18, 15:02
Cpt. H. Elmes wrote:
Mon, 3. Dec 18, 23:18
Saw a post on reddit that they left player shipbuilding out for release because it was too buggy, but are working hard on it.

Hopefully is the case!
Hope so soon, my game is too peaceful.. if these Care bears don't start murdering each other soon, I'm going bribe the union bosses and instigate civil unrest among their workers. When they pull the patriot act on my standings - I'll require my own access to cap-ships to continue the good fight, in Unifying the galaxy under my fascist single galaxy government - the GU.
Spoiler
Show
Image
Doesn't that just mean it is time for workers to liberate their vessels from their oppressive masters? (AKA: Hoist the Jolly Roger, it's time fer a boardin` party lads!)
Yo ho and a bottle of rum. The Argon government knows this, which is why space fuel is illegal. End Prohibition!

aftokinito
Posts: 229
Joined: Sun, 30. Mar 08, 17:29
x4

Re: [WIP] Player Owned Ship Production

Post by aftokinito » Wed, 5. Dec 18, 06:44

Current progress: https://cdn.discordapp.com/attachments/ ... _47_AM.png


It works, it just needs some fluff here and there.


{Images posted directly to the forums should not be greater than 640x480 or 100kb, oversize image now linked - Terre}

StormMagi
Posts: 1335
Joined: Sat, 17. Mar 07, 03:53
x4

Re: [WIP] Player Owned Ship Production

Post by StormMagi » Wed, 5. Dec 18, 07:07

Azran_Zala wrote:
Tue, 4. Dec 18, 16:25
StormMagi wrote:
Tue, 4. Dec 18, 16:19
Azran_Zala wrote:
Tue, 4. Dec 18, 15:02


Hope so soon, my game is too peaceful.. if these Care bears don't start murdering each other soon, I'm going bribe the union bosses and instigate civil unrest among their workers. When they pull the patriot act on my standings - I'll require my own access to cap-ships to continue the good fight, in Unifying the galaxy under my fascist single galaxy government - the GU.
Spoiler
Show
Image
Doesn't that just mean it is time for workers to liberate their vessels from their oppressive masters? (AKA: Hoist the Jolly Roger, it's time fer a boardin` party lads!)
Yo ho and a bottle of rum. The Argon government knows this, which is why space fuel is illegal. End Prohibition!
*hides his X3:TC self sustained Space Fuel, Space Weed, M7M & M8 missle production mega complexes* Nothing to see here comrade! Please do not mind the smoke and random fireworks. Perhaps you would like something from the comissary?
MOD XR Show Skills

Flying spaceships since 1993.

Post Reply

Return to “X4: Foundations - Scripts and Modding”