Crestonia Posted May 26, 2015 Share Posted May 26, 2015 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 More sharing options...
Kzisor Posted May 26, 2015 Share Posted May 26, 2015 (edited) @Crestonia, with the release of ROG into DST they removed both the characterspecific and dapperness component. From hats.lua:inst.components.equippable.dapperness = TUNING.DAPPERNESS_MED Edited May 26, 2015 by Kzisor Link to comment https://forums.kleientertainment.com/forums/topic/54410-sanity-help/#findComment-640606 Share on other sites More sharing options...
Crestonia Posted May 26, 2015 Author Share Posted May 26, 2015 @Kzisor So am I supposed to put that line of code into the place of the dapperness_HUGE? You said dapperness was removed, so how am I supposed to make the hat add sanity to my character? Sorry, I don't know all that much about coding. Link to comment https://forums.kleientertainment.com/forums/topic/54410-sanity-help/#findComment-640609 Share on other sites More sharing options...
Kzisor Posted May 26, 2015 Share Posted May 26, 2015 @Crestonia, you are to remove the code for the dapperness component and use the line of code I provided and change the value to whatever you want it to give. Link to comment https://forums.kleientertainment.com/forums/topic/54410-sanity-help/#findComment-640621 Share on other sites More sharing options...
Crestonia Posted May 26, 2015 Author Share Posted May 26, 2015 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_bwscripts/prefabs/player_common.lua:1515 in (method) OnNewSpawn (Lua) <1511-1523> i = 1 v = hat_bee_bwscripts/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 sayingMarianne and screenshot.zip Link to comment https://forums.kleientertainment.com/forums/topic/54410-sanity-help/#findComment-640958 Share on other sites More sharing options...
Kzisor Posted May 27, 2015 Share Posted May 27, 2015 @Crestonia, Put that line after you put inst:AddComponent("equippable"). Link to comment https://forums.kleientertainment.com/forums/topic/54410-sanity-help/#findComment-641017 Share on other sites More sharing options...
Crestonia Posted May 28, 2015 Author Share Posted May 28, 2015 @Kzisor Thanks a lot for the help. It functions how I want it to, besides one thing... Do you know how I can solve this invisible headbase issue? Link to comment https://forums.kleientertainment.com/forums/topic/54410-sanity-help/#findComment-641480 Share on other sites More sharing options...
Kzisor Posted May 28, 2015 Share Posted May 28, 2015 @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 Link to comment https://forums.kleientertainment.com/forums/topic/54410-sanity-help/#findComment-641486 Share on other sites More sharing options...
Crestonia Posted May 28, 2015 Author Share Posted May 28, 2015 I put this in that code and this was the error. Link to comment https://forums.kleientertainment.com/forums/topic/54410-sanity-help/#findComment-641490 Share on other sites More sharing options...
Kzisor Posted May 28, 2015 Share Posted May 28, 2015 @Crestonia, what I posted was not to be copy and pasted. It was to show you what you needed to do from the official files. You need to recreate it, with your own method not copy and paste it from what I gave you. Link to comment https://forums.kleientertainment.com/forums/topic/54410-sanity-help/#findComment-641497 Share on other sites More sharing options...
Crestonia Posted May 28, 2015 Author Share Posted May 28, 2015 I don't know how to do that. Link to comment https://forums.kleientertainment.com/forums/topic/54410-sanity-help/#findComment-641504 Share on other sites More sharing options...
Kzisor Posted May 28, 2015 Share Posted May 28, 2015 @Crestonia, that is why I posted the code to show you how to do it. Link to comment https://forums.kleientertainment.com/forums/topic/54410-sanity-help/#findComment-641506 Share on other sites More sharing options...
Crestonia Posted May 28, 2015 Author Share Posted May 28, 2015 @Kzisor What are the proper symbols? I don't know what you mean by that. Link to comment https://forums.kleientertainment.com/forums/topic/54410-sanity-help/#findComment-641507 Share on other sites More sharing options...
Hiyori Posted May 28, 2015 Share Posted May 28, 2015 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. Link to comment https://forums.kleientertainment.com/forums/topic/54410-sanity-help/#findComment-641511 Share on other sites More sharing options...
Kzisor Posted May 28, 2015 Share Posted May 28, 2015 @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 Link to comment https://forums.kleientertainment.com/forums/topic/54410-sanity-help/#findComment-641514 Share on other sites More sharing options...
Hiyori Posted May 28, 2015 Share Posted May 28, 2015 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. Link to comment https://forums.kleientertainment.com/forums/topic/54410-sanity-help/#findComment-641516 Share on other sites More sharing options...
Isosurface Posted May 28, 2015 Share Posted May 28, 2015 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. Link to comment https://forums.kleientertainment.com/forums/topic/54410-sanity-help/#findComment-641550 Share on other sites More sharing options...
Crestonia Posted May 28, 2015 Author Share Posted May 28, 2015 Thank you for helping, but I don't think I can accomplish this mod unless I gather some knowledge of lua. Link to comment https://forums.kleientertainment.com/forums/topic/54410-sanity-help/#findComment-641617 Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now