Zchu Posted January 8, 2015 Share Posted January 8, 2015 Hi again everyone. I am sorry if this has already been asked, I have tried a search on the forums and even a google search to no avail. Now on to my question, I was wondering if there is a MOD that makes equips invisible? Like the hats, log suits ect. I am making a custom character and do not want her covered up all the time. Thanks! =D Link to comment Share on other sites More sharing options...
Zchu Posted January 16, 2015 Author Share Posted January 16, 2015 Ehhh I am not sure if Bumping is allowed or not. *sigh* I guess this is not possible... My custom character will have to be covered up by a log suit T^T Link to comment Share on other sites More sharing options...
Ryuushu Posted January 16, 2015 Share Posted January 16, 2015 @ZchuI don't see the problem in wearing armor. Anyways...inst:ListenForEvent("equip", function(inst, data) print("I'm wearing something.") inst.AnimState:ClearOverrideSymbol("swap_body") end)That will hide all body-equippable items, such as armor, amulets, backpacks, etc.If you want to filter certain items, you can do something like:local allowed_items = {"amulet","backpack"} local function isallowed(item) for i,v in ipairs(allowed_items) do if item.prefab == v then return false end end return true end inst:ListenForEvent("equip", function(inst, data) if data.item and data.item.components.equippable.equipslot == EQUIPSLOTS.BODY and isallowed(data.item) then print("I'm wearing a", data.item.name) inst.AnimState:ClearOverrideSymbol("swap_body") end end) Link to comment Share on other sites More sharing options...
Zchu Posted January 17, 2015 Author Share Posted January 17, 2015 @Ryuushu THANK YOU!! I wish it was a MOD cause the script scares me lol Well I am drawing my original character, so I would rather her not be covered up all the time =3 Thanks again! Link to comment Share on other sites More sharing options...
Zchu Posted January 27, 2015 Author Share Posted January 27, 2015 @ZchuI don't see the problem in wearing armor. Anyways...inst:ListenForEvent("equip", function(inst, data) print("I'm wearing something.") inst.AnimState:ClearOverrideSymbol("swap_body") end)That will hide all body-equippable items, such as armor, amulets, backpacks, etc. @Ryuushu I am sorry but... where do I put this? I have never modded anything before. Can you be more specific? Thank you. Link to comment Share on other sites More sharing options...
Ryuushu Posted January 27, 2015 Share Posted January 27, 2015 @ZchuPut it inside your character's prefab file, in the master_postinit function, like so:...local master_postinit = function(inst) -- sound your character will play inst.soundname = "wendy" -- Stats inst.components.health.maxhealth = 200 inst.components.sanity.max = 200 inst.components.hunger.max = 200 inst:ListenForEvent("equip", function(inst, data) print("I'm wearing something.") inst.AnimState:ClearOverrideSymbol("swap_body") end)end... Link to comment Share on other sites More sharing options...
Zchu Posted April 10, 2015 Author Share Posted April 10, 2015 (edited) @ZchuPut it inside your character's prefab file, in the master_postinit function, like so:...local master_postinit = function(inst) -- sound your character will play inst.soundname = "wendy" -- Stats inst.components.health.maxhealth = 200 inst.components.sanity.max = 200 inst.components.hunger.max = 200 inst:ListenForEvent("equip", function(inst, data) print("I'm wearing something.") inst.AnimState:ClearOverrideSymbol("swap_body") end)end... @RyuushuOhhhhh! I see now! Thanks so much! Now does this work for head equips? EDIT: This crashed my game =( Edited April 10, 2015 by Zchu Link to comment Share on other sites More sharing options...
DarkXero Posted April 10, 2015 Share Posted April 10, 2015 (edited) Well, this is strange, I tried using that and it worked for me.What does the log say? Alternatively, maybe instead of ClearOverrideSymbol, you can try using:-- to hide hatinst.AnimState:Hide("hat")inst.AnimState:Hide("hat_hair")inst.AnimState:Show("hair_nohat")inst.AnimState:Show("hair")inst.AnimState:Show("head")inst.AnimState:Hide("head_hair")-- to hide armorinst.AnimState:Hide("swap_body") -- to hide weaponinst.AnimState:Hide("arm_carry")inst.AnimState:Show("arm_normal")instead of:inst.AnimState:ClearOverrideSymbol("swap_hat")inst.AnimState:ClearOverrideSymbol("swap_body")inst.AnimState:ClearOverrideSymbol("swap_object") Edited April 10, 2015 by DarkXero Link to comment Share on other sites More sharing options...
Zchu Posted April 10, 2015 Author Share Posted April 10, 2015 Well, this is strange, I tried using that and it worked for me.What does the log say? Alternatively, maybe instead of ClearOverrideSymbol, you can try using:-- to hide hatinst.AnimState:Hide("hat")inst.AnimState:Hide("hat_hair")inst.AnimState:Show("hair_nohat")inst.AnimState:Show("hair")inst.AnimState:Show("head")inst.AnimState:Hide("head_hair")-- to hide armorinst.AnimState:Hide("swap_body") -- to hide weaponinst.AnimState:Hide("arm_carry")inst.AnimState:Show("arm_normal")instead of:inst.AnimState:ClearOverrideSymbol("swap_hat")inst.AnimState:ClearOverrideSymbol("swap_body")inst.AnimState:ClearOverrideSymbol("swap_object") It was my bad! I forgot to rename the Ghost anim folder DX Hmmm which method would be better? or does it really matter? THANK YOU! Link to comment Share on other sites More sharing options...
DarkXero Posted April 10, 2015 Share Posted April 10, 2015 Well, it depends. For armor, the best is ClearOverrideSymbol. There are no Show() or Hide() on the equip functions. For hats, depending on your hair, and the hat you equip, if you use ClearOverrideSymbol you will delete the hat but the hair won't come back unless you unequip the hat, because the hair is hidden. So you want to both make the hat invisible, and tell the game to show the hair. Concisely, this: inst:ListenForEvent("equip", function() inst.AnimState:ClearOverrideSymbol("swap_hat") inst.AnimState:Show("hair") inst.AnimState:ClearOverrideSymbol("swap_body") end) Link to comment Share on other sites More sharing options...
Maris Posted April 11, 2015 Share Posted April 11, 2015 (edited) Invisible for everyone? Or only for other players? Edited April 11, 2015 by Maris Link to comment Share on other sites More sharing options...
Zchu Posted April 11, 2015 Author Share Posted April 11, 2015 Invisible for everyone? Or only for other players? Not sure what you mean? Like on every character or for everyone playing on just my character? Link to comment Share on other sites More sharing options...
Maris Posted April 12, 2015 Share Posted April 12, 2015 Not sure what you mean? Like on every character or for everyone playing on just my character?For everyone who are plaing on the server? Or for everyone on the server except owner of item? Don't you think that other character can get this item (as a gift, for example)? Don't you think that admin will try to summon this item for himself while he is playing on another character? Link to comment Share on other sites More sharing options...
DarkXero Posted April 12, 2015 Share Posted April 12, 2015 @Maris, as it is, by putting the listener on the master_postinit, the invisible things are a character property. The items aren't actually invisible or make themselves invisible in their own. So for any item, nobody will see it equipped on that character, but everybody will see it on another. Link to comment Share on other sites More sharing options...
Zchu Posted April 13, 2015 Author Share Posted April 13, 2015 @Maris, as it is, by putting the listener on the master_postinit, the invisible things are a character property. The items aren't actually invisible or make themselves invisible in their own. So for any item, nobody will see it equipped on that character, but everybody will see it on another. @DarkXero Oh I see, sadly this is not what I want. I want equips to be completely invisible to everyone. If it is even possible of course. Link to comment Share on other sites More sharing options...
DarkXero Posted April 13, 2015 Share Posted April 13, 2015 (edited) @Zchu, well, I figured you just wanted to have only the blue cats with invisible things. For a entire naked server:AddPlayerPostInit(function(inst) inst:ListenForEvent("equip", function() inst.AnimState:ClearOverrideSymbol("swap_hat") inst.AnimState:Show("hair") inst.AnimState:ClearOverrideSymbol("swap_body") end)end)in modmain. Edited April 13, 2015 by DarkXero Link to comment Share on other sites More sharing options...
Zchu Posted April 13, 2015 Author Share Posted April 13, 2015 @Zchu, well, I figured you just wanted to have only the blue cats with invisible things. For a entire naked server:AddPlayerPostInit(function(inst) inst:ListenForEvent("equip", function() inst.AnimState:ClearOverrideSymbol("swap_hat") inst.AnimState:Show("hair") inst.AnimState:ClearOverrideSymbol("swap_body") end)end)in modmain. What mod main? Do I just stick in my character mod folder mod main? Link to comment Share on other sites More sharing options...
DarkXero Posted April 13, 2015 Share Posted April 13, 2015 @Zchu, in the modmain.lua file of your character mod, next to the modinfo.lua file. That way, everybody from Wilsons to Wendys to blue cats will have their armor and hats invisible. Link to comment Share on other sites More sharing options...
Zchu Posted April 13, 2015 Author Share Posted April 13, 2015 @Zchu, in the modmain.lua file of your character mod, next to the modinfo.lua file. That way, everybody from Wilsons to Wendys to blue cats will have their armor and hats invisible. YAY!!! it works!! THANK YOU!!!! Will i have to put this in all my characters modmain.lua's? =o No more covering up my character with grass and football helmets lol Link to comment Share on other sites More sharing options...
DarkXero Posted April 13, 2015 Share Posted April 13, 2015 @Zchu, your character is a prefab that is inside a mod.When you load the mod, you load the modmain.lua code. If you have AddPlayersPostInit in one mod, it doesn't matter what other characters in the same mod, or mods you have, EVERYBODY will have their things invisible. Wilson, Wendy, blue cat, black cat, characters from other mods. EVERYBODY in your server will be naked. If you don't have the AddPlayersPostInit, then yes, you would need to put the listener inside every character's master_postinit. Link to comment 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