Jump to content

Recommended Posts

I need a lot of help... I don't know what the heck my game is doing... I guess the files are outdated.

So I tried to give my character a hat that raises sanity with the dapperness.huge or something like that.

Now my game is giving me an error about something to do with not being able to find dapperness.lua???

It used to work... I have no idea what happened. Can somebody please help?

Here's the hat.

Bunny hat.zip

Link to comment
https://forums.kleientertainment.com/forums/topic/54410-sanity-help/
Share on other sites

I did that and added it to the bunny hat (which is on my character) and I found this in the crash log

[00:17:17]: [string "../mods/Marianne/scripts/prefabs/hat_bee_bw..."]:62: attempt to index field 'equippable' (a nil value)
LUA ERROR stack traceback:
../mods/Marianne/scripts/prefabs/hat_bee_bw.lua:62 in (field) fn (Lua) <40-80>
   inst = 111125 -  (valid:true)
scripts/mainfunctions.lua:148 in () ? (Lua) <137-168>
   name = hat_bee_bw
   prefab = Prefab hat_bee_bw - 
=[C]:-1 in (method) SpawnPrefab © <-1--1>
scripts/mainfunctions.lua:182 in (global) SpawnPrefab (Lua) <179-184>
   name = hat_bee_bw
scripts/prefabs/player_common.lua:1515 in (method) OnNewSpawn (Lua) <1511-1523>
   i = 1
   v = hat_bee_bw
scripts/networking.lua:106 in () ? (Lua) <99-112>
   player_guid = 110600
   skin_name = nil
   player = 110600 - marianne (valid:true)
=[C]:-1 in (method) SendSpawnRequestToServer © <-1--1>
scripts/mainfunctions.lua:1169 in (local) cb (Lua) <1167-1170>
scripts/frontend.lua:453 in (method) DoFadingUpdate (Lua) <417-457>
   self =
Here is the screen shot of the crash and my character's file... I don't really know what the log is saying

Marianne and screenshot.zip

@Crestonia, in your onequip function of the hat you need to show the proper symbol.

 

HATS.LUA 

    local function onequip(inst, owner, fname_override)        local build = fname_override or fname        owner.AnimState:OverrideSymbol("swap_hat", build, "swap_hat")        owner.AnimState:Show("HAT")        owner.AnimState:Show("HAT_HAIR")        owner.AnimState:Hide("HAIR_NOHAT")        owner.AnimState:Hide("HAIR")         if owner:HasTag("player") then            owner.AnimState:Hide("HEAD")            owner.AnimState:Show("HEAD_HAT")        end

Okay I don't mean to sound rude (and sorry I'm not good enough to help with the code) but I read before that you told her you were trying to help her learn. I'm not the only one (maybe..) but when I come asking for an answer I want an answer. I understand you're trying to help her but I'm pretty sure she came her for the answer and not to learn how to do it. If she wants to learn there is multiple videos and sites on lua and she can watch that whenever she wants. I don't see how giving her an answer like "make the code yourself" is really helping her as she came here because she could NOT make the code herself. Please understand where am I coming from, and hopefully I don't come across as too rude, but in this situation I would kind of be pulling my hair out by now xD.

 

 

Thank you for reading.

@Hiyori, I gave them the code needed all they have to do is adapt it to their needs. I gave them the answer, however, I did it in the a form in which allows them to learn rather than copying and pasting.

 

@Crestonia, once again I will post the same code as before because that is the answer, you simply have to adapt it to your function using the variable names in your code.

 

owner.AnimState:Show("HAT")        owner.AnimState:Show("HAT_HAIR")        owner.AnimState:Hide("HAIR_NOHAT")        owner.AnimState:Hide("HAIR")         if owner:HasTag("player") then            owner.AnimState:Hide("HEAD")            owner.AnimState:Show("HEAD_HAT")        end

I understand you are trying to help her learn, but she is not learning in the form you are giving it to her. If you really want to help her I would advise giving her better clues than to tell her to find the answer in a single code. Do it step by step. For me it's like my math class. If you give me a math problem we haven't been taught yet I wouldn't know what to do with it. I would one: look up the steps on how to do it because my teacher was not avaliable to me, or two: just wait until the teacher begins to teach the unit so that I can learn how to do the problem.

 

Thank you for reading.

Hiyori, one cannot simply become a modder without having to learn how to mod. Modding is not like you want a pizza and you get one that is properly cooked and ready-to-eat.

 

It's also unreasonable to ask a random guy on the internet to sit down, go through the whole problem, and take your there step by step. It's no one's obligation to create a fully functioning mod for everyone on the internet, just because they ask nicely.

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
×
  • Create New...