## Notoriety Formula and Standings (updated Jan 4)

The place to discuss scripting and game modifications for X³: Reunion.
AalaarDB
Posts: 2279
Joined: Thu, 29. Jan 04, 09:19

### Notoriety Formula and Standings (updated Jan 4)

There is a notoriety script on page 2 at the top. It is not mine so I will not link it here.

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``````
In this code, the modifier is the value that you input, while the value in the code is just a temporary value that gets added.

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
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:
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.

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!
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.
Last edited by AalaarDB on Tue, 10. Jan 06, 02:13, edited 6 times in total.

nuclear_eclipse
Posts: 1128
Joined: Thu, 2. Sep 04, 01:54
Thank you! I've been trying to figure out how it works, and there was a thread about it a long while ago, but it was horribly vague. I will be using that formula a lot now =]

Thanks again, and nominating it for tutorial sticky...

AalaarDB
Posts: 2279
Joined: Thu, 29. Jan 04, 09:19
Wait till I decode the Universe map.... again!

Red Spot
Posts: 3224
Joined: Fri, 4. Feb 05, 14:44
wait till you try and remove notority ..

when for instance adding 15 .. you gain a bit ..
when removing 15 .. you loze a lot ..

(at least thats results I got when messing with notority ..)

G

AalaarDB
Posts: 2279
Joined: Thu, 29. Jan 04, 09:19
I never tested is above 15, I'll try now!

Edit: At first testing 15 and 16 and 100 worked fine... then ....

It worked to subtract 100; I got -1250. Then I added 100, I did not get 0 like I should have, it was 1875 or something.... So I added 100 again and that worked, it was exactly 1250 more, at 3125. Then I subtracted 100 from it, and than gave me a -4937 number, clearly wrong.

I am looking into it, but it looks like an Egosoft bug, and it looks like it always has been, because there were these reports in X2 too.

Red Spot
Posts: 3224
Joined: Fri, 4. Feb 05, 14:44
iirc ..

I started with adding 20 .. and got a bit a boost but way to much off what I needed ..
so I removed the 20 .. and ended up far below what it used to be ..
(even got me the message about lozing notority)

Edit;
didnt see your edit in time .. but that would explain a lot ..

Edit2;
maybe some kinda hidden multiplier that multiplies notority if it changes more in a short amount a time ..(just guessing here)

G

nuclear_eclipse
Posts: 1128
Joined: Thu, 2. Sep 04, 01:54
Is the equation perhaps relational to your current standing with the race, or does the erroneous results only happen when switching from adding to subtracting notoriety, or subtracting to adding?

Perhaps this is not really bug but a 'feature' that makes reversive notoriety changes worth more in order to give higher importance to that outlying event?

Effect would be such as attacking a race ship just after you spent an hour killing pirates in their sector. Because you just upped your notoriety, they want the initial rep drop to be more severe to discourage that see-saw action....

Just thoughts to throw in the mix. I used your formula in a lib script for my Syndicate mod, as it's certainly much more accurate than arbitrarily adding notoriety, but I'd kind of like to know what's going on with these weird occurences. Perhaps it should be reported as a bug?

Red Spot
Posts: 3224
Joined: Fri, 4. Feb 05, 14:44
nuclear_eclipse wrote:Is the equation perhaps relational to your current standing with the race, or does the erroneous results only happen when switching from adding to subtracting notoriety, or subtracting to adding?

Perhaps this is not really bug but a 'feature' that makes reversive notoriety changes worth more in order to give higher importance to that outlying event?

Effect would be such as attacking a race ship just after you spent an hour killing pirates in their sector. Because you just upped your notoriety, they want the initial rep drop to be more severe to discourage that see-saw action....

Just thoughts to throw in the mix. I used your formula in a lib script for my Syndicate mod, as it's certainly much more accurate than arbitrarily adding notoriety, but I'd kind of like to know what's going on with these weird occurences. Perhaps it should be reported as a bug?

nope .. when I did it .. I did it from a savegame where I had a high enough standing with the argon to buy M3s ..
added (iirc) 20 .. got a nice boost .. (prob more than killing 20 pirate m3s in argon space)
but when I removed 20 .. I lost notority up to the point where I went a level down from what it was with the argon before I started ..

so it doesnt seem to be connected to getting from foe/friend friend/foe ..

I can say this .. in my hunt script its adds 1 and 2 notority for killing an M4/M3 .. and that seems 'stable' ..

so maybe it just acts up when switching between adding and removing ..
(wich is basicly the same as friend/foe switching ..)

G

AalaarDB
Posts: 2279
Joined: Thu, 29. Jan 04, 09:19
I'm working on it...
The fault is not in the transition between negative and positive. I had 500,000, added -10,000, got 1,000,000 (max). It's got to be an overflow someplace, however, that's extremely hard to figure out. Or it could be some other bug not an overflow.

Anyways this is on the backburner as I go on the the universe map.

I took 1mil and added -1.
979,998
960,397
941,188
922,363

I took -1mil and added 1.
-980,000
-960,400
-941,192

Red Spot
Posts: 3224
Joined: Fri, 4. Feb 05, 14:44

(thats what those results make me believe ..)

G

AalaarDB
Posts: 2279
Joined: Thu, 29. Jan 04, 09:19
It sort of looks that way. However, the difference in the positive and negative delta is puzzling, possibly explained by the fact that 0 is probably positive. But there's still an error when you add a negative number and get a larger positive number.

Cycrow
Moderator (Script&Mod)
Posts: 21061
Joined: Mon, 15. Nov 04, 00:26
just thought ill point out, the negative numbers seem to be about double what the positive is, however ,there not consitant

adding 2 to the noteriaty gives you a boost of 25
but doing -2 removes about 50
but sometimes its not exactly 50, i've seen it take off 49,50 anf 51 b4

so if u take off an amount and then add double, you should be close to where u was, obviosuly the higher the numbers, the further apart it gets, which is a tad annoying

AalaarDB
Posts: 2279
Joined: Thu, 29. Jan 04, 09:19
Close, but not exactly true. Do the same thing you just said, but switch all signs. Subtract 2 from a negative number, you get number - 25, then add 2 to that and it rises by 50 also.

Then, try a number alot higher than 2. Even a round number like 100 will produce unround results.

Cycrow
Moderator (Script&Mod)
Posts: 21061
Joined: Mon, 15. Nov 04, 00:26
i've just noticed that it seems to change the closer u get to zero

so the number you rep changes by depends on what u already have, around 0, when -2 you lose about 40, but then each time you try it again this number seems to go down, the same is true when your high, like having 200 rep, u end up losing about 55, very odd
i've not tryed it for the higher extremes yet thou

y they didn't make postivie and negative changes match i dont know

AalaarDB
Posts: 2279
Joined: Thu, 29. Jan 04, 09:19
Log on to devchat, CBJ and ticaki are here but haven't answered me yet.