Skip to content

Commit

Permalink
Update 2.3.3b
Browse files Browse the repository at this point in the history
This mini-patch refines already existing things and improves the quality of life overall.

Main:

- added 2 items;
- grammar fixes;
- lore expansion;
- balancing.

Alta:

- added 2 more A.I. Chips:
  - Alta Security A.I. Chip;
  - Alta S.A.I.L. A.I. Chip.
- made alta bodies less curvy - will later release a patch that brings back the original version.

Translation:

- fixed typos in a number of objects and effects:
  - `/objects/alta/special/figurines/anglure/ct_nightmare_anglure.object` - `description`;
  - `/objects/alta/special/paintings/ct_alta_abstract_art.object` (and other paintings) - `longdescription`;
  - `/objects/alta/special/samples/phospholion/ct_phospholion_sample.object` - `altaDescription`;
  - `/objects/alta/special/terraformers/biome/alterash/astera/ct_moonrock_space_islands.object` - `longdescription`;
  - `/objects/alta/special/figurines/sporgus/ct_warped_sporgus.object` - `altaDescription`;
  - `/objects/alta/special/figurines/other/ct_alta_af.object` - `description`;
  - `/objects/alta/arknight/pod/ct_arknight_pod.object` - `description`;
  - `/objects/alta/special/terraformers/biome/alterash_prime/gheatorn/ct_gheatorn.object` - `description`;
  - `/stats/effects/alta/emotions/passion.statuseffect` - `description`;
  - `/objects/alta/elite/pod/ct_elite_pod.object` - `altaDescription`;
  - `/objects/alta/special/terraformers/biome/alterash/enchanted/ct_alterash_enchanted.object` - `longdescription`;
  - `/objects/alta/scout/drone_spawner/ct_alta_drone_spawner.object` - `longdescription`;
  - `/objects/biome/alterash_prime/bishyn/decorative/terminal/ct_bishyn_terminal.object` - `altaDescription`.
- added altered species descriptions for decorative alta plants;
- added a `longdescription` for Alta Energy Source;
- added shared descriptions to `/items/buildscripts/ct_texts.config:lore`;
- removed shared `longdescription` from most special objects.

Other:

- added recipes for Alta Shielders and included them as ingredients in other alta equipment;
- added an entry to the My Enternia Guide that talks about the Alta Scanner;
- made support for More Planet Info more granular, in that it now checks for each parameter before adding values to it;
- made Yaara Eyes ferment a little slower (`0.003` -> `0.3`);
- made slight adjustments to creature spawn rates and loot;
- made Alta Constructor only ask for 16 Stardust instead of 256 to upgrade to tier 5;
- fixed Brutefly and Bionfly - they no longer autodefeat when trying to perform an attack;
- minor bug fixes.
  • Loading branch information
Ceterai committed Jul 16, 2024
1 parent 04ce0d6 commit 3166911
Show file tree
Hide file tree
Showing 410 changed files with 6,285 additions and 4,294 deletions.
56 changes: 55 additions & 1 deletion .meta/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ If you want to see more detailed changes, you can always navigate to the [commit

- [Changelog](#changelog)
- [Update 2.3 - Alta Cafe \& Monster Buffet](#update-23---alta-cafe--monster-buffet)
- [2.3.3b](#233b)
- [2.3.3a](#233a)
- [2.3.3](#233)
- [2.3.2](#232)
Expand Down Expand Up @@ -54,6 +55,57 @@ If you want to see more detailed changes, you can always navigate to the [commit

## Update 2.3 - Alta Cafe & Monster Buffet

### 2.3.3b

This mini-patch refines already existing things and improves the quality of life overall.

**Main:**

- added 2 items;
- grammar fixes;
- lore expansion;
- balancing.

**Alta:**

- added 2 more **A.I. Chips**:
- **Alta Security A.I. Chip**;
- **Alta S.A.I.L. A.I. Chip**.
![ ](/.meta/images/showcase/2.3.3b/ai.png)
- made alta bodies less curvy - will later release a patch that brings back the original version.

**Translation:**

- fixed typos in a number of objects and effects:
- `/objects/alta/special/figurines/anglure/ct_nightmare_anglure.object` - `description`;
- `/objects/alta/special/paintings/ct_alta_abstract_art.object` (and other paintings) - `longdescription`;
- `/objects/alta/special/samples/phospholion/ct_phospholion_sample.object` - `altaDescription`;
- `/objects/alta/special/terraformers/biome/alterash/astera/ct_moonrock_space_islands.object` - `longdescription`;
- `/objects/alta/special/figurines/sporgus/ct_warped_sporgus.object` - `altaDescription`;
- `/objects/alta/special/figurines/other/ct_alta_af.object` - `description`;
- `/objects/alta/arknight/pod/ct_arknight_pod.object` - `description`;
- `/objects/alta/special/terraformers/biome/alterash_prime/gheatorn/ct_gheatorn.object` - `description`;
- `/stats/effects/alta/emotions/passion.statuseffect` - `description`;
- `/objects/alta/elite/pod/ct_elite_pod.object` - `altaDescription`;
- `/objects/alta/special/terraformers/biome/alterash/enchanted/ct_alterash_enchanted.object` - `longdescription`;
- `/objects/alta/scout/drone_spawner/ct_alta_drone_spawner.object` - `longdescription`;
- `/objects/biome/alterash_prime/bishyn/decorative/terminal/ct_bishyn_terminal.object` - `altaDescription`.
- added altered species descriptions for decorative alta plants;
- added a `longdescription` for **Alta Energy Source**;
- added shared descriptions to `/items/buildscripts/ct_texts.config:lore`;
- removed shared `longdescription` from most special objects.

**Other:**

- added recipes for **Alta Shielders** and included them as ingredients in other alta equipment;
- added an entry to the **My Enternia Guide** that talks about the **Alta Scanner**;
- made support for More Planet Info more granular, in that it now checks for each parameter before adding values to it;
- made **Yaara Eyes** ferment a little slower (`0.003` -> `0.3`);
- made slight adjustments to creature spawn rates and loot;
- made **Alta Constructor** only ask for 16 **Stardust** instead of 256 to upgrade to tier 5;
- fixed **Brutefly** and **Bionfly** - they no longer autodefeat when trying to perform an attack;
- minor bug fixes.

### 2.3.3a

This mini-patch refines already existing things and improves the quality of life overall.
Expand All @@ -67,6 +119,8 @@ In time for the release of this patch, a couple more mods were released to provi
- [C.T.O.S. Alta S.A.I.L.](https://steamcommunity.com/sharedfiles/filedetails/?id=3277849874)
- [My Enternia Enhanced Storage Patch](https://steamcommunity.com/sharedfiles/filedetails/?id=3278292921)

> Detailed changes for this version: [Update 2.3.3a](https://github.com/Ceterai/Enternia/commit/04ce0d66ec9a520ddb4e6735eeb9c67cba780a84)
**Main:**

- added support for [Craftable Seeds](https://steamcommunity.com/sharedfiles/filedetails/?id=1938886559);
Expand Down Expand Up @@ -1586,7 +1640,7 @@ The update also adds tier 5 and 6 armor sets, as well as loot items and set item

- added 1 atmosphere biome ([Eva Prime](https://github.com/Ceterai/Enternia/wiki/Eva-Prime)) with clouds and bg stat effects;
- added 4 surface biomes ([Alterash Prime Gardens](https://github.com/Ceterai/Enternia/wiki/Alterash-Prime-Gardens), [Alta Prime Labs](https://github.com/Ceterai/Enternia/wiki/Alta-Prime-Labs), [EDS Grounds](https://github.com/Ceterai/Enternia/wiki/EDS-Grounds), [Tavriya](https://github.com/Ceterai/Enternia/wiki/Tavriya));
- added 4 subsurface biomes ([Calocaves](https://github.com/Ceterai/Enternia/wiki/Calocaves), [Crystalline Prime](https://github.com/Ceterai/Enternia/wiki/Crystalline-Prime), [Isoslime Plasts](https://github.com/Ceterai/Enternia/wiki/Isoslime-Plasts), [Phospholion Mines](https://github.com/Ceterai/Enternia/wiki/Phospholion-Mines));
- added 4 subsurface biomes ([Calocaves](https://github.com/Ceterai/Enternia/wiki/Calocaves), [Crystalline Prime](https://github.com/Ceterai/Enternia/wiki/Crystalline-Prime), [Isoslime Plasts](https://github.com/Ceterai/Enternia/wiki/Isostratum), [Phospholion Mines](https://github.com/Ceterai/Enternia/wiki/Phospholion-Mines));
- added 2 shallow underground biomes ([Hidden Alta Labs](https://github.com/Ceterai/Enternia/wiki/Hidden-Alta-Labs), [Tonnova Grove](https://github.com/Ceterai/Enternia/wiki/Tonnova-Grove));
- added 4 mid underground biomes ([Alta Lab Debris](https://github.com/Ceterai/Enternia/wiki/Alta-Lab-Debris), [Bishyn Halls](https://github.com/Ceterai/Enternia/wiki/Bishyn-Halls), [Hevika](https://github.com/Ceterai/Enternia/wiki/Hevika), [Shroomic Depths](https://github.com/Ceterai/Enternia/wiki/Shroomic-Depths));
- added 2 deep underground biomes ([Hevika Tunnels](https://github.com/Ceterai/Enternia/wiki/Hevika-Tunnels), [Ionic Hive](https://github.com/Ceterai/Enternia/wiki/Ionic-Hive));
Expand Down
8 changes: 4 additions & 4 deletions .meta/cockpit.config.patch
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{ "op": "add", "path": "/planetTypeColors/ct_alterash_planet", "value": [32, 240, 128] },
{
"op": "add", "path": "/visitableTypeDescription/ct_alterash_planet", "value":[
"The forests of this planet are home to exotic fruits and creatures. Plasts of prisms can be found here, buried in the ground.",
"The forests of this planet are home to exotic fruits and creatures. Layers of prisms can be found here, buried in the ground.",
"Scanners show this planet is covered in dense forests and rivers. Detected weak ^#8020f0;ionic^reset; impulses throughout the atmosphere. Be careful.",
"It seems like this planet is teeming with lifeforms. Scanners detect ^#ffa8e8;stardust^reset; in the atmosphere, as well as high levels of ^#7733aa;electric^reset; charges.",
"Planet is covered in ^#ffa8e8;stardust^reset;. Additionally, the data suggests it is best to not land there at night or during bad weather.",
Expand All @@ -18,12 +18,12 @@
{ "op": "add", "path": "/planetTypeColors/ct_alterash_prime_planet", "value": [32, 128, 240] },
{
"op": "add", "path": "/visitableTypeDescription/ct_alterash_prime_planet", "value":[
"The planet is partially covered in snow. Plasts of crystals and prisms can be found here, buried in the ground.",
"The planet is partially covered in snow. Layers of crystals and prisms can be found here, buried in the ground.",
"Scanners show this planet is covered in grass plains and snowy canyons. Detected strong ^#8020f0;ionic^reset; impulses throughout the atmosphere. Be careful.",
"It seems like this planet is teeming with crystals. Scanners detect ^#2080f0;alternia^reset; in the atmosphere, as well as high levels of ^#7733aa;electric^reset; charges.",
"Planet is covered in snow and crystals. Additionally, the data suggests it is best to not land there at night or during bad weather.",
"High sources of ^#2080f0;alternia^reset; energy detected. Pieces of blue crystals are scattered among plasts of moonstone and moonrocks.",
"A ^#ffa8e8;stardust^reset;-compatible planet. Be cautious of high electricity levels in the air. Geoanalysis detects rare plasts of ^#a7e001;gheatsyn^reset; underground.",
"High sources of ^#2080f0;alternia^reset; energy detected. Pieces of blue crystals are scattered among layers of moonstone and moonrocks.",
"A ^#ffa8e8;stardust^reset;-compatible planet. Be cautious of high electricity levels in the air. Geoanalysis detects rare layers of ^#a7e001;gheatsyn^reset; underground.",
"This planet is inhabited by lifeforms compatible with or immune to ^#2080f0;alternia^reset; effects. The flora consists of rare crops and plants."
]
},
Expand Down
4 changes: 3 additions & 1 deletion .meta/description.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@ I made this mod mainly for myself, but decided to share with everybody.
This mod adds a new playable race, 2 new planets with their own biomes, monsters, many hazards and treasure. The mod adds new unique weapons, armor, cosmetics, augments/collars, spawners, codexes, throwables and other equipment.
All new content can only be found on those 2 planets, is fairly balanced, and thus doesn't interfere with normal gameplay!

Check out the mod page for more info. Or, even better, check the mod's Wiki!
Check out the mod page for more info. Or, even better, check out the mod's Wiki!

Where to start:

- First of all, get the My Enternia Guide at Treasured Trophies!

- To explore the worlds added by this mod, try to find new planet types around tier 3+ stars!

- To start progressing in the mod content, craft an Alta Crafting Station! It should be available at the tier 2 Inventor's Table.
Expand Down
10 changes: 5 additions & 5 deletions .meta/description_sb_forum.bbcode
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ To start progressing in the mod content, craft an [IMG]https://raw.githubusercon

Also, check out a [IMG]https://raw.githubusercontent.com/Ceterai/Enternia/main/codex/alta/ebook/basic.png[/IMG] [URL='https://github.com/Ceterai/Enternia/wiki/Guide-to-My-Enternia']Mod Guide[/URL] codex that you can buy at Treasured Trophies!

Check out full guide on tenants here: [URL='https://github.com/Ceterai/Enternia/wiki/Tenants']My Eternia Wiki: Tenants[/URL]
Check out full guide on tenants here: [URL='https://github.com/Ceterai/Enternia/tree/main/.meta/wiki/tenants.md']My Eternia Wiki: Tenants[/URL]

[SIZE=6]Supported Addons[/SIZE]
[LIST]
Expand All @@ -51,10 +51,10 @@ Check out full guide on tenants here: [URL='https://github.com/Ceterai/Enternia/

[SIZE=6]Content Rundown[/SIZE]

[SPOILER="Some Informative Images"][ATTACH=full]223655[/ATTACH]
[ATTACH=full]223393[/ATTACH]
[ATTACH=full]223394[/ATTACH]
[ATTACH=full]223395[/ATTACH]
[SPOILER="Some Informative Images"][ATTACH=full]223888[/ATTACH]
[ATTACH=full]223889[/ATTACH]
[ATTACH=full]223890[/ATTACH]
[ATTACH=full]223891[/ATTACH]
[/SPOILER]
More information on new weapon features like press&hold, firemodes, attachments and upgrading: [URL='https://github.com/Ceterai/Enternia/wiki/Weapons']My Enternia Wiki: Weapons[/URL]

Expand Down
2 changes: 1 addition & 1 deletion .meta/description_steam.bbcode
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Check out the end of the description for a [b]rundown of new content[/b]. Or, ev
                                             [url=https://community.playstarbound.com/resources/my-enternia.6252/]>>> Starbound Forums page <<<[/url]
                                  [url=https://discord.gg/nHkhbspvyZ][img]https://i.imgur.com/02z6mWj.png[/img][/url] [url=https://www.buymeacoffee.com/ceterai][img]https://i.imgur.com/1hrgBLH.png[/img][/url]
                                      [url=https://steamcommunity.com/sharedfiles/filedetails/?id=3180091750]>>> 🇨🇳 Chinese Patch/中文翻译补丁 🇨🇳 <<<[/url]
                                                    [url=https://github.com/Ceterai/Enternia/wiki/Tenants]>>> Tenant Guide <<<[/url]
                                                    [url=https://github.com/Ceterai/Enternia/tree/main/.meta/wiki/tenants.md]>>> Tenant Guide <<<[/url]

[h3]My Enternia 2.3: Alta Cafe & Monster Buffet is out![/h3]
Bringing lots of organic [b]creatures[/b], [b]bugs[/b], [b]alta furniture[/b] and [b]terraformers[/b], as well as [b]monster eggs[/b] and [b]shielders[/b]!
Expand Down
Binary file added .meta/images/logos/logo_collection.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .meta/images/logos/logo_collection.psd
Binary file not shown.
Binary file added .meta/images/logos/logo_pet_drones.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .meta/images/logos/logo_pet_drones.psd
Binary file not shown.
Binary file added .meta/images/logos/logo_pet_drones_old.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .meta/images/logos/logo_pet_drones_old.psd
Binary file not shown.
Binary file added .meta/images/logos/logo_pet_ignomes.psd
Binary file not shown.
Binary file added .meta/images/logos/logo_pet_narfins.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .meta/images/logos/logo_pet_narfins.psd
Binary file not shown.
Binary file added .meta/images/logos/logo_pet_snuggets.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .meta/images/logos/logo_pet_snuggets.psd
Binary file not shown.
Binary file added .meta/images/logos/logo_pet_triplods.psd
Binary file not shown.
Binary file added .meta/images/logos/logo_v3_96.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .meta/images/logos/logo_v3_96.psd
Binary file not shown.
Binary file modified .meta/images/showcase/2.3.3/ai.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .meta/images/showcase/2.3.3b/ai.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .meta/images/showcase/2.3.3b/ai_alta_sail.png
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.
Binary file added .meta/images/showcase/2.3.3b/body.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .meta/images/showcase/2.3.3b/chip_alta_sail.png
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.
Binary file added .meta/images/showcase/2.3.4/alta_critter.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .meta/images/showcase/body_types/body_types.psd
Binary file not shown.
Binary file added .meta/images/showcase/body_types/flat.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .meta/images/showcase/body_types/full.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 5 additions & 3 deletions .meta/scripts/MPI_support_script.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ def run():
json_patches: list[list[dict]] = [
pyjson5.load(open(base.ROOT + PATH_INPUT)),
'\n ' + HINT,
[ { "op": "test", "path": "/displayEnvironmentStatusEffects" }, ]
[ { "op": "test", "path": "/displayEnvironmentStatusEffects" }, ],
[ { "op": "test", "path": "/weatherThreatValues" }, ],
[ { "op": "test", "path": "/namesList" }, ]
]

# Effects
Expand All @@ -40,13 +42,13 @@ def run():
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])
json_patches[-3].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])
json_patches[-2].extend([{'op': 'add', 'path': f'/weatherThreatValues/{patch[0]}', 'value': patch[1]} for patch in patches])

# Biomes
paths = base.get_files_flat(is_biome)
Expand Down
3 changes: 3 additions & 0 deletions .meta/scripts/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,8 @@ def get_files_flat(filter_f, paths: list[str] = None) -> list[str]:
obj_list.extend(get_files(path, filter_f))
return obj_list

def get_objects(filter_f) -> list[dict[str]]:
return {path: get_obj(path) for path in get_files_flat(filter_f)}

def get_ext(name: str):
return name.split('.')[-1] if '.' in name else ''
168 changes: 168 additions & 0 deletions .meta/scripts/generate_tenant_guide.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,168 @@
import base


WIKI_URL = 'https://raw.githubusercontent.com/wiki/Ceterai/Enternia/'
FILE_PATH = '/.meta/wiki/tenants.md'
CATEGORIES = {
'alta' : '## Alta',
'casual' : '### Casual',
'misc' : '#### Misc',
'tropical' : '#### Tropical',
'special' : '#### Special',
'official' : '### Official',
'lab' : '### Scientific',
'merchant' : '### Merchants',
'biome_merchant' : '#### Biome Merchants',
'guard' : '### Guards',
'guard_l3' : '#### Level 3',
'guard_l4' : '#### Level 4',
'guard_l5' : '#### Level 5',
'guard_l6' : '#### Level 6',
'guard_l7' : '#### Level 7 and above',
'guard_l0' : '#### Unleveled',
'android' : '#### Androids',
}


def is_obj_file(name: str) -> bool:
return (base.get_ext(name) == 'tenant')


def get_image(path: str):
return f'![ ]({WIKI_URL}{path})' if path else ''


class Tenant:
def __init__(self, obj: dict[str]):
self.raw = obj

@property
def desc(self):
return self.raw.get('wiki', {}).get('description', '')

@property
def name(self):
return self.raw.get('wiki', {}).get('title', '')

@property
def id(self):
return self.raw.get('name', '')

@property
def npc(self):
return self.raw.get('tenants', [{}])[0].get('type', '')

@property
def species(self):
return self.raw.get('tenants', [{}])[0].get('species', '')

@property
def tags(self):
tags = self.raw.get('colonyTagCriteria', {})
return {tag: tags[tag] for tag in tags if tag not in ('light', 'door',)}

@property
def tags_str(self):
return ', '.join([f'`{tag}` ({self.tags[tag]})' for tag in self.tags])

@property
def category(self):
return self.raw.get('wiki', {}).get('category', '')

@property
def images(self) -> dict[str]:
return self.raw.get('wiki', {}).get('images', {})

@property
def icon(self) -> str:
return get_image(self.images.get('main'))

@property
def primary_images(self) -> str:
return '\n'.join([get_image(img) for img in self.images.get('primary', [])])

@property
def secondary_images(self) -> str:
return '\n'.join([get_image(img) for img in self.images.get('secondary', [])])

@property
def old_images(self) -> str:
return ('Old variants:\n\n' + '\n'.join([get_image(img) for img in self.images.get('old', [])])) if self.images.get('old') else ''


def get_tenants():
return [Tenant(obj) for obj in base.get_objects(is_obj_file).values()]


def get_tenants_by_cats():
result = {cat : [] for cat in CATEGORIES}
result[''] = []
for tenant in get_tenants():
result[tenant.category].append(tenant)
return result


def get_table_head():
return '''
<tr valign="middle"><th>
Sprite
</th> <th>
Description </th></tr>
'''


def get_table_expand(tenant: Tenant):
return f'''
<details>
<summary>Examples: (Expand)</summary>
{tenant.primary_images}
{tenant.secondary_images}
{tenant.old_images}
</details>
''' if tenant.primary_images or tenant.secondary_images or tenant.old_images else ''


def get_table_row(tenant: Tenant):
return f'''
<tr><td valign="middle" align="middle">
{tenant.icon}
</td><td>
Type: **{tenant.name}**
Tags: {tenant.tags_str}
{tenant.desc}
{get_table_expand(tenant)}
</td></tr>
'''


def get_table(tenants: list[Tenant]):
rows = '\n'.join(get_table_row(tenant) for tenant in tenants)
return f'''
<table> <tbody valign="top">
{get_table_head()}
{rows}
</table>
'''


def get_text():
tenants = get_tenants_by_cats()
body = ''
for cat in CATEGORIES:
body = body + CATEGORIES[cat] + '\n'
if len(tenants[cat]) > 0:
body = body + get_table(tenants[cat])
body = body + '\n'
return body.replace('\n\n\n\n\n', '\n\n').replace('\n\n\n\n', '\n\n').replace('\n\n\n', '\n\n')[:-1]


def run():
with open(base.ROOT + FILE_PATH, 'w') as guide:
guide.write(get_text())
4 changes: 4 additions & 0 deletions .meta/scripts/update_all.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import MPI_support_script as MPI
import EES_support_script as EES
import WI_support_script as WI
import generate_tenant_guide as TG
import json

METADATA_PATH = '/_metadata'
Expand All @@ -29,6 +30,9 @@
EES.run()
WI.run()

# Updates the Tenant Guide
TG.run()

# Prints affected files for your convenience
print('Affected files:\n' + '\n'.join(['- ' + path for path in (
RT.AFFECTED_FILES +
Expand Down
6 changes: 3 additions & 3 deletions .meta/wiki/manual/Modding-Monsters.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ Species pets in this mod can make sounds (often) and sing (rarely).

Scripts implementing that:

- [/monsters/pets/ct_alta_pet_drone/petBehavior.lua](https://github.com/Ceterai/Enternia/blob/main/monsters/pets/ct_alta_pet_drone/petBehavior.lua)
- [/monsters/pets/ct_alta_pet_drone/singState.lua](https://github.com/Ceterai/Enternia/blob/main/monsters/pets/ct_alta_pet_drone/singState.lua)
- [/monsters/pets/ct_alta_pet_drone/soundState.lua](https://github.com/Ceterai/Enternia/blob/main/monsters/pets/ct_alta_pet_drone/soundState.lua)
- [/monsters/alta/pets/drone/petBehavior.lua](https://github.com/Ceterai/Enternia/blob/main/monsters/alta/pets/drone/petBehavior.lua)
- [/monsters/alta/pets/drone/singState.lua](https://github.com/Ceterai/Enternia/blob/main/monsters/alta/pets/drone/singState.lua)
- [/monsters/alta/pets/drone/soundState.lua](https://github.com/Ceterai/Enternia/blob/main/monsters/alta/pets/drone/soundState.lua)

Pet example: [[ Personal Drone ]]
Loading

0 comments on commit 3166911

Please sign in to comment.