Jump to content

DST Custom Character Select Screen Crash.


Recommended Posts

i made a custom character awhile ago. i tried to port it to DST by copying most files from a compatible mod. it managed to launch, but when i selected it on the character select on my hosted server to test if it would work, it crashed and brought up an error screen.  log attached if that will be of use

 

Link to comment
Share on other sites

@WitchDoctEr16, The last line of your character's prefab file probably looks like this:

return MakePlayerCharacter("wod", prefabs, assets, fn, start_inv) 

But it should look like this:

return MakePlayerCharacter("wod", prefabs, assets, common_postinit, master_postinit, start_inv)

 What used to be fn() has now been split into two functions, common_postinit and master_postinit. Certain things need to be in each, but mostly things need to be in master_postinit.

Edited by rezecib
Link to comment
Share on other sites

@rezecib how do i set certain things into common_postinit and master_postinit? i see what that says, and i launched the mod. but after i enabled the mod, it loaded the main menu and froze. it then states this in the log-

Orphaned unnamed resource. This resource must have used Add( resource ) to insert itself into the manager. 
Orphaned unnamed resource. This resource must have used Add( resource ) to insert itself into the manager. 
Orphaned unnamed resource. This resource must have used Add( resource ) to insert itself into the manager. 
Orphaned unnamed resource. This resource must have used Add( resource ) to insert itself into the manager. 
Orphaned unnamed resource. This resource must have used Add( resource ) to insert itself into the manager. 
Orphaned unnamed resource. This resource must have used Add( resource ) to insert itself into the manager.
and a few more after that. thank you for the support and help btw.
Link to comment
Share on other sites

@WitchDoctEr16, I think the only change you need to make is to change this line in cbk.lua:

local fn = function(inst)

to this:

local function master_postinit(inst)

Although the log you posted suggests that fn was actually running. I'm not sure why it would be... Unless I guess you changed the line that I suggested before without changing the function names.

Link to comment
Share on other sites

@rezecib, I changed the line you mentioned. I then enabled the mod and tried to host a server and select the character. once clicking the okay button, the game faded to black and sat there playing very unoticable audio. so what you suggested fixed one problem, but now there may be another. i checked the log, and it still says orphaned unnamed resource. i dont know what this means. here is a log.

Link to comment
Share on other sites

i went and attempted to reconnect to the server i made, and it crashed with a warning screen about what went wrong. the message is as follows:

[string "scripts/components/builder_replica.lua"]:143: attempt to index field '?' (a nil value)

LUA ERROR stack traceback:

scripts/components/builder.lua:72 in (method) OnLoad (Lua) <68-81>

scripts/entityscript.lua:1424 in (method) SetPersistData (Lua) <1414-1432>

scripts/mainfunctions.lua:1149 in () ? (Lua) <1145-1155>

=[C]:-1 in (method) SendResumeRequestToServer © <-1--1>

scripts/prefabs/world_network.lua:25 in (field) fn (Lua) <19-27>

scripts/scheduler.lua:170 in (method) OnTick (Lua) <144-199>

scripts/scheduler.lua:380 in (global) RunScheduler (Lua) <378-386>

 
Link to comment
Share on other sites

how do you mention people? and i went into the file and moved the recipes into the common_postinit. i looked at the other parts and removed the night vision because i didnt completely understand it. now it all seems normal but when i try to load it up, it still causes an endless blackscreen after i select my character

Link to comment
Share on other sites

@WitchDoctEr16, Select a tiny bit of their text and the buttons show up. 

 

It looks like you introduced a problem with start_inv, since apparently it's not declared by the time you do the final return...

 

But really, man, this is how you have to mod. You need to interpret the crash logs yourself. All I'm doing is looking for the stack trace in the log-- the part that starts with something like this:

error calling LoadPrefabFile in mod Crash Bandicoot Multiplayer Mod Support (Crash_Bandicoot): [string "../mods/Crash Bandicoot Multiplayer Mod Sup..."]:92: variable 'start_inv' is not declaredLUA ERROR stack traceback:        =[C] in function 'error'

and then I look at the line of code that it's talking about. If you can't read the game's code and figure out what it does... then you should learn how to before you can expect to mod. =\

Link to comment
Share on other sites

alright. i looked into the log and was looking at the code like i should have tried. i didnt really know what i was looking at but now that i think about it more, i understand when something is wrong. i managed to get it to launch into the game and i now know what to do to make something work. thank you for the help with what i need to do next time.

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