Scaldis vs Titurel... Intended... or Bug?

The place to discuss scripting and game modifications for X Rebirth.

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

ragamer
Posts: 523
Joined: Wed, 6. Nov 02, 20:31
x4

Scaldis vs Titurel... Intended... or Bug?

Post by ragamer »

I wasn't sure were to post this... So I chosen to start here to see if some expert modder could shed some light into the matter before reporting this as a true bug.

This is about the differences between the Titurel and the Scaldis as XL freighters. They also show differences in maneuverability but for the sake of simplicity I will just do examples on top speed.

Engine configuration (Maneuverability more or less follow speed... Higher speed means also higher maneuverability & strafe). In brackets is the size of the component:

Scaldis: 2 x 64m/s (xl).

Titurel: 1 x 70m/s (xl), 1 x 40m/s (l), 4 x 28m/s (m).


And any1 that has seen a Scaldis and a Titurel both knows that the Titurel is slower than the Scaldis (And also maneuvers much much worse)...

...The question is that the reported ingame speed goes as:

Scaldis: 64m/s.
Titurel: 70m/s.

So... What's wrong here? The display or how the game is evaluating the Titurel multiengine configuration?

Just eyeballing looks as if the Titurel performance on top speed was the average of the speeds of all enginres with independece of their size (70+40+4x28 = 37 m/s) but, I repeat, the game reports it as 70m/s.


Is any1 aware on how ship speed is derived when the engine components aren't all the same engine macro?
User avatar
euclid
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 13486
Joined: Sun, 15. Feb 04, 20:12
x4

Post by euclid »

Nope, not the same engine macro. The Scaldis (engine_size_xl_cargo_hauler_02_macro) has

Code: Select all

<speed forward="64" reverse="-20" strafe="20" pitch="4" yaw="4" roll="2" />
and the Titurel (engine_size_xl_cargo_hauler_03_macro")

Code: Select all

<speed forward="70" reverse="-20" strafe="20" pitch="5" yaw="5" roll="2" />
so the difference is rather minor.

Cheers Euclid
"In any special doctrine of nature there can be only as much proper science as there is mathematics therein.”
- Immanuel Kant (1724-1804), Metaphysical Foundations of the Science of Nature, 4:470, 1786
ragamer
Posts: 523
Joined: Wed, 6. Nov 02, 20:31
x4

Post by ragamer »

Thanks for anwering but I'm afraid I reprased the idea wrong. When I was saying 2 identical engines I was refering to the Scaldis (which has twin engines):

...Scaldis has 2 components that are identical:

Code: Select all

      <connection ref="connection_engine01">
        <macro ref="engine_size_xl_cargo_hauler_03_macro" connection="Connection01" />
      </connection>
      <connection ref="connection_engine02">
        <macro ref="engine_size_xl_cargo_hauler_03_macro" connection="Connection01" />
      </connection>
...Meanwhile, Titurel has a single XL engine:

Code: Select all

      <connection ref="connection_engine01">
        <macro ref="engine_size_xl_cargo_hauler_02_macro" connection="Connection01" />
      </connection>
plus later on the macro definition 5 more appear. A single L engine and 4x medium engines:

Code: Select all

      </connection>
      <connection ref="con_engine_l_01">
        <macro ref="engine_size_l_03_macro" connection="Connection01" />
      </connection>
      <connection ref="con_engine_m_01">
        <macro ref="engine_size_m_03_macro" connection="Connection01" />
      </connection>
      <connection ref="con_engine_m_02">
        <macro ref="engine_size_m_03_macro" connection="Connection01" />
      </connection>
      <connection ref="con_engine_m_03">
        <macro ref="engine_size_m_03_macro" connection="Connection01" />
      </connection>
      <connection ref="con_engine_m_04">
        <macro ref="engine_size_m_03_macro" connection="Connection01" />
      </connection>
When I was browsing other ships that more or less behave as their reported "engine" stats indicate I realized that their "engine pack" is always made of multiple instances of the same engine macro (which translate, ofc, to a single speed stat).

...Precissely the Titurel (that shows an ingame obious discrepancy) is the one I found with such asymetrical distribution.

That's why I think there is a bug somewhere... The Titurel is too slow compared to its reported speed. What I cannot decide is to report it as:

a) A harmless speed visualization bug when asymetrical engine packs are involved into the ship macro definition.

b) A more serious bug were entities made of multiple engine macros are slower than expected.


Sorry for the confusion, my english usually suck, I hope I was clearer this time.

EDIT: I noticed you refer the Scaldis as "hauler_2" and Titurel as "hauler_3". In my extracted .cat files (1.24 version) the Scaldis is hauler_3 and Titurel is hauler_2. When I double checked the master index and my own 1.24 savegames they show as this... What version are you using? Or am I looking at the wrong files?
ragamer
Posts: 523
Joined: Wed, 6. Nov 02, 20:31
x4

Post by ragamer »

Update... I just did a dirty "hack" by replacing the smaller engines with the same model as the main engine:

"engine_size_xl_cargo_hauler_02_macro"

And now the Titurel behaves similarly ingame to the Scaldis, and its speed is kept on reported as 70 m/s. I did this by hacking the savegame as the Titurel I got is already a spawned entity, meaning modding the templates will not alter it.

I will try to do a reciprocal test by replacing ONLY the 1st component with a medium slow one (So overall the performance shouldn't suffer much)... Because I have the impression that the moving code is using a "real speed" (derived from somekind of formula taking into account all engines defined) while the UI is just reporting the speed of the 1st component.

EDIT: Reciprocal test completed... As I was suspecting the "engines" stat reported by the UI is derived only from the 1st engine macro, meanwhile the moving code calculates somekind of average performance based on the whole set of defined engines.

I hacked my Titurel (I repeat, I'm hacking the savegame entity... Not creating a proper patch mod and respawning a new one... Which should be the correct approach but it would be too slow as finding one of this ingame is hard) to contain 5 XL engines and 1 M engine. I then rotated which engine "slot" I assigned the M engine to... When the M engine wasn't the 1st one the "engine" stat was 70 m/s... When it was, the "engine" stat is reported at 28 m/s. At least to the "resolution" of the naked eye, the ingame performance of this "Titurel+" remained close to that of the Scaldis both on top speed and maneuverability and it didn't change based on were the M engine was defined.

I will wait a bit to see if some1 with more experience than me (which is practically nothing) at ship modding can offer a possible explanation... And then I will report it as a visualization bug.
H.E.I.N.Z.
Posts: 47
Joined: Thu, 11. Mar 04, 14:50
x4

Post by H.E.I.N.Z. »

Indeed the shown speed of 70 m/s is only the speed of the first main engine. If you change the speed (patch the engine_size_xl_cargo_hauler_02_macro.xml) to lets say 71 m/s than this value is shown ingame but it will calculate the average speed from all engines.

If you want the ingame shown speed you need to patch all used engine macros to 70 m/s:

engine_size_l_03_macro.xml
engine_size_m_03_macro.xml
engine_size_xl_cargo_hauler_02_macro.xml

ragamer
Posts: 523
Joined: Wed, 6. Nov 02, 20:31
x4

Post by ragamer »

It's a bit more complex... Because engine macros also contain acceleration, strafe and rotation values.

There is also the problem that:

"engine_size_l_03_macro"

Is shared with a regular L transport, so if you edit that component it will escalate to that ship.

On a private mod I completed to bring the Titurel to the advertised speed (I repeat, I'm still not sure if ES intention was to have a regular XL but the underlying code is bugged when evaluating asymetric engine configurations... Or really designed the Titurel as an extremely slow ship) what I did was:

- Replace "engine_size_m_03_macro" with the movement related stats of Titurel's main engine. I also updated the booster connection to a XL size.

- Replacing in "units_size_xl_cargo_hauler_2_macro" the "engine_size_l_03_macro" with the main engine macro.

The result is that newly spawned Titurels will behave as 70m/s ships and existing ones will recover most of their 70m/s performance (Already spawned ones would require manual hack of the savegame to "covert" the L slot to the main one) and leaves the rest of the Universe's ships intact.
Kelthur
EGOSOFT
EGOSOFT
Posts: 790
Joined: Tue, 31. May 05, 18:24
x3tc

Post by Kelthur »

Hi. Let me clarify some things here. :idea:

1. The engine properties of all engines of a ship are averaged; that's intended and working fine (it was used once for all ships with different sizes of engines so that destroying a large engine has a bigger impact than destroying a small one).
2. The menu is not working correctly apparently, but I'm not too concerned about that since we no longer want to use engines with different properties on a single ship and therefore the menu doesn't need to support that case.
3. The Titurel using engines with different properties is a mistake. The engine_size_l_03_macro.xml and
engine_size_m_03_macro.xml macros are deprecated and will be replaced with proper engines (the fix will likely be delayed and part of an upcoming balancing patch).
UniTrader
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 14571
Joined: Sun, 20. Nov 05, 22:45
x4

Post by UniTrader »

Kelthur wrote:Hi. Let me clarify some things here. :idea:

1. The engine properties of all engines of a ship are averaged; that's intended and working fine (it was used once for all ships with different sizes of engines so that destroying a large engine has a bigger impact than destroying a small one).
i hope you intend to keep this behavior since its neat to use it for temporary Speed buffs/debuffs by adding another Engine in a special (unused) Slot instead of changing the main Engines completely. (or add/document an effect which does the same, but better :D :P )
if not stated otherwise everything i post is licensed under WTFPL

Ich mache keine S&M-Auftragsarbeiten, aber wenn es fragen gibt wie man etwas umsetzen kann helfe ich gerne weiter ;)

I wont do Script&Mod Request work, but if there are questions how to do something i will GLaDly help ;)
Kelthur
EGOSOFT
EGOSOFT
Posts: 790
Joined: Tue, 31. May 05, 18:24
x3tc

Post by Kelthur »

Yes, we do. Don't worry.

Return to “X Rebirth - Scripts and Modding”