[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
slater1376
Posts: 8
Joined: Thu, 30. Apr 15, 02:59
x4

Re: [TOOL] X3 Customizer 3.12.4

Post by slater1376 » Thu, 4. Oct 18, 04:37

I'm trying to use the adjust_generic_missions and want to reduce the chance of specific missions by their que names but i don't know how to write it into the user_transforms.py for the customizer to recognize it. could i see a valid example of how its written? i wrote adjust_generic_missions () and it did recognize the command but i didn't specify any specific mission so it shouldn't have changed anything

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

Re: [TOOL] X3 Customizer 3.12.4

Post by SirNukes » Thu, 4. Oct 18, 04:59

An example that reduces build missions and removes dual convoys:

Code: Select all

Adjust_Generic_Missions({
    'Build': 0.3,
    'L2M183': 0,
    })
Another example is in Authors_Transforms at line 224, though I have since disabled dual convoys after learning they tend to leave stations invulnerable.

slater1376
Posts: 8
Joined: Thu, 30. Apr 15, 02:59
x4

Re: [TOOL] X3 Customizer 3.12.4

Post by slater1376 » Thu, 4. Oct 18, 06:21

hey tyvm

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

Re: [TOOL] X3 Customizer 3.12.4

Post by RoverTX » Thu, 4. Oct 18, 08:24

Hey thanks for the info! Have been working on a few object file modification and will be submitting a PR to the repo within the next week or so! This really is an awesome project!

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

Re: [TOOL] X3 Customizer 3.12.4

Post by RoverTX » Sat, 20. Oct 18, 04:45

I submitted three PRs. Wondering if you have any feedback.

PRs are for
  • Dynamic max marines based off of unused Video ID
  • Terran stations making Terran marines
  • Changing Laser Tower, Argon and Terran, equipment load outs.

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

Re: [TOOL] X3 Customizer 3.12.4

Post by SirNukes » Sun, 21. Oct 18, 05:37

Thanks a bunch for the contributions. Apologies for the delay in merging; my ISP was having problems in my area for the last week. Hopefully I can be quicker with future pull requests.

The pending pull requests have been merged in for 3.13, albeit with some edits. Feel free to collect changes into a single pull request, particularly if modifying the same file. Since Misc.py was getting large, I also split off the new transforms (and some others) into Lasertowers.py and Marines.py.

For "video id" marines, I made some changes for Sirokos handling to be more robust when mixing Set_Max_Marines and Max_Marines_Video_Id_Overwrite. This also restores the sirokos argument to Set_Max_Marines, to avoid breaking existing user code. This transform seems to work well in quick tests.

Make_Terran_Stations_Make_Terran_Marines is merged unchanged. Though alone, does it have any effect? I think marines need to also be added as wares to some Terran stations so that they will start being generated. From a quick search and test, SS_WARE_SOLDIER_1 enables training while SS_WARE_SOLDIER_2 enables marine generation. For new games, I think that just editing WareTemplate.xml is enough. For ongoing games, direct station search and update would be needed, perhaps with infrequent repeat to catch respawning stations. (There is a trick to update defaults in an ongoing game, as I use for extra factory sizes, but it's probably overkill.)

Set_LaserTower_Equipment had a small bug where the lasertower args were used for orbital lasers as well. Other than that, I wasn't seeing the expected effect in game when testing. Maybe the Tships entries for the lasertowers need to be changed in some corresponding way. Also, there is a sneaky bit of code during lasertower creation where it records the PBC range for use in its defense script (presumably this is what allows it to attack at range when OOS), but I don't know if it is worth bothering with.

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

Re: [TOOL] X3 Customizer 3.13

Post by RoverTX » Sun, 21. Oct 18, 05:58

Thanks for the merge.

Yes the Terran Marine “Fix” requires the correct wares already be present or a new game.

Also for the laser tower you have to make sure the new shield and laser are compatible. So the max shield type must be high enough and the laser be included in the default laser list.

Really love this project and really appreciate you spending the time to write this. Really love having some open source in this modding community.

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

Re: [TOOL] X3 Customizer 3.13

Post by RoverTX » Sun, 28. Oct 18, 05:32

Working on a new PR

Both the cost and time calculations for marine training both use 5 as a divisor of the skill to calculate themselves. It appears as this would be the best way to manipulate marine training.

In other words

To make training cheaper/faster make the divisor bigger
To make training expensive/slower make the divisor smaller

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

Re: [TOOL] X3 Customizer 3.13

Post by SirNukes » Sun, 4. Nov 18, 18:41

RoverTX wrote:
Sun, 28. Oct 18, 05:32
Working on a new PR
The PR has a "work in progress" tag on it, so I have been leaving it alone. But it has been a week without change, and the code looks complete, so I was wondering if the "wip" tag was left on by accident and you were waiting for me to merge it in.

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

Re: [TOOL] X3 Customizer 3.13

Post by RoverTX » Sun, 4. Nov 18, 18:47

Trying to come up with a way to test how the transformation exactly effects time and cost for training.

Just haven’t had time yet to stop and figure out the best way to check my math.

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.

Post Reply

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