SolarMisae Posted September 18, 2017 Share Posted September 18, 2017 (edited) So I managed to create a custom character using the extended character template, and it's more or less working as I want but one thing I can't figure out is bugging me. While creating his custom starting weapon, despite it functioning mechanically just fine, I wanted to add special "inspect" text to it, and a unique one for wx as well to match his usual "all caps" speak. Now the first two strings for the item name and description in the recipe tab are working in-game just fine, but the two lines of text I added for the "inspect" for all players + wx's special one just won't. The item also does not seem to function with the Food Values+Item tooltips mod properly, as it will either display no text (not even the "equip" option though it can still be equipped normally) or if I hover over another weapon or tool, or any item with stats really, the hover text will match the last item I hovered. This is after hovering over the torch, then hovering the weapon. The strings I'm using for the descriptions and inspect options in my modmain.lua are as follows: STRINGS.NAMES.SHADOWRAPIER = "Shadow Rapier" STRINGS.RECIPE_DESC.SHADOWRAPIER = "Don't poke your eye out." STRINGS.CHARACTERS.GENERIC.DESCRIBE.SHADOWRAPIER = "Dark and pointy." STRINGS.CHARACTERS.WX78.DESCRIBE.SHADOWRAPIER = "EXTREMELY POINTY. USE WITH CAUTION." I pulled these from another character mod called "Wolfe" who has a unique craftable weapon as well. Is there something wrong with these strings? (Well i mean obviously there is, but what...) or is it something in the other files such as the item's .lua file? If needed I will provide the full modmain.lua, item.lua and character.lua files. Thanks in advance! Edited September 19, 2017 by SolarMisae Link to comment https://forums.kleientertainment.com/forums/topic/82130-solvedcharacters-custom-item-inspect-option-not-working/ Share on other sites More sharing options...
Lumina Posted September 18, 2017 Share Posted September 18, 2017 (edited) You don't have a GLOBAL in your lines. It's possible that the mod you used as an example has the line in modmain.lua with this line before : STRINGS = GLOBAL.STRINGS Or has the line in a place when no global is needed (not sure about it). You can also do : GLOBAL.STRINGS.NAMES.SHADOWRAPIER = "Shadow Rapier" GLOBAL.STRINGS.RECIPE_DESC.SHADOWRAPIER = "Don't poke your eye out." GLOBAL.STRINGS.CHARACTERS.GENERIC.DESCRIBE.SHADOWRAPIER = "Dark and pointy." GLOBAL.STRINGS.CHARACTERS.WX78.DESCRIBE.SHADOWRAPIER = "EXTREMELY POINTY. USE WITH CAUTION." If you have something like this but just forgot to show it here, i don't know. I also don't know about the compatibility with others mods. Edited September 18, 2017 by Lumina Link to comment https://forums.kleientertainment.com/forums/topic/82130-solvedcharacters-custom-item-inspect-option-not-working/#findComment-955504 Share on other sites More sharing options...
SolarMisae Posted September 18, 2017 Author Share Posted September 18, 2017 (edited) I do indeed have the GLOBAL string listed above in my modmain, maybe it's in the wrong location. i don't know why the crafting tab name and description works but the inspect option doesn't. I've attached the horrific frankenstein of a modmain.lua file I've created so far, perhaps this will help. modmain.lua Edited September 18, 2017 by SolarMisae Link to comment https://forums.kleientertainment.com/forums/topic/82130-solvedcharacters-custom-item-inspect-option-not-working/#findComment-955506 Share on other sites More sharing options...
Lumina Posted September 18, 2017 Share Posted September 18, 2017 I'm not seeing anything wrong, but i could miss something obvious or anything. I suggest you attach your entire mod, maybe it will help if someone wants to see what is wrong. Link to comment https://forums.kleientertainment.com/forums/topic/82130-solvedcharacters-custom-item-inspect-option-not-working/#findComment-955508 Share on other sites More sharing options...
Eevelion Posted September 18, 2017 Share Posted September 18, 2017 Does the weapon prefab have "inst:AddComponent("inspectable")" as part of the local function? Link to comment https://forums.kleientertainment.com/forums/topic/82130-solvedcharacters-custom-item-inspect-option-not-working/#findComment-955515 Share on other sites More sharing options...
SolarMisae Posted September 18, 2017 Author Share Posted September 18, 2017 I actually didn't have that line, but after adding it it didn't seem to make any difference. :< Gonna just attach the entire mod. Wythe.7z Link to comment https://forums.kleientertainment.com/forums/topic/82130-solvedcharacters-custom-item-inspect-option-not-working/#findComment-955602 Share on other sites More sharing options...
ptr Posted September 19, 2017 Share Posted September 19, 2017 1.To see your inspection speech, please press "Alt" key, which is necessary for inventory items with actions other than inspection. It is because inspection has very low action priority. 2.The compatibility issue is simply due to no network. You should add inst.entity:AddNetwork() behind CreateEntity(). Link to comment https://forums.kleientertainment.com/forums/topic/82130-solvedcharacters-custom-item-inspect-option-not-working/#findComment-955627 Share on other sites More sharing options...
SolarMisae Posted September 19, 2017 Author Share Posted September 19, 2017 Ahh, ptr to the rescue again. All fixed now, thanks! Link to comment https://forums.kleientertainment.com/forums/topic/82130-solvedcharacters-custom-item-inspect-option-not-working/#findComment-955639 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