icantevenname Posted October 9, 2017 Share Posted October 9, 2017 Is it possible to have a character give the others the ability to do the bow emote as if they were wearing the Bee Queen's Crown? I tried to look into it myself, but couldn't find the crown's data. Link to comment Share on other sites More sharing options...
w00tyd00d Posted October 9, 2017 Share Posted October 9, 2017 (edited) Sure, you just need to have them wear an item with the "regal" tag on it. That can easily be done with any equippable item using AddPrefabPostInit function ThingPostInit(inst) inst:AddTag("regal") end AddPrefabPostInit("thing", ThingPostInit) You can refine it a bit more from there if you wanted to, but that's the basic requirement for it. Hope that helps EDIT: You don't even need to check for "ismastersim" since tags are checked by clients as well Edited October 9, 2017 by w00tyd00d Link to comment Share on other sites More sharing options...
w00tyd00d Posted October 9, 2017 Share Posted October 9, 2017 If you wanted it to happen naturally without an equipped item, however, you're gunna have to do some stategraph editing since the code only checks for equipped items. Not impossible, just a bit more work Link to comment Share on other sites More sharing options...
icantevenname Posted October 9, 2017 Author Share Posted October 9, 2017 2 hours ago, w00tyd00d said: If you wanted it to happen naturally without an equipped item, however, you're gunna have to do some stategraph editing since the code only checks for equipped items. Not impossible, just a bit more work I had that in mind. I don't mind puttin' in the extra work, I might end up learnin' stuff from that. Link to comment Share on other sites More sharing options...
ptr Posted October 9, 2017 Share Posted October 9, 2017 Yes, modifying SGwilson.lua will be a solution, but you need to copy that file to your mod and modify on that file directly. However, I prefer to a hacking but API way: local CHARACTER = "wilson" AddComponentPostInit("inventory",function(cmp) OldEquipHasTag=cmp.EquipHasTag function cmp:EquipHasTag(tag) if self.inst.prefab==CHARACTER and tag=="regal" then return true else return OldEquipHasTag(self,tag) end end end) in modmain.lua and it is server_only. Link to comment Share on other sites More sharing options...
icantevenname Posted October 10, 2017 Author Share Posted October 10, 2017 4 hours ago, ptr said: Yes, modifying SGwilson.lua will be a solution, but you need to copy that file to your mod and modify on that file directly. However, I prefer to a hacking but API way: local CHARACTER = "wilson" AddComponentPostInit("inventory",function(cmp) OldEquipHasTag=cmp.EquipHasTag function cmp:EquipHasTag(tag) if self.inst.prefab==CHARACTER and tag=="regal" then return true else return OldEquipHasTag(self,tag) end end end) in modmain.lua and it is server_only. Works like a charm! I know ya can't see it, but I'm bowin' to ya. Link to comment Share on other sites More sharing options...
icantevenname Posted October 10, 2017 Author Share Posted October 10, 2017 There's also a way to customize what characters say when bowing. ANNOUNCE_ROYALTY Link to comment Share on other sites More sharing options...
w00tyd00d Posted October 10, 2017 Share Posted October 10, 2017 15 hours ago, ptr said: Yes, modifying SGwilson.lua will be a solution, but you need to copy that file to your mod and modify on that file directly. However, I prefer to a hacking but API way: Well not necessarily, there's API functions that deal with just modifying/appending stategraphs as well so you woudn't need the whole file. But either way, I like your solution better Link to comment Share on other sites More sharing options...
ptr Posted October 10, 2017 Share Posted October 10, 2017 47 minutes ago, w00tyd00d said: Well not necessarily, there's API functions that deal with just modifying/appending stategraphs as well so you woudn't need the whole file Oh, right, AddStategraphPostInit. There's gonna to be indeed a lot of work though, as many functions are required to be overwritten after some inspection. So I give up. 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