[Help] New XL Engine

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

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

sco1981
Posts: 282
Joined: Fri, 14. Sep 18, 14:47
x4

[Help] New XL Engine

Post by sco1981 »

Hi,

i am trying to create a new xl engine.
If i include it to the game, then every ship class (s, m, l and xl) are able to select the engine.
Is there a way to add this xl engine only to xl class ships or to only a specific ship maybe?
And someone figured out how i can change the icon in the ship build menu for that specfic new engine?

Thank you in advanced.
7ate9tin11s
Posts: 813
Joined: Fri, 11. Nov 05, 23:18
x4

Re: [Help] New XL Engine

Post by 7ate9tin11s »

I think the EngineConnection holds the XL limitation, such as from the Teladi XL engine in engine_tel_xl_treavel_01_mk1.xml (not the macro!):

Code: Select all

<connection name="EngineConnection01" tags="engine extralarge component ">
To make it ship specific would probably require defaulting it in that ships loadout and not allowing others to buy it in the wares file? Unsure.
sco1981
Posts: 282
Joined: Fri, 14. Sep 18, 14:47
x4

Re: [Help] New XL Engine

Post by sco1981 »

7ate9tin11s wrote: Sun, 30. Dec 18, 19:36 I think the EngineConnection holds the XL limitation, such as from the Teladi XL engine in engine_tel_xl_treavel_01_mk1.xml (not the macro!):

Code: Select all

<connection name="EngineConnection01" tags="engine extralarge component ">
To make it ship specific would probably require defaulting it in that ships loadout and not allowing others to buy it in the wares file? Unsure.
Tried that with the new engine, but same behavior. :( The engine is always equiable on all ship classes.

Code: Select all

<connection name="connection_engine01" tags="component engine extralarge">
	<offset/>
</connection>
7ate9tin11s
Posts: 813
Joined: Fri, 11. Nov 05, 23:18
x4

Re: [Help] New XL Engine

Post by 7ate9tin11s »

sco1981 wrote: Sun, 30. Dec 18, 20:05

Code: Select all

<connection name="connection_engine01" tags="component engine extralarge">
	<offset/>
</connection>
Could be the connection name, every other engine uses then name "EngineConnection01". Might just be hardcoded in the game and require that name to make use of the tags.
sco1981
Posts: 282
Joined: Fri, 14. Sep 18, 14:47
x4

Re: [Help] New XL Engine

Post by sco1981 »

7ate9tin11s wrote: Sun, 30. Dec 18, 20:18
sco1981 wrote: Sun, 30. Dec 18, 20:05

Code: Select all

<connection name="connection_engine01" tags="component engine extralarge">
	<offset/>
</connection>
Could be the connection name, every other engine uses then name "EngineConnection01". Might just be hardcoded in the game and require that name to make use of the tags.
Unfortunately, no. :(
They did it with the behemoth main guns, but can't figure out which tag or something is doing this restriction.
unit757
Posts: 116
Joined: Fri, 21. Feb 14, 21:20
x4

Re: [Help] New XL Engine

Post by unit757 »

I think you need to give your custom engine a unique tag in the engines actual file (macro file maybe?) Changing the tag in the ships macro file just changes what the ship itself looks to for components, grabbing anything that meets the criteria.

So right now for example the Taranis could show

<connection name="connection_engine01" tags="component engine extralarge">
<offset/>
</connection>

You could change it to

<connection name="connection_engine01" tags="component engine taranis">
<offset/>
</connection>

And then change your custom engine to use the tag taranis, thus any ship looking for the taranis engine will automatically grab it.


Im still working on figuring out the modding system, so I wont guarantee that is the right answer, but it's a guess based on what I've messed around with so far, so it's a place to start.
sco1981
Posts: 282
Joined: Fri, 14. Sep 18, 14:47
x4

Re: [Help] New XL Engine

Post by sco1981 »

unit757 wrote: Sun, 30. Dec 18, 21:16 I think you need to give your custom engine a unique tag in the engines actual file (macro file maybe?) Changing the tag in the ships macro file just changes what the ship itself looks to for components, grabbing anything that meets the criteria.

So right now for example the Taranis could show

<connection name="connection_engine01" tags="component engine extralarge">
<offset/>
</connection>

You could change it to

<connection name="connection_engine01" tags="component engine taranis">
<offset/>
</connection>

And then change your custom engine to use the tag taranis, thus any ship looking for the taranis engine will automatically grab it.


Im still working on figuring out the modding system, so I wont guarantee that is the right answer, but it's a guess based on what I've messed around with so far, so it's a place to start.
Ok, tried that, but it seems nothing changed.
My problem is, that the engine appears for every ship class in the shipyard/wharf buildmenu. So even a s class ship is able to buy the engine and that looks ugly as hell with xl engines. :D :gruebel:
unit757
Posts: 116
Joined: Fri, 21. Feb 14, 21:20
x4

Re: [Help] New XL Engine

Post by unit757 »

sco1981 wrote: Sun, 30. Dec 18, 21:42
unit757 wrote: Sun, 30. Dec 18, 21:16 I think you need to give your custom engine a unique tag in the engines actual file (macro file maybe?) Changing the tag in the ships macro file just changes what the ship itself looks to for components, grabbing anything that meets the criteria.

So right now for example the Taranis could show

<connection name="connection_engine01" tags="component engine extralarge">
<offset/>
</connection>

You could change it to

<connection name="connection_engine01" tags="component engine taranis">
<offset/>
</connection>

And then change your custom engine to use the tag taranis, thus any ship looking for the taranis engine will automatically grab it.


Im still working on figuring out the modding system, so I wont guarantee that is the right answer, but it's a guess based on what I've messed around with so far, so it's a place to start.
Ok, tried that, but it seems nothing changed.
My problem is, that the engine appears for every ship class in the shipyard/wharf buildmenu. So even a s class ship is able to buy the engine and that looks ugly as hell with xl engines. :D :gruebel:
Yeah it sounds like the custom engine isnt tagged properly, likely just as "engine" or something which is why every ship can equip it, since very ship looks for engine. Is there anything in the engines macro file that lists a tag? Try comparing it to a vanilla engine. Your looking specifically for the part that dictates size maybe.

Edit - Just looked in the vanilla engine macros, nothing that mentions a tag. Perhaps in the wares file?
sco1981
Posts: 282
Joined: Fri, 14. Sep 18, 14:47
x4

Re: [Help] New XL Engine

Post by sco1981 »

unit757 wrote: Sun, 30. Dec 18, 21:47
sco1981 wrote: Sun, 30. Dec 18, 21:42
unit757 wrote: Sun, 30. Dec 18, 21:16 I think you need to give your custom engine a unique tag in the engines actual file (macro file maybe?) Changing the tag in the ships macro file just changes what the ship itself looks to for components, grabbing anything that meets the criteria.

So right now for example the Taranis could show

<connection name="connection_engine01" tags="component engine extralarge">
<offset/>
</connection>

You could change it to

<connection name="connection_engine01" tags="component engine taranis">
<offset/>
</connection>

And then change your custom engine to use the tag taranis, thus any ship looking for the taranis engine will automatically grab it.


Im still working on figuring out the modding system, so I wont guarantee that is the right answer, but it's a guess based on what I've messed around with so far, so it's a place to start.
Ok, tried that, but it seems nothing changed.
My problem is, that the engine appears for every ship class in the shipyard/wharf buildmenu. So even a s class ship is able to buy the engine and that looks ugly as hell with xl engines. :D :gruebel:
Yeah it sounds like the custom engine isnt tagged properly, likely just as "engine" or something which is why every ship can equip it, since very ship looks for engine. Is there anything in the engines macro file that lists a tag? Try comparing it to a vanilla engine. Your looking specifically for the part that dictates size maybe.

Edit - Just looked in the vanilla engine macros, nothing that mentions a tag. Perhaps in the wares file?
Every engine has class="engine" in the macro or component name.
Don't see anything that define it with the size, but the connection name. I tried that with an extra tag already. :?
FlynTie
Posts: 36
Joined: Wed, 12. Dec 18, 01:42

Re: [Help] New XL Engine

Post by FlynTie »

Isn't it

Code: Select all

<connection name="EngineConnection01" tags="engine extralarge component ">
instead of

Code: Select all

<connection name="connection_engine01" tags="component engine extralarge">
Maybe the order of the tags is important?
sco1981
Posts: 282
Joined: Fri, 14. Sep 18, 14:47
x4

Re: [Help] New XL Engine

Post by sco1981 »

FlynTie wrote: Sun, 30. Dec 18, 23:31 Isn't it

Code: Select all

<connection name="EngineConnection01" tags="engine extralarge component ">
instead of

Code: Select all

<connection name="connection_engine01" tags="component engine extralarge">
Maybe the order of the tags is important?
Ty, but tried that too. Its really strange behavior.
unit757
Posts: 116
Joined: Fri, 21. Feb 14, 21:20
x4

Re: [Help] New XL Engine

Post by unit757 »

Did you try changing <connection name="EngineConnection01" tags="engine extralarge component "> to something unique in the engines xml file, aswell as changing <connection name="connection_engine01" tags="component engine extralarge"> to match the unique name in the ships xml file?

I've dug through just about every file I can find relating to engines and thats about the only place I see that provides a matching reference.
sco1981
Posts: 282
Joined: Fri, 14. Sep 18, 14:47
x4

Re: [Help] New XL Engine

Post by sco1981 »

unit757 wrote: Mon, 31. Dec 18, 20:19 Did you try changing <connection name="EngineConnection01" tags="engine extralarge component "> to something unique in the engines xml file, aswell as changing <connection name="connection_engine01" tags="component engine extralarge"> to match the unique name in the ships xml file?

I've dug through just about every file I can find relating to engines and thats about the only place I see that provides a matching reference.
Yeah, it has something to do with the xl rebirth engine xml file (props_enginesystems_engine_xl). If i change the file to the argon xl of X4, then it will work proberly with the tags. :gruebel:

[Edit]
Anyone knows how to resize in blender correctly?
I resized the argon xl allround mk1 engine, exported dae, converted to xml and gave it a new name.
Engine shows up and on Tanaris only, but has the old size. :gruebel:
unit757
Posts: 116
Joined: Fri, 21. Feb 14, 21:20
x4

Re: [Help] New XL Engine

Post by unit757 »

The scale option under tools>Transform is the only way I know of.

You sure you changed the new engine to look for the new model? Showing the old one would suggest it's still pulling the old model instead of the new one.
sco1981
Posts: 282
Joined: Fri, 14. Sep 18, 14:47
x4

Re: [Help] New XL Engine

Post by sco1981 »

unit757 wrote: Tue, 1. Jan 19, 17:46 The scale option under tools>Transform is the only way I know of.

You sure you changed the new engine to look for the new model? Showing the old one would suggest it's still pulling the old model instead of the new one.
I didn't apply the scale with F6 it seems. But now, the engine is 100x smaller ingame. :roll:
sco1981
Posts: 282
Joined: Fri, 14. Sep 18, 14:47
x4

Re: [Help] New XL Engine

Post by sco1981 »

Got a resize version of a XL engine to work.
Is it possible to add or copy a icon for the shipyard build menu?
ShadowTek49
Posts: 17
Joined: Sat, 8. Dec 18, 01:06

Re: [Help] New XL Engine

Post by ShadowTek49 »

sco1981 wrote: Wed, 2. Jan 19, 23:12 Got a resize version of a XL engine to work.
Congrats man!! I know you have been trying for a long time :)
sco1981
Posts: 282
Joined: Fri, 14. Sep 18, 14:47
x4

Re: [Help] New XL Engine

Post by sco1981 »

ShadowTek49 wrote: Thu, 3. Jan 19, 00:22
sco1981 wrote: Wed, 2. Jan 19, 23:12 Got a resize version of a XL engine to work.
Congrats man!! I know you have been trying for a long time :)
thank you, but it is not finished. Sometimes the game crashes if i build these engines on the Taranis and teleport to her. :gruebel:
unit757
Posts: 116
Joined: Fri, 21. Feb 14, 21:20
x4

Re: [Help] New XL Engine

Post by unit757 »

I don't know to much about the coding type they use, but since you can define coordinates for components, is it also possible to define the scale of that particular object?
sco1981
Posts: 282
Joined: Fri, 14. Sep 18, 14:47
x4

Re: [Help] New XL Engine

Post by sco1981 »

unit757 wrote: Fri, 4. Jan 19, 22:12 I don't know to much about the coding type they use, but since you can define coordinates for components, is it also possible to define the scale of that particular object?
You can change it in the xml, but i think in the LODs are the correct size, so it does not have any effects.
But it seems, that even i don't change anything in blender, the game is crashing in the ship or on game exit. So it must be the import/export or convert to xml process.
Does anyone changed something sucessfully and bring it back to the game without crashes?

Return to “X4: Foundations - Scripts and Modding”