Morkilimus Posted May 22, 2019 Share Posted May 22, 2019 I sincerely apologize if this has already been covered in this thread. I did some searching, but 424 pages is a lot of posts! XD I am very intrigued by the possibilities that cvars provide, but I'm confused as to how to create a new cvar for a requirement check. Let's say you wanted to create an item set, where each of four pieces of clothing added .25 to a cvar value, and an effect proc'd when the value = 1 (so all four need to be worn). I understand how to add the buffs, set the requirement, and add particle effects, but how do you call on a cvar that doesn't exist? Am I just not understanding how they're formed? Link to comment Share on other sites More sharing options...
n2n1 Posted May 22, 2019 Share Posted May 22, 2019 I was wondering the same thing. but i somewhere read that they are initialized at the first use or something like that...but this is not exact...it would be better if someone who knows told us. I'll skip the A17. ...somewhere in .xml is written about this...in comments i seen it. Link to comment Share on other sites More sharing options...
sphereii Posted May 22, 2019 Share Posted May 22, 2019 From my understanding, when a cvar is referenced with a new value, it gets created. Take a look at the A17b7patch cvar in the buffs.xml to see how it's set and referenced. <triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar="$A17b7patch" operation="set" value="1"/> I've done a fair amount of work with the cvars, but more with the SDX code than the XML properties. Link to comment Share on other sites More sharing options...
Morkilimus Posted May 23, 2019 Author Share Posted May 23, 2019 So if I’m off to create a new cvar, I simply use the modifycvar action, ad if it doesn’t recognize the cvar as an existing one, it will create a new one? If that’s so, man that’s super easy, and really intuitive. Link to comment Share on other sites More sharing options...
sphereii Posted May 23, 2019 Share Posted May 23, 2019 Yeah, the key is the operation="set". Not sure if "add" creates it if it doesn't exist; if it does, it probably initializes it to 0. Link to comment Share on other sites More sharing options...
Morkilimus Posted May 23, 2019 Author Share Posted May 23, 2019 I'll work with this and give it a try. Thanks Sphereii! Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.