Ради вашего удобства наш сайт использует cookies! Узнать больше! Мы используем cookies

NareisLib

NareisLib The following introduction utilizes GPT for translation. [b] This is a custom multi-layer rendering mod built on vanilla RimWorld and the HumanAlienRace mod ------ but since the 1.5 update some functionality now overlaps with vanilla; blame Tynan ;P [/b] [hr] 1. Defining textures for vanilla defs For example: [list] [*] Take a HairDef whose defName is Test_Hair; [*] In another XML file, define a MultiTexDef—its defName can be anything—and set its originalDef property to Test_Hair; [*] This means the MultiTexDef is created for the HairDef named Test_Hair, and the two are now linked; [*] You can define multiple layers inside the MultiTexDef. When the game renders the linked HairDef, it automatically detects the layers defined in the MultiTexDef and renders them together. [/list] [u]This is just a rough workflow example. For actual usage, see the [url=https://steamcommunity.com/linkfilter/?u=https%3A%2F%2Fgithub.com%2FKamijouko%2FNareisLib%2Fwiki]wiki guide[/url][github.com].[/u] Defs on a pawn that you can target include: BodyDef, HeadDef, HairDef, Apparel (clothing), and HandTypeDef. [hr] 2. Custom multi-layer textures —— this currently overlaps with vanilla functionality; blame Tynan XD As the name implies, you can define multiple identical or different texture layers within a MultiTexDef. Before listing the layers, you need to understand a bit about RimWorld’s pawn rendering mechanics: [list] [*] RimWorld primarily renders pawns using Unity’s DrawMesh function; [*] A pawn roughly consists of two parts: the head and the body; [*] As the function name suggests, each part corresponds to a Mesh, and textures must be drawn onto that Mesh, which comes either from the game’s internal mesh pool or is generated on the fly; P.S.: Vanilla RimWorld cannot render very large textures because of mesh size limitations; [*] When vanilla draws meshes, the spacing between each mesh layer is extremely small (on the order of two to three zeros after the decimal point). When that spacing is smaller than the GPU’s highest precision, the rendering order is determined by the order in which the function is executed (the one called first ends up underneath); [*] Unlike traditional Unity games, RimWorld uses the Y-axis as the height axis (normally this would be Z), so X and Z are the width and height of the image, and Y determines its elevation. [/list] This mod augments and modifies the vanilla rendering functions to define several selectable layers: Layer heights increase from top to bottom. [list] [*] BottomOverlay [*] BottomHair [*] BottomShell [*] Body [*] Apparel [*] Hand [*] Head [*] FaceMask [*] Hair [*] FrontShell [*] HeadMask [*] Hat [*] Overlay [/list] Among these, Body, Apparel, Head, FaceMask, and Hair are the vanilla pawn body parts. They represent the pawn’s body, clothing/gear/headgear, head, facial makeup/beards, and hair, respectively, while the other layers revolve around these parts. Their default render order matches the list above. The list does not mean you can only set up 13 layers; the layers define the baseline Y-offsets. By assigning textures to any of the layers above in XML and adjusting their properties, you achieve multi-layer rendering—that’s the core functionality of this mod. [hr] 3. Mod load order [list] [*] Harmony [*] Core [*] All DLCs [*] Human Alien Races [*] [b][u]NareisLib[/u][/b] (this mod) [*] Mods that use NareisLib [/list] In theory, any mod that doesn’t use NareisLib can load before it. [hr] 4. Known issues (Rimworld 1.4 only) RimWorld 1.4: Requires [url=https://steamcommunity.com/workshop/filedetails/?id=818773962]HugsLib[/url] (subscribe first). Conflicts with most mods that alter the rendering logic. Known conflicts include: [url=https://steamcommunity.com/sharedfiles/filedetails/?id=1542291825]Hats Display Selection[/url] (affects hat/hair rendering) [url=https://steamcommunity.com/sharedfiles/filedetails/?id=2879080074][CAT] Show Hair With Hats or Hide All Hats[/url] (affects hat/hair rendering) [url=https://steamcommunity.com/sharedfiles/filedetails/?id=2890901044]Combat Extended[/url] (affects hat/hair rendering) [url=https://steamcommunity.com/sharedfiles/filedetails/?id=2723801948]Vanilla Factions Expanded - Pirates[/url] (sarcophagi affect global pawn rendering) [url=https://steamcommunity.com/sharedfiles/filedetails/?id=2296697286]Dubs Apparel Tweaks[/url] (features that alter hat and hair display affect hat/hair rendering) [url=https://steamcommunity.com/sharedfiles/filedetails/?id=2747392932]Stylish Rim[/url] (affects global pawn rendering) RJW Animation Framework (affects global pawn rendering) For hair rendering incompatibilities, the framework currently forces all hairstyles to display in-game; customizable settings will be added later. Since version 1.5 adopts the same rendering logic as vanilla, the mods listed above are (theoretically) compatible—thanks, Tynan. [hr] 5. Mods currently using this framework [url=https://steamcommunity.com/sharedfiles/filedetails/?id=3034077531][img]https://images.steamusercontent.com/ugc/2485516526278761540/A5674C79BF121341281155B012E68753BD984922/?imw=600&imh=390&ima=fit&impolicy=Letterbox&imcolor=%23000000&letterbox=false[/img][/url] [url=https://steamcommunity.com/sharedfiles/filedetails/?id=3034078059][img]https://images.steamusercontent.com/ugc/2057637239587033047/E44B3F6147C6F0B5947E82ABBAAE20B51FF177C2/?imw=125&imh=80&ima=fit&impolicy=Letterbox&imcolor=%23000000&letterbox=false[/img][/url][url=https://steamcommunity.com/sharedfiles/filedetails/?id=3034078602][img]https://images.steamusercontent.com/ugc/2057637239587034795/645A8B1DBA079D3D4FDD296F2AF037650335712C/?imw=125&imh=80&ima=fit&impolicy=Letterbox&imcolor=%23000000&letterbox=false[/img][/url][url=https://steamcommunity.com/sharedfiles/filedetails/?id=3034079349][img]https://images.steamusercontent.com/ugc/2057637239587044043/F5DDEB7DCDD21BFAF56F86109FB4203E48659EC3/?imw=125&imh=80&ima=fit&impolicy=Letterbox&imcolor=%23000000&letterbox=false[/img][/url][url=https://steamcommunity.com/sharedfiles/filedetails/?id=3124872587][img]https://images.steamusercontent.com/ugc/2314351841352424528/3F9280314A66B8C6B8055A3EDD181C150539EC34/?imw=125&imh=80&ima=fit&impolicy=Letterbox&imcolor=%23000000&letterbox=false[/img][/url][url=https://steamcommunity.com/sharedfiles/filedetails/?id=3353962716][img]https://images.steamusercontent.com/ugc/2485516526278760780/0AAC50135E16EC2F33F37EE3D530CAE7C1E7D292/?imw=125&imh=80&ima=fit&impolicy=Letterbox&imcolor=%23000000&letterbox=false[/img][/url] [url=https://steamcommunity.com/sharedfiles/filedetails/?id=3034077531]1. [b]Annelitrice 3.0[/b] main[/url] [url=https://steamcommunity.com/sharedfiles/filedetails/?id=3034078059]2. [b]Annelitrice-3.0-Yorha[/b] Nier theme[/url] [url=https://steamcommunity.com/sharedfiles/filedetails/?id=3034078602]3. [b]Annelitrice-3.0-Gakuen[/b] Japanese school drama theme[/url] [url=https://steamcommunity.com/sharedfiles/filedetails/?id=3034079349]4. [b]Annelitrice-3.0-Jurnizia[/b] Caucasian war theme[/url] [url=https://steamcommunity.com/sharedfiles/filedetails/?id=3124872587]5. [b]Annelitrice-3.0-Ahmislan[/b] Medieval(isekai) theme[/url] [url=https://steamcommunity.com/sharedfiles/filedetails/?id=3353962716]6. [b]Annelitrice-3.0-Neo-Yokohama[/b] Cyberpunk theme[/url] [hr] 6. About this framework [url=https://steamcommunity.com/linkfilter/?u=https%3A%2F%2Fgithub.com%2FKamijouko%2FNareisLib]GitHub[/url][github.com] [url=https://steamcommunity.com/linkfilter/?u=https%3A%2F%2Fgithub.com%2FKamijouko%2FNareisLib%2Fwiki]Wiki guide[/url][github.com] [b] 1.6 removed part of the spaghetti code [/b]