Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - jabbamonkey

#16
Help / Re: Can't find texture path...
February 09, 2019, 01:35:32 PM
Quote from: LWM on February 09, 2019, 01:02:04 AM
If you look in the RimWorld directory, there's a Mod folder, with a Core folder inside it.  Inside THAT, there are a lot more folders.  The one you want is either Defs or Languages/<your language>.  Search in the XML files for the phrase/term you're looking for.  It will often be tied to a defName or a keyed value you can cross-reference with the code.  (If you're looking for someone else's mod's stuff, it'll be in a different folder - in yet a 3rd location if you're using steam!)

I'm aware of the Core folder with the defs. That was what I was initially using before posting this thread.  But, there are plenty of images that don't show up in there (i.e. alot of User Interface graphics). So, that was why I started looking at decompiling ... to find the other ones.

A good example is the Camellia tree texture ... nothing shows up when I search the CORE folder. And nothing shows up when I search the decompiled files.

An example of a texture that shows up in the decompiled code, but not in the CORE files is the NoRoofArea icon...
Quotethis.icon = ContentFinder<Texture2D>.Get("UI/Designators/NoRoofArea", true);
#17
Help / Re: Can't find texture path...
February 08, 2019, 11:12:58 PM
Ok... so, I decompiled the Assembly-CSharp.dll and got a TON of folders and files. I searched these files (and their content), and looked for specific words ... like "Camellia" (for the camellia tree texture) .. or "Berry" or "Bush" for the generic Berry Bush and didn't get any results with texture paths (results came up, but zero paths were in the document ... and I need the texture paths to know what files to replace).

#18
Help / Re: xpath conditional statement... need help
February 08, 2019, 10:42:33 PM
Quote from: LWM on February 06, 2019, 11:31:45 AM
Your conditional XML has <li class="PatchOperationConditional">.  Instead of <li Class="...">.

Wow. I can officially say that I hate programming. No wonder why I stick to the design side of things. That seems to be working... Let me run through the rest of the mod (and add a ton of other conditionals). Thanks.
#19
Help / Re: xpath conditional statement... need help
February 06, 2019, 11:19:26 AM
Quote from: LWM on February 04, 2019, 08:53:13 PM
Or possibly lowercase 'p'?

I followed the guide on rimworldwiki ... PatchOperationConditional (with caps)
https://rimworldwiki.com/wiki/Modding_Tutorials/PatchOperations#PatchOperationConditional
#20
Help / Re: xpath conditional statement... need help
February 06, 2019, 11:18:35 AM
Quote from: Pelador on February 04, 2019, 07:30:54 PM
It isn't because the class assertion prior to PatchOperationConditional has a lower case "c"?

Otherwise, maybe take it out of the Patch sequence as a standalone operation to see if that's the issue?

This works fine... (but wont work when I have a mod conflict)
Quote<li Class="patchOperationAdd">
         <success>Always</success>
         <xpath>Defs/ThingDef[defName = "ExoskeletonSuit"]</xpath>
         <value>
          <graphicData>
            <texPath>Things/Item/BodyPart/ExoskeletonSuit</texPath>
            <graphicClass>Graphic_Single</graphicClass>
            <drawSize>0.80</drawSize>
          </graphicData>
         </value>
      </li>
... it's when I add the conditional that there is an issue...
#21
Thanks all!
#22
Help / Re: xpath conditional statement... need help
February 04, 2019, 04:56:18 PM
I posted a text file with the complete xml...

http://classicgaming.cc/temp/MedPatches.txt
#23
Help / targetVersion vs. supportedVersion Error Messages
February 04, 2019, 01:23:35 PM
I'm getting a conflicting error message. In my About.xml, I was using <targetVersion> but was getting an error that the tag is deprecated.  So, I tried the recommeneded <supporedVersion><li> tag... but am getting an error from that too...

Below are the two conflicting error messages:

QuoteXML error: <supportedVersion><li>1.0.2150</li></supportedVersion> doesn't correspond to any field in type ModMetaDataInternal. Context: <ModMetaData><name>Jabbamonkey's Furniture Graphics (Set 3 of 6)</name><author>Jabbamonkey</author><url></url><supportedVersion><li>1.0.2150</li></supportedVersion><description>Graphic replacements for furniture, workbenches and miscellaneos objects.</description></ModMetaData>

<targetVersion> in mod About.xml is deprecated! Use <supportedVersions> tag instead. (example: <supportedVersions><li>1.0</li></supportedVersions>)

Full error log is below...
http://classicgaming.cc/temp/targetVersion.txt

Note: I completely got rid of the "targetVersion" from all my mod's About.xml files. Yet it is still showing up in the error.  I did a search in my mod folder for files containing "targetVersion" and no About.xml files appeared.
#24
Help / Re: xpath conditional statement... need help
February 04, 2019, 12:45:13 PM
That didn't solve the issue...

QuoteXML error: <xpath>*/ThingDef[defName = "ExoskeletonSuit"]/graphicData/texPath</xpath> doesn't correspond to any field in type PatchOperation. Context: <li class="PatchOperationConditional"><xpath>*/ThingDef[defName = "ExoskeletonSuit"]/graphicData/texPath</xpath><nomatch Class="PatchOperationAdd"><success>Always</success><xpath>Defs/ThingDef[defName = "ExoskeletonSuit"]</xpath><value><graphicData><texPath>Things/Item/BodyPart/ExoskeletonSuit</texPath><graphicClass>Graphic_Single</graphicClass><drawSize>0.80</drawSize></graphicData></value></nomatch><match Class="PatchOperationReplace"><success>Always</success><xpath>Defs/ThingDef[defName = "ExoskeletonSuit"]/graphicData/texPath</xpath><value><texPath>Things/Item/BodyPart/ExoskeletonSuit</texPath></value></match></li>
#25
Help / Re: Replacing Crops Texture Paths ... Not working
February 04, 2019, 12:44:40 PM
Anyone else know why this is happening? And how to fix it?
#26
Help / Re: xpath conditional statement... need help
January 30, 2019, 03:42:58 PM
Below is part of the log...

QuoteXML error: <xpath>*/ThingDef[defName = "ExoskeletonSuit"]/graphicData/texPath</xpath> doesn't correspond to any field in type PatchOperation. Context: <li class="PatchOperationConditional"><xpath>*/ThingDef[defName = "ExoskeletonSuit"]/graphicData/texPath</xpath><nomatch Class="PatchOperationAdd"><xpath>Defs/ThingDef[defName = "ExoskeletonSuit"]</xpath><value><graphicData><texPath>Things/Item/BodyPart/ExoskeletonSuit</texPath><graphicClass>Graphic_Single</graphicClass><drawSize>0.80</drawSize></graphicData></value></nomatch><match Class="patchOperationReplace"><xpath>Defs/ThingDef[defName = "ExoskeletonSuit"]/graphicData/texPath</xpath><value><texPath>Things/Item/BodyPart/ExoskeletonSuit</texPath></value></match></li>
Seems like it is saying that the path doesn't exist... um, but that is part of the condition. If it "matches", then show X ... it "nomatch" then do Y.  Any idea how to fix this?

#27
Help / Re: xpath conditional statement... need help
January 24, 2019, 09:10:07 AM
Anyone out there good with xpathing? 

I tried using the <match></match> and <nomatch></nomatch> tags to designate the conditional for the xpath... but that obviously didn't work how I intended.

Any help?
#28
Quote from: AileTheAlien on January 18, 2019, 07:07:44 PM
Maybe the game is looking at either the image location for the vanilla game, or for your mod, randomly? What you could do instead, is have all your images in a unique location (for example, "Things\JabbaMonkeysPlants\CornPlant\CornPlant_A.png" instead of using the exact same folder names as the base game) and then patch all the image locations for the plants to look at that location instead of the default location. It would be a bit more work, but should work 100% of the time.

A bit more work is fine ... but that could also cause problems with other mods (which I am trying to avoid).  The way the game works, is that if replacement textures exist, then SHOULD just be replacing the default textures.
#29
Ok, that helped me make some minor path/naming corrections. Now, some of the textures show, some don't. See the image below...



The immature crops aren't showing at all.  And, for the mature crops, sometimes it shows the old texture, and other times it shows the new texture. Odd. Below are the paths and naming convention...

QuoteThings\Plants\CornPlant\CornPlant_A.png
Things\Plants\CornPlant\CornPlant_B.png
Things\Plants\CornPlant_Immature\CornPlant_A.png
Things\Plants\CornPlant_Immature\CornPlant_B.png
(note: I also tried just using Things\Plants\CornPlant_Immature\CornPlant.png for the immature, and that didn't work either)

Things\Plants\CottonPlant\CottonPlant_A.png
Things\Plants\CottonPlant\CottonPlant_B.png
Things\Plants\CottonPlant\CottonPlant_C.png
Things\Plants\CottonPlant_Immature\CottonPlant_A.png
Things\Plants\CottonPlant_Immature\CottonPlant_B.png
Things\Plants\CottonPlant_Immature\CottonPlant_C.png
#30
Help / Replacing Crops Texture Paths ... Not working
January 17, 2019, 01:29:49 PM
So, I am trying to redo the crops (cause some of them look a little too "cartoonish" for me). I tried recreating the textures, and used the DEF to find the correct paths and names, but the textures are still not working...

For cotton, I searched the Defs, and found the following paths for the cotton plant in Plants_Cultivated_Farms.xml ....
QuoteTextures\Things\Plant\CottonPlant
Textures\Things\Plant\CottonPlant_Immature

So, since the graphicclass is GraphicRandom, I placed the images as such...

QuoteTextures\Things\Plant\CottonPlant\CottonPlantA.png
Textures\Things\Plant\CottonPlant\CottonPlantB.png
(note: I also tried just using a single image CottonPlant.png)

Textures\Things\Plant\CottonPlant_Immature\CottonPlant_Immature.png
(note: I also tried renaming the immature image CottonPlant.png in that folder)

But none of these worked.  I even tried just placing both images in the Plant/ folder (with no subfolders).  Any idea what's wrong?  I have a TON of other crops to redo, and can't get the first few working... 

Thanks