Majic-Jungle / sapiens-mod-creation

Official tools and examples for mod creation in the game Sapiens
MIT License
54 stars 12 forks source link

Expose 'sapien.lua' (modelComposite) #13

Closed SirLich closed 2 years ago

SirLich commented 2 years ago

This file is pretty much 100% locked down. The only exposed function is modelComposite:generate.

Why: @13єrѕєrk on discord wants to create new hairstyles for the Sapiens.

My Suggestion: I honestly don't know what needs to be exposed to make this modifiable.

I guess I would start by exposing the raw data like beardPaths or skinMaterials. You should also expose getPath function if possible, but this is tricky cause it's inlined inside of modelComposite:generate, and appears to rely on data there like sharedState and hash.

generateRemap should probably be exposed.

Last note: Huge functions (even if exposed), are kinda 'meh' to shadow, because they encapsulate too many state changes! If possible, breaking apart large functions like modelComposite:generate makes our job modding much easier.

mjdave commented 2 years ago

fixed b21