Jump to content

Custom Character: Can't find prefab


Recommended Posts

So I am making a custom character called Haley and my character seems to work fine in character select, however, once I press "Go" to enter the world, I get stuck on an infinite load screen. I checked the log and I think it is due to the error "Can't find prefab haley". 

I'm pretty sure my modmain.lua is set up correctly. 

PrefabFiles = {
    "Haley",
    "Haley_none",
}

Assets = {
    Asset( "IMAGE", "images/saveslot_portraits/Haley.tex" ),
    Asset( "ATLAS", "images/saveslot_portraits/Haley.xml" ),

    Asset( "IMAGE", "images/selectscreen_portraits/Haley.tex" ),
    Asset( "ATLAS", "images/selectscreen_portraits/Haley.xml" ),
    
    Asset( "IMAGE", "images/selectscreen_portraits/Haley_silho.tex" ),
    Asset( "ATLAS", "images/selectscreen_portraits/Haley_silho.xml" ),

    Asset( "IMAGE", "bigportraits/Haley.tex" ),
    Asset( "ATLAS", "bigportraits/Haley.xml" ),
    
    Asset( "IMAGE", "images/map_icons/Haley.tex" ),
    Asset( "ATLAS", "images/map_icons/Haley.xml" ),
    
    Asset( "IMAGE", "images/avatars/avatar_Haley.tex" ),
    Asset( "ATLAS", "images/avatars/avatar_Haley.xml" ),
    
    Asset( "IMAGE", "images/avatars/avatar_ghost_Haley.tex" ),
    Asset( "ATLAS", "images/avatars/avatar_ghost_Haley.xml" ),
    
    Asset( "IMAGE", "images/avatars/self_inspect_Haley.tex" ),
    Asset( "ATLAS", "images/avatars/self_inspect_Haley.xml" ),
    
    Asset( "IMAGE", "images/names_Haley.tex" ),
    Asset( "ATLAS", "images/names_Haley.xml" ),
    
    Asset( "IMAGE", "images/names_gold_Haley.tex" ),
    Asset( "ATLAS", "images/names_gold_Haley.xml" ),
}

My Haley.lua and Haley_none.lua are also in the scripts/prefabs directory. 

My log is attached below, I would really appreciate the help. 

log.txt

  • Spool 1
Link to comment
Share on other sites

31 minutes ago, decduck3 said:

It says it can't find "Haley.tex" not Haley. Make sure you have all textures in the right place and imported correctly

This is actually an error I see in a lot of mods myself, no idea how to fix it, but it never seems to make the game crash.

Link to comment
Share on other sites

I am pretty sure you can just delete saveslot_portraits and selectscreen_portraits, as they aren't used in dst as far as I can tell.
This error seems to be the classic error that the template readme files talk about.
From notes v1.2.1

The contents of this folder are converted by the autocompiler. If you wish to do this manually using TEXTool instead, don't use the png provided, and export a new png from the tex first.

V1.2.1
After compiling names_[character].png, open names_[character].xml in a text editor.
Change the Element name to "[character].tex". (Do not change the Texture filename)

Example:
<Atlas>
	<Texture filename="names_character.tex" />
	<Elements>
		<Element name="character.tex" u1="0.00048828125" u2="0.85498046875" v1="0.1533203125" v2="0.9990234375" />
	</Elements>
</Atlas>

replace character with Haley

Edited by IronHunter
  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
  • Create New...