Jump to content


Kaiser Soze

Member Since 03 Dec 2006
Offline Last Active Aug 09 2007 11:45 AM

Topics I've Started

Want to join DoWPRO forums?

08 February 2007 - 01:18 PM

Hi,
as you know I'm adapting you mod to the new DC: PRO.
90% of my work is done on the races part, but I'm also changing a few thing on the core.

anyway, my proposal is that maybe some of the designers of your mod may want to have access to our internal forums.

Larkin usually post there, but I think that right now he is doing very little coding for you, so maybe you want to see directly what are we trying to do. A few ideas and changes may also be useful for you.

I try to post here any time I feel it's important for the whole mod, and not just the Ai of DC: PRO, but I may forget something. I'm sure Korbah and the other members of the team won't see any problem in granting access to a few of you and it may be useful for both mods. We have a special AI subforum, you can read only what you want. In fact I found that you posted on our forums long time ago (but only on public forums)

Bug found (2.0) in the building unit process

05 February 2007 - 11:21 PM

Hi,
this bug maybe solved in 2.2 but I feel this should be reported.

CalculateEffectivenessDemand
and
CalculateClassDemand
(both on buildbasestrategy)
may have a bug.

Both functions calculates the demand required for classes. But they do use the difference wrong (or so I think).
the result is that the AI focus the demand on classes that the enemy can counter and reduces the demand on classes to counter the enemy. Unit ratings may compensate this, as well as buildprograms, but I feel it should be reported.
I have added a few traces to prove that.

Detectors

24 January 2007 - 10:22 AM

Hi,
I do not have yet your 2.2 version, so this may be a fixed bug but in 2.0 and 2.1 there is a problem with detectors.

When the Ai is deciding whether or not build detectors it reads the whole list of detectors checking if they are already built. The problem is that if the detector is built but its attached to a squad it returns that the number of units is 0, so it thinks it doesn't have the detector built and tries to built this detector and when it fails it tries to built the next on the list. This has happen to me with Chaos Lord.

It is not a big issue since the only backwards is that the Ai build more detector, but I just wanted to pointed it out in case you didn't know yet.

Info about unit upgrades

23 January 2007 - 08:40 AM

Hi,
Is there anyway that the AI can know what upgrades has a unit?.
If this is not possible, at least can be possible to know how much does their upgrades cost? (so I can try to figure what upgrades has the unit)

Possible bug with dancing (CheckForDance function)

21 January 2007 - 08:39 PM

Hi,
I'm working with your mod and I may have found a bug in the infantrytactic.
in the InfantryTactic:CheckForDance()
Here is the code (from 2.1)
	  local infantry = Ability.Filters.CloseInfantryEnemy( squad_pos, enemy_dist, 3 )
	  if (self:CheckDance(infantry)) then
		 
		 local num_own = self.squad_ai:GetNumTroopers()
		 local num_enemy = infantry:GetNumTroopers()
		 stance = infantry:GetMeleeStance()
		 
		 --don't dance if enemy is ranged or we have more than 300% troopers
		 if stance == SquadAI.MSTANCE_Ranged or num_own > num_enemy * 3 then
			
			infantry = nil
		 end
	  end
	  .
	  .
	  .
	  --close combat enemy nearby and not enough support, lets dance
	  if (( infantry ~= nil and not infantry:IsBroken() ) or
		 ( vehicle ~= nil and not vehicle:IsRanged() and vehicle:GetHealthPercentage() > 0.1 ) or
		 ( commander ~= nil and commander:GetHealthPercentage() > 0.1 )) and
		 ( self.squad_ai:CanJump() or strength <= 0 or number <= 0 ) then
	 ...Dancing code ...

So, if the CheckDance(infantry) function returns false the unit will still dance because infantry will not be "nil".

for instance if the units doing the check is a marine tac against a cultist. I haven't tested yet in game, but I think that the code should be something like this:
	  local infantry = Ability.Filters.CloseInfantryEnemy( squad_pos, enemy_dist, 3 )
	  if (self:CheckDance(infantry)) then
		 
		 local num_own = self.squad_ai:GetNumTroopers()
		 local num_enemy = infantry:GetNumTroopers()
		 stance = infantry:GetMeleeStance()
		 
		 --don't dance if enemy is ranged or we have more than 300% troopers
		 if stance == SquadAI.MSTANCE_Ranged or num_own > num_enemy * 3 then
			
			infantry = nil
		 end
>>>>>>else
		infantry = nil<<<<<
	  end