Winz00e (ver 6.0)
Would you like to react to this message? Create an account in a few clicks or log in to continue.

[Tutorial] A.I. System Controls

3 posters

Go down

[Tutorial] A.I. System Controls Empty [Tutorial] A.I. System Controls

Post by CometStrife Thu Jul 18, 2013 9:36 am

Artificial Intelligence (A.I.) System Editing


In this short tutorial, I'll be teaching you guys how to fine tune your own A.I. such that it either gets stronger or weaker.

Why Edit The A.I.?

In UKWXP, lets face it. You are playing most of the time, if not all of the time, against a computer. Unless you are able to play online (Read up my tutorial on how you can go online play here! https://winz00e.canadaboard.net/t3456-tutorial-host-online-windom-server-with-dns-servers-without-hamachi-noob-friendly).

The A.I. settings of the original game is much too weak to serve as a real threat to the gamers. This reduces the perks of the game which would ultimately make the game obsolete and no longer as fun as when you just started out. Thus, in order to maintain the game's fun, Maps, Mechas, Sounds, Textures, and A.I. changes are needed.



Measuring Unit Used in A.I. editing

The 2nd and 3rd numbers (Would be explained below) in the A.I. settings as well as the lock-on distance is measured as units of 10. So let's say the lock-on distance is 90, in game the maximum effective range for a lock-on on enemy is 900metres. As such, the 90 is in a unit of decametres (dam).

Don't get me wrong, I'm not scolding anyone. It's just that deca's symbol is da, and metres is m so it becomes dam.



How to Edit the A.I.
The A.I. Settings of every mech in Windom can be found in the Script.spt.

Navigate to the mecha you want its A.I. to be improved on and decrypt its Script.spt

Under the Mecha Stats, generally you'll come across something like this.

AISetting(0, 90);
'AI用武器設定
AIWeaponSetting(0,  9,  122, 90,  500);
AIWeaponSetting(1,  1,    9, 50,  0);
AIWeaponSetting(2,  9,  80,  70,  600);
AIWeaponSetting(3,  5,   15, 80,  600);
AIWeaponSetting(4,  40, 122, 90,  600);

In the very first setting, it controls the attack range of the mech.
AISetting(0, 90);

The 0 represents Proximity~Distance. This Proximity~Distance determines the nearest distance that the enemy would need to be from the AI before it would commence an attack.

The 90 represents Reach. Its the furthest distance that the mech would be for its attacks. Let's say the mech goes to a distance of 100, it will NO LONGER attack. Take note that if this value is a small value, the AI will try its best to get as close as possible to the enemy as it's LockDistance allows.


After configuring the mech's attack ranges, its time to configure its weapons usage!

AIWeaponSetting(0,  9,  122, 90,  500);
AIWeaponSetting(1,  1,    9, 50,  0);
AIWeaponSetting(2,  9,  80,  70,  600);
AIWeaponSetting(3,  5,   15, 80,  600);
AIWeaponSetting(4,  40, 122, 90,  600);

Generally, there are only 5 AIWeaponSettings, each with 5 numbers.

The first number (eg. 0, 1, 2, 3, 4) represents the weapon type.
0 = Primary Weapon (Usually the ranged weapon)
1 = Secondary Weapon (Usually the melee weapon)
2 = Subattack 1
3 = Subattack 2
4 = Subattack 3


The second number (eg. 9, 1, 9, 5, 40) and third number (eg. 122, 9, 80, 15, 122) is similar to the AISetting.

The second number determines the closest range that a weapon would be used, while the third number determines the maximum range from the enemy that the weapon would be used. For instance, for the primary weapon, the third number is 122. If the A.I. goes to a distance of 123dam, the weapon would no longer be used.
Limits for the 2nd and 3rd numbers are undefined. You can even set the 3rd number as 999 so it attacks even when not lock-on.


Unlike the 2nd and 3rd number, the 4th number has a unit of %, while the 5th number has no unit and is dependent on the mech's stats.

The fourth number (eg. 90, 50, 70, 80, 90) determines frequency that the attack would be used. For instance if you want it to constantly fire a weapon even if it runs out of energy, set this value to 100. This is however unwise as it overheats the mech easily, making the A.I. very easy to defeat. Usually this value is set at 50-90 depending on your own preference of how much you want to get shot at by the A.I.
Limit: 1-100

The fifth and final number (eg. 500, 0, 600, 600, 600) determines the minimum energy needed before the weapon is used. Remember when I said that this number is dependent on the mech's stats? Let's say the mech has a energy gauge of 1000, this value CANNOT exceed 1000. Otherwise the mech will never ever use its subattacks at all. This value is the biggest decision maker. So let's say the A.I. has you in range, if this value is not met, it won't fire.

However, let's say this value is met, but the range is not, there is still a very very slight chance that it would use this weapon so long as it has lock-on to you. [Eg. Mech range is 100, but the Proximity~Distance for its attacks are 0 - 50]
Limit: Depends on Energy Gauge Levels



End Note

Playing UKWXP with a stronger A.I. is definitely more fun. Nuff said



Credits

Y.Kamada for creating the game and including his author's notes
Aesreal for translating the notes, typing this tutorial and explaining


Last edited by Aesreal on Sat Jan 04, 2014 1:24 am; edited 2 times in total
CometStrife
CometStrife
(40%)-Lv7
(40%)-Lv7

Posts : 1256
Join date : 2010-11-07
Age : 30
Currently : Earth

Back to top Go down

[Tutorial] A.I. System Controls Empty Re: [Tutorial] A.I. System Controls

Post by Casval Thu Jul 18, 2013 11:37 am

hmmmm, in looking over this, the information stated here is dead on accurate Considering I was an AI master in SPT editing. Very good work Aesreal.
Casval
Casval
(40%)-Lv6
(40%)-Lv6

Posts : 689
Join date : 2013-07-07
Age : 31
Currently : Air Forcing

Back to top Go down

[Tutorial] A.I. System Controls Empty Re: [Tutorial] A.I. System Controls

Post by Heart of Vandel Thu Jul 18, 2013 1:42 pm

Thank you very much
I am grateful for this valued information
Heart of Vandel
Heart of Vandel
(40%)-Lv1
(40%)-Lv1

Posts : 88
Join date : 2013-07-06
Age : 34

Back to top Go down

[Tutorial] A.I. System Controls Empty Re: [Tutorial] A.I. System Controls

Post by CometStrife Fri Jul 19, 2013 2:10 am

Casval wrote:hmmmm, in looking over this, the information stated here is dead on accurate Considering I was an AI master in SPT editing. Very good work Aesreal.

Well, your A.I. in the Akatsukis were just a tad more difficult to beat than the original mechs thou, just saying =P

Of course things are different if I still had my laggy laggy lag computer from back then

Heart of Vandel wrote:Thank you very much
I am grateful for this valued information

Your very welcome
CometStrife
CometStrife
(40%)-Lv7
(40%)-Lv7

Posts : 1256
Join date : 2010-11-07
Age : 30
Currently : Earth

Back to top Go down

[Tutorial] A.I. System Controls Empty Re: [Tutorial] A.I. System Controls

Post by Casval Fri Jul 19, 2013 9:52 am

Aesreal wrote:
Casval wrote:hmmmm, in looking over this, the information stated here is dead on accurate Considering I was an AI master in SPT editing. Very good work Aesreal.

Well, your A.I. in the Akatsukis were just a tad more difficult to beat than the original mechs thou, just saying =P

Of course things are different if I still had my laggy laggy lag computer from back then
.

Nah its all good, Back then when I made those 2 amazing Gold Units I went a little bit insane on the ANI part. Hell, Most cases I Can't even beat them because I made their AI that damn intelligent XD. Still I'm thankful I had this knowledge along with other modding knowledge as well. If you want you can post the AI of those 2 if you wish. They make a perfect Boss type AI.
Casval
Casval
(40%)-Lv6
(40%)-Lv6

Posts : 689
Join date : 2013-07-07
Age : 31
Currently : Air Forcing

Back to top Go down

[Tutorial] A.I. System Controls Empty Re: [Tutorial] A.I. System Controls

Post by Sponsored content


Sponsored content


Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum