Jump to content

Xml code


pasmon79

Recommended Posts

  • Replies 61
  • Created
  • Last Reply

Top Posters In This Topic

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=0
Var3=Var3+Var1*1
Var3=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+Var2

The 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 by qmjs
Link to comment
Share on other sites

  • 2 months later...

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

%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 by pasmon79
Link to comment
Share on other sites

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 by qmjs
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...