PDA

View Full Version : Research on unit behavior!



komninos
04-08-2004, 07:37
Hi all,
Here are some subjects that need to be addressed by any researchers or even better CA.

1. Unit strength. This value is mostly 80 but depending on the type and number of men in the unit it take different values.
What we need to know is:
How does it work (interact) with the attack, defense and charge values
How much does it differentiate these values i.e. if attack is 4 and unit strength is for A 80 and for B 90. How much more power does unit B have?
Is it used to differentiate production?

2. How does the engine assigns the type of the unit and if we can change that. i.e. how does it differentiate the spear from sword units to put them in the state of hold formation or attack.
Why do all missile troops go in to skirmish mode and not attack.
Can we change that or force it i.e. Legionaries have one missile shot for there pilums. They are considered as missile unit and placed to skirmish but they should be on attack

Eastside Character
04-11-2004, 14:46
Quote[/b] (komninos @ April 08 2004,01:37)]2. How does the engine assigns the type of the unit and if we can change that. i.e. how does it differentiate the spear from sword units to put them in the state of hold formation or attack.
Why do all missile troops go in to skirmish mode and not attack.
Can we change that or force it i.e. Legionaries have one missile shot for there pilums. They are considered as missile unit and placed to skirmish but they should be on attack
Hello komninos,

I believe the AI uses units according to their labels specified in (if using GnomeEditor) column 18 - Unit Class Labels. That is my best guess.
So maybe a way to make the AI use Legionnaires the way you want, is to play a bit with those labels...

Regards,
EC

komninos
04-13-2004, 15:09
Thanks Eastside Character
Though I think I have used this before and they still retreated in my attack. Have to test this

I but still most of the times these missile units retreat if they get to the back of my units and the distance is small they have a charge at it but only then

komninos
04-13-2004, 18:06
I use it for my early hoplitic armies. They had a javelin that was used before the final charge ... the definitions there are "DEFENDER, SPEAR, STRONG" and they still retreat until they dispose all there javelins

CBR
04-14-2004, 17:59
Im pretty sure that any unit with a missile weapon will always start a battle in skirmish mode.

Same thing with spear armed units. They will always start with Hold Formation.

These things are hardcoded.


CBR

Aurelian
04-15-2004, 10:54
If legionaries are given one shot with their javelins, do they leave skirmish formation after they run out of missiles? If so, then maybe such units could just be given a particularly lethal long-ranged javelin so they'd be sure to get it off before the enemy got too close.

The other option would be just to factor the pilum into the charge factor of legionaries. You wouldn't get to see them throw anything, but the overall effect would probably be fairly realistic.

R'as al Ghul
05-10-2004, 14:37
@ komninos,

I'm very curious.
Have you been successful with the Labels?
Are your Javelins doing better now?

I'm asking because I'm trying to improve the AI's use of units in the NapMod.

Thx

R'as al Ghul

komninos
05-12-2004, 10:21
NO and this is a big problem for me since Persian army uses bows till the enemy is close for a charge.

So I am thinking to solutions:
1. Is using the auto-charge of the units but that is unstable since they might and might not. If they are disciplined then they will not charge.
2. Has to do with formations. I remember reading something about a flag that sets the units status of the given position, so I plan on trying with that setting to hold.

I guess you face the same problems sine all NTW armies are considered missile type.

Duke John
05-12-2004, 10:31
Last week I was busy with trying to make new army formations, I gave up since every player needs to have the exact same files when playing MP or else risking a crash. But I did learn that you can set units to Skirmish, Engage-at-will, Hold formation, Loose, Wedge and Close. You will find most of these commands in the several formation files.

Because of the MP incompatibility I never really tested wether the missile units stayed in the formation or wether they were set back by the AI to skirmish. But it might be worthwhile to try it out. Let us hear if it works.

Good luck, Duke John

R'as al Ghul
05-12-2004, 14:38
Right Duke John & komninos ,

I have also toyed a bit with army formations for the Nap Mod. The Problem with the Nap units is that all of them carry guns/ shoot missiles as kominos said. So the AI has Probs to distinguish them.
So far I'm able to differ between good/ levy Infantry; Heavy/ MEdium Cavalry; General and Artillery using the flags for different units. (Artillery is recognized as MissileInfantry)

The formationdata textfile provides the information that you can use the commands "Hold, Close, Loose, HoldtheLine, Skirmish + Engageatwill" for the AI's units. If a player uses this formation his units will be in default. So this is AI only. For the AI it seems to work even better if you add "hint" before "holdtheLine".

I'm testing this in single player mode.
I also changed the values in column 18. Most of them are
a bit ridiculous i.e. the Label doesn't suit the unit.

If you Label a LineInfantry with "Spear, Anti_Spear, Defender, Strong" they stay close most of the time and shoot it out with the enemy.
I also changed the Artillery pieces from "Castle_defender, Missile" to "Missile, Anti_Spear, Defender, Castle_Defender, Weak (to avoid h2h)". This makes them really aggressively shooting at my Infantry.

It would be nice if someone from CA could shed some light on these columns.

Cheers

R'as al Ghul

Lord Krazy
05-17-2004, 02:27
Hi guy's

I don't think there is a definate answere to all this .
As for imporving the behavour of the ai I reckon this is possible, but not in a consistant manner .
From what I have seen from using various versions of labels,
the ai does respond . The thing is it has never been consistant for me .

Regarding an explaination form CA ,on what exactly the labels in Column AE , of the unitprod file mean and how they work .
Well in the file it states,
( As far as I can tell ) This is used to determine where in the deployment of formations this units formation will be placed given the order provided.

The bit in brackets is all you need to read really .

Making the ai use units in a different manner by changing
where and ,how it is told to use them , is not the same as
making missile unit behave as spear units .

Missile unit's will behave, like missile units,
as stated above, plus many other places and, has been tested to high heaven and back . It is hard coded and can not be changed .

Now by messing about with the formation stuff and changing the unit labels , you can alter how the ai plays the game.
These are not the only things that will change the actions of the ai though . If you give a unit lots of honour
then it won't run away even if it's on skirmish .
Or it's possible to make a unit never be overrun .
This is not a solution btw , just some of the many factors that seem to cause you problems , when you try to figure
what is taking or not . Not getting overrun is not exactly a gamming option and unit's that attack instead of run away
is robbing peter to pay paul , so to speak .
So to sum up, it's a bit of dead end , but it's the only avenue we have . http://www.totalwar.org/forum/non-cgi/emoticons/gc-wall.gif http://www.totalwar.org/forum/non-cgi/emoticons/handball.gif http://www.totalwar.org/forum/non-cgi/emoticons/gc-computer.gif http://www.totalwar.org/forum/non-cgi/emoticons/gc-help.gif

Keep changing the labels and stats untill you get the closest desired affect from the units, or go totally mad .
Whichever comes first .

That's what I think anyway http://www.totalwar.org/forum/non-cgi/emoticons/gc-anxious.gif

Keep up the good work .

LK
http://www.totalwar.org/forum/non-cgi/emoticons/smokin.gif

R'as al Ghul
05-19-2004, 09:43
http://www.totalwar.org/forum/non-cgi/emoticons/gc-stunned.gif http://www.totalwar.org/forum/non-cgi/emoticons/gc-wall.gif http://www.totalwar.org/forum/non-cgi/emoticons/gc-wall.gif http://www.totalwar.org/forum/non-cgi/emoticons/gc-wall.gif http://www.totalwar.org/forum/non-cgi/emoticons/gc-wall.gif http://www.totalwar.org/forum/non-cgi/emoticons/gc-wall.gif

Sorry guys,

just had to express my frustration.
Hours of testing for nuts. GAH http://www.totalwar.org/forum/non-cgi/emoticons/gc-wall.gif

Lord Krazy
05-20-2004, 00:34
Quote[/b] ]Hours of testing for nuts. GAH

I hope that was not inspired by what I said .

If your research leads to any improvments , in the understanding of how these things work , or , any
improvment to performance, for the ai when using missile units , then it is not for nuts .

Like I said we have limited joy regarding this,
but joy all the same . http://www.totalwar.org/forum/non-cgi/emoticons/biggrin.gif

So don't give up on my account , that's the last thing I want you to do .

We have not discovered all the limits of what we can do with these files yet , just some .

If your just frustrated because you have not seen daylight
for a few days , then that's cool . I can understand that http://www.totalwar.org/forum/non-cgi/emoticons/gc-curtain.gif

So like I said keep up the good work .

Also if you'r doing this for the nap mod,
drop us a line seen as we working on the same thing .

Regards

LK
http://www.totalwar.org/forum/non-cgi/emoticons/smokin.gif

R'as al Ghul
05-20-2004, 19:18
Quote[/b] (Lord Krazy @ May 20 2004,00:34)]
Quote[/b] ]Hours of testing for nuts. GAH
I hope that was not inspired by what I said .
So don't give up on my account , that's the last thing I want you to do .
We have not discovered all the limits of what we can do with these files yet , just some .

Lord Krazy, http://www.totalwar.org/forum/non-cgi/emoticons/wave.gif

part of it was the result of my own experience with the testing of changes to the files. The other part was you saying:
Quote[/b] ]Missile unit's will behave, like missile units, as stated above, plus many other places and, has been tested to high heaven and back . It is hard coded and can not be changed .
This sounds like you know what you say and as if you (the Lords) had given up.

Additionally I already posted in the Lords Forum as "Baron von Reiswitz" concerning this issue: http://www.thelordz.co.uk/forum/viewtopic.php?t=1197
With no reaction at all. This also confirmed me in my assumption that this is a dead end track.

Don't get me wrong. I'm in no way angry or anything. At the end I'm having fun testing and toying around with your fantastic mod. http://www.totalwar.org/forum/non-cgi/emoticons/bigthumb.gif
I think one good result of my testing was that I think I found out how to manipulate the unit labels for the Nap units. Have a look at my thread.

Cheers

R'as al Ghul/Baron von Reiswitz http://www.totalwar.org/forum/non-cgi/emoticons/gc-toff.gif

Lord Krazy
05-21-2004, 01:43
May has not been a good month for reaction http://www.totalwar.org/forum/non-cgi/emoticons/rolleyes.gif
LOS is a bit busy right now with real life , so
that hasn't helped neither . If he did have the time he
surely would have .
At least I know who you are now
and what you are doing ,it might help on the communication front . http://www.totalwar.org/forum/non-cgi/emoticons/wave.gif

Thanks

LK
http://www.totalwar.org/forum/non-cgi/emoticons/smokin.gif

Blaidd
07-21-2004, 16:45
I've been trying to do something similar with my light skirmisher 'Kobold Raider' unit. My idea was to have a unit that would fire a few spears and then charge into battle and the AI seems to be fairly competent with it. In my game at least the AI always charges when it runs out of missles. So what I did was to up the range on heavy_spears slightly and give the unit only two throwing javelins. Generally on defensive the AI will find a nice spot and stand and wait. Then it will start spear chunking when you get in range. After the second (or third, sometimes they don't all shoot at once) volley they charge down and melee.

Of course this doesn't always work. If the AI decides to come at you when it's supposed to be playing defense it usually takes it too long to get in formation for the throw (even on UNFORMED), but my Kobolds are fast enough to skirmish anything except light cavalry.

In your case with the legionaires, I would say mod the heavy_spear to have a longer range, a reload time of 1 second, reload while moving, and shoot immediately. That ought to get the first shot off quick enough no matter what is coming at them. Then only give them one spear. Of course, you may not want your legionaires to charge into melee as soon as they shoot their spears, but in all likelyhood the AI would charge them forward anyway as soon as you got close enough to triger a response.

Another thing is to turn on DISCIPLINED to keep them from getting an impetuous charge and not throwing their spears. The range I have set on my spears seems to be the exact range the AI decides to charge randomly so that was a problem until I figured out what was causing it.

Interesting data on labels in this thread also. I'll have to put that to use.

R'as al Ghul
07-22-2004, 08:49
Blaidd & Kominos,

have you experimented with the "Engagement Treshhold"?
All units have a value here, including the non-range ones.
In case of the Javelin its range and its ET are equal - 1500.
Maybe if you make the ET smaller than the range it makes them charge later into melee?

Just a thought....

R'as