Lokoluna Posted March 11, 2019 Share Posted March 11, 2019 Hello! So with the Winona update i'd like to give myself her tags, to lsoe hunger upon building ,build faster, etc However i've hit the tag limit, and I need help around this, is there a more simple way to apply tags, without adding them? Link to comment https://forums.kleientertainment.com/forums/topic/103789-small-help-with-tags/ Share on other sites More sharing options...
Ultroman Posted March 12, 2019 Share Posted March 12, 2019 Yes. I can't remember how, though. A workaround could be to simply add bools to the player inst, like this: inst.mytag = true Then just check if inst.mytag then -- do something end If a player does not have the variable at all, the if-statement will see inst.mytag as nil which also makes the if-statement false. Link to comment https://forums.kleientertainment.com/forums/topic/103789-small-help-with-tags/#findComment-1164556 Share on other sites More sharing options...
Lokoluna Posted March 12, 2019 Author Share Posted March 12, 2019 That seems like it would still add a tag to myself, Thus overdoing the tag limit.. since I'm so use to jsut "inst.addtag: fastworker" etc Link to comment https://forums.kleientertainment.com/forums/topic/103789-small-help-with-tags/#findComment-1164566 Share on other sites More sharing options...
CarlZalph Posted March 12, 2019 Share Posted March 12, 2019 Just now, Lokoluna said: That seems like it would still add a tag to myself, Thus overdoing the tag limit.. since I'm so use to jsut "inst.addtag: fastworker" etc Tags on entities are networked to clients, hence the limit. Setting a variable on an entity isn't networked as you'd have to go through netvars to add that functionality. I'd look into which functions cause Winona to build quicker/get hunger on build, then hook them to add in another check to see if it's your character's prefab doing the task. Link to comment https://forums.kleientertainment.com/forums/topic/103789-small-help-with-tags/#findComment-1164568 Share on other sites More sharing options...
Lokoluna Posted March 12, 2019 Author Share Posted March 12, 2019 3 hours ago, CarlZalph said: Tags on entities are networked to clients, hence the limit. Setting a variable on an entity isn't networked as you'd have to go through netvars to add that functionality. I'd look into which functions cause Winona to build quicker/get hunger on build, then hook them to add in another check to see if it's your character's prefab doing the task. I'm not familiar with netvars or bools. What sort of way would I hook them? Do you have an example? Link to comment https://forums.kleientertainment.com/forums/topic/103789-small-help-with-tags/#findComment-1164607 Share on other sites More sharing options...
Ultroman Posted March 12, 2019 Share Posted March 12, 2019 (edited) Making a variable does not count towards the tag limit. They are totally different things. The tags are a game-specific thing, whereas variables are a language-specific thing. The number of variables is not limited (at least not in the numbers you'll be hitting). I've never worked with netvars, which CarlZalph is mentioning, but I know there're threads about how they work on this forum somewhere. That said, extending the right functions and simply checking which prefab is doing the function and then doing a specific thing, is a very good way to go. Edited March 12, 2019 by Ultroman Link to comment https://forums.kleientertainment.com/forums/topic/103789-small-help-with-tags/#findComment-1164648 Share on other sites More sharing options...
Lokoluna Posted March 12, 2019 Author Share Posted March 12, 2019 Ill look around thanks. Link to comment https://forums.kleientertainment.com/forums/topic/103789-small-help-with-tags/#findComment-1164807 Share on other sites More sharing options...
YakumoYukari Posted March 13, 2019 Share Posted March 13, 2019 You can make netvars like this inst.testvar = net_bool(inst.GUID, "ontestvar", "ontestvardirty") inst.testvar:set(false) There're many other sorts of netvars available. You can see it in netvars.lua. Actually, I have made a similar thing like what you're trying to do.https://github.com/HimekaidouHatate/YakumoYukari-DST/tree/master/scripts Look stategraph_yukari.lua and prefab/yukari_classified.lua You can see how I create netvars and use it. But you don't actually need to make your own classified. Just define your netvar at common_poistinit. (if it's not a player character, define it before SetPristine() like this.) Link to comment https://forums.kleientertainment.com/forums/topic/103789-small-help-with-tags/#findComment-1164933 Share on other sites More sharing options...
Lokoluna Posted March 15, 2019 Author Share Posted March 15, 2019 Thanks Yakumo, still.. pretty confusing but seems like something I can figure out over time! Link to comment https://forums.kleientertainment.com/forums/topic/103789-small-help-with-tags/#findComment-1165597 Share on other sites More sharing options...
Developer zarklord_klei Posted March 15, 2019 Developer Share Posted March 15, 2019 I'm curious, how the heck do you have 63 tags on your character? if your having trouble adding a single tag, your character will break with just about any other mod/game update in existence, and you need to find a different option for your stuff. Link to comment https://forums.kleientertainment.com/forums/topic/103789-small-help-with-tags/#findComment-1165607 Share on other sites More sharing options...
YakumoYukari Posted March 15, 2019 Share Posted March 15, 2019 (edited) Has the entity size increased? I thought it was 31 because I tested it about two or three months ago. Edited March 15, 2019 by YakumoYukari Link to comment https://forums.kleientertainment.com/forums/topic/103789-small-help-with-tags/#findComment-1165618 Share on other sites More sharing options...
Developer zarklord_klei Posted March 15, 2019 Developer Share Posted March 15, 2019 13 hours ago, YakumoYukari said: Has the entity size increased? I thought it was 31 because I tested it about two or three months ago. Yeah, somewhat recently they upped the max tag count from 31 to 63(I think it was in January). Link to comment https://forums.kleientertainment.com/forums/topic/103789-small-help-with-tags/#findComment-1165787 Share on other sites More sharing options...
Lokoluna Posted March 16, 2019 Author Share Posted March 16, 2019 7 hours ago, Zarklord said: Yeah, somewhat recently they upped the max tag count from 31 to 63(I think it was in January). Oh! I thought it was still 31! This changes everything. Link to comment https://forums.kleientertainment.com/forums/topic/103789-small-help-with-tags/#findComment-1165942 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