[Resolved]Texture problem

Started by Gary Bastard, November 02, 2017, 08:54:50 AM

Previous topic - Next topic

Gary Bastard

[I was told that I put my post in the wrong place, so I'm doing it again her]

Hello,
I understand the basics of modding (xml...), but i got one problem with the texpath.In the .xml file for the gun that i want to add i do:
<texpath>Thing/Item/Equipment/RangedWeapon/XXXPistol</texpath> and i add texture folder following by Thing/Item...and the XXXPistol,
but when i start the game, it says:

Could not load UnityEngine.Texture2D at
Thing/Item/Equipment/RangedWeapon/XXXPistol in any active mod or in base
MatFrom withh null sourceTex

I don't understand why, if anybody know why, please save me, I can not stand it anymore.XD

sorry if i do english errors, i'm pretty bad in english.
If the hares had guns, we would not kill them so much.
                                                French proverb, 1823

CannibarRechter

Did you make XXXPistol a folder? Graphic_Single wants a path to the FILE, but without the file extension.
CR All Mods and Tools Download Link
CR Total Texture Overhaul : Gives RimWorld a Natural Feel
CR Moddable: make RimWorld more moddable.
CR CompFX: display dynamic effects over RimWorld objects

Gary Bastard

Quote from: CannibarRechter on November 02, 2017, 10:55:21 AM
Did you make XXXPistol a folder? Graphic_Single wants a path to the FILE, but without the file extension.
I did it after seeing you message, but nothing has change.I think i forgot something or doing bad, maybe it's truly stupid but i don't understand (maybe my texture for the gun is not correct after all).
If the hares had guns, we would not kill them so much.
                                                French proverb, 1823

CannibarRechter

Provide some more detail.

Exact snip of Tex path.

Exact full path including file extension of image.

Size of image in pixel height and width.
CR All Mods and Tools Download Link
CR Total Texture Overhaul : Gives RimWorld a Natural Feel
CR Moddable: make RimWorld more moddable.
CR CompFX: display dynamic effects over RimWorld objects

Gary Bastard

#4
Quote from: CannibarRechter on November 02, 2017, 11:24:01 AM
Provide some more detail.

Exact snip of Tex path.

Exact full path including file extension of image.

Size of image in pixel height and width.
Exact snip of texPath=not sure i have understand what is it, can you explain me?(i'm dumb XD)

full path on .xml file= <texPath>Thing/Item/Equipment/RangedWeapon/XXXPistol</texPath>
path on folder= Mod/XXXPistolTest/Texture/Thing/Item/Equipment/RangedWeapon/XXXPistol+XXXPistol.png

size of image:64*64 pixels.

If you want:


  <graphicData>
      <texPath>Texture/Thing/Item/Equipment/RangedWeapon/XXXPistol</texPath>
      <graphicClass>Graphic_Single</graphicClass>
  </graphicData>
If the hares had guns, we would not kill them so much.
                                                French proverb, 1823

CannibarRechter

#5
There should be a file called "XXXPistol.png" in the ranged weapons directory. You should also check "Texture", because I thought it was supposed to be "Textures". I'm not in front of my computer to double check.u

Edit, also looking at your XML, you should be aware that "Textures" is the "/" root directory and need not be referenced. I suggest you download my textures mod and read thru it.
CR All Mods and Tools Download Link
CR Total Texture Overhaul : Gives RimWorld a Natural Feel
CR Moddable: make RimWorld more moddable.
CR CompFX: display dynamic effects over RimWorld objects

Gary Bastard

Problem solved, I do not know why since I made a texture file and a correct texpath (I look at your texture pack, it's fine ^^)
I think the problem had to come from my texture, it must not be consistent for rimworld.
So a big thank you, I will be able to start modder like a big XD.
If the hares had guns, we would not kill them so much.
                                                French proverb, 1823