Jump to content

Custom Character causes a blackscreen.


Scottnov

Recommended Posts

Greetings.

 

I recently decided to create my own custom character using this guide. I don't have much knowledge in programming and I'm not great at art, but I figured I'd probably be able to figure it out myself or use the forums if something goes wrong. After finishing most of the guide (I didn't want to add a custom item), it did have some problems to start out with. It would always crash the game one way or another once enabled. Once I heard about the log file I decided to go there and see what I could find. This helped a lot at first, but after a while I couldn't fix it myself just by looking at the log. I'm hoping some of you can decode it better than I can: log.txt

 

If you need any additional information or clarification on anything, don't hesitate to ask.

Thanks in advance.

Link to comment
Share on other sites

It appears you try to debugprint something that the game doesn't like. Try using print() instead.

 

Thanks for the reply!

The only issue is, I don't remember putting debugprint into any part of my character (unless it's just another term for custom quotes or something similar). Do you by any chance know what file and what line it's having issues with?

Link to comment
Share on other sites

Thanks for the reply!

The only issue is, I don't remember putting debugprint into any part of my character (unless it's just another term for custom quotes or something similar). Do you by any chance know what file and what line it's having issues with?

 

No I don't, maybe the game tries to perform a routine action. Could you upload your mod (or at least the characters prefab file)?

Link to comment
Share on other sites

No I don't, maybe the game tries to perform a routine action. Could you upload your mod (or at least the characters prefab file)?

 

Very well:

sct.lua

 

Also, the mod is a WIP as of now, so keep that in mind when looking at it. I could also upload the modmain and modinfo files if you think it'll help.

 

Link to comment
Share on other sites

Bump again.

 

At this point, I sound whiny, and I probably am, but like said before, everyone needs their problems fixed, and right now none of my own fixes I've tried have worked. Does anybody have any ideas? This is also probably gonna be the last bump.

Link to comment
Share on other sites

Excuse me for leaving you in the lurch, I looked into your file but found nothing. I read your log again, it seems mostly debugprint, but also various other scripts, show that error.  I'll study my local files and see what that could be about.

 

EDIT: Does your mod mention "insert" in any way? Could you post your modmain.lua?

Link to comment
Share on other sites

Excuse me for leaving you in the lurch, I looked into your file but found nothing. I read your log again, it seems mostly debugprint, but also various other scripts, show that error.  I'll study my local files and see what that could be about.

 

EDIT: Does your mod mention "insert" in any way? Could you post your modmain.lua?

 

No problem, I probably would've made the same mistake.

Here's the modmain.lua:

modmain.lua

 

And I'm not quite sure. I tried a number of things, but from the bits I've read of the end of the log it talks about having issues with the Don't Starve files themselves. It has to be some sort of problem with the mod, though. Otherwise, the game wouldn't work at all.

 

EDIT: In the modmain.lua, there IS something that says table.insert. Not sure what it effects, though.

Link to comment
Share on other sites

Yes, hehe, you replaced the function "insert" rather than using it. Here's what that line should look like:

table.insert(GLOBAL.CHARACTER_GENDERS.MALE, "sct")

If you want the technical details...

Whenever you put '=' in Lua (and most programming languages) it's understood as "This means now the same as that". Putting '==' means "check whether those are the same" in Lua, and '(...)' after some name generally means "Do this command (with ... conditions)".

Link to comment
Share on other sites

Yes, hehe, you replaced the function "insert" rather than using it. Here's what that line should look like:

table.insert(GLOBAL.CHARACTER_GENDERS.MALE, "sct")
If you want the technical details...

Whenever you put '=' in Lua (and most programming languages) it's understood as "This means now the same as that". Putting '==' means "check whether those are the same" in Lua, and '(...)' after some name generally means "Do this command (with ... conditions)".

 

Well, it doesn't blackscreen anymore, but now it gives me this:

Ol8eRaa.jpg

Again, I couldn't decipher the logfile, but I'll put it here for you to take a look at: log.txt I already tried taking the file out of the mods folder and putting it back to no avail. Also, is there a way to make the UI say it's compatible with Don't Starve and Reign of Giants? Modinfo doesn't have it, and that's where I assumed it'd be. Again, thanks for your patience with these issues.

 

IT NEVER ENDS

Link to comment
Share on other sites

Well, it doesn't blackscreen anymore, but now it gives me this:

Again, I couldn't decipher the logfile, but I'll put it here for you to take a look at: I already tried taking the file out of the mods folder and putting it back to no avail. Also, is there a way to make the UI say it's compatible with Don't Starve and Reign of Giants? Modinfo doesn't have it, and that's where I assumed it'd be. Again, thanks for your patience with these issues.

 

THE END IS NEVER

 

Crash:

inst.components.sanity.night_drain_mult = * 2

remove the *

 

Compability Icons:

dont_starve_compatible = truereign_of_giants_compatible = true

in modinfo.lua

Link to comment
Share on other sites

Crash:

inst.components.sanity.night_drain_mult = * 2

remove the *

 

Compability Icons:

dont_starve_compatible = truereign_of_giants_compatible = true

in modinfo.lua

Hooray! It no longer crashes when I start the mod. Unfortunately, it now crashes when I select him from the character selection menu without a crash report.

Log: log.txt

 

 

Link to comment
Share on other sites

Crash:

inst.components.sanity.night_drain_mult = * 2
remove the *

 

Compability Icons:

dont_starve_compatible = truereign_of_giants_compatible = true
in modinfo.lua

 

 

Alright, so it no longer crashes, and I can enter the game without fail. However, these things happen:

 

1: My character is completely invisible. There is literally nothing there. The quotes work, though.

2: My powers don't exactly work. Is it possible to make my character attack 1.5x faster? And if so, how? I couldn't seem to do it right. I just attack slower instead.

3: Isn't really an issue, but something worth noting: The log says the textures are the right resolution, but don't have power of 2 dimensions.

 

Log:log.txt

 

If you need any other files just ask.

Link to comment
Share on other sites

i looked at the combat component. try doing something with this in your  mod to reduce the minimum delay:

    self.min_attack_period = 4

this might be what stops you from attacking faster. so reducing this number may help, im not sure.

the dimensions thing ive seen in my current mod but it doesnt cause any issue with it since most of mine are from the portraits. i think its the dimensions of the image that it refers to. like it thinks that its size isnt to the power of two ie 64x64 or 66x66. i wouldnt worry about the dimensions problem for now, i dont think itll hurt functionality.

 

Link to comment
Share on other sites

i looked at the combat component. try doing something with this in your  mod to reduce the minimum delay:

    self.min_attack_period = 4

this might be what stops you from attacking faster. so reducing this number may help, im not sure.

the dimensions thing ive seen in my current mod but it doesnt cause any issue with it since most of mine are from the portraits. i think its the dimensions of the image that it refers to. like it thinks that its size isnt to the power of two ie 64x64 or 66x66. i wouldnt worry about the dimensions problem for now, i dont think itll hurt functionality.

 

It actually defaulted to attack period 4, so I don't know if that's it. Thanks though. And the "dimensions" thing wasn't a problem, like I said, but just something to note. Good to know it's not the issue though.

Have any idea on the invisibility?

 

Link to comment
Share on other sites

the invisibility can be caused by an atlas-0.tex issue. when you converted it, it should have been converted to 2D instead of 1D. did u convert it to 2D?
also thinking about it. if that didnt help, you may have accidentally removed the location from you files. check just in case for your custom characters assets.

    Asset( "ANIM", "anim/sct.zip" ),
Link to comment
Share on other sites

 

the invisibility can be caused by an atlas-0.tex issue. when you converted it, it should have been converted to 2D instead of 1D. did u convert it to 2D?

also thinking about it. if that didnt help, you may have accidentally removed the location from you files. check just in case for your custom characters assets.

    Asset( "ANIM", "anim/sct.zip" ),

 

Yup, both were confirmed for being there. Have you checked the new log file? That might help you diagnose the problem.

Link to comment
Share on other sites

Invisible char problem?

I had that problem.

 

When using that build renamer, I forgot to save the new name.

Which resulted in the game finding my zip, but none of my references.

Thus creating an invisible char.

 

easily fixed by running build renamer again, then after saving the output file and confirming the overwrite, click on the save button.

Link to comment
Share on other sites

near the bottom of your log file it states:

Could not find anim build sct.

is your build file renamed right? if it is, it may refer to your prefab file not being able to locate the anim build files in your zip.

 

Both of the files inside "sct.zip" are "atlas-0.tex" and "build.bin". I didn't rename them yet. However, I did try renaming build.bin to sct.bin, but it did nothing. Still invisible.

Also, in game, my character's name is Scott. Based around me.

 

Invisible char problem?

I had that problem.

When using that build renamer, I forgot to save the new name.

Which resulted in the game finding my zip, but none of my references.

Thus creating an invisible char.

easily fixed by running build renamer again, then after saving the output file and confirming the overwrite, click on the save button.

REVISION: Could you provide step-by-step instructions on how to do this? It seems I'm lost somewhere.
Link to comment
Share on other sites

do you have the build renamer tool? if not, then here is a link.

https://dl.dropboxus...uosS87_beA&dl=1 

you need to use the build renamer and open up the build.bin. itll probably say wod or whoever the build belonged to. rename that to sct. doing so allows your prefab to communicate with your atlas,anim, and build. this means that it allows it to display the atlas ingame. that means you can see your character.

to use this, open build renamer. extract build.bin to desktop (must have that name).

select build.bin in build renamer.

select an output location.

rename wod to sct.

there you go.

inject that into your zip.

tell me if this is something you havent done.

Link to comment
Share on other sites

do you have the build renamer tool? if not, then here is a link.

https://dl.dropboxus...uosS87_beA&dl=1 

you need to use the build renamer and open up the build.bin. itll probably say wod or whoever the build belonged to. rename that to sct. doing so allows your prefab to communicate with your atlas,anim, and build. this means that it allows it to display the atlas ingame. that means you can see your character.

to use this, open build renamer. extract build.bin to desktop (must have that name).

select build.bin in build renamer.

select an output location.

rename wod to sct.

there you go.

inject that into your zip.

tell me if this is something you havent done.

I finally got it to work! I'll have to re-align a few textures and polish the character for sure, but it works! I still DO have one problem though: my perk. I need to be able to attack faster, does anyone know the code for getting that to work? This is the last problem that needs fixing for now.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

Please be aware that the content of this thread may be outdated and no longer applicable.

×
  • Create New...