Jump to content


Photo

How do I make the AI rebuild quicker?


  • Please log in to reply
19 replies to this topic

#1 Akkrand

Akkrand
  • New Members
  • 61 posts
  • Location:Melbourne, Australia

Posted 04 August 2004 - 03:37 AM

Hi,

I noticed in Lion's AI mod that the computer rebuilds his base a whole lot quicker than the normal AI. He's on holiday atm, so I can't ask him...
Does anyone know a method for making the computer rebuild destroyed parts of his base quicker?
Is it simply a matter of having more money and having more dozers free? Or is there a script-based approach to it?
Also the rebuilding of command centers - why is it they don't ever seem to get rebuilt but every other building does?
At the moment I find the AI for all USA and China factions are way too easy to take out, just hit their command center with a few auroras/couple of superweapons or powers, and it's all over for them.
Normally I'd be of the opinion that a player who loses his CC is pretty much a goner anyway, but when we're fighting multple computers, it seems we can hit one's command center and then forget about him until its time to mop up. I'd like computers to regain their former glory and come back from almost nothing.

Cheers,
Lord Akkrand

#2 Mithril

Mithril

    496

  • Hosted
  • 1,386 posts
  • Location:UK
  • Projects:Heh! You're not going to ask me that question.

Posted 04 August 2004 - 09:26 AM

RebuildDelayTimeSeconds in AIData.ini ;)

I suppose it won't rebuild it because you haven't told it to build the CC, thus the AI engine marks it as "unbuilt", thus thinks that it doesn't need to be rebuilt because it was never built in the first place :grin:

But I'm sure you know how to solve this.

v.1.5 is uploaded, man you're a quick dev :)
Command & Conquer: Red Alert - ReGeneration

"Not the faintest clue =\"

-ComradeJ

#3 Cammy

Cammy
  • Hosted
  • 51 posts
  • Location:Hamburg

Posted 17 August 2004 - 12:50 AM

And GLA rebuilds faster than any other Faction....... :ninja: Btw, I'm not sure if it's in the INI but, where can i find a Tag for the GLA Holes when they start to rebuild? This is way too fast....

#4 Mithril

Mithril

    496

  • Hosted
  • 1,386 posts
  • Location:UK
  • Projects:Heh! You're not going to ask me that question.

Posted 17 August 2004 - 08:41 AM

For every gla hole there is a RebuildHoleBehavior, under that is a WorkerRespawnDelay which sets when the worker is supposed to be spawned - thus when the worker is supposed to rebuild the thing.
Command & Conquer: Red Alert - ReGeneration

"Not the faintest clue =\"

-ComradeJ

#5 thudo

thudo

    Wacko AI Guy!

  • Division Leaders
  • 9,179 posts
  • Location:Lemonville North, Canada
  • Projects:DoW AI Scripting Project
  • Division:DoW
  • Job:Division Leader

Posted 17 August 2004 - 12:53 PM

For every gla hole there is a RebuildHoleBehavior, under that is a WorkerRespawnDelay which sets when the worker is supposed to be spawned - thus when the worker is supposed to rebuild the thing.

<{POST_SNAPBACK}>


However, BIGGEST PROBLEM FOR GLA not found with both USA/CHINA Dozers..

HOW TO GET THE GLA Workers to repair their own buildings (ie. Command Center) quickly once damaged? USA/CHINA don't have this issue as its right in the AIDATA.INI. I've been tackling this problem for awhile. I hate to see GLA Buildings stay damaged. Dunno why the flag in the INI works for USA/CHINA dozers and not Gla Workers.. Grrrrrrrr!
Advanced Skirmish AI Team Lead for the coolest Warhammer40k PC RTS out there:

Dawn of War Advanced AI Headquarters

Latest DoW Advanced AI Download!

#6 Mithril

Mithril

    496

  • Hosted
  • 1,386 posts
  • Location:UK
  • Projects:Heh! You're not going to ask me that question.

Posted 17 August 2004 - 04:42 PM

Possibly because it has a WorkerAIUpdate instead of a DozerAIUpdate..

but if you change that the worker won't be able to gather supplies. Another EA bug, the creation of which can be derived from lazyness!
Command & Conquer: Red Alert - ReGeneration

"Not the faintest clue =\"

-ComradeJ

#7 thudo

thudo

    Wacko AI Guy!

  • Division Leaders
  • 9,179 posts
  • Location:Lemonville North, Canada
  • Projects:DoW AI Scripting Project
  • Division:DoW
  • Job:Division Leader

Posted 25 August 2004 - 03:17 PM

I wonder if there is a way via a script to get the GLA worker AIs to scan their buildings to repair them when they reach, say, 50% health? Doable?

This is VERY important as what good is a GLA AI opponent who doesn't quickly repair his buildings after a major attack. USA/CHINA factions are fine but all 4 GLA factions need a fix ASAP! Fix it, then attacking him will be more a challenge. He'll last longer in a major fight!
Advanced Skirmish AI Team Lead for the coolest Warhammer40k PC RTS out there:

Dawn of War Advanced AI Headquarters

Latest DoW Advanced AI Download!

#8 Lion

Lion
  • New Members
  • 50 posts

Posted 27 August 2004 - 03:56 PM

To get rebuilding quicker the AI needs to have a free nearby dozer, and most importantly, MONEY! the AI will rebuild pretty quickly if it has the money for it! I found that the settings at AIDATA.ini such as rebuild x many times, and the multipliers for team and building making speeds seem irrelevant. When low on money i put it to build teams at a multiplier of 0.01 and it was pumping them out as fast as it could anyways, while the rebuild x many times is always at 0 and the AI still rebuilds as normal (provided it has the money)

I had to make a money management system where the AI will have from 2k to 6k in bank at least once every minute or two (more money later as combat intensifies) so it can ALWAYS rebuild something in under a minute.

Also it is good practice adding a script to check if player owns a CC or a CC hole and if not build another. Check every 2 minutes or add a flag "Building_CC" to prevent it from building too many CCs.

that should be enough for it to rebuild at a decent pace!

Im exploring the INI files looking for a way to increase the radius of repair of the worker. The AIData.ini specifies a multiplier so there must be a set radius somewhere else. Increasing this would give human players crazier workers but much more effective GLA AI.
Another way to fix this would maybe create scripts to move workers around main buildings every minute or so and them leave them to repair, but that might not work.

anyways hope this helps!

#9 thudo

thudo

    Wacko AI Guy!

  • Division Leaders
  • 9,179 posts
  • Location:Lemonville North, Canada
  • Projects:DoW AI Scripting Project
  • Division:DoW
  • Job:Division Leader

Posted 27 August 2004 - 07:23 PM

Im exploring the INI files looking for a way to increase the radius of repair of the worker. The AIData.ini specifies a multiplier so there must be a set radius somewhere else. Increasing this would give human players crazier workers but much more effective GLA AI.
Another way to fix this would maybe create scripts to move workers around main buildings every minute or so and them leave them to repair, but that might not work.


I think we need to do whatever it takes to get that GLA AI player to *repair* his damaged buildings ASAP like his USA/CHINA counterparts.

Perhaps a GLA Worker team could be spawned to specifically heal all buildings around it when certain buildings reach 50-70% health. This is important as the last thing I hate seeing is a floundering GLA base with burning buildings. Arrghhhh!
Advanced Skirmish AI Team Lead for the coolest Warhammer40k PC RTS out there:

Dawn of War Advanced AI Headquarters

Latest DoW Advanced AI Download!

#10 Cammy

Cammy
  • Hosted
  • 51 posts
  • Location:Hamburg

Posted 27 August 2004 - 10:45 PM

The GLA is rebuilding faster then any other Faction and is creeping all around the Map, they don't need to repair their Buildings :p They are annoying enough as they are now ;)

#11 Mithril

Mithril

    496

  • Hosted
  • 1,386 posts
  • Location:UK
  • Projects:Heh! You're not going to ask me that question.

Posted 28 August 2004 - 08:25 AM

They are REBUILDING faster, yes, but thudo wants them to REPAIR faster :p
Command & Conquer: Red Alert - ReGeneration

"Not the faintest clue =\"

-ComradeJ

#12 Cammy

Cammy
  • Hosted
  • 51 posts
  • Location:Hamburg

Posted 28 August 2004 - 02:27 PM

They are REBUILDING faster, yes, but thudo wants them to REPAIR faster ;)

<{POST_SNAPBACK}>


I know :laugh: But GLA doesn't repair, the only Things they repair are their Def Buildings.... and this is way enough for such a "poor" Faction ;) And China doesn't repair their most Buildings either... Especially the CommandCenter and the NukeSilo.... :p

#13 thudo

thudo

    Wacko AI Guy!

  • Division Leaders
  • 9,179 posts
  • Location:Lemonville North, Canada
  • Projects:DoW AI Scripting Project
  • Division:DoW
  • Job:Division Leader

Posted 28 August 2004 - 02:32 PM

They are REBUILDING faster, yes, but thudo wants them to REPAIR faster :laugh:

<{POST_SNAPBACK}>


I know :laugh: But GLA doesn't repair, the only Things they repair are their Def Buildings.... and this is way enough for such a "poor" Faction ;) And China doesn't repair their most Buildings either... Especially the CommandCenter and the NukeSilo.... ;)

<{POST_SNAPBACK}>



Guy.. the CHINA AI totally repairs all its buildings super-fast! It uses the same logic as the USA Dozers. My AI, at least, will actively move about and EVEN repair distant garrisoned civilian buildings that are damaged. Thats the type of repair job I love seeing! I want the GLA AI player to do the same because thats what PRO players would do (not let key buildings gets nuked when they are needed to expand the terrorist empire.. :p ).
Advanced Skirmish AI Team Lead for the coolest Warhammer40k PC RTS out there:

Dawn of War Advanced AI Headquarters

Latest DoW Advanced AI Download!

#14 Lion

Lion
  • New Members
  • 50 posts

Posted 28 August 2004 - 02:58 PM

yep its fun to add some repairing for the AI as well!
Brgins me memories of my inf gen urban combat AI back when i was learning to mod... given time it would garrison dozens of buildings and repair them all if they got damaged...
Im looking throught the INI files to find the worker repair radius which must exist *hopes its not hardcoded*

#15 Mithril

Mithril

    496

  • Hosted
  • 1,386 posts
  • Location:UK
  • Projects:Heh! You're not going to ask me that question.

Posted 29 August 2004 - 07:13 PM

It could be VisionRange...the GLA worker has a vision range of 100, while the dozers have a vision range of 200..(well the china one has 150)

Edited by Mithril, 29 August 2004 - 07:14 PM.

Command & Conquer: Red Alert - ReGeneration

"Not the faintest clue =\"

-ComradeJ

#16 thudo

thudo

    Wacko AI Guy!

  • Division Leaders
  • 9,179 posts
  • Location:Lemonville North, Canada
  • Projects:DoW AI Scripting Project
  • Division:DoW
  • Job:Division Leader

Posted 30 August 2004 - 05:25 AM

It could be VisionRange...the GLA worker has a vision range of 100, while the dozers have a vision range of 200..(well the china one has 150)

<{POST_SNAPBACK}>


I'm not too sure we want to fiddle with a GLA Worker's VisionRange UNLESS it only effects the AI. Not that its a big issue to give GLA Workers more vision as compared to Dozers.. I would like this resolved somehow.
Advanced Skirmish AI Team Lead for the coolest Warhammer40k PC RTS out there:

Dawn of War Advanced AI Headquarters

Latest DoW Advanced AI Download!

#17 Lion

Lion
  • New Members
  • 50 posts

Posted 30 August 2004 - 08:52 AM

hmmm i think i got it, how to get the workers to have a greater repair range without actually interfering with the player's gameplay...
lemme check!

Damn it got owned too quick for me to see a change...
trying again!

Edited by Lion, 30 August 2004 - 09:43 AM.


#18 thudo

thudo

    Wacko AI Guy!

  • Division Leaders
  • 9,179 posts
  • Location:Lemonville North, Canada
  • Projects:DoW AI Scripting Project
  • Division:DoW
  • Job:Division Leader

Posted 30 August 2004 - 12:21 PM

hmmm i think i got it, how to get the workers to have a greater repair range without actually interfering with the player's gameplay...
lemme check!

Damn it got owned too quick for me to see a change...
trying again!

<{POST_SNAPBACK}>


Lion, you and Akkrand are amazing! Regardless if and when LotR: BfmE is released, the work you guys are doing on ZH is incredible! I can only imagine after a month or two of BfmE being released we shift gears to that. Depending on EA's release (likely Oct-Nov or hell maybe even delayed EA-style) we can all hope BfmE has robust AI out-of-the-box similar to the release of AoM: Titans and every subsequent patch.

Both yourself and Akkrand's committment to the SAGE AI endeavour is impecable! So glad you, Akkrand, and others who are working here on common goals are gonna make ZH a far memorable experience then EA could have ever paid their devs. It just goes to show that once again the faithful community rises up to assist where the manufacturer has failed.

I know its a little over 11 months now since ZH was released (late Sept'03) and now we have major AI work going on for the last 3-4 months (mine since late Jan although I'm a little slower now doing things more in the background) so I'm quite pleased to see such advanced work being undertaken especially the BombTruck and Overlord garrisoning pretty much resolved.

I'm hoping we can get all 12 factions fully working before BfmE is released (2-3months from now) but otherwise its a pleasure working with you fellers! With such AI scripts in utter disorder upon release, the resurrection thats happened is most welcome. All our work will have lasting power into the future of the franchise.
Advanced Skirmish AI Team Lead for the coolest Warhammer40k PC RTS out there:

Dawn of War Advanced AI Headquarters

Latest DoW Advanced AI Download!

#19 Mithril

Mithril

    496

  • Hosted
  • 1,386 posts
  • Location:UK
  • Projects:Heh! You're not going to ask me that question.

Posted 30 August 2004 - 02:48 PM

All our work will have lasting power into the future of the franchise.


That's the spirit! That is why I was talking about a centralized project for BfME; because of cumulative advantages. If our PR is good and if EA's AI is as sloppy and incomplete as the ZH one, many many people should get OUR AI as a kind of "patch" !
Command & Conquer: Red Alert - ReGeneration

"Not the faintest clue =\"

-ComradeJ

#20 Lion

Lion
  • New Members
  • 50 posts

Posted 30 August 2004 - 06:43 PM

Yep it would be great to do such thing! However BFME seems like its going to be quite oriented towards children, at least form the review i saw a while ago. Playing other LOtR games made this only seem true as a lot of them are click and bash the mouse and the char does it all for ya kinda thing. I hope im wrong!

Damn it seemed perfect but no results, theres 2 types of vision a unit can have, i only changed the one that doesnt uncover the shroud, but still no result! ill try finding a repair radius variable!




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users