RimWorld

RimWorld

124 ratings
PIGEON's Texture Finder
3
   
Award
Favorite
Favorited
Unfavorite
Mod, 1.1, 1.2
File Size
Posted
Updated
1.474 MB
Sep 8, 2020 @ 8:27am
Sep 10, 2020 @ 9:53pm
5 Change Notes ( view )

Subscribe to download
PIGEON's Texture Finder

Description
========================NOTICE======================
Now you can visit online editor and make your config.xml at htmlpreview.github , please click here [htmlpreview.github.io]

First, you can add Gobal Exclude Folders\Gobal AlienBodyTypes and Package easily on the left , and the web will update the code on the right once you have make a change.

The only thing you should do is config what you want and DOWNLOAD it by "Save as a config.xml" then OVERRIDE your config.xml file at "Mods\2223312012\config\config.xml" or "steam\steamapps\workshop\content\294100\2223312012\config\config.xml"

========================Introduction===================
查看中文版 [tieba.baidu.com]

Localized this mod and bak your config.xml is appreciated , bcoz i will update config.xml in need and it will cover your config.xml you had modified.

This mod is coding to fix the problems of Rimworld can't find apparel texture path when alien wearing cloth.

For user , u can use this mod simply to slove the "texutre not found " problem when lift alien stress restrictions.

For modder , u can make one texture and apply it to all alien by useing this mod , which will reduce ur duplication of work, and save time to make mod about Apparel .

As this mod's default setting, you can let ur Dragonian wear ratkin's / rakkle 's / moyo 's and etc 's clothes without PINK BOX ( The premise is that your alien can wear it , here is a patch ) , other's alien is the same. (even kurin's cloth , but now i don't have time to make it, and there are some problems when translates HAR to GAR /GAR to HAR. )

This is a mod help you config your setting, reduce the probability of pink box that unnecessary to appear , but no a final way to solve pink box.

u can browse English version below .


===================================================

Why pink box appear

Texture's path loading in your game generated by rule : textureName + postfix + direction .png

For "direction" , 3 value def : "_north" , "_south " and "_east" ( while "west" can imaged by "east" )

For "postfix" , it can be "_Female" and "_Male" as default , but also can be def by Mod's developer ,which can found in thier race.xml or code , in bodyTypes node.

So why pink box appear? it's maybe u order a incompatible bodyType (such as B) pawn dress different clothes in different bodyType (such as A). And rimworld will resolve itself's bodyType as postfix , a error path and lead to pink box. (For this example , the true path should be "clothesName_A.png" while our game resolve it as "clothesName_B.png" ).

And my litte code is to help our parser redirect the route to true path.

How it work

It's designed to make multiple associated path to the right path .

First, it will resolve "AppendGobal" and "ExcludeFoldersGobal" nodes from config.xml (It is a global variable ) as user setting .

Then it will read all the mods you define (through the "packageId" in config.xml) and exclude the folders you dont want them to read (defined in "ExcludeFoldersGobal" and "ExcludeFolders". by using them, u can save time when loading ur game).

Next, it will read all the textures under the mod file (by packageId) and associate its path to the path (specified in the AppendGobal variable. and this step works in memory, so no extra files appear).

How to config as i want ?

I've configured DragonianRace\RatkinRaceMod\Rakkle\AncientSpecies in config.xml, so u can run it directly and let ur girls wear others race's cloth (Once you lifts their clothing restrictions by patch, and you can't see pink box from apparel anymore).

For config.xml ( you can find config.xml at this mod path such as "..\steam..\RimWorld\Mods\2223312012\config\config.xml" ( in this mod's config folder) ), u can make it as fllow:

--AppendGobal : Defines the node that complements the postfix to ur game. this node will resoulve the "<li></li>" nodes under him and make it as a postfix list.

As a texture called "Cloth_east.png" , your game may get red error when wearing by Dragonian bcoz it can't find a texture name "Cloth_Female_east.png" (which def by Dragonian ), the way you can do is def my config , setting->AppendGobal,and add <li>Female</li>, it will solve the problems. (And for rakkle, u should add one node: <li>RakkleF</li> , which you can see at their mod's def, from <alienbodytypes></alienbodytypes> in **race.xml that def the race )

--ExcludeFoldersGobal : Remind the program don't look texture from /mod/ExcludeFoldersGobal's def , it is a global variable. for example , u can add a node <li>Weapon</li>, and this mod will skip to associated the texture (which in Weapon folder ) under all the mod (def in packageIds) in order to save loading time.


--packages: the collection of which mods you want me to find.

----package: composition of order to find a mod .

----packageId: which mod can be find and associate.

----excludeFolders: which folder in packageId should be skip by program.(this is a local variable, work under one package, can easily help program scan some folder that no common like weapon, bodies, etc. )


More Example
If your Alien can't find texture named A (from the folder / texture / apparel / cloth / at B mod), and the < alienBodyTypes > is def as C, you can define the following config.xml:
<AppendGobal>

<li>C</li>

</AppendGobal>


<ExcludeFoldersGobal>

<!-- can be skip ->

</ExcludeFoldersGobal>


<packages>

<package>

<packageId>

B's packageId

</packageId>

<excludeFolders>

<!-- here can be skip ->

</excludeFolders>

</package>

</packages>


A config for GloomyLynx's Dragonian Race can be config as :

<package>
<packageId>
GloomyLynx.DragonianRace
</packageId>
<excludeFolders>
<li>Body</li>
<li>Hair</li>
<li>Head</li>
<li>Things</li>
<li>Weapon</li>
</excludeFolders>
</package>

It will exclude "Body\Hair\Head\Things\Weapon" folders and scan other folders under Dragonian's mod and generated paths (maybe some paths are redundant but i think it have a small part impact.) when starting your program.

Load order

load this mod after all the apparel mod.

Compatibility

It should not be incompatible

can add in saved-game.

Why do it

alien should wear clothes as she want .

Compared to copying texture to a folder , which not only caused some problems like permission etc, this mod make it possible to reduce hard disk memory caused by texture problems ( Although it's only 30MB or less ), by only redirect its path to be correct. ( and it still has a lot of room for optimization) .

Support Version

works both 1.1 and 1.2 well

No steam version

u can download it at github [github.com] .
Source included.

38 Comments
zellmos Aug 17, 2024 @ 6:58am 
大佬 这mod还会更新吗? 感觉完全找不到能替代你这个的mod了
...-.. Nov 24, 2023 @ 9:32pm 
IS THIS STILL BEING UPDATED?
noahzxc119 Sep 12, 2021 @ 8:08pm 
老哥还会更新1.3版本么
路人公 Jul 24, 2021 @ 8:31am 
大佬,您的mod如果使用mod manager备份后,备份的mod就会失效,有不能读取配置的红字:使用在线版本就没有这个问题。。。不知道原因
虽然这个并不影响游玩就是了
Highlandman Jul 23, 2021 @ 10:00pm 
Good day. Will this mod be updated for 1.3 patch? Many thanks.
5DollarBladeJob Jan 3, 2021 @ 1:01am 
@PIGE ON I ran into the same problem when trying to find a solution for this problem but actually I managed to figure out a solution using your mod. I downloaded a high res mod pack which replaced all the vanilla and royalty assets with mod assets located in a texture file. Using your config I targeted this folder's assets instead of the root textures so everything works now. Kurins can wear the vanilla clothes and other mod's clothes.
PIGE 0N  [author] Jan 2, 2021 @ 11:19pm 
@Me a Pussie
it is quite inconvenient to do that.
The roya's path listed likes : /Textures/Things/xxx.jpg and so on. (So a new patch is required, for the reason that my patch is defined as : /Textures/Things/AlienRace/xxx.jpg)
And, the most important problem is that Kurin is developed under GAR framework so the above setting would not work actually.
I have noticed this problem, but I have no time to solve it in the past six months. sorry.
PIGE 0N  [author] Jan 2, 2021 @ 11:09pm 
@{SK} That Lamer
restrict clothing has different realization under different frameworks.
you can add gender restrict in setting.xml to prevent the problem.
e.g. Add a postfix in setting likes <li>male</li> to redirect the path to the male. (Then pink box disappear).
or : add male restrict, which correcorresponds to node <raceRestriction></raceRestriction>. (Then male can not wear moyo's clothing.
PIGE 0N  [author] Jan 2, 2021 @ 11:01pm 
@warmainiac
In fact, androids is a human race, so it is possible to realize that with a right setting
5DollarBladeJob Dec 22, 2020 @ 3:19pm 
Hi there, I followed your instructions and managed to get this mod working for clothing from Rimworld of Magic to work on Kurins but how do I get this to work with the base game's armor and clothing? When I tried to add the package id of royalty and core, the textures folder is not listed in either one of the core files and are apparently packaged into the game. How do I get your mod to scan for those clothing items? Thanks!