Jump to content

Custom Character producing errors


Recommended Posts

I accidently posted this in the wrong section at first, oops

 

So I've started to develop a new character and I've been running into some odd errors. The crash_log is giving me this error

Quote

[00:04:14]: [string "scripts/util.lua"]:470: Could not find an asset matching bigportraits/Sarah.xml in any of the search paths.
LUA ERROR stack traceback:
    =[C]:-1 in (global) assert (C) <-1--1>
    scripts/util.lua:470 in (global) resolvefilepath (Lua) <465-473>
    scripts/widgets/image.lua:31 in (method) SetTexture (Lua) <27-38>
    scripts/widgets/imagebutton.lua:110 in (method) OnLoseFocus (Lua) <104-124>
    scripts/widgets/imagebutton.lua:70 in (method) SetTextures (Lua) <31-75>
    scripts/widgets/characterselect.lua:146 in (method) SetPortrait (Lua) <125-157>
    scripts/widgets/characterselect.lua:20 in (field) _ctor (Lua) <11-24>
    scripts/class.lua:181 in (upvalue) CharacterSelect (Lua) <171-184>
    scripts/screens/lobbyscreen.lua:239 in (field) _ctor (Lua) <44-254>
    scripts/class.lua:181 in (local) LobbyScreen (Lua) <171-184>
    scripts/mainfunctions.lua:1272 in () ? (Lua) <1266-1276>
    =[C]:-1 in (method) SendResumeRequestToServer (C) <-1--1>
    scripts/prefabs/world_network.lua:30 in (field) fn (Lua) <19-34>
    scripts/scheduler.lua:177 in (method) OnTick (Lua) <155-207>
    scripts/scheduler.lua:371 in (global) RunScheduler (Lua) <369-377>
    scripts/update.lua:170 in () ? (Lua) <149-228>

Now, No where in the assets or other files have I said that the sarah.xml file in in that case. I've checked the other files and can't find anything about it. So I followed the advice of others, and I've simply tried renaming it to Sarah.xml and then I get this error now.

Quote

[00:03:04]: [string "scripts/util.lua"]:470: Could not find an asset matching bigportraits/sarah.xml in any of the search paths.
LUA ERROR stack traceback:
    =[C]:-1 in (global) assert (C) <-1--1>
    scripts/util.lua:470 in (global) resolvefilepath (Lua) <465-473>
    scripts/mainfunctions.lua:70 in (global) RegisterPrefabs (Lua) <63-81>
    scripts/mods.lua:591 in (method) RegisterPrefabs (Lua) <551-597>
    scripts/gamelogic.lua:226 in (upvalue) LoadAssets (Lua) <137-247>
    scripts/gamelogic.lua:840 in (upvalue) LoadSlot (Lua) <836-847>
    scripts/gamelogic.lua:896 in (upvalue) DoResetAction (Lua) <851-932>
    scripts/gamelogic.lua:942 in (local) complete_callback (Lua) <934-943>
    scripts/upsell.lua:27 in (global) UpdateGamePurchasedState (Lua) <11-30>
    scripts/gamelogic.lua:966 in (local) callback (Lua) <945-967>
    scripts/saveindex.lua:243 in (upvalue) OnLoad (Lua) <196-245>
    scripts/saveindex.lua:252 in () ? (Lua) <251-253>
    =[C]:-1 in (method) GetPersistentString (C) <-1--1>
    scripts/saveindex.lua:250 in (method) Load (Lua) <247-254>
    scripts/gamelogic.lua:982 in (local) callback (Lua) <981-983>
    scripts/playerprofile.lua:853 in (method) Set (Lua) <726-856>
    scripts/playerprofile.lua:714 in () ? (Lua) <713-715>
    =[C]:-1 in (method) GetPersistentString (C) <-1--1>
    scripts/playerprofile.lua:712 in (method) Load (Lua) <711-716>
    scripts/gamelogic.lua:981 in () ? (main) <0-0>
    =[C]:-1 in (global) require (C) <-1--1>
    scripts/mainfunctions.lua:807 in () ? (Lua) <800-822>

So I'm not a coder or anything but I'm at a loss and need some help here. I'll happily do all the art but the coding confuses me haha this is my first mod too so. I've attached the file incase you need more indepth look into the files incase I made a mistake (which I probably did.) If someone could help, that would be truly amazing and I'll be grateful

sarah.zip

Edited by Pinkiceygirl
Link to comment
Share on other sites

2 hours ago, Pinkiceygirl said:

So I'm not a coder or anything but I'm at a loss and need some help here. I'll happily do all the art but the coding confuses me haha this is my first mod too so.

local require = GLOBAL.require
local STRINGS = GLOBAL.STRINGS

-- The character select screen lines
STRINGS.CHARACTER_TITLES.sarah = "The Small But Mighty"
STRINGS.CHARACTER_NAMES.sarah = "Sarah"
STRINGS.CHARACTER_DESCRIPTIONS.sarah = "*Cuddly teddy!\n*Loves the rain.\n*Scared of ghosts"
STRINGS.CHARACTER_QUOTES.sarah = "\"D-Don't touch me!!\""

-- vvv (all uppercase)
-- Custom speech strings
STRINGS.CHARACTERS.SARAH = require "speech_sarah"

-- vvv (all uppercase)
-- The character's name as appears in-game 
STRINGS.NAMES.SARAH = "Sarah"

AddMinimapAtlas("images/map_icons/sarah.xml")

-- vvv (all lowercase)
-- Add mod character to mod character list. Also specify a gender. Possible genders are MALE, FEMALE, ROBOT, NEUTRAL, and PLURAL.
AddModCharacter("sarah", "NEUTRAL")

This is in modmain. I pointed out the changes.

All your asset stuff should be lowercase. The Sarah.xml should be sarah.xml. The names inside the files should be lowercase too. You renamed ghost_Sarah_build into ghost_sarah_build but it remained as ghost_Sarah_build (inside the build.bin) because you compiled it that way, then changed it (outside). Needs recompiling.

The build and the ghost build look alright in the game.

However, there is something that causes a crash when you click OK and go to the character wardrobe during character selection.

Apparently, the game hates your names_sarah from inside images, and also hates sarah and sarah_none from inside bigportraits, so try doing those again. Compile the pngs you did (maybe try to match the dimensions of the templates, although I don't see why it would be a problem since some dimensions aren't powers of 2).

Link to comment
Share on other sites

1 hour ago, DarkXero said:

However, there is something that causes a crash when you click OK and go to the character wardrobe during character selection.

Yeah thats what happens for me now. also I changed the dimensions of the sarah.tex and now it's off center greatly. This was the last few things I was getting in the client log

Quote

[00:03:38]: Attempting to send resume request
[00:03:38]: Resuming user: session/3B4A1D9FAA3139F2/OU_76561198040369549_/0000000003
[00:03:38]: ReceiveResumeNotification
[00:03:38]: Deleting user: session/3B4A1D9FAA3139F2/OU_76561198040369549_/0000000004
[00:03:39]: Validating portal[7] <-> <nil>[7] (inactive)    
[00:03:39]: Validating portal[6] <-> <nil>[6] (inactive)    
[00:03:39]: Validating portal[5] <-> <nil>[5] (inactive)    
[00:03:39]: Validating portal[1] <-> <nil>[1] (inactive)    
[00:03:39]: Validating portal[9] <-> <nil>[9] (inactive)    
[00:03:39]: Validating portal[10] <-> <nil>[10] (inactive)    
[00:03:45]: WARNING! Could not find region 'FROMNUM' from atlas 'FROMNUM'. Is the region specified in the atlas?
[00:03:45]: Looking for default texture '' from atlas 'FROMNUM'.
[00:03:45]: Error Looking for default texture in from atlas 'FROMNUM'.
 

 

Link to comment
Share on other sites

12 hours ago, Pinkiceygirl said:

also I changed the dimensions of the sarah.tex and now it's off center greatly

Are you keeping the same dimensions as the ones in the character template?

How are you generating the tex files?

You also have this:

 

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