Texture Loading Problem

Started by bonmar14, January 20, 2018, 06:20:57 AM

Previous topic - Next topic

bonmar14

Total beginners mistake i made i think. I made a custom melee weapon with a custom made textures that I made with everything in the weapon code checked by comparing the core file with mine when loading in to the game from startup it gives me an error and I think its with the texture I made. Can any of you reading this help me out with this. even tho every thing is in the right folders


Could not load UnityEngine.Texture2D at Things/Item/DualSword in any active mod or in base resources.
Verse.Log:Error(String)
Verse.ContentFinder`1:Get(String, Boolean)
Verse.Graphic_Single:Init(GraphicRequest)
Verse.GraphicDatabase:GetInner(GraphicRequest)
Verse.GraphicDatabase:Get(Type, String, Shader, Vector2, Color, Color, GraphicData)
Verse.GraphicData:Init()
Verse.GraphicData:get_Graphic()
Verse.ThingDef:<PostLoad>m__3()
Verse.LongEventHandler:ExecuteToExecuteWhenFinished()
Verse.LongEventHandler:UpdateCurrentAsynchronousEvent()
Verse.LongEventHandler:LongEventsUpdate(Boolean&)
Verse.Root:Update_Patch1(Object)
Verse.Root_Entry:Update()

and this comes with this bellow it

MatFrom with null sourceTex.
Verse.Log:Error(String)
Verse.MaterialPool:MatFrom(MaterialRequest)
Verse.Graphic_Single:Init(GraphicRequest)
Verse.GraphicDatabase:GetInner(GraphicRequest)
Verse.GraphicDatabase:Get(Type, String, Shader, Vector2, Color, Color, GraphicData)
Verse.GraphicData:Init()
Verse.GraphicData:get_Graphic()
Verse.ThingDef:<PostLoad>m__3()
Verse.LongEventHandler:ExecuteToExecuteWhenFinished()
Verse.LongEventHandler:UpdateCurrentAsynchronousEvent()
Verse.LongEventHandler:LongEventsUpdate(Boolean&)
Verse.Root:Update_Patch1(Object)
Verse.Root_Entry:Update()



sulusdacor

QuoteI think its with the texture I made
if you test/make mods only load stuff you absolutly need. means vanilla+your mod or if you have other mods it wants to add on to and uses items form them, then these. first you should make sure all runs without error before adding "your stuff" ;)

Could not load UnityEngine.Texture2D at Things/Item/DualSword in any active mod or in base resources.
the game looks for Rimworld/mods/yourmodnamefolder/Textures/Things/Item/DualSword.png

make sure:
- your texture path/folder is the right one (compare to vanilla/other mods)
- texture is the right format+size (usally png and most weapons have 64x64 pixels i think)

the vanilla art ressource and the auto xml documentation help alot (both things pinned here in the subforum). you can just look for a melee weapon in vanilla: the texture and then find the xml files path via autodocumentation in your core folder.

in the end i would look for something that does something similar or quite similar to what you want to do - compare and work of it as a preset. the smaller and less complex your preset the better.

good luck :D

bonmar14

Ok thank you very much for helping out