[MOD] Player Owned Ship Production

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

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

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, 19: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, 01: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, 19:52

RESERVED

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

Re: [WIP] Player Owned Ship Production

Post by BlackRain » Sun, 2. Dec 18, 20: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, 21: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: 6422
Joined: Mon, 15. Dec 03, 19:53
x4

Re: [WIP] Player Owned Ship Production

Post by BlackRain » Sun, 2. Dec 18, 21: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: 21
Joined: Tue, 29. Dec 09, 13:08
x4

Re: [WIP] Player Owned Ship Production

Post by Melraki » Sun, 2. Dec 18, 21: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 » Mon, 3. Dec 18, 00:38

BlackRain wrote:
Sun, 2. Dec 18, 21: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, 01:00
x4

Re: [WIP] Player Owned Ship Production

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

can I test is mod.
Just curious :D

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

Re: [WIP] Player Owned Ship Production

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

carmaster wrote:
Mon, 3. Dec 18, 00:38
BlackRain wrote:
Sun, 2. Dec 18, 21: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, 01:25
x4

Re: [WIP] Player Owned Ship Production

Post by Azran_Zala » Mon, 3. Dec 18, 12: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: 338
Joined: Sat, 13. Apr 13, 14:45

Re: [WIP] Player Owned Ship Production

Post by EmperorDragon » Mon, 3. Dec 18, 16: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: 5193
Joined: Thu, 12. Oct 06, 17:19
x4

Re: [WIP] Player Owned Ship Production

Post by mr.WHO » Mon, 3. Dec 18, 20: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, 20: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: 1324
Joined: Sat, 17. Mar 07, 04:53
x4

Re: [WIP] Player Owned Ship Production

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

mr.WHO wrote:
Mon, 3. Dec 18, 20: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: 41
Joined: Sun, 21. Sep 08, 00:07
x4

Re: [WIP] Player Owned Ship Production

Post by Cpt. H. Elmes » Tue, 4. Dec 18, 00: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!

Post Reply

Return to “X4: Foundations - Scripts and Modding”