Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
SpecialThreatValue
#1
SpecialThreatValue, what does it REALLY do. The rules.ini guide says:

Quote:SpecialThreatValue=
Can be set to '0' or '1' and determines if this unit over-rides the default threat evaluation logic when the AI makes an assessment of potential threats to itself, or when evaluating potential targets for attack. If you set this to '1', you must also set ThreatPosed=0, or the special logic does not apply as the ThreatPosed= will take precedence.
I don't really understand what that means. WW seems to put it on units completely randomly, including Tanya, SEAL, engineers, IFV, MCVs, some civilian vehicles, and the Missile Silo.

Also, not all of the units that have SpecialTheatValue=1 in the YR rules have a ThreatPosed of 0. Does anyone have any idea what the function of this elusive tag really is?
[Image: alexstand1.gif]
Reply
#2
As far as I can tell, it means that units with SpecialThreatValue=1 take precedence over other units when the cpu determines what it should attack. In other words, it tells the cpu to kill that unit nownownow!
Reply
#3
How did you determine that? By guessing?
[Image: alexstand1.gif]
Reply
#4
Going by what the guide says Omegared appears to be correct. However, i don't believe any of the threat functions actually works as the AI in RA2 (and TS) is relativly simple (in that it just builds specified taskforces). I have never seen it react to anything i have ever done except from just attacking me with whatever it has lying around.
As far as i know there is nothing specified in the AI ini's to complement any threat functions that may still exist.

If im wrong im sure someone will correct me but;

The threat functions were probably used to make the AI seem smarter by allowing it to evaluate the forces sent against it, it could then pick specfic targets first depending on their threat (so it would kill the most dangerous first). Specialthreat would override the normal threatposed to guarantee the AI would kill those units first. But as i said i don't think it works as the AI just kills whatever it sees first regardless of threat.
[Image: sig.jpg]
Reply
#5
So all of the threat stuff is mostly useless?
[Image: alexstand1.gif]
Reply
#6
Threat Rating Node and Threat Evaluation Controls.
Code:
; default threat evaluation controls
MyEffectivenessCoefficientDefault=200
TargetEffectivenessCoefficientDefault=-200
TargetSpecialThreatCoefficientDefault=200
TargetStrengthCoefficientDefault=-200
TargetDistanceCoefficientDefault=-10

; defaults for dumb threat evaluation
DumbMyEffectivenessCoefficient=200
DumbTargetEffectivenessCoefficient=200
DumbTargetSpecialThreatCoefficient=200
DumbTargetStrengthCoefficient=200
DumbTargetDistanceCoefficient=-1

EnemyHouseThreatBonus=400
By default, each house uses the dumb eval. When a building with IsThreatRatingNode=yes is built, that house switches to the "default" labeled values. As you see, in that mode the threat of non-special ThreatPosed= objects is decreased in favour of the SpecialThreatValue stuff.

I did notice an improvement in AI behaviour after adding that flag to battle labs and switching these coefficients to fractions as DZ recommends. It was fun to see the AI forces stop midroute, turn around and take another, less guarded path to my base when I sent a large force to intercept them on their original path. Big Grin And seeing the flaktracks drive around my Prism Towers just out of their range towards an unprotected base portion...

Worth playing: 1 | 2 | 3
Reply
#7
Also, would the threat rating logic not come into play when a taskforce is commanded to 'attack anything' in a scripttype. But why do civilian units have threat ratings? The most civilians are armed with is a pistola, which takes ages to kill anything
Ares Project Manager.
[Image: t3wbanner.png]
[Image: cncgsigsb_sml.png]
Open Ares positions: Documentation Maintainer, Active Testers.
PM if interested.
Reply
#8
Thanks for the insight DCoder!
[Image: alexstand1.gif]
Reply
#9
to show that those units can attack?

threatposed also has a effect on defence building

also when u mean fractions you mean like 4.0 and 2.0 right?

your precise values? Big Grin
Reply
#10
Quote:Also, would the threat rating logic not come into play when a taskforce is commanded to 'attack anything' in a scripttype. But why do civilian units have threat ratings? The most civilians are armed with is a pistola, which takes ages to kill anything
Because engine use logic for all objects: not separately for civilian and real unitsWink
ARM forever - x86 sucks!


Reply
#11
Vinifera, glad to help Wink

AliG, I didn't try tweaking them, I simply found this quote in my "random notes.txt", which seems to be years old, TS oriented, and is most likely DeeZire's (but is not in his Tutorials section), and applied the proposed conversions. (Apologies for not posting it earlier.)
Quote:Activating The Threat Rating Node
The Threat Rating Node was originally intended to be used by GDI as a mechanism for supporting the game's original concept of advancement through the veteran system, in a bid to detract from 'rush' tactics. The aim was to ensure players no longer considered their troops expendable, by rewarding each unit with upgraded characteristics for killing enemy units

The TRN would be employed to evaluate the threat posed to the player by incoming enemy forces, and then allow the computer to respond in a more logical fashion, by reacting to the threat with a force or unit with at least an equal chance of destroying the threat.

The TRN can be partially re-enabled by taking the following steps. It's worth noting several points here:-

(i) Many mods employ the TRN by simply allowing you to build the appropriate structure. This is not enough! You have to enable additional logic.

(ii) There's a lot of work involved in getting it to work as it should! You will end up having to edit every unit's entry in the RULES.INI file at least twice.

(iii) Once it's working, you will want to go back and tweak three things, one being the Default Threat Evaluation Controls, the second being the ThreatPosed of the units in the game, and the third being the ThreatAvoidanceCoefficient of each unit, in order to get the TRN working as you'd like. This is the only way to adjust it's efficiency.

To Begin
First off, you have to be able to build the TRN itself. Originally, it was designed as a third plug-in for the Upgrade Center, but if you follow these steps, you can apply the logic to any structure.

First, open your RULES.INI file. Find the entry for [GAPLUG1]. You will see that the game designers have put a comment there - OBSOLETE. Delete the comment if you like! In order to make it buildable, simply change the TechLevel entry to whatever you like. Personally, I set it at 10, as it does give GDI an advantage which is offset if Nod get to build a Missile Silo.

One thing to note is that the RULES.INI entry for the Threat Rating Node is listed as [GAPLUG1] and it's image data in ART.INI is [GAPLUG_D]. This is the same information used by Firestorm, which uses this data for the Drop Pod Node which allows the player to use Drop Pod reinforcements. Thus you will have to create new entries in RULES.INI and ART.INI which are copies of these but with new names if you want to able to use both.

The vital thing to note here is that there is an entry which says IsThreatRatingNode=true. This is essential to activate the Threat Evaluation Logic. As long as your structure has this entry, it will be enabled as a TRN.

You can now build the TRN!

Activate The Threat Evaluation Logic
Now, you have to make the TRN do it's job. Open the RULES.INI file, and search for 'Default Threat'. You will see two sections, one is Default Threat Evaluation Controls, and the second is Defaults For Dumb Threat Evaluation. There's two things to do here.

(i) Ensure that none of the lines in these two sections is commented out. I have had emails from people saying that they were not commented out anyway, but certainly in my copy of TS (V1.00, which I purchased on the day of release) they were.

(ii) The lines tell you that these values are coefficients. However, the values left in there are percentages. In order to convert them, you must make the values so that they are multiples of 1 rather than multiples of 100. So for example, 200 becomes 2.0 etc. Where the percentage is negative (eg -10), change it so that it becomes 0.9 (ie a percentage change of -10% is equivalent to a multiplier of 0.9).

It's important to do this, for reasons which will become clearer, but think of it this way - you have a soldier (with say a threat rating of 1) faced with a tank (say threat rating of 100). Your effectiveness would be 1 x 200 = 200. The target effectiveness would be 100 x -200 = -20000. The tank has more strength than the soldier, so as a threat it gets a bonus of -200 x strength (probably another -20000!) and it's within firing range of him, so it gets another -10 x distance. Take the difference between threat ratings and the result is likely to be -45000 or something. This is way too stupid a figure to work with, and we have used just about the simplest example of where the TRN would come in useful. Besides, in this (made up) example, the soldier gets a higher threat rating than the tank - in other words, he would gladly run at it!!

Now, do it with my method instead. The same soldier (threat rating 1, strength 20) is faced with the same tank (threat rating 100, strength 120). The tank is 3 'tiles' from the soldier (in other words, its a threat to him as he's within it's firing range). His effectiveness against the tank would be 1 x 2.0 = 2.0. The tanks effectiveness would be 100 x 0.02 = 2.0. Pretty equal - he may even shoot at it in a bid to defend himself. BUT, it has a much higher strength than him, so its strength coefficient is applied (0.02 x 120 = 2.4) so its new threat is actually 4.4. Oh oh, perhaps shooting it would be a bad idea! Then, he's within firing range (!) so it gets a further bonus of 0.9 x 3 = 2.7 so overall the tank poses a threat rating of 6.1 versus the soldier's 2.0. More realistic - the soldier can only do one thing - RUN AWAAAAAAAAY!!

Note that the above logic is only applied if the TRN is active (in other words you have a structure in your base defined as a TRN with the line IsThreatRatingNode=true included in it's RULES.INI entry.

Get The TRN To Affect Your Score
Now, this is one possible reason why the TRN was rendered obsolete. Nod have no such facility to aid them in battle - the TRN is exclusive to GDI (unless of course Nod manage to capture it in the battle, very difficult). Thus GDI commanders who employ this could, in theory at least, end up with higher scores in every game they play against Nod - even if they lost the game, provided they had an active TRN throughout the game.

However, you can get the TRN to influence your score as a GDI commander. This makes some sense - after all, if you manage to keep more troops alive than your opponent (ie your kill/loss ratio is better) you get a bigger bonus to your score. Plus, troops which constantly engage units sensibly and stay alive get advanced through the veteran system, which in turn gives them a higher threat rating, meaning they can take on more powerful opponents - again, enhancing your score. Naturally, it's the TRN which enables this opportunity.

Your score (with the TRN active) will obviously benefit anyway, but to enable a proper influence, open the RULES.INI file again, and find Bret's Hack Section. You will see a line commented out which says StatisticTimeInterval. This was used in Red Alert, but appears to enhance the TRN's ability to affect your score. Delete the comment. The value is the number of seconds between which the score statistics will be worked out, so change this accordingly. I have it set at 10 seconds (the lower the value the more frequent the stats are worked out), but any lower than that appears to slow the game a little.

I have definately seen a difference in scores obtained as GDI when I have won games against Nod with and without the TRN active. If you set AIBuildThis=yes in the RULES.INI entry for [GAPLUG1] then it appears the difference is negligable - the ability of the TRN to affect your score appears to be nullified if your opponent has one too.

Give The TRN A Special Weapon?
This is a matter of personal preferance, but in line with the basis of having a TRN, I have made it a pre-requisite for getting the Drop Pod Reinforcements. You do not need to have Firestorm installed to make use of Drop Pod Reinforcements as long as you have Tiberian Sun version V2.00 or later.

To give the Drop Pod Reinforcements to the Threat Rating Node, just add DropPodSpecial to the list of [SuperWeaponTypes] in RULES.INI. Then add this line to the entry for the Threat Rating Node;-

SuperWeapon=DropPodSpecial

Finally, add a listing for the Drop Pod Reinforcements after the other Super Weapon entries;-

[DropPodSpecial]
Name=Drop Pods
IsPowered=true
RechargeVoice=00-N114
ChargingVoice=00-I374
ImpatientVoice=00-I132
SuspendVoice=00-I344
RechargeTime=7
Type=DropPod
Action=DropPod
SidebarImage=PODSICON

There's an interesting point here. If you give the TRN a Super Weapon, it's worth editing that Super Weapon entry in RULES.INI to enable some hidden EVA voices that appear to be linked to the TRN. Try putting these in for the voices:-

00-I200 - Establishing Battlefield Control, Standby
00-I352 - Your Defeat Is At Hand
00-I348 - Surrender Is Your Only Logical Option...
00-I346 - Retreat Is Your Only Logical Option...
00-I344 - Inferior Tactics Detected
00-I350 - Observe Superior Tactics While You Still Have Human Eyes
00-I356 - You Have Been Marked For Termination - Prepare For Sterilisation
00-I360 - Time To Erase The Human Factor From This Equation
00-I370 - Your Probablilty Of Success Is Insignificant And Falling
00-I372 - Surrender Is Acceptable And Preferable Against The Odds That You Face
00-I374 - Data Received Indicates That You Are A Threat
00-I376 - Defeat Of Enemy Predicted In T-Minus 3...2...1...

Note that, unlike the other in-game voices, these cannot be re-mapped for CABAL. So if Nod captured the TRN and got this, they would hear EVA rather than CABAL. Similar voices exist for CABAL - just change the filename so they read 01-Innn instead of 00-Innn.

Make Sure Unit Statistics Are Usable By The TRN
Ok, almost finished! Here's where the real work starts. You must now edit the entry in RULES.INI for every unit. I know it's a pain, but you have already seen what the default values in the Threat Evaluation Logic did!

You need to edit 1 line and include another for each unit.

For each unit, edit the ThreatPosed=nn value so it is between 0 and 100. Map it out on paper first, and it will save you some time. Write each unit from the game (or your mod) and write a ThreatPosed value next to it. Consider the ThreatPosed value carefully. You should remember obvious things like a MMII should have near enough the highest, and a Rifle Infantry should be pretty low, but remember to consider each value relative to other units. For example, you dont want to end up with Disruptor Tanks running away from a Nod Artillery! Make sure things are on an even scale, and you will retain the balance in the game as well as enhance the TRN's performance without giving GDI a massive advantage or (the opposite) having GDI's troops running scared from something they could easily beat! Doing this enables you to add a further degree of customization to your mod as well as a personal touch to the AI and how it conducts battle against human players.

Thankfully, the next bit is optional. You can include a line for every unit which is:-

ThreatAvoidanceCoefficient=nn

where nn should be between 0.01 and 1.00. This means that when the TRN is active, this coefficient is applied to the unit so it will avoid threats rather than take them on. One obvious example where this is used is the Harvester - it can't shoot anything anyway, so it's better for it to avoid trouble in the first place! The higher (nearer to 1.00) that this value is set, the more likely the unit is to avoid trouble. Curiously, the only unit in the game with this is the Harvester. Then again, it would be crazy to give the MMII this as it's designed to kick ass, not run away at the first sign of trouble! It is worth applying it to any unit that is defined as Category=Support, as these units cannot retaliate to threats anyway. Examples include the Mobile Repair Vehicle and Weed Eater. Giving it to APC's seems pointless, as they would not move into a base which contained lots of base defence structures. With this value set at 0.99 and the TRN active, the harvester is less likely to wander near enemy bases for Tiberium (as it sometimes does).

Other Notes
Other things I have noticed with the TRN activated are the following (I am still testing these but it's proving difficult to fully substantiate. Currently, I have observed all of these in 85% of games played).

-Mech Units gain the 'Laser Sight' (even when this has been disabled)
-Units automatically scatter from enemy fire (even when disabled)
-Veteran/Elite units automatically return fire (even when disabled)
-Units with Crusher=yes set automatically crush enemy soldiers (even when disabled)
-Base defences tend to target enemies with the highest threat rating. One example is when a Cyborg Commando enters a GDI base, the RPG's turn and aim at him before resuming fire at other threats.

Best of all, the Hunter Seeker logic appears to be affected. When used in conjunction with an active TRN, the Hunter Seeker no longer picks targets quite as randomly. When the V1.16a.1 patch came out, the Short Game option was added. In the V1.13 patch, the Hunter Seeker code was amended to target those buildings which may cause an end-game situation (for example, an enemy MCV). The two patches together mean that any structure or unit with SpecialThreatRating=1 set in RULES.INI is significantly more likely to be targetted! I have tested this numurous times and found it to work. The random nature of the HS means it could and would hit useless stuff (even civilian buildings) but with the TRN it's much more likely to hit something important to the enemy.

Final Note
It's worth noting that giving the TRN to GDI does give them an advantage that Nod cannot have. For this reason, I personally would set BuildLimit=1 on the Upgrade Center. This forces the player to choose between 2 of the 3 upgrades, thus having to decide upon a strategy which best fits their style of play and/or the circumstances of the battle. Remember, the Ion Cannon is only any good if you can see a target - if you're up against purely Nod armies and they're all cloaked, the HS/TRN combination is a good option. Consider this also - by default, the GDI Upgrade Center has SpecialThreatRating=1 set. Put two of these in your base and you're just asking for an enemy GDI Hunter Seeker to take one out if they too have a TRN.

Then again, enabling the old GDI Radar Installation, making it expensive, and allowing it only to be upgraded by a TRN may be a better option.

I'm not sure it's 100% correct, a lot of stuff could have changed since TS days, and it doesn't explain how Dumb vs Default stuff works, but the number changing sure made a difference.

Worth playing: 1 | 2 | 3
Reply
#12
Cool. Actually I remember reading that article way back when I still modded TS. Though it's been about five or six years so I totally forgot. Thanks everyone.
[Image: alexstand1.gif]
Reply




Users browsing this thread: 1 Guest(s)