[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: Moderators for English X Forum, Scripting / Modding Moderators

Post Reply
User avatar
Aldebaran_Prime
Posts: 1386
Joined: Sat, 20. Feb 10, 17:47
x4

Post by Aldebaran_Prime » Sun, 24. Jun 18, 14:31

yes, this was it - I stiil used a 04.cat/dat from X3AP 3.2, not from 3.3. Now I got "Successfully ran Kill_Spaceflies" and in the game-folder the directory "L" was created with a x3story.obj in it.

When I load my savegame, open the script-editor and the script-task statistics - it's great to see how the number of running spacefly scripts goes down from 5000 to 0 in some seconds!

:x3:
THANK YOU VERY MUCH!!!

I think it is worth to mention, that, after this clean-up a new save needs to be done, then close X3AP and delete the just generated x3story.obj from L, but otherwise you never will find any spacefly in game any more, because they destroy themselves immediately as long your modified x3story.obj is used.

So after this cleanup the player either needs to generate a new modified version of the game with your modified create_ship command or with the bugfix for the installed mod-scrips like IR2.0

As you reported in the other thread, the increase of FPS in normal play ist not so big - I just got 2-3 FPS after deletion and reload. This is much less, when I deleted 5000 Spaceflys which are not in sector NULL, but in "normal sectors"
But the gameplay in sinza and during battles should have a benifit of this deletion.

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

Post by SirNukes » Sun, 24. Jun 18, 23:01

Good to hear it worked out.

You can also remove the changed file by rerunning the tool with Kill_Spaceflies removed (or commented out), or run the tool with the -clean flag. Each run creates a log of which files were created (with hashes) or renamed, so that a following run can clean out prior changes.

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

Post by |K.O.S.H. » Mon, 2. Jul 18, 13:42

Can you please explain, how exactly you kill the spaceflies?
i tried for weeks...

Does this tool work with terran conflict (i really need to remove my spaceflies)?

Edit2: I saw: you edit the isdisabled-command.

i also saw, this only works for ap, right?
can you provide an obj file for TC?
Wing Commander Mod - German Topic
06.07.11 - v1.1 RELEASED!

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

Post by |K.O.S.H. » Mon, 2. Jul 18, 21:35

I managed to run aldebarans script in Terran Conflict (created a folder "addon" and put cat01 there), but of course i got an Obj_Patch_Exception.

:/
Wing Commander Mod - German Topic
06.07.11 - v1.1 RELEASED!

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

Post by SirNukes » Tue, 3. Jul 18, 03:08

Updated to 3.6, now with some support for TC. For the most part I just needed to tweak paths in two spots and the rest worked itself out (feels good when that happens), though I took some time to do light testing and update a couple transforms that weren't working.

In the Set_Path function, add "enable_TC_mode = True" as a parameter. Kill_Spaceflies should work for TC 3.4.

|K.O.S.H.
Posts: 3724
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.

Post Reply

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