[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
TechSY730
Posts: 115
Joined: Tue, 26. Jul 16, 02:51
x3ap

Post by TechSY730 » Fri, 24. Aug 18, 19:57

How long are you waiting after it freezes? At the current default cutoff of about 2 million, it takes a good 15-30 seconds for the freezing script to be terminated.

You may want to consider passing a lower value as the cutoff, by giving a number in you script you pass to the customizer (lower numbers mean waiting less time, but more prone to false positives)

kecin25
Posts: 36
Joined: Sun, 13. Aug 17, 19:58
x4

Post by kecin25 » Fri, 24. Aug 18, 20:33

I've been waiting around 10 seconds, I will try lowering the number and waiting a little longer

kecin25
Posts: 36
Joined: Sun, 13. Aug 17, 19:58
x4

Post by kecin25 » Fri, 24. Aug 18, 20:51

ok So it turns out I forgot to put in a number between the ()
I added 10K inside it and i found the script that is causing the problem

!fight.attack.object.std:217:4:0:65764478:0: hidden goto label -1610571767 RefObj: Xenon J (XM1UX-10), env=Zyarth's Dominion

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

Post by SirNukes » Fri, 24. Aug 18, 21:27

Interesting. Once that script is terminated, does the game continue to play normally without other freezing? Also, out of curiosity, how long did the game pause before the script was terminated?

kecin25
Posts: 36
Joined: Sun, 13. Aug 17, 19:58
x4

Post by kecin25 » Fri, 24. Aug 18, 21:34

I haven't tested it without the script yet and when set to 10K it would take a second of it being frozen and then unfreeze and then freeze again

the very first time for the script to be killed took about 10 seconds

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

Post by SirNukes » Sat, 25. Aug 18, 21:53

Hopefully someone in the LU thread can take a look at the script, now that you know which one it is.

In other news, I updated to 3.12.2, adding support for running from the bat file directly (skipping the command line requirement). The bat launcher will default to running User_Transforms.py in the input_scripts folder, and has some extra directions to help guide first time users.

steve_v
Posts: 159
Joined: Sun, 12. Jun 16, 08:39
x4

Post by steve_v » Mon, 24. Sep 18, 08:22

Can anyone confirm that Adjust_Weapon_Fire_Rate actually works properly on LUv1.7.2? I can't get it to make changes to anything but the first weapon ( IRE) in Tlaser.txt.
No errors are generated, but the files dropped in ./output show no change to any other weapon, either in-game or when compared to the original file in x3 editor.

Ed.
------------
The transform works on every laser if I (laboriously) specify a factor for each one by name in laser_name_adjustment_dict, so presumably scaling_factor isn't causing it to iterate through the whole file.

If I'm reading the comments in Author_Transforms.py right, scaling_factor is supposed to be a scaling factor for all lasers, and laser_name_adjustment_dict is supposed to be a flat refire delay per laser? Right?



From my tests, scaling_factor only applies to the first laser in TLaser.txt, and entries in the laser_name_adjustment_dict list are being applied as scaling factors, not refire delays...
To everything except:
CIG
ISR
PBG
HEPT
MAML
PSG
PPC
IC
IBL
All Kyons

Which are modified as a refire delay.

If I run this from the shipped Author_Transforms.py:

Code: Select all

        laser_name_adjustment_dict = {
            # Cut the PAL down to every 2 seconds to reduce its
            #  excessive performance impact somewhat.
            'SS_LASER_PAL': 30,
            })
I get a PAL that fires at 660 rds/min (22*30). :?


The mind boggles, this is properly borked.
Is there something about LU that's not properly accounted for?

Apologies for the disorganized ramble, but this was a lot of frustrating shagging about to figure out.

-------------


Here's the transform that only hits the IRE:

Code: Select all

from X3_Customizer import *

Set_Path(
    path_to_x3_folder = r'G:\X3AP_LU\game',
    path_to_addon_folder = r'G:\X3AP_LU\game\addon',
    #path_to_source_folder = 'xrm_source'
    path_to_output_folder = './output'
)

Adjust_Weapon_Fire_Rate(
    scaling_factor = 2)
Log:

Code: Select all

{
  "version": "3.12.2",
  "file_paths_written_hash_dict": {
    "addon\\output\\addon\\types\\TBullets.txt": "3a42e93c99130e56dc8046919413bc11ddac907856a616ed2d8457c0153978d1",
    "addon\\output\\addon\\types\\TLaser.txt": "19b68b61793db23897a6ea30766285737458faea5150a03e9cfc9f27e86cbe99"
  },
  "file_paths_renamed_dict": {}
}
Summary:

Code: Select all

Loaded file types/TBullets.txt from G:\X3AP_LU\game\addon\types\TBullets.txt
Loaded file types/TLaser.txt from G:\X3AP_LU\game\addon\types\TLaser.txt
Last edited by steve_v on Mon, 24. Sep 18, 10:13, edited 2 times in total.

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

Post by SirNukes » Mon, 24. Sep 18, 09:55

steve_v wrote:Can anyone confirm that Adjust_Weapon_Fire_Rate actually works properly on LUv1.7.2? I can't get it to make changes to anything but the first weapon ( IRE) in Tlaser.txt.
3.12.3 is uploaded now with a fix. The problem was with the fire_rate_floor: it was getting mistakenly applied when speeding weapons up, skipping nearly all LU weapons already above the default floor (of 1 round per second).

Please let me know if you run into any other problems.

steve_v
Posts: 159
Joined: Sun, 12. Jun 16, 08:39
x4

Post by steve_v » Mon, 24. Sep 18, 11:05

SirNukes wrote:3.12.3 is uploaded now with a fix.
Blimey, that was quick. Awesome work dude. :D

This tool is the best thing that has happened to X3 in a long time.
Now I just need to get around to learning me some python.
SirNukes wrote:Please let me know if you run into any other problems
Only one that I can see: There's no GNU/Linux executable. :P

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

Post by SirNukes » Mon, 24. Sep 18, 20:24

steve_v wrote:Only one that I can see: There's no GNU/Linux executable. :P
In theory, the Make_Executable script should be portable and just needs to run on a linux machine with Python and the PyInstaller package set up, and Make_Release would need to swap the windows batch files for Linux equivalents. PyInstaller does all the heavy lifting.

However, I don't have a Linux installation conveniently available to test on. Plus, I figure Linux users are accustomed to doing things the hard way, and can obtain Python (if they don't have it already) and run the source code directly. :)

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.

Post Reply

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