-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
At last, a data patch that fixes drone malfunctions! You can now make sure that your drone spawners are safe to use... > Note that next version (2.2) will remove a lot of long-deprecated items and objects. Load you world and check inventories with those to update them to avoid them turning into Perfectly Generic Items. Deprecation Station will also get deprecated. It's no longer of much use, and the Perfectly Generic Item section will be moved to the Upgrade Station. Main: - many big bugfixes, lore additions and wiki improvements; - properly functional hazard objects and decorations; - pretty big mod cleanup; Alta: - fixed scout/EDS drone spawners: - increased amount of drones in the Alta Drone Station from 3 to 10; - fixed spam in EDS Spawner; - fixed EDS Drones exploding on spawn in low threat environments; - fixed defeat logic on some drones (like Frigate Drone); - seemingly fixed errors with "liquidLineCollision" on all droids & drones (?); - fixed Alta Lab Barrier - now it: - only damages when closed; - has according particles and looping electric sound when closed; - shows up in the Hazards tab in Alta Constructor; - fixed break sounds on EDS Haulters; - fixed Staris Soup food item; - fixed items no longer being upgradable at the Weapon Upgrade Anvil when having certain items in your inventory; - fixed some items not being upgradable at the Weapon Upgrade Anvil due to incorrect tags (forgot the `upgradeableWeapon` tag): Bishyn Spear, Niverisk, Protospear; - fixed tooltips on Alta City Sapling, Alta Lab Sapling and Alta Ship Sapling; Wiki: - added trivia sections; - added extended descriptions to rifles, drones, droids, hazard objects, plants and some other things; - added screenshots for Defensive Drone R300, Ionic Drone and Lava Drone; - added species support; - made Alta page semi-automated, added in-game info; - fixed extended descriptions on monster spawner items; - minor adjustments and formatting update; Dev: - added comments to some lua scripts; - moved dev landscape screenshots and previews and their psd files for versioning and to keep them in one place; - moved all dev/meta stuff like mod support scripts, palettes, mod descriptions and images to a `/.meta` folder to keep it clean; - the `/.meta` folder is excluded from actual releases and will only be present in the GitHub repo, as well as `.gitignore`, `changelog.md` and `README.md`; - reworked mod support scripts and added comments to make them cleaner and easier to understand; - optimized build scripts and made them cleaner; - made deprecation builders slightly more seamless; Other: - added particles to objects: Poison Crystals, Yaara Heart; - fixed upgraded item icons; - fixed upgraded calin sword; - fixed collision on hazard objects: Alternia Crystal, Poison Crystals, Yaara Heart, Yaara Roots, Warped Roots, Alta Lab Barrier, EDS Haulters; - fixed particles on hazard objects: Alternia Crystal, Yaara Heart, Yaara Roots, Alta Lab Barrier, EDS Haulters; - fixed levels on hazard objects: Alternia Crystal, Yaara Heart, Yaara Roots, Warped Roots; - fixed level inventory tooltips on objects; - moved text lines from item builder scripts into a `/items/buildscripts/ct_texts.config` file to make them easier to translate/change; - tried to fix emote issues for kaiteras (second alta gender), but wasn't successful; - minor bug fixes.
- Loading branch information
Showing
217 changed files
with
2,428 additions
and
849 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes
File renamed without changes
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Diff not rendered.
Oops, something went wrong.
File renamed without changes
Diff not rendered.
File renamed without changes
Diff not rendered.
Oops, something went wrong.
Diff not rendered.
Oops, something went wrong.
Oops, something went wrong.
File renamed without changes
Diff not rendered.
File renamed without changes
Diff not rendered.
File renamed without changes
Diff not rendered.
File renamed without changes
Diff not rendered.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
""" | ||
This script automatically creates support for the Frakin' Universe mod. | ||
""" | ||
|
||
import RT_support_script | ||
|
||
|
||
PATH = f'/species/{RT_support_script.RACE}.raceeffect' | ||
PATH_WINDOW = '/interface/scripted/statWindow/statWindow.config.patch' | ||
PATH_SPECIES = f'/species/{RT_support_script.RACE}.species' | ||
AFFECTED_FILES = [PATH, PATH_WINDOW, PATH_SPECIES] | ||
MOD = 'Frakin Universe/Frakin Races' | ||
HINT = RT_support_script.base.HINT.format(mod=MOD) | ||
EXCLUDED = [ | ||
'foodDelta', | ||
] | ||
TEMPLATE = '''{hint} | ||
{{ | ||
"stats": [ | ||
{stats} | ||
], | ||
"diet" : "{diet}", | ||
"controlModifiers": {{ | ||
{controls} | ||
}} | ||
}} | ||
''' | ||
|
||
def run(): | ||
RT_support_script.create_patch(EXCLUDED, TEMPLATE, HINT, RT_support_script.RACE, PATH, ' ') | ||
with open(RT_support_script.base.ROOT + PATH_WINDOW, 'w') as f: | ||
f.write(f'''{HINT} | ||
[ | ||
{{ | ||
"op": "add", | ||
"path": "/races/-", | ||
"value": "{RT_support_script.RACE}" | ||
}} | ||
] | ||
''') | ||
TEXT = ''' | ||
If you have ^orange;Frakin' Universe^reset;/^orange;Frakin' Races^reset;/^orange;Race Traits^reset; installed: | ||
^yellow;Attributes^reset; | ||
^cyan;Max Health^reset;: ^red;-20%^reset; | ||
^cyan;Max Energy^reset;: ^green;+10%^reset; | ||
^cyan;Energy Regen^reset;: ^green;+5%^reset; | ||
^yellow;Resistances^reset; | ||
^cyan;Fire Resistance^reset;: ^red;-10%^reset; | ||
^cyan;Electric Resistance^reset;: ^green;+20%^reset; | ||
^cyan;Poison Resistance^reset;: ^green;+5%^reset; | ||
^cyan;Ice Resistance^reset;: ^green;+5%^reset; | ||
^cyan;Cosmic Resistance^reset;: ^green;+10%^reset; ^gray;(FU/FR only)^reset; | ||
^cyan;Radioactive Resistance^reset;: ^red;-25%^reset; ^gray;(FU/FR only)^reset; | ||
^cyan;Shadow Resistance^reset;: ^red;-15%^reset; ^gray;(FU/FR only)^reset; | ||
^yellow;Immunities^reset; | ||
^#7733aa;Electrified^reset; | ||
^yellow;Extra Stats^reset; | ||
^cyan;Hunger Slowness ^gray;(Race Traits)^reset;/^cyan;Max Food ^gray;(FU/FR)^reset;: ^green;+10%^reset; | ||
^cyan;Jump Height^reset;: ^green;+5%^reset; | ||
^cyan;Charisma^reset;: ^green;+15%^reset; ^gray;(FU/FR only)^reset; | ||
^cyan;Mental Protection^reset;: ^green;+15%^reset; ^gray;(FU/FR only)^reset; | ||
^orange;Diet^reset;: ^cyan;Herbivore^reset; ^gray;(FU/FR only)^reset; | ||
^orange;Environment^reset;: None ^gray;(FU/FR only)^reset; | ||
^orange;Weapons^reset;: None ^gray;(FU/FR only)^reset;''' | ||
desc = str(''.join(RT_support_script.CONFIG.get('lore')) + TEXT).replace('\n\n', '\\n\\n').replace('\n', ' \\n') | ||
hint = ' ' + RT_support_script.base.HINT.format(mod='species traits mods') + '\n' | ||
has_hint = False | ||
has_desc = False | ||
lore_line = 0 | ||
lines = [] | ||
with open(RT_support_script.base.ROOT + PATH_SPECIES, 'r') as f: | ||
lines = f.readlines() | ||
for i in range(len(lines)): | ||
if '"subTitle"' in lines[i]: | ||
lore_line = i | ||
if '//' in lines[i+1]: | ||
has_hint = True | ||
if '"description"' in lines[i+2] or '"description"' in lines[i+1]: | ||
has_desc = True | ||
break | ||
if lore_line > 0: | ||
if has_hint: | ||
lines[lore_line + 1] = hint | ||
else: | ||
lines.insert(lore_line + 1, hint) | ||
if has_desc: | ||
lines[lore_line + 2] = f' "description" : "{desc}"\n' | ||
else: | ||
lines.insert(lore_line + 2, f' "description" : "{desc}"\n') | ||
with open(RT_support_script.base.ROOT + PATH_SPECIES, 'w') as f: | ||
f.writelines(lines) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
""" | ||
It's a bit stupid that you have to specify effect's path AND name | ||
for the Improved Food Descriptions mod, since the path is used to | ||
literally load the effect which already has the name in it, so I | ||
did this to create patches automatically for this mod (since it | ||
has a lot of effects).""" | ||
|
||
import pyjson5 | ||
import base | ||
|
||
|
||
PATH = '/IFD_statuseffects.config.patch' | ||
AFFECTED_FILES = [PATH] | ||
MOD = 'Improved Food Descriptions' | ||
HINT = base.HINT.format(mod=MOD) | ||
|
||
def is_obj_file(name: str) -> bool: | ||
return (name[-13:] == '.statuseffect') | ||
|
||
def run(): | ||
paths = base.get_files_flat(is_obj_file) | ||
objs = {path: base.get_obj(path) for path in paths} | ||
patches = [(objs[path].get('name'), f"^green;+ {objs[path].get('label')}^reset;", path.replace(base.ROOT, '').replace('\\', '/')) for path in objs] | ||
json_patches = [{'op': 'add', 'path': f'/effectNames/{patch[0]}', 'value': {'customLabels': [patch[1]], 'path': patch[2]}} for patch in patches] | ||
json_patch_lines = '[\n ' + ',\n '.join([pyjson5.dumps(json_patch) for json_patch in json_patches]) + '\n]\n' | ||
json_patch_lines = HINT + '\n' + json_patch_lines | ||
# print(json_patch_lines) | ||
with open(base.ROOT + PATH, 'w') as patch_file: | ||
patch_file.writelines(json_patch_lines) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
""" | ||
Run this script to update the cockpit patch file to include | ||
biome and planet info for the More Planet Info addon.""" | ||
|
||
import os | ||
import pyjson5 | ||
import base | ||
|
||
|
||
PATH_INPUT = '/interface/cockpit/cockpit.config.patch.init.json' | ||
PATH = '/interface/cockpit/cockpit.config.patch' | ||
AFFECTED_FILES = [PATH, PATH_INPUT] | ||
MOD = 'More Planet Info' | ||
HINT = base.HINT.format(mod=MOD) | ||
|
||
def is_effect(name: str) -> bool: | ||
return (name[-13:] == '.statuseffect') | ||
|
||
def is_weather(name: str) -> bool: | ||
return (name[-8:] == '.weather') | ||
|
||
def is_biome(name: str) -> bool: | ||
return (name[-6:] == '.biome') | ||
|
||
def run(): | ||
# Initial fill | ||
json_patches: list[list[dict]] = [ | ||
pyjson5.load(open(base.ROOT + '/interface/cockpit/cockpit.config.patch.init.json')), | ||
'\n ' + HINT, | ||
[ { "op": "test", "path": "/displayEnvironmentStatusEffects" }, ] | ||
] | ||
|
||
# Effects | ||
paths = base.get_files_flat(is_effect) | ||
objs = {path: base.get_obj(path) for path in paths} | ||
for path in objs: | ||
icon = objs[path].get('icon', 'icon.png') | ||
objs[path]['icon'] = ((os.path.dirname(path) + '/' + icon) if icon[0] != '/' else icon).replace(base.ROOT, '').replace('\\', '/') | ||
patches = [ ( objs[path].get('name'), f"{objs[path].get('label')}", objs[path].get('icon'), ) for path in objs ] | ||
json_patches[-1].extend([{'op': 'add', 'path': f'/displayEnvironmentStatusEffects/{patch[0]}', 'value': {'displayName': patch[1], 'icon': patch[2]}} for patch in patches]) | ||
|
||
# Weather | ||
paths = base.get_files_flat(is_weather) | ||
objs = {path: base.get_obj(path) for path in paths} | ||
patches = [ ( objs[path].get('name'), f"{objs[path].get('threat', 0.1)}", ) for path in objs ] | ||
json_patches[-1].extend([{'op': 'add', 'path': f'/weatherThreatValues/{patch[0]}', 'value': patch[1]} for patch in patches]) | ||
|
||
# Biomes | ||
paths = base.get_files_flat(is_biome) | ||
objs = {path: base.get_obj(path) for path in paths} | ||
patches = [ ( objs[path].get('name'), f"{objs[path].get('friendlyName')}", ) for path in objs ] | ||
json_patches[-1].extend([{'op': 'add', 'path': f'/namesList/{patch[0]}', 'value': {'word': patch[0], 'friendlyWord': patch[1]}} for patch in patches]) | ||
|
||
lines = [('\n [\n ' + ',\n '.join([pyjson5.dumps(json_patch) for json_patch in json_batch]) + '\n ]' + (',' if json_batch != json_patches[-1] else '')) if type(json_batch) == list else json_batch for json_batch in json_patches] | ||
|
||
json_patch_lines = '[' + ''.join(lines) + '\n]\n' | ||
# print(json_patch_lines) | ||
with open(base.ROOT + '/interface/cockpit/cockpit.config.patch', 'w') as patch_file: | ||
patch_file.writelines(json_patch_lines) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import os | ||
import pyjson5 | ||
import re | ||
|
||
|
||
ROOT = os.path.dirname(os.path.dirname(os.path.dirname(__file__))) | ||
HINT = '// Mod Support for {mod} (see mod description)' | ||
|
||
def get_paths_flat(roots: list[str] = ['']) -> list[str]: | ||
paths = [] | ||
for path in roots: | ||
paths.extend([r[0] for r in list(os.walk(os.path.join(ROOT, path)))]) | ||
return paths | ||
|
||
def get_obj(file_path) -> dict[str, str]: | ||
with open(file_path, encoding="utf-8") as fp: | ||
lines = ''.join(fp.readlines()) | ||
lines = str(re.sub(r'((?<!:)\/\/.*)\n', r'\n', lines)) | ||
lines = lines.replace('\n', ' ') | ||
return pyjson5.loads(lines) | ||
|
||
def get_files(path: str, filter_f) -> list[str]: | ||
file_names = os.listdir(path) | ||
file_paths = [os.path.join(path, file_name) for file_name in file_names if filter_f(file_name)] | ||
return file_paths | ||
|
||
def get_files_flat(filter_f, paths: list[str] = None) -> list[str]: | ||
obj_list = [] | ||
for path in paths or get_paths_flat(): | ||
obj_list.extend(get_files(path, filter_f)) | ||
return obj_list |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
"""Run this script to update all mod support related files.""" | ||
|
||
import RT_support_script as RT, FU_support_script as FU, IFD_support_script as IFD, MPI_support_script as MPI, json | ||
|
||
METADATA_PATH = '/_metadata' | ||
|
||
with open(RT.base.ROOT + '/.meta/description.md', 'r') as f: | ||
mod_info = RT.base.get_obj(RT.base.ROOT + METADATA_PATH) | ||
mod_desc = ''.join(f.readlines()) | ||
mod_info['description'] = mod_desc | ||
json.dump(mod_info, open(RT.base.ROOT + METADATA_PATH, 'w'), indent=2) | ||
|
||
RT.run() | ||
FU.run() | ||
IFD.run() | ||
MPI.run() | ||
print('Affected files:\n' + '\n'.join(['- ' + path for path in ( | ||
RT.AFFECTED_FILES + | ||
FU.AFFECTED_FILES + | ||
IFD.AFFECTED_FILES + | ||
MPI.AFFECTED_FILES + | ||
[METADATA_PATH] | ||
)])) |
Oops, something went wrong.