"Backporting" Vanilla Bug Fixes in Litcube's Universe to vanilla

The place to discuss scripting and game modifications for X³: Terran Conflict and X³: Albion Prelude.

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

Post Reply
TechSY730
Posts: 115
Joined: Tue, 26. Jul 16, 02:51
x3ap

"Backporting" Vanilla Bug Fixes in Litcube's Universe to vanilla

Post by TechSY730 » Fri, 14. Apr 17, 04:50

So I was checking out Litcube's Universe, and noticed these three bug fixes.

- Ships now respond properly to SIGNAL_ATTACKED from attacks from Pirate race owned ships
- Jobs now properly select all variants of a ship class when choosing a ship for a job
- Mission spawned pirate ships no longer have inactive turrets.

Does anyone know if an official patch ever fixed these?

If not, does anyone have a general idea of how Litcube went about fixing these, and a general idea of what files needed to be changed?

I am not going to just straight rip-off his fixes (unless he gives me permission), but I am interested in taking a stab at fixing them in my local.
Or maybe someone else already backported these fixes, and I can just use that.

User avatar
X2-Illuminatus
Moderator (Deutsch)
Moderator (Deutsch)
Posts: 24965
Joined: Sun, 2. Apr 06, 16:38
x4

Post by X2-Illuminatus » Fri, 14. Apr 17, 16:33

TechSY730 wrote:If not, does anyone have a general idea of how Litcube went about fixing these, and a general idea of what files needed to be changed?
These are most-likely engine (read hardcoded) changes, which you cannot port easily.
Nun verfügbar! X3: Farnham's Legacy - Ein neues Kapitel für einen alten Favoriten

Die komplette X-Roman-Reihe jetzt als Kindle E-Books! (Farnhams Legende, Nopileos, X3: Yoshiko, X3: Hüter der Tore, X3: Wächter der Erde)

Neuauflage der fünf X-Romane als Taschenbuch

The official X-novels Farnham's Legend, Nopileos, X3: Yoshiko as Kindle e-books!

User avatar
RoverTX
Posts: 1436
Joined: Wed, 16. Nov 11, 18:37
x4

Post by RoverTX » Sun, 16. Apr 17, 18:55

From what I understand those engine changes result in changes to the structure of type files. There is also a whole new job engine which I am not sure how it is managed.

I also asked about this in the LU thread. I got a very cryptic answer from Litcube himself. At the time I thought he was just being a jerk, but now I think he didn't want to say anything else because if he explained how everything hooked together with the mod and the type files that he might give some information away that would break what ever dev net agreement he signed.

In other words the engine changes aren't open sourced, and the optimization and fixes are highly coupled to Litcube balance and game changes.

User avatar
X2-Illuminatus
Moderator (Deutsch)
Moderator (Deutsch)
Posts: 24965
Joined: Sun, 2. Apr 06, 16:38
x4

Post by X2-Illuminatus » Sun, 16. Apr 17, 19:15

Bernd gave the permission to modify the .obj files, which contain what we normally call the "hardcode" (i.e. the compiled game code) around here, years ago. The TotT mod team also modified the .obj files already. So it isn't a problem of permissions. However, Egosoft never released any official tools for decompiling and compiling these files nor is there any documentation available. While there is a custom made (de)compiler, editing files with it still comes with a lot of problems. So even if someone managed to made changes, it's probably not that easy to explain them to others in a step by step / how to tutorial.
Nun verfügbar! X3: Farnham's Legacy - Ein neues Kapitel für einen alten Favoriten

Die komplette X-Roman-Reihe jetzt als Kindle E-Books! (Farnhams Legende, Nopileos, X3: Yoshiko, X3: Hüter der Tore, X3: Wächter der Erde)

Neuauflage der fünf X-Romane als Taschenbuch

The official X-novels Farnham's Legend, Nopileos, X3: Yoshiko as Kindle e-books!

User avatar
Litcube
Posts: 4254
Joined: Fri, 20. Oct 06, 19:02
xr

Re: "Backporting" Vanilla Bug Fixes in Litcube's Universe to vanilla

Post by Litcube » Tue, 16. May 17, 18:44

TechSY730 wrote:So I was checking out Litcube's Universe, and noticed these three bug fixes.

- Ships now respond properly to SIGNAL_ATTACKED from attacks from Pirate race owned ships
- Jobs now properly select all variants of a ship class when choosing a ship for a job
- Mission spawned pirate ships no longer have inactive turrets.
The last one can be fixed by scripts. The others can't. The first one is a bug that still isn't fixed by Egosoft. The second one, I consider to be a serious design flaw, but I threw it in bugs anyway.

FriendlyFirePhoenix
Posts: 90
Joined: Tue, 14. Feb 17, 10:06
x3ap

Post by FriendlyFirePhoenix » Wed, 17. May 17, 06:16

@Litcube

Hey man, I reckon you'd be the most qualified person to answer this question, being that you've trawled through the source code. On a scale of 'Hello World' to 'Frostbite Engine', how would you rate the competence of the coders at Egosoft?

From my experience of X games, they seem to be utterly awful.

User avatar
Litcube
Posts: 4254
Joined: Fri, 20. Oct 06, 19:02
xr

Post by Litcube » Wed, 17. May 17, 15:06

They are better than I am.

Xenon_Slayer
EGOSOFT
EGOSOFT
Posts: 13093
Joined: Sat, 9. Nov 02, 11:45
x4

Post by Xenon_Slayer » Wed, 17. May 17, 16:00

FriendlyFirePhoenix wrote:From my experience of X games, they seem to be utterly awful.
Shots fired!
Litcube wrote:The last one can be fixed by scripts. The others can't. The first one is a bug that still isn't fixed by Egosoft. The second one, I consider to be a serious design flaw, but I threw it in bugs anyway.
I'll take a look later and make sure they're at least listed. Can't promise when there'll be another patch. Could you detail what had to be changed please?

FriendlyFirePhoenix
Posts: 90
Joined: Tue, 14. Feb 17, 10:06
x3ap

Post by FriendlyFirePhoenix » Wed, 17. May 17, 16:48

Great now I feel like a dick. @Xenon_Slayer Sorry. You guys make awesome games, even if they aren't built very well. Better a flawed gem than all the well built games that sit unplayed in my steam directory.

User avatar
Jack08
Posts: 2993
Joined: Sun, 25. Dec 05, 10:42
x3tc

Post by Jack08 » Thu, 18. May 17, 04:42

@FriendlyFirePhoenix Do keep in mind the engine running TC/AP is like, >16 years old, receiving updates along the way, its a bit of mess now and still runs on a version of C++ from 2005 (if you look at the DLL deps in dependency walker)

@Xenon_Slayer
In regards to the second change on the list:
IIRC an overhaul of TShips was required to ensure the new ship selection routine didn't spawn invalid/bogus entries - everything that is a "valid" ship has a valid maker race, everything else has unknown. If you were to import that change to the official game, it would cause havoc to every mod on the forum that changes TShips.

The change in a nutshell was, previously, only the first index of a given ship variant & subtype was considered a valid spawnable ship, so only [Argon Nova Vangaurd] would spawn, even if there was another [<Argon M3> Vanguard] available in TShips, it was changed to keep an array of all valid entries for Vanguard (mapped by race/type tables) that was generated from Tships every time the game loads.

I dont remember the other changes, Litcube might - but
@Litcube: What about the command preload script reloading? something about the preload map not clearing because something else was cleared twice.
[ external image ]
"One sure mark of a fool is to dismiss anything that falls outside his experience as being impossible."
―Farengar Secret-Fire

TechSY730
Posts: 115
Joined: Tue, 26. Jul 16, 02:51
x3ap

Post by TechSY730 » Fri, 19. May 17, 22:32

Oh wow, I was not expecting a dev to chime in :)

Well, if you are wondering about bugs, I only chose a subset of bugs that seemed feasible to backport given my newb modding skills. Here is the complete list from the Litcube wiki's list of Vanilla bug fixes:
  • Ships now respond properly to SIGNAL_ATTACKED from attacks from Pirate race owned ships
    Jobs now properly select all variants of a ship class when choosing a ship for a job
    Several scene and model issues have been fixed with ships (misaligned turrets)
    Mission spawned pirate ships no longer have inactive turrets.
    Player no longer refreshes laser energy when jumping
    No longer able to sell to equipment docks if the dock doesn't trade in that ware

User avatar
Litcube
Posts: 4254
Joined: Fri, 20. Oct 06, 19:02
xr

Post by Litcube » Sun, 28. May 17, 17:09

From april 30th, 2014:

Hold on, Rover! I can explain one of those bugs:

"Mission spawned pirate ships no longer have inactive turrets."

Scenario: If you get a mission, and pirate ships are spawned in the sector you're currently in, the pirate ships will not have turret commands.

Cause: In the script !plugin.gz.missile.def.mk3.xml, there's a check for owership change of the host ship. This happens in the above scenario, so the turret script exits.

Easy fix.

Xenon_Slayer
EGOSOFT
EGOSOFT
Posts: 13093
Joined: Sat, 9. Nov 02, 11:45
x4

Post by Xenon_Slayer » Mon, 29. May 17, 11:05

My personal take on these two:
Player no longer refreshes laser energy when jumping
Known behaviour which could be used as an exploit. However, I doubt we'd change that so far into a game's lifetime as it would probably upset more people than please. I've *cough*, used it on occasion.
No longer able to sell to equipment docks if the dock doesn't trade in that ware
AFAIK, it was intended to do so. Don't think we'll see that change in vanilla.

Post Reply

Return to “X³: Terran Conflict / Albion Prelude - Scripts and Modding”