[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
SirNukes
Posts: 546
Joined: Sat, 31. Mar 07, 23:44
x4

Re: [TOOL] X3 Customizer 3.14

Post by SirNukes » Tue, 13. Nov 18, 02:17

Updated to 3.14. This adds fixes for a couple vanilla MD bugs. Some in-game testing is still pending, so on github it is tagged as pre-release. I am not sure when I will find the time/interest in testing, but have been sitting on these for a week now and wanted to push them out.

Fix_Corporation_Troubles_Balance_Rollover is set to check the balance at each hourly update, and cap it at 1 billion.

Fix_Terran_Plot_Aimless_TPs repairs a bug where replacement TP ships were given a malformed command during the elephant capture step. The initial TPs are commanded to "follow" the split elephant; replacements are commanded to "moveposition" and given the elephant.. except that "moveposition" requires an actual position argument, and an object like the elephant is only used to select a sector (if a sector is not given). At least, that's how I understand the bug from reading the MD obj code.

Fix_Dual_Convoy_Invincible_Stations aims to fix problems with this mission setting stations invincible on mission spawning, but not clearing invincibility if the mission is never accepted by the player. This mission might also clear invincibility of plot stations if they are selected as start/end points and the mission is accepted. The only good fix I could think of was to remove the invincibility mechanic entirely, and add a failure condition if an ending station is destroyed.

Fix_Reset_Invincible_Stations is meant to clean up after Fix_Dual_Convoy_Invincible_Stations in an existing save. It reruns the existing code added by one of the AP patches, which tries to preserve invincibility of stations in the AP plots.

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

Re: [TOOL] X3 Customizer 3.14

Post by TechSY730 » Fri, 16. Nov 18, 17:18

Hey @SirNukes. Thanks so much for the "force infinite loop detection on" transform. It has helped me weed out several infinite loops freezing the game.
However, I have noticed a small issue with it. While it is on, if a script goes "infinite loop detection enabled=[FALSE]", then the infinite loop detector is presumably set to 0, but since infinite loop detection is forced on, the engine treats that as "hung for a long time to empty the counter" and kills it as if it were an infinite loop.

Perhaps there is a way to make the engine ignore "infinite loop detection enabled" statements while this transform is in effect?

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

Re: [TOOL] X3 Customizer 3.14.1

Post by SirNukes » Fri, 16. Nov 18, 20:22

Good catch. 3.14.1 is up now, preventing the script command from overwriting the counter with a 0.

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

Re: [TOOL] X3 Customizer 3.14.1

Post by TechSY730 » Sat, 17. Nov 18, 01:57

@SirNukes

According to the wiki, the Fragmentation Bomb Launcher is pretty weak because it lacks AOE damage due to a bug.

Any idea what that bug is and how it can be fixed?

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

Re: [TOOL] X3 Customizer 3.14.1

Post by SirNukes » Sat, 17. Nov 18, 04:23

TechSY730 wrote:
Sat, 17. Nov 18, 01:57
According to the wiki, the Fragmentation Bomb Launcher is pretty weak because it lacks AOE damage due to a bug.

Any idea what that bug is and how it can be fixed?
After some reading, mainly viewtopic.php?t=365717, the problems are that A) frag bullets are set to do no damage, B) bullets don't have a proximity fuse, and C) bullets don't have an actual AoE effect (unlike missiles). I'm pretty sure all of those are going to be part of the in-sector code in the exe, and are outside the scope of changes I can make. I haven't seen any bullet code in the obj files; it calls lower level assembly functions for doing laser and bullet related stuff.

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

Re: [TOOL] X3 Customizer 3.14.1

Post by TechSY730 » Sat, 17. Nov 18, 05:25

SirNukes wrote:
Sat, 17. Nov 18, 04:23
TechSY730 wrote:
Sat, 17. Nov 18, 01:57
According to the wiki, the Fragmentation Bomb Launcher is pretty weak because it lacks AOE damage due to a bug.

Any idea what that bug is and how it can be fixed?
After some reading, mainly viewtopic.php?t=365717, the problems are that A) frag bullets are set to do no damage, B) bullets don't have a proximity fuse, and C) bullets don't have an actual AoE effect (unlike missiles). I'm pretty sure all of those are going to be part of the in-sector code in the exe, and are outside the scope of changes I can make. I haven't seen any bullet code in the obj files; it calls lower level assembly functions for doing laser and bullet related stuff.


Oh dang, the bug is actually baked into the main executable, not in the bytecode like thing they have going on? Ouch.
Yeah, I can see why you wouldn't want to touch that. x_x

Pilotoftheuniverse
Posts: 4
Joined: Wed, 21. Nov 18, 14:09

Re: [TOOL] X3 Customizer 3.14.1

Post by Pilotoftheuniverse » Wed, 21. Nov 18, 14:17

This tool is not compatible with 32-bit Window 7 :(

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

Re: [TOOL] X3 Customizer 3.14.1

Post by SirNukes » Wed, 21. Nov 18, 19:01

Pilotoftheuniverse wrote:
Wed, 21. Nov 18, 14:17
This tool is not compatible with 32-bit Window 7 :(
While I am not set up to easily put out a 32-bit version, you can download an appropriate version of Python and run the source directly.

Pilotoftheuniverse
Posts: 4
Joined: Wed, 21. Nov 18, 14:09

Re: [TOOL] X3 Customizer 3.14.1

Post by Pilotoftheuniverse » Mon, 26. Nov 18, 15:22

SirNukes wrote:
Wed, 21. Nov 18, 19:01
Pilotoftheuniverse wrote:
Wed, 21. Nov 18, 14:17
This tool is not compatible with 32-bit Window 7 :(
While I am not set up to easily put out a 32-bit version, you can download an appropriate version of Python and run the source directly.
*smiles* im not a computer guy so can you teach me how? i do have python 3.7.1 installed.

i really would like to apply your fixes on complex lag and the removed cutscene when building stations

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

Re: [TOOL] X3 Customizer 3.14.1

Post by SirNukes » Mon, 26. Nov 18, 19:54

Pilotoftheuniverse wrote:
Mon, 26. Nov 18, 15:22
*smiles* im not a computer guy so can you teach me how? i do have python 3.7.1 installed.

i really would like to apply your fixes on complex lag and the removed cutscene when building stations
After grabbing the python source code off git, the simplest would be something like "python X3_Customizer\Main.py -default_script" from the command prompt (cmd.exe) or shortcut or batch file. Paths will need to be filled in depending on where you call it from. If python isn't registered with the command line, it will need the path to its exe as well.

As a warning, the complex related lag reduction is experimental. To be safe, back up your save before trying it out.

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

Re: [TOOL] X3 Customizer 3.15

Post by SirNukes » Sat, 27. Apr 19, 00:51

Updated to 3.15. Added Prevent_Ship_Equipment_Damage, which stops hull damage from destroying lasers/shields/etc.

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

Re: [TOOL] X3 Customizer 3.15

Post by RoverTX » Tue, 28. May 19, 05:36

Two little neat things I found tonight and am working towards a PR on.

-----

Figured out how to make room for editing InitIllegalWares. Atm the Terran and the ATF use the same array as the Argon for illegal wares. The boron use a different but identical array. So instead of declaring the an identical array working on having the Boron use the same array and clearing up a lot of room for additions or changes.

-----

GetRaceLicenseSubtype works off a large switch statement, but in reality you can map from a race to a licence item id by

Code: Select all

race id + 25 = licence id 
Which allow you to delete a lot of the case statement and leaves room for handling Terran licence.

Realspace
Posts: 1339
Joined: Wed, 15. Nov 06, 10:21
x4

Re: [TOOL] X3 Customizer 3.15

Post by Realspace » Fri, 24. Apr 20, 15:08

Almost one year no news but I discovered this great tool now! If the op reads, about ships speed, if I add the string << 'SG_SH': 1.5, >> will it increase the speed for ALL ships or do I have to add each single class like 'SG_SH_M6': 1.5, 'SG_SH_M3: 1.5, 'SG_SH_M7': 1.5, 'SG_SH_M7M': 1.5, etc.?
Also, my TShips lists ships under the SS_SH id not SG_SH, does it change anything? Thank you!

edit: nevermind, I found the solution, instead of the

Adjust_Ship_Speed(
adjustment_factors_dict = {
# Bump up interceptors about 30%, to better distinguish their role from
# fighters (which otherwise have a lot of speed overlap).
# Could also bump up to 50% and still be in about the right range.
'SG_SH_M4': 1.5,
'SG_SH_M3': 1.5,
'SG_SH_M6': 1.5,
'SG_SH_M7': 1.5,
'SG_SH_M6M': 1.5,
'SG_SH_M7M': 1.5,
'SG_SH_M2': 1.5,
'SG_SH_M1': 1.5,
'SG_SH_M8': 1.5,
'SG_SH_TL': 1.5,
'SG_SH_TM': 1.5,
'SG_SH_TP': 1.5,
'SG_SH_TS': 1.5,
})

which also works, I used

Adjust_Ship_Speed(scaling_factor = 1.5)

It works on all ships. Still the M4 need a boost over all the others, a factor of 2x is better

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

Re: [TOOL] X3 Customizer 3.15

Post by SirNukes » Fri, 24. Apr 20, 18:23

Ytes, the names need to be specific in the current version, with anything not matched falling back on the generic scaling_factor, as you noticed.

Realspace
Posts: 1339
Joined: Wed, 15. Nov 06, 10:21
x4

Re: [TOOL] X3 Customizer 3.15

Post by Realspace » Wed, 6. May 20, 08:33

May I ask, is it possible to add some configurations of the maps using your tool as you did in the X4 versions? Some things are incredibly time sparing, such as changing the sector's size in one click. I already use an excellent script (don't remember the author) but it works only on started games and modifies the save file not the x3universe.xml. Which is good for testing ingame but not for modding, cant' be used in the galaxy editor.
Thanks!

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

Re: [TOOL] X3 Customizer 3.15

Post by SirNukes » Wed, 6. May 20, 19:14

It is possible, though I am not planning to do it since I've moved on to X4.

The X3 map file is much flatter and simpler than X4, so it shouldn't be too hard to write a basic rescaling tool for it, if you wanted to do so. The hard part would be tracking down all scripts which find or spawn objects, to adjust their coordinates (or random ranges) to match. It would also be awkward if you want to shrink sectors and avoid close objects (eg. asteroids) bumping into each other. (That was where most of my X4 map scaling complexity came from.)

Solstice_
Posts: 10
Joined: Tue, 30. Oct 18, 05:40
xr

Re: [TOOL] X3 Customizer 3.15

Post by Solstice_ » Thu, 10. Dec 20, 08:49

I know you've moved on to X4, but I was wondering if a few things were theoretically possible:
  • Disabling collision damage
  • Changing AI max engagement range (10km)
  • Having ships sit stationary, optionally pointing towards enemies, when engaging
Also, how does universally increasing ship speed affect the AI? Is the AI better suited for slower acceleration and/or max speed, to avoid crashing into everything?

By the way, THANK YOU for this tool. To be able to turn off that stupid GoD station-deleting menace was how I found this. And for fixing many other niggles with the game :D

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

Re: [TOOL] X3 Customizer 3.15

Post by SirNukes » Fri, 11. Dec 20, 02:52

Always glad to hear someone getting use out of my work. :)

Removing collision damage is the holy grail of X3 modding, imo. But that code is buried in the exe, and I never got into that side of modding. In theory, if someone could identify the damage calculation assembly, the damage could be reduced or removed.

I don't know anything in particular about the 10km engagement range, though I would assume it is in the exe. Flight patterns are also in there, but perhaps some heavy handed scripting could get a ship to sit still and just turn around.

In theory, the AI should crash less with a mixture of lower max speed, better deceleration, and better turning.

deotehero
Posts: 2
Joined: Sun, 11. Apr 21, 10:54

Re: [TOOL] X3 Customizer 3.15

Post by deotehero » Fri, 16. Apr 21, 17:03

can someone make a tutorial video to how to install and use this thing? i wanna make the universe have more missions but i have no idea where to start

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

Re: [TOOL] X3 Customizer 3.16 (added FL support)

Post by SirNukes » Fri, 14. May 21, 01:14

Version 3.16 is up, with support for FL. To target the FL install, specify the "path_to_addon_folder" path and point it at the "addon2" folder.

Post Reply

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