Jump to content


Photo

UnitStats


4 replies to this topic

#1 Kaiser Soze

Kaiser Soze
  • Members
  • 16 posts

Posted 08 December 2006 - 07:14 PM

Hi,
I'm doing the DoWPRO AI (with Larkin's help) and I will use you great mod as core for our AI.
Right now I'm only working on a script that creates the unitstats file reading the luas.

I have it almost finished (in fact I did a variation that calculates the DPS of every weapon) but I have a few question, mainly about what values have to use in unistats.ai.

Unit Strength
----------------
I've read that this value should be close to the cost of the units.
But I've also notices that you use "1000" for uber units, no matter its cost. So I'm a bit confused.
¿It's 1000 the maximun value?, what is this strength used for?.
I mean, If it just look at cost it not be the strength of the unit. If I'd know what will be the use of this number I can give it a more accurate value using not only cost but also DPS, armor and hitpoints.

Unit Rating
----------------
Again I'm not sure of the use of this value. the doc says that is used to give an importance to the building of the unit. so the more rating the more probably the ai will build it. But I thought the Ai also look at build order (plans) and unit effectiveness to decide what unit build. So, again I'm a little bit confused.

Weapon effectiveness
----------------
I would like to know what is this number used for. Right now I calculate the DPS of every unit and give the higher a 10.0 effectiveness. After that I can calculate a effectiveness of every weapon comparing it with the maximum. BUT actually I'm doping this for every armor type. So when I use a 10.0 effectiveness against infantry it will NOT be the same DSP as a a 10.0 against vehicles.
Should I give a 10.0 just the most powerful weapon, or can I reset values every armor?,
I'm also reseting the 10.0 for each race. So the 10.0 for Chaos is the Bloddthister damage, but the Space marines is the dreadnought fist (wich is lower than the bloodthister DPS).
Should I give a 10.0 just the most powerful weapon, or can I reset values every armor and race?
If Ai just compares effectiveness against same armor and race, then I can reset, but if it compers between armor, then I should not. the same thing if tha ai compares effectiveness of different races units


I've also noticed that Leader Weapons are not present in this file. Is this correct?, The AI do not use the Leader weapon efectiveness?

Thanks in advance for your help, and If you want the script I'm making I'll have no problems in sharing them. But they'll only read luas, not RGD

Kaiser Soze

#2 ArkhanTheBlack

ArkhanTheBlack

    title available

  • Members
  • 814 posts

Posted 08 December 2006 - 08:49 PM

Unit Strength

The unit strength has two main purposes:

1.) It decides when and where the AI attacks by comparing the unit strengths of his troops with the ones from the enemy.

2.) It's used by the build programs to decide if the army is strong enough that the next build item (building, research, addon) is allowed to be built. For that, the AI just adds the unit strength values of all its troops together and gets the total army strength of its forces.

The unit strength value should stay close to the resource costs since we use some fixed army strength values in the core code. For example 2000 is considered as a strong enough army to research tier 3. Or unit strength < 100 is very weak like a 2 men scout squad for example.
If you change the unit strength values of the troops too much, it could screw up the entire AI behaviour. For example, setting a space marine to a range of 35 - 75 probably won't do any harm, but setting it to 10 or 100 would be too much. All fixed army and unit strength values in the core code and the build programs would have to be readjusted to the new 'scale'.
The unit strength of the titans is overrated since their resource cost doesn't represent their strength. It's a bonus for getting tier 4 and owning a relic. In vanilla the cost was almost 2000 resources, but their strength was very similar. You will also notive that all unit strength values of the Necrons are overrated, since their power resource is worth more than the one of other races. (A reason why I consider power transfer from other races to Necrons almost as cheating...)


Weapon effectiveness

Those values are pretty much copied from the LUAs. They (should) represent the armor piercing values. It's only used for the unit building code. If I understand the code correct (it's a bit complicated), then the AI tries to reach an army with a 'balanced' weapon arsenal. Some weapons against infantry, some against vehicles and some against buildings. If a weapon type is rare, units with good weapon stats in this area get priority.
Leader weapons are not shown since leaders are built very different. They are a unit upgrade and not a new unit for the AI.

BTW, I've never modified a weapon stat...


Unit Rating

The unit rating modifies the unit building behaviour of the AI, since not every strength or weakness is shown in the weapon stats. A unit with a cotton ball gatling wouldn't be considered as very usefull for the AI, but if the unit also has a spell 'Destroy all enemy units on map' it would be VERY effective, but the AI wouldn't know that. For such cases the unit ratings are usefull.

#3 Kaiser Soze

Kaiser Soze
  • Members
  • 16 posts

Posted 09 December 2006 - 12:39 PM

Ok, thank you very much.
If I have undestand this the values should be:

Unit Strenght
-----------------
Very close to cost .
no problems with that, I can use my script to generate it automatically. BTWI the cost is just Requisition, requisition plus power, or power is more important to calculate cost. I mean: cost = Req ? , or Cost = Req + Power? or Cost = Req + 1,5 * Power?

Unit Rating
-----------------
Relative value.
I guess I'll have to edit this numbers by hand. My script will generate a value based only in the armor, but I will need to edit by

Weapon efectiveness
-----------------
Very close to DPS.
I guess you were refering to DPs when you said very close to armor piercing, becasue I think DPs is more apropiate to calculate the weapon potential.
right now I'm going to do rhis, correct me if someone sees a potential bug when the core uses this values.
Give a 10.0 reseteable by Armor and Race.
This means that the best DPS against a specific armor for a scpecific race will recevive a 10.0. But this 10.0 has NOT the same DPS as a 10.0 against other armor r another 10.0 against the same armor but in other race.
For instance, if a lasscanon makes 100.0 DPs against buildings, and its the best SM weapon in that category, I'll give it a 10.0 efectiveness against buildings. But if the power fist does 80.0 damage againt infantry, and its the best weaopon against infantry, I'll give it also a 10.0 against infantry (not a 8.0). Also if the Bloodthister Axe does 90 DPS against buildings and its the best weapon for chaos against building, I'll give it a 10.0 efectiveness (not a 9.0).
this is correct?, If the Ai compares effectiveness of different races it could lead to errors, but If not I prefer to reset values for every race and armor

#4 ArkhanTheBlack

ArkhanTheBlack

    title available

  • Members
  • 814 posts

Posted 10 December 2006 - 11:30 AM

I mean: cost = Req ? , or Cost = Req + Power? or Cost = Req + 1,5 * Power?

UnitStrength = Req + Power

I guess you were refering to DPs when you said very close to armor piercing, becasue I think DPs is more apropiate to calculate the weapon potential.

We use the armor piercing value. I don't consider the weapon damage very usefull, since a single vehicle or hero has a very high damage while a squad gets his damage through multiple squad members.
There's also an AEP tool which can generate those stats automatically from the LUAs.

#5 Kaiser Soze

Kaiser Soze
  • Members
  • 16 posts

Posted 10 December 2006 - 04:50 PM

I guess you were refering to DPs when you said very close to armor piercing, becasue I think DPs is more apropiate to calculate the weapon potential.

We use the armor piercing value. I don't consider the weapon damage very usefull, since a single vehicle or hero has a very high damage while a squad gets his damage through multiple squad members.
There's also an AEP tool which can generate those stats automatically from the LUAs.


Mmmm, so this values are "squad based" not "troop based".
I still think that I'll use the DPS value. But not alone. Armor piercing could be not enougth for me becasue it just mean the % of the damage that traspases armor. And in DoWPRO DPS is used more than armor piercing. I mean, a weapon with 100 dmg and 10% piercing will be exactly the same in game as one with 10 dmg and 100% piercing. But if I only use the piercing my script will think that one is more powerfull than the other when they are exactly the same.
I'll have to use number of troops per squad (or weapons per squad) and maybe hitpoint to ponderate a little bit this values.



Reply to this topic



  


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users