pasmon79 Posted April 16, 2020 Share Posted April 16, 2020 If we define two variables in rtsdata(Status.Var1,Status.Var2, Status.Var3), assign Var 1 & Var 2 and then add their assigned values to Var3 in rtsevnts? How can it be accomplished? Link to comment Share on other sites More sharing options...
qmjs Posted April 16, 2020 Share Posted April 16, 2020 (edited) Make sure you define all three variables, even if they are 0 initially. This can be done, but it is not very straightforward. It is a three step process. The process goes:Var3=0Var3=Var3+Var1*1Var3=Var3+Var2*1 <RTSStat_Set DurationCancellable="" OutputAmount="0" OutputDuration="" OutputId="Status.Var3" PauseWhenOffline="" /><RTSStat_MultiplyAdd MultiplyBy="Status.Var1" OutputAmount="1" OutputId="Status.Var3" PauseWhenOffline="" /><RTSStat_MultiplyAdd MultiplyBy="Status.Var2" OutputAmount="1" OutputId="Status.Var3" PauseWhenOffline="" /> That format means, OutputId = OutputID + MultiplyBy*OutputAmount Net value, Var3 = Var1+Var2The output amount is the multiplier, so use -1 to subtract.You set it to 0 to remove whatever value was set the last time it was called. A couple of other notes:You can use the same method to divide, by changing the OutputID, so to divide by 2 you would use 0.5 RTSStat_Set occasionally gives invalid values if you use a variable, so to set Var3=Var2, it works better to use a format like this:<RTSStat_Set DurationCancellable="" OutputAmount="0" OutputDuration="" OutputId="Status.Var3" PauseWhenOffline="" /><RTSStat_MultiplyAdd MultiplyBy="Status.Var2" OutputAmount="1" OutputId="Status.Var3" PauseWhenOffline="" /> Edited April 17, 2020 by qmjs Link to comment Share on other sites More sharing options...
pasmon79 Posted April 17, 2020 Author Share Posted April 17, 2020 Thanks Link to comment Share on other sites More sharing options...
pasmon79 Posted July 12, 2020 Author Share Posted July 12, 2020 Is it possible to print out the Variable 3 in the "EventLog", i.e in Daily Journal? Link to comment Share on other sites More sharing options...
qmjs Posted July 12, 2020 Share Posted July 12, 2020 I think so. The fatecards Daily_Offline uses a lot of variables. But, you'll have to look around to determine exactly what to use. In those, %+d is referring to the last OutputAmount value used. If you can't figure out the appropriate variable, just add a dummy statement with the number you want as outputamount. Link to comment Share on other sites More sharing options...
pasmon79 Posted July 13, 2020 Author Share Posted July 13, 2020 Ok, thanks figured it out. Link to comment Share on other sites More sharing options...
pasmon79 Posted July 14, 2020 Author Share Posted July 14, 2020 Can "OutputAmount" use variable name in order that "%+d" displays the "updated" value of variable ? Link to comment Share on other sites More sharing options...
qmjs Posted July 15, 2020 Share Posted July 15, 2020 (edited) Yes. I use one calculation that includes OutputAmount="Count.Population", so any variable that has a value defined already should work. Edited July 15, 2020 by qmjs Link to comment Share on other sites More sharing options...
pasmon79 Posted July 15, 2020 Author Share Posted July 15, 2020 (edited) %d is used to output previously stored numerical value only as in c++. It gives exact value of variable while in conjugation with &variable. How to use this combination of %d and &variable in Text= Edited July 15, 2020 by pasmon79 Link to comment Share on other sites More sharing options...
qmjs Posted July 15, 2020 Share Posted July 15, 2020 (edited) I can't quite tell what you are asking, I think the charset is making it confusing. But, as for other variable types, %1$s refers to the first Actor's first name, and %2$s is the second actor's first name. (In most cases the first one listed is referred to as Actor 0, but not with these variables.) The highest these go is %3$s, but it should actually apply to any number of actors in a specific action. If only one is listed, %s works. There is also some instances where %d is used instead of %+d, usually referring to the Count= value in a previous Com_Give statement. I suspect these are simply related to the return values from the exe. Those are really the only formats used. Edited July 15, 2020 by qmjs Link to comment Share on other sites More sharing options...
Recommended Posts