Skip to content

Add CreatureManager and entity systems#5

Closed
Segually wants to merge 49 commits into
eris-webserv:mainfrom
Segually:main
Closed

Add CreatureManager and entity systems#5
Segually wants to merge 49 commits into
eris-webserv:mainfrom
Segually:main

Conversation

@Segually

Copy link
Copy Markdown
Contributor

Introduce a new entity subsystem to support custom creatures.

  • Add CreatureManager and Creature classes (Entities.Systems.cs) with: resource registration from embedded .png/.txt pairs, sprite byte loading and Texture2D->Sprite creation, caching, and helper methods to query data lines and names.
  • Add Harmony patches to integrate custom creatures into the game: intercept ResourceControl.GetTextFileLines, override AssignCreatureSprite, hook into CreatureMorpher list generation and LoadPlainCreatureFromDisk, add breeder UI integration and random creature selection.
  • Wire up initialization in Base.GamePlugin.cs: initialize CreatureManager and log its startup time.
  • Add placeholder namespaces files: Entities.Events.cs and Entities.Interfaces.cs.

This change enables packaging custom creature definitions and images as embedded resources and integrates them into existing game lists/UI via runtime patches.

eris-webserv and others added 16 commits March 11, 2026 01:59
Initialize and wire up two new item systems. Base.GamePlugin now initializes WorldPrefabManager and CraftingInjectionManager (with startup timing logs). Added CraftingInjectionManager which lets mods inject items into vanilla crafting lists via a Harmony postfix on inventory_ctr.GetCraftList; insertions are idempotent and support inserting after a specific item. Added WorldPrefabManager which allows registering AssetBundle prefabs for world-placeable items (keyed by item id or World_obj_path) and patches both overloads of ResourceControl.AsyncInstantiateWorldObjectPrefab to supply mod prefabs, instantiating cached assets safely. Includes simple reset/initialize helpers and Harmony patches to integrate with the game.
Add world prefab and crafting injection managers
Introduce a new entity subsystem to support custom creatures.

- Add CreatureManager and Creature classes (Entities.Systems.cs) with: resource registration from embedded .png/.txt pairs, sprite byte loading and Texture2D->Sprite creation, caching, and helper methods to query data lines and names.
- Add Harmony patches to integrate custom creatures into the game: intercept ResourceControl.GetTextFileLines, override AssignCreatureSprite, hook into CreatureMorpher list generation and LoadPlainCreatureFromDisk, add breeder UI integration and random creature selection.
- Wire up initialization in Base.GamePlugin.cs: initialize CreatureManager and log its startup time.
- Add placeholder namespaces files: Entities.Events.cs and Entities.Interfaces.cs.

This change enables packaging custom creature definitions and images as embedded resources and integrates them into existing game lists/UI via runtime patches.
@eris-webserv

Copy link
Copy Markdown
Owner
  1. This should be in Creatures/, not Entities/. Entities is for in-game entities.

Apart from that it looks fine.

Move creature-related types and logic out of Entities into a new Creatures namespace and folder. Adds Creature and CreatureManager (resource registration, sprite caching, and multiple Harmony patches) in HAModHelper.GamePlugin/Creatures and updates Base.GamePlugin to reference Creatures.Systems. Leaves the old Entities.* files emptied/stubbed. Also adds Visual Studio workspace/metadata files (.vs) generated by the IDE.
@Segually

Segually commented Jun 8, 2026

Copy link
Copy Markdown
Contributor Author

@eris-webserv i moved it to creatures

@Segually Segually closed this by deleting the head repository Jul 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants