How to improve the Rook AI to make it more competitive enclosed!!
I agree with the posters here, while programming an AI that can provide a challenge to a player WITHOUT cheating might be very difficult without relying on cheats, providing an AI that is competent shouldn´t require various after-release patches to polish.
I prefer playing the game single player only or over the LAN with some friends so the AI flaws are more glaring, so I decided modding the game for my benefit as I don´t have to worry about online play and the lack of mod support so far.
I know what is causing the infamously horrible Rook AI that causes it to stutter nonstop when trying to flee. I managed to fix it practically for my own personal play and would be glad to provide others with information on how to do it.
I can´t point to the code that is causing the with full knowledge but I have pinpointed it to the Rooks Independent weapons, more precisely, the Archer Tower causes the most problems.
Apparently, there is some problem with the Archers firing while the Rook is trying to move, causing it to pause or even re-engage when the Rook AI obviously wants to flee... Its like a split personality where the archers take over the Rooks Body while the Rooks AI wants to run for the hills, causing it to stutter and dance, and die messily.
I managed to reduce this annoying behaviour drastically by modding the Archer towers to not be able to fire on move as shown in the .lua code below:::
{
BallisticArc = 'RULEUBA_LowArc',
CanDamageReturn = false,
CanFireWhileMoving = true, #### THIS IS THE LINE YOU WANT TO CHANGE TO false TO REMEDY THE SITUATION
CantSetTargetUI = true,
CollideFriendly = false,
Damage = 5,
DamageType = 'Arrow',
DisplayName = 'Arrows',
DoNotUseDamageRating = true,
FireTargetLayerCapsTable = {
Land = 'Air|Land',
},
FiringRandomness = 0.1,
FiringTolerance = 2,
Label = 'Arrow01',
MaxRadius = 15,
MinRadius = 0,
MuzzleVelocity = 30,
NoWeaponBuffs = true,
NoFloatText = true,
NoItemEffect = true,
NoSplashDamage = true,
ProjectileId = '/projectiles/Arrow02/Arrow02_proj.bp',
ProjectileLifetime = 2,
PrefersPrimaryWeaponTarget = true,
RangedWeapon = {
MuzzleBones = {
'sk_Rook_Turret03_REF',
},
ShotDelay = 0,
},
It also seems that the Tower of Light shoulder enhancement and the Trebuchet also cause this stutter effect... The difference being that the Archer tower fires 6-12 arrows TWICE per seconds, which prevents most Rook AI builds from retreating effectively. The Tower of Light fires once every two seconds I believe, and the Trebuchet once every three seconds, so the disruption is less noticeable.
Anyways, thats just a work around. The real solution I imagine has something to do with the fire on move bugs that seem to plague the game, also probably related to the skill activation problems. It seems the Demigods cannot chew gum and walk at the same time.
This piece of code is located in the file HRook_unit.bp in the dgdata.zip file in the dgdata\units\heroes\HRook directory when unzipped.
In order to modify it without corrupting your original game files, you want to do the following steps:
1. Unzip the dgdata.zip file located in your Demigod main directory which should create a dgdata folder
2. Rename the original dgdata.zip file to something else such as dgdata(original).zip for backup purposes
3. Rename the unzipped dgdata folder to dgdata.zip so the Game uses that information when it loads instead of the original dgdata.zip file
4. Modify the files that are located in the dgdata.zip folder you created to your hearts content.
Hopefully this information can be passed along to GPG so they can remedy the situation. This game is exactly the kind of game I always wanted to play so I really hope they dedicate the time required to polish it.
Enjoy!