[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
kecin25
Posts: 36
Joined: Sun, 13. Aug 17, 19:58
x4

Post by kecin25 » Fri, 24. Aug 18, 01:29

I don't see the addon/scripts folder. I do see a game_files folder that when opened has two more folders named "scripts" and "objects" are those the folders I would be looking for?

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

Post by SirNukes » Fri, 24. Aug 18, 01:39

I meant addon/script in the X3 installation folder.

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

Post by kecin25 » Fri, 24. Aug 18, 01:50

I don't know which script is causing the problems but I had the Script Global Tasks tab open when it froze. Would one of the scripts appearing there be causing this issue?

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

Post by SirNukes » Fri, 24. Aug 18, 02:12

A script's freezing likely isn't related to if it is a global task or not, and almost certainly viewing the global tasks wouldn't interfere with the running scripts.

If the infinite loop detection isn't catching the freezing script, then I am not sure what I can do to help find the problem.

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

Post by kecin25 » Fri, 24. Aug 18, 14:24

OK because the infinite loop scrip just keeps running like nothing happened without any change on finding the script that is breaking it

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: 157
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: 157
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.

Post Reply

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