Jump to content
Sign in to follow this  
theavonlady

Bad consequences of negative player score/rating

Recommended Posts

In testing I found that when I changed the player's rating at the start of a mission from zero to -6000, the player was automatically targetted and killed by units on the player's side. wow_o.gif

Anyone else familiar with this?

Is there a workaround? Or do I simply have to be safe and wait for mission end to calculate in the accumulated negative score? rock.gif

Share this post


Link to post
Share on other sites

Giving a negative addrating is making the unit to be seen as the worst traitor of the whole history (the same when you begin to teamkill several of your squad or side members).

Deathmatch 'missions' are made like this actually

If you add this in the init line of each units, as an example

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">this addrating (-(rating this)-10000)

Everyone will hate so much everyone that they want to have them dead , same side of not.

Share this post


Link to post
Share on other sites

No. OFP has a separate method of killing you for team kills. You could have a very high positive score and if you start killing your own side's units, OFP's AI will still go after you even if you've still got a remaining high score.

Here you haven't killing anyone, just got a negative rating. Of course, there is the natural law fo survival of the species............................. tounge_o.gif

Share this post


Link to post
Share on other sites
No. OFP has a separate method of killing you for team kills. You could have a very high positive score and if you start killing your own side's units, OFP's AI will still go after you even if you've still got a remaining high score.

Here you haven't killing anyone, just got a negative rating. Of course, there is the natural law fo survival of the species............................. tounge_o.gif

There is actually no difference for the AI. TKs give you a negative score (even if u have still a positive one on the scoreboard) and the AI will see you as an enemy.

And if you give the Player a negative score at the beginning of a mission, it will have the same effect: the AI will act like if you are an enemy.

Why do you want to give the player a negative score at the beginning of the mission, Avon?

MfG MEDICUS  smile_o.gif

Share this post


Link to post
Share on other sites

You may aswell just add -6000 at the end of the mission, why bother doing it at the start if it is going to cause problems?

RED

Share this post


Link to post
Share on other sites
Quote[/b] ]Why do you want to give the player a negative score at the beginning of the mission, Avon?

As Sanctuary already mentioned above:

This method is being used in Deathmatch missions, and

i'm sure it may fit into some other situations too.

e.g: you're a desserteur, or you start in prison of your own

forces - must escape and find some documents, which will

show that you're not guilty - etc.

~S~ CD

Share this post


Link to post
Share on other sites
You may aswell just add -6000 at the end of the mission, why bother doing it at the start if it is going to cause problems?

RED

I have a condition met somewhere at the beginning of the mission that sets the negative rating.

The mission has about 5 different endings, so now I would have to adjust all of the 5 ending triggers to tabulate any accumulated negative ratings.

Much more of a pain, don't you think? rock.gif

Share this post


Link to post
Share on other sites
this setcaptive true

Then you won't be shot by anyone, unless that isn't a problem Avon?

Quote[/b] ]The mission has about 5 different endings, so now I would have to adjust all of the 5 ending triggers to tabulate any accumulated negative ratings.

Much more of a pain, don't you think?

Depending on the complexity of your mission it doesn't sound like much pain at all.

RED

Share this post


Link to post
Share on other sites

Actually, if i understand you correctly this has been known for a long time, it was even adressed in an old cwc patch, where the limit was lowered so the ai does not kill you for every accidental tk.

From the official Comref:

Quote[/b] ]unit addRating number

Operand types:

unit: Object

number: Number

Type of returned value:

Nothing

Description:

Add number to unit rating. This is usually used to reward for completed mission objectives. Rating for killed enemis and killed friendlies is adjusted automatically. When rating is lower than zero, unit is consider "renegade" and is enemy to everyone.

Example:

player addRating 1000

This has nothing to do with the score from the scoreboard, you can change that too:

Quote[/b] ]unit addScore score

Operand types:

unit: Object

score: Number

Type of returned value:

Nothing

Description:

MP only: add unit score. This is shown in the "I" MP screen as total.

Example:

player addScore 10

Share this post


Link to post
Share on other sites

I cant recall just now how the score part of the description.ext works, but if your mission has that failed objective as a proper objective, ie, defined in the breifing.html, and instead of giving the player addrating -6000 you simply give him a FAIL, that should do the trick of knocking his score down (does anybody actually READ the scores?rock.gif?)

i dont think addscore has any effect for a SP mission

Share this post


Link to post
Share on other sites

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> When rating is lower than zero, unit is consider "renegade" and is enemy to everyone.

Disagree.

I have finished some CWC missions with ~-100 points. biggrin_o.gif

It should be ~-500 if u want friendly units to fire on u.

Share this post


Link to post
Share on other sites
I cant recall just now how the score part of the description.ext works, but if your mission has that failed objective as a proper objective, ie, defined in the breifing.html, and instead of giving the player addrating -6000 you simply give him a FAIL, that should do the trick of knocking his score down (does anybody actually READ the scores?rock.gif?)

These negative ratings in my mission aren't for failed objective but for poor performance events while attempting to achieve an objective.

Anyway, I'll accumulate the addRating values in a global counter variable and adjust the final mission score in the various end triggers.

Thanks all for your help.

Share this post


Link to post
Share on other sites
No way around it.  Do some math.

I've combined math with reading comprehension.

0 - 6000 = Run, Sally, run! ghostface.gif

Share this post


Link to post
Share on other sites

OK. Quick visual syntax check assistance, please. Reminder: this is an SP mission.

In init.sqs, I added a global variable:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">scoreadjust   = 0

One of my calls to a new script to tabulate score adjustments is this:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_vehicle addEventHandler ["killed",{[_this select 0,4000] exec "\Amore\Avon\Scripts\updrating.sqs"}]

Script "updrating.sqs" contains the following:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_unit = _this select 0

_points = _this select 1

? (_unit != "aP") : exit

hint "player's score adjusted"

scoreadjust = scoreadjust + _points

exit

And, finally, immediately before every mission end trigger, a script is run which includes the following line:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">aP addRating scoreadjust

Will it work? Anything blatantly wrong here with syntax or logic? TIA. smile_o.gif

Share this post


Link to post
Share on other sites
<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> When rating is lower than zero, unit is consider "renegade" and is enemy to everyone.

Disagree.

I have finished some CWC missions with ~-100 points. biggrin_o.gif

It should be ~-500 if u want friendly units to fire on u.

That's what i thought was "fixed" in that patch a long time ago. I just quoted the comref, although i thought you could have a few points below zero without going renegade. Well, lets check the readmes to the patches to see if this is mentioned somewhere...

Share this post


Link to post
Share on other sites
Script "updrating.sqs" contains the following:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_unit   = _this select 0

_points = _this select 1

? (_unit != "aP") : exit

hint "player's score adjusted"

scoreadjust = scoreadjust + _points

exit

HELP! crazy_o.gif

Why am I getting the following error message?

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">'? (_unit != "aP") |#|': Error Generic error in expression

sad_o.gif

Share this post


Link to post
Share on other sites

?! _unit == player

or,

?!_unit == ap

no need of "" as they make the player name variable into a string

tj

Share this post


Link to post
Share on other sites
?! _unit == player

or,

?!_unit == ap

Both:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">?!_unit==aP: exit

and:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">?!_unit=="aP": exit

Give the same error message:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">'?!_unit==|#|aP': Error!: Type Object, expected Bool

Quote[/b] ]no need of "" as they make the player name variable  into a string

Doesn't it make logical sense here that I want to compare the value of variable _unit with string "aP"? rock.gif

Share this post


Link to post
Share on other sites

? !(_unit == player): exit

Why even have this check running? It seems completely pointless.

RED

Share this post


Link to post
Share on other sites
? !(_unit == player): exit

Why even have this check running? It seems completely pointless.

As I mentioned much earlier, this script is also called by and addEventHandler, ["killed"] call. I only want to subtotal score changes if the killer of that unit was the player and not an AI unit on the player's side.

Now, I'm a bit confused here between "player" and "aP". The former is a reserved word for the player but the latter is the name assigned to the player's unit.

I would assume that "_this select 1" returned from the above addEventHandler command returns the string value of the unit that made the kill. If so, that would be "aP" - not player and I would assume it's returned as a string.

What have I got wrong here? rock.gif

Share this post


Link to post
Share on other sites

no, it does not give you "aP" as a string. it gives you the content of player/aP whatever. something like "WEST ALPHA BLACK 1"

Share this post


Link to post
Share on other sites
no, it does not give you "aP" as a string. it gives you the content of player/aP whatever. something like "WEST ALPHA BLACK 1"

Yuck! That's absurd!

Nevertheless, what's causing the syntax errors? rock.gif

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×