[TOOL] X3 Customizer 3.16 (added FL support)

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

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

Post Reply
|K.O.S.H.
Posts: 3723
Joined: Fri, 19. Dec 03, 10:36
x3tc

Post by |K.O.S.H. » Tue, 3. Jul 18, 10:58

It worked.

I cant believe it!
Thank you so much!

you saved my ten year old savegame!
I love you!
Wing Commander Mod - German Topic
06.07.11 - v1.1 RELEASED!

michtoen
Posts: 67
Joined: Mon, 22. May 06, 20:09
x3

Post by michtoen » Wed, 11. Jul 18, 22:04

I included the X3 Customizer and its features in my modding package.

https://forum.egosoft.com/viewtopic.php?t=399184

Its just a package with installer, not a mod by itself.
The X3 Customizer is one of the key parts and really shines - i think its the first real use like that.

The bat installer allows also a pretty fast test and run, in fact i was able to run like 6 different instances and sets of the types only with that batches.

You are also free of course to use what you want, like rip off the bat files for your own test package - its really useful.

I used the customizer beside it fixes also to generate for xrm and lucikes stuff the "make for ships missing variants". I did that for capital ships, extending XRM even further and its alot fun.

I did not included the Customizer bins or python files but you can find in
LxRM\_Tools\_X3_Customizer (modding)\
the transform file i used.

SirNukes
Posts: 546
Joined: Sat, 31. Mar 07, 23:44
x4

Post by SirNukes » Mon, 16. Jul 18, 01:50

Awesome; it is wonderful to see my tool getting used like this, though a bit scary if something breaks.

In other news, I have updated it to 3.7 with a couple minor changes.

Disable_Combat_Music now supports LU. This ended up only needing to wildcard the offset of a member variable.

For the brave, the experimental _Benchmark_Gate_Traversal_Time has been renamed to Remove_Complex_Related_Sector_Switch_Delay. This should only be used by people plagued by really long sector loading times due to having built large complexes in their game. It cuts out the call to SA_CleanUpObjects, and I really don't know what side effects might crop up. This transform makes me feel like that quack doctor from the Simpsons, pulling out someone's organ because he doesn't know what it does and it was in the way.

SirNukes
Posts: 546
Joined: Sat, 31. Mar 07, 23:44
x4

Post by SirNukes » Tue, 17. Jul 18, 06:36

Updated to 3.8.

Non-script modified files will now be collected to an incrementally indexed cat/dat pair to reduce clutter. This behavior can be turned off using the no_catalog command line flag, or using "Settings.output_to_catalog = False" in the control script. If your game crashes after making this change, and was already open from before the change, a full game restart should clean up the problem. (It took me much longer than it should have to realize the source of my crashes during testing.)

The Add_Life_Support transform has been updated to now edit various mission director scripts which check for player ship life support. Those scripts have special checks for TP class ships, since the mission director does not support built-in ware checks; the locations I found will now include checks for the modified ship classes as well. Many of these changes are in plot scripts and are difficult to check, so there may still be issues (though things looked okay at a glance).

The Add_Ship_Variants transform will now update the Bounce mod wall file, if found, with the new variants. Note that this does not ensure the original wall file was up to date for the original TShips before variants were added.


Edit:
Updated to 3.9, adding Disable_Docking_Music.

michtoen
Posts: 67
Joined: Mon, 22. May 06, 20:09
x3

Post by michtoen » Tue, 17. Jul 18, 12:41

SirNukes wrote:Awesome; it is wonderful to see my tool getting used like this, though a bit scary if something breaks.
I hoped you like it - in fact the X3C gave me one of the main reason to make LxXRM. Its to good not to offer it connected with a setup.

Btw, i had one idea which is perhaps something you find interesting too.

There is the problem with wrecks, ships and docks. Some scripts/mods can add alot, clustering the area.

The usual fix is to clean the wreck type files, but i think there is a better possible solution.

The npc bailing script comes with a timer for all its bailed ships, make them self destroying after some time. If that would be possible for wrecks, it would be the golden solution.

Is the wreck creation is hard coded or part of the scripts in the obj files?
In the last case it should be easy to add such timer script to wrecks.

SirNukes
Posts: 546
Joined: Sat, 31. Mar 07, 23:44
x4

Post by SirNukes » Tue, 17. Jul 18, 19:20

From the bits I've seen: a station creates a wreck when killed (if set to make wrecks), and the God engine cleans them up. Cleanup will delete the oldest wreck if there is more than one in sector, and will delete the last wreck if it is 10 hours old in core sectors, 30 hours otherwise. This is offset by when God visits the sector, which is something like every 10 hours plus some delay for random sector selection. (Note: I am not 100% confident I interpreted the above correctly.) I also recall that a wreck will get removed early when the station is rebuilt on the same spot.

Wrecks also have a StartSelfDestructTimer function, but it isn't called anywhere that I found. It appears to use the same 15-30 minute delay as flying wares, but that can be edited.

So, the main problem seems to be that wrecks can get created much faster than the rate God cleans them out. Some possible approaches to fix this:
  • Disable the wreck creation to begin with.
  • Add the StartSelfDestructTimer when the wreck is created. This is tricky, since I always aim for size neutral code edits, meaning some other bit of code would need to be cut out to make room for calling that function. It looks like maybe the random rotation in wreck Create can be cut out, particularly since rotation gets overwritten later anyway at the sector level (to match the factory rotation, I assume).
  • Reorganize the God code to do the lifetime check on every wreck in sector, which is somewhat error prone and hard to verify.
  • Tweak God to call StartSelfDestructTimer during its wreck loop instead of doing direct deletion, though I am not sure how to tell if a given wreck already has a timer going (or if it would really matter if it starts multiple timers).
Overall, I think the second option might work best, and it is relatively easy to verify compared to the God engine edits. You need to let me know if I interpreted your request correctly, though.

SirNukes
Posts: 546
Joined: Sat, 31. Mar 07, 23:44
x4

Post by SirNukes » Mon, 23. Jul 18, 04:02

Updated to 3.10, adding Preserve_Captured_Ship_Equipment. This change shortcuts the code which removes lasers, missiles, etc. from ships being bailed from or captured. The main motivation is to improve continuity for immersion purposes. I expect this to affect bailed ships, marine captured ships, the "pilot eject from ship" script command, and the "force pilot to leave ship" director command.

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

Post by RoverTX » Tue, 24. Jul 18, 02:42

Love the update! Really cool tool and so cool it is open source and python!

What tools do you use for exploring the OBJ files?

SirNukes
Posts: 546
Joined: Sat, 31. Mar 07, 23:44
x4

Post by SirNukes » Tue, 24. Jul 18, 06:15

A group of Russian modders wrote a disassembler for the obj files, which I have been using. <Edit: link updated, since the original from egosoft forum thread 92374 goes to a site that picked up a virus.> https://www.elite-games.ru/conference/v ... hp?t=47140 is a post by CheckerTwo, with a disassembler link at the bottom. For that thread and the readme, google translate works pretty well.

I assume there are further tools or information for those with devnet access, but I haven't bothered with signup.

The obj files contain KC psuedo-assembly code, which is fed to a lower level interpreter in the exe. Egosoft has some details on the X2 KC available at https://www.egosoft.com/X/questsdk/info ... index.html, which can give a general idea of what is in there. The assembly is stack oriented, where operations generally pull some number of items off the stack and put a result back on the stack.

Notepad++ does a reasonable job as a text viewer. The .asm file can be used for general perusal, though the .out is handy for checking stack depth changes to help understand different operations.

Most of my notes on the KC I haven't put on git, since they are a couple thousand lines of random observations and such, but feel free to ask questions or contribute changes.
Last edited by SirNukes on Sun, 30. Jun 19, 00:20, edited 1 time in total.

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

Post by TechSY730 » Tue, 31. Jul 18, 02:30

The new gate models work great, except they lack the "glowy field" inside the circle that marks the point where you "jump". That was a nice visual effect, IMO. Is there any chance these fields can be restored in the altered models?

SirNukes
Posts: 546
Joined: Sat, 31. Mar 07, 23:44
x4

Post by SirNukes » Tue, 31. Jul 18, 03:18

The fields are intended to be present still, with just the ring modified. I just double checked for vanilla, XRM, and LU, and they all preserve the respective fields for me (or orb for LU).

Is it possible you are running another mod that may have replaced the field itself with an empty model? One way to check: open up the X3 Editor 2 VFS, find "objects\others\argon_gate_effect", and open it in the 3D viewer (zooming out a bit with the mouse wheel for a better view). You should see the desired field effect.

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

Post by TechSY730 » Tue, 31. Jul 18, 07:28

Strange. I have the field when I use the vanilla gate models. But when I use the replacement models they are gone.

It is worth noting that I am on Linux. I have seen a couple of rendering bugs that only seem to occur on Linux.

EDIT: Also, I do have "glow" enabled in the launcher settings

SirNukes
Posts: 546
Joined: Sat, 31. Mar 07, 23:44
x4

Post by SirNukes » Tue, 31. Jul 18, 08:54

I am not set up to test on Linux, so you will need to help me out in debugging this. (Side note: I try to write decent code that is platform portable, but the Customizer is also untested on linux.)

As far as that transform goes, it just swaps in a replacement scene file for gates, which is a simple text file that specifies the models to use and where to place them. All actual models are part of the game already (which was a bit of a lucky find on the plain ring; if I found that earlier, I wouldn't have added rotations).

So if the original argon_gate_scene looks like (with comments removed):

Code: Select all

VER: 3;
P 0; B others\argon_gate; N Bothers\argon_gate; b
  { 0x2002;  209; -2632; 2136;  0.000000; 0.000000; 0.000000; 0.000000;  -1;  -1; }
P 1; B others\argon_gate_effect; N Bothers\argon_gate_effect; b
  { 0x2002;  0; 0; 49802;  0.000000; 0.000000; 0.000000; 0.000000;  -1;  -1; }
then the replacement for 'use_plain_ring' looks like:

Code: Select all

VER: 3;
P 0; B stations\others\terraformer_gate; b
{ 0x2002; 209; -2632; 2136; 0.500; 0.000; 1.000; 0.000; -1; -1; }
P 1; B others\argon_gate_effect; b
{ 0x2002; 0; 0; 49802; 0.000; 0.000; 0.000; 0.000; -1; -1; }
where the N field was skipped since it is just a 3dmax node name.

That the gate ring swap shows up in game indicates the scene file is getting read correctly, which is why I am wondering if something is up with the argon_gate_effect, either due to Linux or mods or whatever.

Are you able to run X3 Editor 2, or unpack catalogs in general? I am curious to verify if the argon_gate_effect looks okay, as well as see if there are any differences in the argon_gate_scene file.

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

Post by TechSY730 » Tue, 31. Jul 18, 17:28

Oh wait, now there is the "glowy field". Why didn't it show up last time? :?

Anyways, thanks for the help/


Not that it is relevant to the discussion now, but I can run X3 Editor. I can't view 3D model files, but I can at least extract files from catalogs and browse the virtual file system.

SirNukes
Posts: 546
Joined: Sat, 31. Mar 07, 23:44
x4

Post by SirNukes » Tue, 31. Jul 18, 19:46

Glad to hear it works. If only everything in life fixed itself.

Model changes like that can take a sector change to update, since a lot of the information for the current sector's loaded models is part of a saved game and only refreshes on entering a new sector. But I figured that wasn't be the problem since the gate ring change was showing up.

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

Post by TechSY730 » Tue, 31. Jul 18, 20:39

One minor nitpick. The glowy trimming for gates in the hub, IIRC, are supposed to yellow/amber (maybe the fields too, but it is hard to tell if they really changed color or its from the ambient light from the yellow bits) But the new models make them blue like normal gates. Is there any easy fix for that?

SirNukes
Posts: 546
Joined: Sat, 31. Mar 07, 23:44
x4

Post by SirNukes » Tue, 31. Jul 18, 20:54

The options I like to use (and will be swapped to defaults in the next version):

Adjust_Gate_Rings(
standard_ring_option = 'use_plain_ring',
hub_ring_option = 'use_reversed_hub',
)

The hub gates have a quirk where one side has full protrusions for ships to collide with, and the other side has short stubs. By flipping the gate around, the stubs face the inside of the hub and should be a lot safer for traffic. Since it is the same gate, highlights will be unchanged, still amber. The portal field itself is the same blue as for normal gates.

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

Post by TechSY730 » Fri, 3. Aug 18, 05:25

Thanks for the setting tip. Those settings do indeed preserve the yellow trimming of the Hub gates.

Are you taking requests? If so, you know how some things that are technically classified as ships (like laser towers and orbital defense platforms) nevertheless keep their positions known if they go out of sensor range? If so, could you add an option that enables or disables this "stays known like a station would" property for arbitrary ships?

I think this would require obj changes, cause I can't find anything in the T files that seem to control it, but if it is a simple txt file tweak, let me know.

SirNukes
Posts: 546
Joined: Sat, 31. Mar 07, 23:44
x4

Post by SirNukes » Fri, 3. Aug 18, 08:50

Sure, I can take requests. It's my pleasure to serve, as long as I have a couple free hours I can set aside.

Updated to 3.11, adding Hide_Lasertowers_Outside_Radar.

I tracked down the related code, and it was indeed in the obj file as suspected. When ships are being checked for display on the sector map, a class group including lasertowers, satellites, beacons, and mines will skip the player ships' radar checks and just display if the object is known. I swapped the class group check to just cover satellites and beacons, so that jump beacons will still show up.

Initial in-game tests looked good, treating lasertowers like normal ships for sector display.

For orbital platforms, I am not sure where they are handled specially. A quick test in game, at least for XRM, has platforms disappearing when off radar. Edit: also tested vanilla and platforms disappear there as well.

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

Post by TechSY730 » Sat, 4. Aug 18, 16:43

I could of sworn that OWPs were preserved when "unseen but known" too.

Anyways, it sounds like the logic is only for certain kinds of flying wares. I was hoping it could work for ships too, and we could get a way to turn it on or off for arbitrary ships and wares, but I guess I was wrong.

Anyways, thanks for the tweak. :)

Post Reply

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