Adding and subtracting notoriety from a script can be tricky. Here is what you need to know. First the formula, thanks to ticaki:

Code: Select all

```
if oldnoto > -1000 AND modifier < 0
value = (oldnoto+1000) * modifer/100
if oldnoto < 0 AND modifier > 0
value = oldnoto * modifer/100
if ( ABS(modifier) != 1 && ( ABS(value) < ABS(modifier)*5 ) )
value = modifier * 5
newnoto = oldnoto + value
```

This is the formula that the internal game uses. HOWEVER, the script command changes things a bit. The script command multiples the modifier by 2.5 (in integer math) before continuing. Thus, the command "add notoriety value= 1" gives the result (1 * 2,5 = 2) * 5 = 10. Similarily (2 * 2,5 = 5) * 5 = 25.

Next, the first 2 if statements deal with high or low notorietys and modifiers. When the existing notoriety is above -1000 (mad at you, but relatively neutral) and you are subtracting notoriety, the modifier becomes percentage points. The same thing with negative existing notoriety and adding notoriety. However, don't forget that there is a 2.5 multipler, so value 40 = 100%.

So, when the player has a positive notoriety and you want to subtract from it, but you want the end notoriety to still be positive, don't use a value above 39! If you subtract 40, you are telling the script to subtract 100%.

Please note that there is an overflow with high numbers, you should not ever need to use such high numbers, but just beware.

Standings for the Argon:

Hero of the F ...........333,333 _ 1,000,000

Protector F ...............100,000 _ 333,332

F Overwatch...............33,333 _ 99,999

F Marshal....................10,000 _ 33,332...Friend at 10,001

F Guardian ..................3,333 _ 9,999......Neutral at 10,000

Trusted Ally .................1,000 _ 3,332

Accepted Advisor ............333 _ 999

Confirmed Friend ............100 _ 332

F Associate ......................33 _ 99

F Member .........................10 _ 32

Citizen ............................-10 _ 9

Suspected Foe .................-11 _ -100

Known Antagonist ...........-101 _ -1,000

Confirmed Insurgent ....-1,001 _ -10,000....Neutral

Confirmed Enemy ......-10,001 _ -100,000...Foe

Enemy of the F .........-100,001 _ -1,000,000

TIPS:

Argon add notoriety race=Player value=$notoriety is what you want.

Then, $notoriety= get notoriety from race Argon to race Player is also what you want.

While experimenting with notoriety and friend / foe settings, I noticed that almost nothing went enemy when I was supposed to be enemy. It seems it takes a while for the other ships' settigs to be updated. Use $object-> set relations from notoriety and [TRUE] for critical parts.

You can set the notoriety to whatever you want very simply, without querying the current notoriety or messing about with the logic and formulas. First, add -40. Then, add +40. You are now at 0!

Here is the old notoriety formula that is incorrect:

I did not get exact results. However, the results I got lead me to believe the borders fall exactly as shown, because a few did fall on the borders. For instance, Accepted Adviser was in fact 999 and Trusted Ally was 1,000. Also, F Guardian was 3,333 low while F Member was 32 high.So I was testing using ints as races when I noticed adding 1 notoriety didn't increase it by 1... it increased it by 10. But adding 2 doesn't increase it by 20, it increases it by 25...

Here's the formula, but remember this is integer math:

Notoriety = Notoriety + ( ( (add * 5) / 2) * 5).

An easier way to remember it is add * 12.5 for even, and for odd do the same but subtract (or add if the number is negative) 2.5. Odd and even are different because of the integer division, the .5 in the odd case is dropped.

So adding 1 really adds 10, 2 really adds 25, 3 is 35, 4 is 50...

Remember, this is what is added to the current notoriety. So if I add 1 twice I do not get 25, I get 20. Therefore an easy way to add 5 would be to add 2 and subtract 1 twice.

What's funny is that you can only manipulate the notoriety in multiples of 5. But the game starts you out at 0 Argon, 100 Boron!, -15 Paranid, 0 Teladi, .... and -13 Split!