
Introduction
I like some of the changes outlined in https://steamcommunity.com/sharedfiles/filedetails/?id=2327432977, but found it a pain to have to make these changes every time the game updates. So I used NotePad++ and a Python scripting plugin to automate these changes. After every update I can just run these scripts again and it makes the same changes.
This is compatible with version 1.3, 1.4, and 1.5. Unless there are major changes to how these config files work it will probably continue to work in the future.
Setting up NotePad++ and the PythonScript plugin
- notepad-plus-plus.org – https://notepad-plus-plus.org/downloads/
- Once NotePad++ is open, click ‘Plugins’ in the menu bar, then select ‘Plugins Admin…’
- In the ‘Available’ tab, search for PythonScript. Check the box and click ‘Install’
Running the scripts
- The two scripts are in the sections below. Copy the text of the first one – “Blocks Script”. Make sure you copy them carefully because Python is very picky about how many spaces you use in it.
- In NotePad++, click Plugins > Python Scripts > New Script. Name it after the title of the script and put it in the default folder location that pops up. Click ‘Save’.
- Copy the text into the new file, make any custom changes you want (see “Customization” section), then save it.
- Repeat steps 1 through 3 for the second script – “Items Script”
- Go to your Empyrion Configuration folder at \Steam\steamapps\common\Empyrion – Galactic Survival\Content\Configuration
- Open “BlocksConfig.ecf” in NotePad++
- Click Plugins > Python Script > Scripts > [whatever you named the block script]
- The editor will jump around a bit if it worked. Save the file.
- Open “ItemsConfig.ecf” in NotePad++
- Click Plugins > Python Script > Scripts > [whatever you named your items script]
- Jumping around. Save changes.
Now every time the game updates and these files reset, you can repeat steps 5 – 11 to make the same changes again.
Blocks Script
####### Run this script in BlocksConfig.ecf ####### import math # Change this to change the division factor of power draw # For example, 10 means stuff will cost 1/10th energy divideFactor = 20 # How many times stronger to make the shields multiplyFactor = 2 # Change this to True to only change the idle power requirements # If this is True teleporters won't get changed since they don't have an idle draw idleOnly = False # Reduce power draw of shield blocks changeShields = True # Reduce power draw of teleporter blocks changeTele = True # Allow deconstructors to be placed on CV capitalDecon = True # Make shields stronger strongShields = True def divide_replace(m): return str(math.trunc(int(m.group(0)) / divideFactor)) def multiply_replace(m): return str(math.trunc(int(m.group(0)) * multiplyFactor)) def go_to_pos(m): editor.gotoPos(m.span(0)[0]) def search_replace_func(blockId, attribute, isMulti = False): editor.search('Block Id: ' + blockId + ',', go_to_pos) editor.search(attribute, go_to_pos, 0, editor.getCurrentPos(), 9999999, 1) if isMulti: editor.rereplace('\d+', multiply_replace, 0, editor.getCurrentPos(), 9999999, 1) else: editor.rereplace('\d+', divide_replace, 0, editor.getCurrentPos(), 9999999, 1) if changeShields: # HV Shield search_replace_func('1888', 'EnergyInIdle') # SV Shield search_replace_func('1810', 'EnergyInIdle') # CV Shield I search_replace_func('1809', 'EnergyInIdle') # CV Shield II search_replace_func('1811', 'EnergyInIdle') # BA Shield I search_replace_func('1808', 'EnergyInIdle') # BA Shield II search_replace_func('1812', 'EnergyInIdle') if not(idleOnly): # HV Shield search_replace_func('1888', 'EnergyIn') # SV Shield search_replace_func('1810', 'EnergyIn') # CV Shield I search_replace_func('1809', 'EnergyIn') # CV Shield II search_replace_func('1811', 'EnergyIn') # BA Shield I search_replace_func('1808', 'EnergyIn') # BA Shield II search_replace_func('1812', 'EnergyIn') if changeTele and not(idleOnly): #BA Teleporter search_replace_func('1377', 'EnergyIn') #CV Teleporter search_replace_func('1315', 'EnergyIn') if strongShields: #HV Shield search_replace_func('1888', 'ShieldCapacity', True) #SV Shield search_replace_func('1810', 'ShieldCapacity', True) #CV Shield I search_replace_func('1809', 'ShieldCapacity', True) #CV Shield II search_replace_func('1811', 'ShieldCapacity', True) #BA Shield I search_replace_func('1808', 'ShieldCapacity', True) #BA Shield II search_replace_func('1812', 'ShieldCapacity', True) if capitalDecon: editor.search('Block Id: 1371,', go_to_pos) editor.search('AllowPlacingAt', go_to_pos, 0, editor.getCurrentPos(), 9999999, 1) editor.replace('Base', '"Base,MS"', 0, editor.getCurrentPos(), 9999999, 1) editor.replace('TechTreeNames: "Base"', 'TechTreeNames: "Base,Capital Vessel"', 0, editor.getCurrentPos(), 9999999, 1)
Items Script
####### Run this script in ItemsConfig.ecf ####### # Handheld pulse laser, the pulse laser turret, and the rocket turret can be used on planets useOnPlanets = True # Minigun turrets fire minigun rounds # Does not appear to work as of 1.5.1 public branch minigunTurretRounds = False def search_replace_func(itemId, attribute, searchTerm, replaceTerm): editor.search('Item Id: ' + itemId + ',', go_to_pos) editor.search(attribute, go_to_pos, 0, editor.getCurrentPos(), 9999999, 1) editor.replace(searchTerm, replaceTerm, 0, editor.getCurrentPos(), 9999999, 1) if useOnPlanets: search_replace_func('112', 'Child 0', 'AllowAt: Space', 'AllowAt: "Space,Planet"') search_replace_func('123', 'Child 0', 'AllowAt: Space', 'AllowAt: "Space,Planet"') search_replace_func('126', 'Child 0', 'AllowAt: Space', 'AllowAt: "Space,Planet"') if minigunTurretRounds: search_replace_func('114', 'Damage', '280', '140') search_replace_func('114', 'AmmoType', '15mmBullet', '8.3mmBullet')
Customization
To customize the effects of these scripts, just edit them within NotePad++. What each value does should be explained within the script itself. Just change numbers or use ‘True’ or ‘False’ to turn certain features on or off. For example, you can have the script change teleporter energy usage but not shield energy usage. Or shield energy but not shield capacity.
Hey there, thanks for checking our blog. I hope the information you found about Empyrion – Galactic Survival – Storm’s Quality of Life Configuration – NotePad++ script helped you. If you believe we forget something to add or want us to add extra on the post, please let us know via comment below. Thanks, and see you soon!
- Check All Empyrion - Galactic Survival Posts List
Leave a Reply