EnglishGermanFrenchRussianPolishItalianSpanish
Log inRegister
 
[TOOL] X3 Customizer
Post new topic Reply to topic
View previous topic :: View next topic
Author Message
SirNukes





Joined: 31 Mar 2007
Posts: 16 on topic

Thank you for registering your game
modified
PostPosted: Sun, 27. Aug 17, 05:31    Post subject: [TOOL] X3 Customizer Reply with quote Print

As part of toying around with modding my own game, I have developed a Python program which perform various transforms on game files, with options to selectively enable transforms or tune their effects in various ways. The scripts have been cleaned up and placed on github for public use. Short documentation is below; fuller documentation is in the repository.

Download:
https://github.com/bvbohnen/X3_Customizer


X3 Customizer v2.01
--------------------

This tool will read in source files from X3, perform transforms on them, and write the results back out. Transforms will often perform complex or repetitive tasks succinctly, avoiding the need for hand editing of source files. Source files will generally support any prior modding.

This tool is written in Python, and tested on version 3.6.

Usage:
* "X3_Customizer <user_transform_module.py>"
- Runs the customizer using the provided module, located in this directory, to specify the path to the AP directory, the folder containing the source files to be modified, and the transforms to be run. See User_Transforms_Example.py for an example.
* "Make_Documentation.py"
- Generates documentation for this project.

Setup:

* Transforms will operate on source files which need to be set up prior to running this tool. Source files can be extracted using X2 Editor 2 if needed. Source files may be captured after any other mods have been applied.

* Source files need to be located in a folder underneath the specified AP addon directory, and will have an internal folder structure matching that of the files in the normal addon directory.

* Output files will be generated in the addon directory matching the folder structure in the source folder. Non-transformed files will generate output files. Files which do not have a name matching the requirement of any transform will be ignored and not copied.

* Warning: Generated output will overwrite any existing files.

Example directory:
Code:

    <path to X3 installation>
        addon
            source_folder
                maps
                    x3_universe.xml
                types
                    TBullets.txt
                    TLaser.txt
                    TShips.txt
                    TShips_backup.txt

This will write to the following files, overwriting any existing ones:
Code:

    <path to X3 installation>
        addon
            maps
                x3_universe.xml
            types
                TBullets.txt
                TLaser.txt
                TShips.txt

Change Log:
* 1.x :
- Original project development for private use.
* 2.0 :
- Restructuring of project for general use, isolating individual transforms, separating out transform calls, adding robustness. Filling out documentation generation.
* 2.01:
- Added beam to bullet conversion.

Full documentation found in Documentation.md.

***

Setup methods:

* Set_Path

***

Transform List:

* Adjust_Beam_Weapon_Duration
* Adjust_Beam_Weapon_Width
* Adjust_Fade_Start_End_Gap
* Adjust_Global
* Adjust_Job_Count
* Adjust_Job_Respawn_Time
* Adjust_Missile_Damage
* Adjust_Missile_Hulls
* Adjust_Missile_Range
* Adjust_Missile_Speed
* Adjust_Particle_Count
* Adjust_Ship_Hull
* Adjust_Ship_Laser_Recharge
* Adjust_Ship_Pricing
* Adjust_Ship_Shield_Regen
* Adjust_Ship_Shield_Slots
* Adjust_Ship_Speed
* Adjust_Strafe
* Adjust_Weapon_DPS
* Adjust_Weapon_Energy_Usage
* Adjust_Weapon_Fire_Rate
* Adjust_Weapon_OOS_Damage
* Adjust_Weapon_Range
* Adjust_Weapon_Shot_Speed
* Boost_Truelight_Seeker_Shield_Reactor
* Clear_Weapon_Flag
* Color_Sector_Names
* Convert_Beams_To_Bullets
* Convert_Weapon_To_Ammo
* Convert_Weapon_To_Energy
* Convoys_made_of_race_ships
* Enhance_Mosquito_Missiles
* Fix_Pericles_Pricing
* Remove_Stars_From_Foggy_Sectors
* Remove_Weapon_Charge_Up
* Remove_Weapon_Drain_Flag
* Remove_Weapon_Shot_Sound
* Replace_Weapon_Shot_Effects
* Restore_Aldrin_rock
* Restore_Hub_Music
* Restore_M148_Music
* Restore_Vanilla_Tuning_Pricing
* Restore_heavy_missile_trail
* Set_Communication_Distance
* Set_Complex_Connection_Distance
* Set_Dock_Storage_Capacity
* Set_Global
* Set_Minimum_Fade_Distance
* Set_Missile_Swarm_Count
* Set_Ware_Pricing
* Simplify_Engine_Trails
* Standardize_Start_Plot_Overtunings
* Standardize_Tunings
* Swap_Standard_Gates_To_Terran_Gates

***

Example input file, User_Transforms_Example.py:
Code:

    '''
    Example for using the Customizer, setting a path to
    the AP directory and running some simple transforms.
    '''
   
    #Import all transform functions.
    from Transforms import *
   
    Set_Path(
        #Set the path to the AP addon folder.
        path_to_addon_folder = r'D:\Steam\SteamApps\common\x3 terran conflict\addon',
        #Set the subfolder with the source files to be modified.
        source_folder = 'vanilla_source'
    )
   
    #Speed up interceptors by 50%.
    Adjust_Ship_Speed(adjustment_factors_dict = {'SG_SH_M4' : 1.5})
   
    #Increase frigate laser regeneration by 50%.
    Adjust_Ship_Laser_Recharge(adjustment_factors_dict = {'SG_SH_M7': 1.5})
   
    #Reduce OOS damage by 30%.
    Adjust_Weapon_OOS_Damage(scaling_factor = 0.7)




Last edited by SirNukes on Tue, 19. Sep 17, 09:04; edited 2 times in total
Back to top
View user's profile Send private message
SirNukes





Joined: 31 Mar 2007
Posts: 16 on topic

Thank you for registering your game
PostPosted: Mon, 18. Sep 17, 07:01    Post subject: Reply with quote Print

There wasn't much expressed interest to my original post, but I had some free energy this weekend and polished up my tool for public use anyhow. The original post has been edited accordingly.

Question: is there a good tag to put on the front of the thread? I went with [TOOL] temporarily, and was thinking maybe [PROGRAM] or similar.

Back to top
View user's profile Send private message
SimB





Joined: 15 Dec 2005
Posts: 170 on topic

Thank you for registering your game
PostPosted: Mon, 18. Sep 17, 15:10    Post subject: Reply with quote Print

This sounds great!

I removed the engine trails of XRM by hand...this will come in very handy for when I want to switch to the high hull addon of XRM.

Thank you!

PS: [TOOL] seems to be fitting.

Back to top
View user's profile Send private message
SirNukes





Joined: 31 Mar 2007
Posts: 16 on topic

Thank you for registering your game
PostPosted: Tue, 19. Sep 17, 09:15    Post subject: Reply with quote Print

If you prefer, you can also set your own custom hull upscaling. I am using an AP style upscale (2x for fighters up to 10x for capitals) in my XRM game. If applying to an existing save, the XRM hull pack script is still needed to update ships back to 100% (if hulls were increased).


While playing tonight, an Oceanus and an I decided to duke it out with their beam weapons, turning the game into a slideshow. As a result, I have added a performance transform to convert beam weapons to standard bullets, setting bullet speed to that of similar DPS weapons. Github is now updated with version 2.01.

Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic Reply to topic
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum
Control Panel
Login Data
The time now is Wed, 20. Sep 17, 07:35

All times are GMT + 2 Hours


Board Security

Copyright © EGOSOFT 1989-2017
Powered by phpBB © 2001, 2005 phpBB Group
Template created by Avatar & BurnIt!
Debug: page generation = 0.36022 seconds, sql queries = 18