Removing wares for player only

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

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

Post Reply
Realspace
Posts: 1342
Joined: Wed, 15. Nov 06, 10:21
x4

Removing wares for player only

Post by Realspace » Tue, 24. Jan 23, 10:09

I'd like to standardize the S and M engines so to remove the MK differences and make them all as L and XL, maybe keep the combat differentiation. So, remove the Mk2 and Mk1 (or whatever, two of the three) from wharf etc..
If I remove them from wares.xml will this cause issues with ships created by script that call say an Mk1? Are the engines gone for all or only from the market?
Thanks

j.harshaw
EGOSOFT
EGOSOFT
Posts: 1847
Joined: Mon, 23. Nov 15, 18:02

Re: Removing wares for player only

Post by j.harshaw » Tue, 24. Jan 23, 15:00

That would disallow usage by NPC factions as well except where specified by a custom loadout (although then specifying them in a custom loadout might cause errors, not sure). You could also add noblueprint and noplayerbuild tags to the ware definitions which, if I remember correctly, would only prevent player access to them.

Realspace
Posts: 1342
Joined: Wed, 15. Nov 06, 10:21
x4

Re: Removing wares for player only

Post by Realspace » Wed, 25. Jan 23, 02:49

Interesting, this means I could make some engines used only by other NPC, different from those used by the player's fleet.
Thank you very much, I'll try the tags

User avatar
Casishur
Posts: 1649
Joined: Fri, 1. Jul 05, 10:04
x4

Re: Removing wares for player only

Post by Casishur » Wed, 25. Jan 23, 22:29

Some blueprints with the flag noplayerblueprint (xenon) prohibit the player from purchasing the blueprint. another allows the blueprint to be purchased, but the equipment or ship is not purchasable in their shipyard. Example the Asgard.
A combination of both would eventually have to make it so that you can't buy the equipment or blueprints in the equipment dock.
CPU Typ Ryzen 9 3900x
Grafikkarte Radeon RX 6600 XT 8GB
Arbeitsspeicher: Corsair Vengeance LPX 32GB (2 x 16 GB) DDR4 3200MHz
Motherboard Name/Typ MSI B550 Gaming Plus
Win 10 64 bit

Betty : Autopilot.... hat.... total Versagt.

Twitch https://www.twitch.tv/Casishur

Realspace
Posts: 1342
Joined: Wed, 15. Nov 06, 10:21
x4

Re: Removing wares for player only

Post by Realspace » Thu, 26. Jan 23, 00:01

Good to know, thanks!
I was thinking of watching how xenon and khaak engines are listed, to copy their tags (they are not in the market) and found none listed in wares.xml. Still they use their engines without issues. So this makes me think that maybe if I simply remove the Mk1 and Mk2 engines from the wares, they will continue to be used by ships that have them in their loadout, same as Xenons do, right?

I don't care if other npc ships use them, I will set them identical to those in the market, no matter the type

EDIT:
Ok, tried the total removal and while engines are still used, ship's interface appears blank if that engine is mounted, so no viable. Then tried adding various tags:

Code: Select all

noblueprint nocustomgamestart noplayerblueprint nopersonalupgrade noplayerbuild
It works perfectly, so I could standardize all engines (btw had to replace the entire ware entry to change nr of wares used etc, while could change price only previously...well, not a problem).

Now my idea was to add another engine, let's call it S Mk4, that can be used by the player only. I had this idea by redoing as in my Rebirth mod, where the player has a unique engine so you can make it hardcore Newtonian physics, while other npc ships use more arcade physics.

Indeed AI does not handle inertia very well so I wanted to make this "trick" as having standard engines for all and hardcore for player only.
But...the engine I added does not show :evil:

Added the entry in macros and components, duplicate the Combat Mk3 into Mk4, changing all names, changing the components or using the reference to the Mk3 instead, since the model is identical. I don't think I made errors, know how adding or replacing works,
using diff or not using for a new component, etc. Well it does not show, no matter the tags I add to the ware, it does not show in custom game nor in argon wharf (it is ARG Combat Mk4) :gruebel:

This is strage but, IF, only if I can't add anew engines, what would be needed to exclude npc from the usage of a specific engine (let's say combat mk3 has to be player only)? Removing that engine from lodouts is enough to prevent it being mounted by a random ship in a random event?? Tags? What about the allowplayeronly="true"?
Thanks for any help..

Post Reply

Return to “X4: Foundations - Scripts and Modding”