[4.00 HF3] (Scripting) "method" attribute of "add_blueprint" not working

Ask here if you experience technical problems with X4: Foundations.

Moderator: Moderators for English X Forum

Post Reply
Berserk Knight
Posts: 398
Joined: Tue, 17. Dec 13, 01:34
x4

[4.00 HF3] (Scripting) "method" attribute of "add_blueprint" not working

Post by Berserk Knight » Tue, 8. Jun 21, 11:37

If I'm reading the documentation correctly, it should be giving the player blueprints to the ware, but only for the method specified.
(i.e. Adding blueprints for Torpedo Launchers with method="terran" should only give us blueprints that use the Terran materials such as Metallic Microlattice and Silicon Carbide instead of Weapon Components.)

That is not the case, and the game currently just adds the whole ware and all the methods attached to it.

When looking at the Lua UI's version of the command (which seems to directly call the engine's linked C function), it seems that the function doesn't even have any way to specify a method.


The "method" attribute was in the documentation for ages, but from what I can tell, the engine never had any accommodations for it.

CBJ
EGOSOFT
EGOSOFT
Posts: 51740
Joined: Tue, 29. Apr 03, 00:56
x4

Re: [4.00 HF3] (Scripting) "method" attribute of "add_blueprint" not working

Post by CBJ » Tue, 8. Jun 21, 12:18

Berserk Knight wrote:
Tue, 8. Jun 21, 11:37
The "method" attribute was in the documentation for ages, but from what I can tell, the engine never had any accommodations for it.
Well this part, at least, simply isn't true. The engine has always implemented production methods, even before they were used in the game. :)

Looking at the relevant code, the method information is passed through the various layers from the script action, so my question is where you are seeing the results that you are stating, i.e. where is the game showing you that you know all production methods?

Berserk Knight
Posts: 398
Joined: Tue, 17. Dec 13, 01:34
x4

Re: [4.00 HF3] (Scripting) "method" attribute of "add_blueprint" not working

Post by Berserk Knight » Tue, 8. Jun 21, 15:55

By literally being able to build with a method I didn't add a blueprint for?

After removing the "noplayerbuild" tag from Xenon methods, several wares (such as missiles) had 3 production methods to use.

I added several blueprints with method="terran" added.

Code: Select all

<add_blueprints wares="$Unlocked.{$i}" method="terran" />
Missiles and various deployables, which have all 3 Universal, Terran and Xenon methods, should have given me only the Terran versions.
Argon Defense Discs and Tubes, which only have Universal and Xenon (because Xenon occasionally use them in their station designs), so it should have given me the default Universal.
All sorts of Xenon only ships, weapons, turrets, engines, modules, etc., which only have 1 method. (Basically Xenon registered as "default" because there isn't any production method variation.)

With my preferred build method set to Xenon, despite not adding any Xenon methods, I could build everything (that has a Xenon method exist) just fine with only E Cells, Ore and Silicon.
I could even switch over the preferred build method to Terran or Universal, and build things using those methods and materials as well.


...Okay, after thinking about it some more, it COULD be that the blueprints for specific methods get added just fine, but then the game only checks if you have the ware blueprint at all and just lets you use whatever method you set as preferred.

In any case, the end result is the same - it isn't exactly working properly.


...Which still doesn't address the Lua UI's version

Code: Select all

	void LearnBlueprint(const char* wareid);
not even having anything for method.

Berserk Knight
Posts: 398
Joined: Tue, 17. Dec 13, 01:34
x4

Re: [4.00 HF3] (Scripting) "method" attribute of "add_blueprint" not working

Post by Berserk Knight » Sat, 17. Jul 21, 16:15

After digging through the save files, I have found that the blueprints record does not have anything for method.
It just records that the player has the blueprints for the specific ware, and that's it.

Post Reply

Return to “X4: Foundations - Technical Support”