Meatwad107 Posted October 2, 2020 Share Posted October 2, 2020 How can I make this work? <triggered_effect trigger="onSelfHarvestBlock" action="ModifyCVar" cvar="X" operation="add" value="1"/> <triggered_effect trigger="onSelfHarvestBlock" action="SetProgressionLevel" progression_name="perkDancing" level="@X"/> I get an error: "ERR XML loader: Loading and parsing 'progression.xml' failed FormatException: Input string was not in the correct format: nDigits == 0." Is this because @X is a floating point and it needs to be an integer? I tried various ways and always got "nDigits == 0." error. level can equal zero, I did that test already. 'level="0". Link to comment Share on other sites More sharing options...
h0tr0d Posted October 2, 2020 Share Posted October 2, 2020 did you try an asterisk ? Link to comment Share on other sites More sharing options...
Meatwad107 Posted October 2, 2020 Author Share Posted October 2, 2020 WHat do you mean? Where would I use the *? Link to comment Share on other sites More sharing options...
h0tr0d Posted October 2, 2020 Share Posted October 2, 2020 is your cvar=x where x means a number or did you actually use X? Link to comment Share on other sites More sharing options...
Meatwad107 Posted October 2, 2020 Author Share Posted October 2, 2020 I was using X as in 'nCount'. A name of a variable. Link to comment Share on other sites More sharing options...
h0tr0d Posted October 2, 2020 Share Posted October 2, 2020 USING CUSTOM VARIABLES AND GAME VARIABLES A custom variable (float) is declared on the target entity whenever you use one. <triggered_effect trigger="onSelfAimingGunStop" action="ModifyCVar" target="self" cvar="iAmYourNewCVar" operation="set" value="5"/> When USING a custom variable INSTEAD OF a fixed value you reference it with an "@" instead of a numeric value. <passive_effect name="JumpStrength" operation="perc_set" value="@iAmYourNewCVar"/> <requirement name="StatCompare" target="self" stat="stamina" operation="GTE" value="@iAmYourNewCVar"/> GAME VARIABLES are constants (read-only) A game variable (whatever data type it is) can be USED in requirements / values. <passive_effect name="JumpStrength" operation="perc_set" value="#GameTime"/> <requirement name="StatCompare" target="self" stat="stamina" operation="GTE" value="#GameTime"/> OPERATIONS AND CVARS, game variables cvar : custom variable name. Use whatever you want. operation [set,setvalue,add,subtract,multiply,divide,randomfloat,randomint] : value (Float,@cvar,#gameVariable) : Leading with @/# will parse the value of an existing cvar or game variable instead of a number. value="randomfloat(1,10)" / value="randomint(1,10)" this generates a random number to be used in the cvar manipulation. <triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar="test2" operation="set" value="randomint(1,10)"/> Is the error you posted the entire error? Link to comment Share on other sites More sharing options...
Meatwad107 Posted October 2, 2020 Author Share Posted October 2, 2020 I read that but I read #GameTime as a predefined number, such as in C++ "Int GameTime = 3;". I'll try it and see what happens. i actually ignored that # above for that one reason and didn't try it... as GameTime is a redefined number. Thanks Didn't work 😞 "2020-10-01T22:13:17 20.622 ERR XML loader: Loading and parsing 'progression.xml' failed FormatException: Input string was not in the correct format: nDigits == 0." Link to comment Share on other sites More sharing options...
h0tr0d Posted October 2, 2020 Share Posted October 2, 2020 Did you remove the second line and try it? and Is the error you posted the entire error? Link to comment Share on other sites More sharing options...
mr.devolver Posted October 2, 2020 Share Posted October 2, 2020 Eh, pesky cvars, I was never able to figure them out and make them work, so I stopped trying. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.