Jump to content

modding character problem


Recommended Posts

the problem that I cant aviod when making my character is that when ever i generate the world then try to switch to my character it just says this ../mod/hatty/selectecreen_portraits/hatty.xml

LUA ERROR stack traceback:

scripts/widgets/image.lua(30,1) in function 'SetTexture'

scipts/screens/lobbyscreen.lua(270,1) in function 'SelectAndScroll

scipts/screens/lobbyscreen.lua(192,1) in functtion 'onclick'

scipts/screens/imagebutton.lua(90,1) in fuction 'On Control'

scripts/widgets/widget.lua(115,1) in fuction 'On Control'

scripts/widgets/widget.lua(115,1) in fuction 'On Control'

as you can see here I am very desperate for help so it would be much aprceated if you could help me

Link to comment
Share on other sites

scripts/widgets/image.lua(30,1) in function 'SetTexture'
 I went and looked at this line in the files (which is what you should do if you are debugging mods in the future), and found this:
    self.inst.ImageWidget:SetTexture(self.atlas, self.texture, default_tex)

It's weird that your error was cut off like that, but my guess is that one of those arguments (self.atlas, self.texture) is nil.

 

Going to the next line of the stack trace:

scipts/screens/lobbyscreen.lua(270,1) in function 'SelectAndScroll
 
		local character = self:GetCharacterForPortrait(k)				self.portrait_bgs[k]:GetAnimState():PlayAnimation(k == self.portrait_idx and "selected" or "idle", true)		local atlas = (table.contains(MODCHARACTERLIST, character) and "images/selectscreen_portraits/"..character..".xml") or "images/selectscreen_portraits.xml"		local atlas_silho = (table.contains(MODCHARACTERLIST, character) and "images/selectscreen_portraits/"..character.."_silho.xml") or "images/selectscreen_portraits.xml"		if not self.profile:IsCharacterUnlocked(character) then			self.portraits[k]:SetTexture( atlas_silho, character.."_silho.tex")		else			self.portraits[k]:SetTexture( atlas, character..".tex")		end

Do you have a file images/selectscreen_portraits/hatty.xml in your mod? You both need it in the mod, and also need to be declaring it as part of the Assets table in the modmain. Look at other character mods for reference.

Link to comment
Share on other sites

Hi guys, I'm very new to creating mods and thought I would have a go too. I am also getting the same issues as above and no matter what I try doing. (new files, copying other mods and starting from scratch.) I still get the same errors. I have taken screenshots of the offending file and hopefully get some tips/advice.

 

 

Error I get when select the character > http://i.imgur.com/b6Xs2EJ.png

 

The xml file code its refering to > http://i.imgur.com/WWrq4vA.png

 

In response to what Rezecib suggested about it being in the modmain I confirmed it is > http://i.imgur.com/LJ7c3F2.png

 

I'm still getting the error and have no idea what to do.  :wilson_cry:

 

Thanks in advance for helping a complete noob.

 

-Leo

 

Link to comment
Share on other sites

@rezecib hey, could you help with my similar problem? ._. 

I've got error when enering the server. In DS my mod works just fine, no crashes and stuff, but here i can't do anything with it, i don't even know what to do.

 

My XML file should be good:

 

- <Atlas>
  <Texture filename="avatar_fak.tex" />
- <Elements>
  <Element name="avatar_fak.tex" u1="0.0078125" u2="0.9921875" v1="0.0078125" v2="0.9921875" />
  </Elements>
  </Atlas>
 
^that's it.
 
So what do I have to do now?
 
Here's screen with my problem.
 
post-551847-0-41723000-1420838763_thumb.

 

 

Please, help, I can't find the answer anywhere

Link to comment
Share on other sites

@fakisiel, Look at Leo's third image. Do you have an entry there for both the xml (ATLAS) and the tex (IMAGE)? 

 

Edit: But there's probably more information than what you posted in your log file. The specific error message is totally cut off at the start, there.

Edited by rezecib
Link to comment
Share on other sites

@fakisiel, Look at Leo's third image. Do you have an entry there for both the xml (ATLAS) and the tex (IMAGE)? 

 

Edit: But there's probably more information than what you posted in your log file. The specific error message is totally cut off at the start, there.

 

I figured out how to fix it :) Thanks for help anyway.

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...