[MOD] Player Owned Ship Production
Moderators: Moderators for English X Forum, Scripting / Modding Moderators
-
- Posts: 229
- Joined: Sun, 30. Mar 08, 17:29
Re: [MOD] Player Owned Ship Production
Please, do note that POSP might undo some of the fixes introduced in 1.51 beta.
I'll update POSP to support 1.51 soon.
I'll update POSP to support 1.51 soon.
Re: [MOD] Player Owned Ship Production
i wilspeak with the ship Trader and x4 foundations stopt work
-
- Posts: 398
- Joined: Tue, 17. Dec 13, 01:34
Re: [MOD] Player Owned Ship Production
Found this on Nexus the other day.
I'm still laughing at the utter stupidity of it.
Breach of modding protocols (flat out replacement of base game files instead of using proper extension method when all they do is add some entries to "god"),
redundant changes (bundles your mod, and then doing what it ALREADY DOES to the base game files) (<-specifically, the ware.xml changes)
I'm still laughing at the utter stupidity of it.
Breach of modding protocols (flat out replacement of base game files instead of using proper extension method when all they do is add some entries to "god"),
redundant changes (bundles your mod, and then doing what it ALREADY DOES to the base game files) (<-specifically, the ware.xml changes)
Re: [MOD] Player Owned Ship Production
Mod crashes the game when buying ship blueprints after owning a shipyard
Re: [MOD] Player Owned Ship Production
so with the requirement of having to buy blueprints from representatives and not just having all the ships unlocked, how would one get a hold of xenon ship blueprints or maybe the possibility of getting a hold of xenon station parts
Re: [MOD] Player Owned Ship Production
Everything seems to be working fine. Until, I buy ship blueprints, then CTD
-
- Posts: 99
- Joined: Sat, 21. Jun 08, 18:46
Re: [MOD] Player Owned Ship Production
Hmm, I've just crashed on buying ship equipment blueprints.
Think I bought some blueprints earlier in the game and there was no issue, but that was before the 1.51 beta patch and with a different combination of mods. But maybe it's specific to the particular blueprints.
EDIT: Just reread over the thread then did some testing. Turns out it's the same bug others are reporting where owning a shipyard causes it to crash when you buy blueprints. Did anyone find a solution besides demolishing your shipyard?
EDIT2: I'm also having an issue in that medium shields aren't available to be equipped from my shipyard. They work fine in AI shipyards, and I definitely have the blueprints
-
- Posts: 229
- Joined: Sun, 30. Mar 08, 17:29
Re: [MOD] Player Owned Ship Production
DMCA'd, thanks for reporting.Berserk Knight wrote: ↑Wed, 16. Jan 19, 03:06Found this on Nexus the other day.
I'm still laughing at the utter stupidity of it.
Breach of modding protocols (flat out replacement of base game files instead of using proper extension method when all they do is add some entries to "god"),
redundant changes (bundles your mod, and then doing what it ALREADY DOES to the base game files) (<-specifically, the ware.xml changes)
The crash happens outside of my control, it's an issue with the LearnBlueprint function that causes a crash because of how the Lua state is handled when it comes to blueprints vs how it is handled by the rest of the game (MD, for example).Baldamundo wrote: ↑Wed, 16. Jan 19, 21:50Hmm, I've just crashed on buying ship equipment blueprints.
Think I bought some blueprints earlier in the game and there was no issue, but that was before the 1.51 beta patch and with a different combination of mods. But maybe it's specific to the particular blueprints.
EDIT: Just reread over the thread then did some testing. Turns out it's the same bug others are reporting where owning a shipyard causes it to crash when you buy blueprints. Did anyone find a solution besides demolishing your shipyard?
EDIT2: I'm also having an issue in that medium shields aren't available to be equipped from my shipyard. They work fine in AI shipyards, and I definitely have the blueprints
So far the only solution I've been able to find is to start a new save with POSP enabled and never disable it for the lifetime of that save.
- Blacky_BPG
- Posts: 2030
- Joined: Mon, 23. Feb 04, 23:42
Re: [MOD] Player Owned Ship Production
But that did not work that way either.
I also started a new game with 1.50 and POSP enabled. I bought some blueprints for the basics and then a shipyard (this time even with just one L & XL ship category, not mixed) and as soon as the modules were finished the game crashed when I wanted to buy a blueprint.
So there is definitely something wrong with the LearnBlueprint function. I also had to output the values which are passed to the LearnBlueprint function in the LUA and these are correct and will be passed just like without player shipyard modules.
I think you can do absolutely nothing, Egosoft has to do something, and if they finally do, they will include the player shipyard function anyway.
Nevertheless, you has done a great job so far, and that can only be praised. Thank you.
I also started a new game with 1.50 and POSP enabled. I bought some blueprints for the basics and then a shipyard (this time even with just one L & XL ship category, not mixed) and as soon as the modules were finished the game crashed when I wanted to buy a blueprint.
So there is definitely something wrong with the LearnBlueprint function. I also had to output the values which are passed to the LearnBlueprint function in the LUA and these are correct and will be passed just like without player shipyard modules.
I think you can do absolutely nothing, Egosoft has to do something, and if they finally do, they will include the player shipyard function anyway.
Nevertheless, you has done a great job so far, and that can only be praised. Thank you.
-
- Posts: 229
- Joined: Sun, 30. Mar 08, 17:29
Re: [MOD] Player Owned Ship Production
The problem is that GetBlueprints returns blueprints that you already know, which indicates that the state is not properly passed to Lua.Blacky_BPG wrote: ↑Thu, 17. Jan 19, 18:50But that did not work that way either.
I also started a new game with 1.50 and POSP enabled. I bought some blueprints for the basics and then a shipyard (this time even with just one L & XL ship category, not mixed) and as soon as the modules were finished the game crashed when I wanted to buy a blueprint.
So there is definitely something wrong with the LearnBlueprint function. I also had to output the values which are passed to the LearnBlueprint function in the LUA and these are correct and will be passed just like without player shipyard modules.
I think you can do absolutely nothing, Egosoft has to do something, and if they finally do, they will include the player shipyard function anyway.
Nevertheless, you has done a great job so far, and that can only be praised. Thank you.
When you call LearnBlueprint in that case, the game crashes for some reason.
Re: [MOD] Player Owned Ship Production
i imagine thats the problem the devs had that prevented this from being available in base game on launchaftokinito wrote: ↑Thu, 17. Jan 19, 19:57The problem is that GetBlueprints returns blueprints that you already know, which indicates that the state is not properly passed to Lua.Blacky_BPG wrote: ↑Thu, 17. Jan 19, 18:50But that did not work that way either.
I also started a new game with 1.50 and POSP enabled. I bought some blueprints for the basics and then a shipyard (this time even with just one L & XL ship category, not mixed) and as soon as the modules were finished the game crashed when I wanted to buy a blueprint.
So there is definitely something wrong with the LearnBlueprint function. I also had to output the values which are passed to the LearnBlueprint function in the LUA and these are correct and will be passed just like without player shipyard modules.
I think you can do absolutely nothing, Egosoft has to do something, and if they finally do, they will include the player shipyard function anyway.
Nevertheless, you has done a great job so far, and that can only be praised. Thank you.
When you call LearnBlueprint in that case, the game crashes for some reason.
-
- Posts: 99
- Joined: Sat, 21. Jun 08, 18:46
Re: [MOD] Player Owned Ship Production
Any idea why I can't build shields on M class ships at my shipyard? It works fine at NPC shipyards, I have the blueprint, I'm able to use M class shields on my stations, and I'm able to build M class shields as the turret/engine shields on L and XL ships at my shipyard, but for some reason I don't have any shield options available on M class ships
Also having an issue with saved ship loadouts never working at player shipyards - even ones saved at that shipyard with exactly the same set of available components
Also having an issue with saved ship loadouts never working at player shipyards - even ones saved at that shipyard with exactly the same set of available components
-
- Posts: 398
- Joined: Tue, 17. Dec 13, 01:34
Re: [MOD] Player Owned Ship Production
Do you have...Baldamundo wrote: ↑Thu, 17. Jan 19, 23:39Any idea why I can't build shields on M class ships at my shipyard? It works fine at NPC shipyards, I have the blueprint, I'm able to use M class shields on my stations, and I'm able to build M class shields as the turret/engine shields on L and XL ships at my shipyard, but for some reason I don't have any shield options available on M class ships
Also having an issue with saved ship loadouts never working at player shipyards - even ones saved at that shipyard with exactly the same set of available components
1. Both blueprints for M shields/turrets? There are 2 versions, one for use in separately damageable L/XL ship and station engine/turret groups, the other for M ships where they are integrated and can not be damaged separately.
2. L/XL build capability AND S/M build capability on the same station? You'll want Blacky_BPG's fix on this post for that one.
...Oh yeah, #2 only causes problems on engines and turrets. If shields aren't appearing at all for M ships, it's probably #1.
-
- Posts: 99
- Joined: Sat, 21. Jun 08, 18:46
Re: [MOD] Player Owned Ship Production
Huh. I'm only seeing one set of blueprints available at any of the faction reps.Berserk Knight wrote: ↑Fri, 18. Jan 19, 00:53Do you have...
1. Both blueprints for M shields/turrets? There are 2 versions, one for use in separately damageable L/XL ship and station engine/turret groups, the other for M ships where they are integrated and can not be damaged separately.
2. L/XL build capability AND S/M build capability on the same station? You'll want Blacky_BPG's fix on this post for that one.
...Oh yeah, #2 only causes problems on engines and turrets. If shields aren't appearing at all for M ships, it's probably #1.
Is this the distinction between <blueprint ware="shield_par_m_standard_01_mk2"/> and<blueprint ware="shield_par_m_standard_02_mk2"/>, and would I be able to fix it with a savegame edit?
Re: [MOD] Player Owned Ship Production
i buy bluprints after ownning a schipyard and x 4 stopt work
-
- Posts: 229
- Joined: Sun, 30. Mar 08, 17:29
Re: [MOD] Player Owned Ship Production
Heh,
Anyway, even with 0 mods there is deffo something wrong with blueprints/research, even if you have not got the research done, they sometimes drop anyway, plus I have had crashes at similar points with and without POSP, buying blups from faction reps. I think crashes with shipbuilding just reveal this quicker, so I don't think its an issue with POSP, more due to X4 needing a little more work.
mmmh, probably quicker to talk about it on disco.
Anyway, even with 0 mods there is deffo something wrong with blueprints/research, even if you have not got the research done, they sometimes drop anyway, plus I have had crashes at similar points with and without POSP, buying blups from faction reps. I think crashes with shipbuilding just reveal this quicker, so I don't think its an issue with POSP, more due to X4 needing a little more work.
mmmh, probably quicker to talk about it on disco.
Aladna Hill, Again, AP, 3.1. in the last Game worthy of the "X" title. <<<< X4 might just be changing this.
-
- Posts: 398
- Joined: Tue, 17. Dec 13, 01:34
Re: [MOD] Player Owned Ship Production
I have 2 additions that'll make things go smoother.
/md/InitUniverse.xml
This will create ship dealers on shipyards every 1 minute instead of the stock interval of 29 minutes.
Yes, the lack of ship dealers on the station is the exact reason why you can't build ships in your shipyard for a while. (...Unless you got lucky and the build module got built right before the tick.)
/md/Job_Helper.xml
The first part was SUPPOSED TO stop player shipyards from being registered and then cancel the cue.
...Which shouldn't happen anyways since every trigger for this cue has a player faction check in it, so this cue shouldn't be firing for player shipyards.
Both of them fail for some reason, and the cue still fires.
So I put in the second part. When the shipyard looks for a job ship to build, if it's a player owned shipyard, it'll do nothing.
This will keep your shipyards free of NPC faction build orders.
It will NOT prevent NPC ships from using it like an equipment dock to restock ammo or get repairs.
Then the answer is yes to both.
/md/InitUniverse.xml
Code: Select all
<?xml version="1.0" encoding="utf-8"?>
<diff>
<replace sel="//cue[@name='CreateShipDealerNPCs']/@checkinterval">1min</replace>
</diff>
Yes, the lack of ship dealers on the station is the exact reason why you can't build ships in your shipyard for a while. (...Unless you got lucky and the build module got built right before the tick.)
/md/Job_Helper.xml
Code: Select all
<?xml version="1.0" encoding="utf-8"?>
<diff>
<replace sel="/mdscript/cues/cue/actions/do_if/add_to_group">
<do_if value="$Shipyard.isplayerowned">
<cancel_cue cue="AddShipyard"/>
</do_if>
<do_else>
<add_to_group groupname="md.$Shipyards" object="$Shipyard"/>
</do_else>
</replace>
<replace sel="/mdscript/cues/cue/cues/cue/cues/cue[@name='FindSuitableShip']/actions/do_if/do_if/do_while/do_all/do_if/do_all/do_if/do_if/add_build_to_construct_ship">
<do_if value="$Shipyard.isplayerowned">
<set_value name="$Build" exact="null"/>
</do_if>
<do_else>
<add_build_to_construct_ship result="$Build" object="$Shipyard" buildobject="$Ship"/>
</do_else>
</replace>
</diff>
...Which shouldn't happen anyways since every trigger for this cue has a player faction check in it, so this cue shouldn't be firing for player shipyards.
Both of them fail for some reason, and the cue still fires.
So I put in the second part. When the shipyard looks for a job ship to build, if it's a player owned shipyard, it'll do nothing.
This will keep your shipyards free of NPC faction build orders.
It will NOT prevent NPC ships from using it like an equipment dock to restock ammo or get repairs.
Ah...I see the problem. The wares.xml only changes a single ware for shields.Baldamundo wrote: ↑Fri, 18. Jan 19, 01:23Huh. I'm only seeing one set of blueprints available at any of the faction reps.
Is this the distinction between <blueprint ware="shield_par_m_standard_01_mk2"/> and<blueprint ware="shield_par_m_standard_02_mk2"/>, and would I be able to fix it with a savegame edit?
Then the answer is yes to both.
Re: [MOD] Player Owned Ship Production
Are you sure this is actually where the build orders come from? The code in Job_Helper checks for the shipyard owner matching the desired ship. But I was poking around in the resupply code and found that order.restock.subordinates does not. It just uses the closest friendly shipyard.Berserk Knight wrote: ↑Sun, 20. Jan 19, 13:40The first part was SUPPOSED TO stop player shipyards from being registered and then cancel the cue.
...Which shouldn't happen anyways since every trigger for this cue has a player faction check in it, so this cue shouldn't be firing for player shipyards.
Both of them fail for some reason, and the cue still fires.
So I put in the second part. When the shipyard looks for a job ship to build, if it's a player owned shipyard, it'll do nothing.
This will keep your shipyards free of NPC faction build orders.
-
- Posts: 398
- Joined: Tue, 17. Dec 13, 01:34
Re: [MOD] Player Owned Ship Production
Hmm, it seems the AI was trolling me. After 2.5 hours of SETA, one of the NPC factions did indeed get an order (or 2) through. (Apparently, 1+hour of SETA while you have the only functioning shipyard in the galaxy isn't enough.)Mysterial wrote: ↑Sat, 26. Jan 19, 02:46Are you sure this is actually where the build orders come from? The code in Job_Helper checks for the shipyard owner matching the desired ship. But I was poking around in the resupply code and found that order.restock.subordinates does not. It just uses the closest friendly shipyard.
Still a lot less than what I normally get without that little patch of mine (which is basically an instant spam-fest of build orders) so it might be working to some degree?
I think there are 2 different job ship build order queues, one that's global which is periodically picked up by Job_Helper, and another that's posted to a specific shipyard and instantly started by order.restock.subordinates.
Fixing that and interrupt.restock as well should make player shipyards NPC order free.