Jump to content


Let's fix the AI ourselves


  • This topic is locked This topic is locked
30 replies to this topic

#21 Polaris

Polaris
  • Members
  • 49 posts

Posted 18 June 2005 - 01:13 PM

I am quite sure to have localized the location that needs examination and maybe patching. In fact, lets have a look to the attached FlowChart: it seems that sub_F207A1A returns a boolean value that is used to determine if the prerequisites for a building are met.

Thus, it is *probably* the prereq:CannotFulfillPrereq function. In fact if such a function returns true, WE CANNOT BUILD. If it returns FALSE, then we can safely build.

The same behaviour is expressed by function sub_F207A1A... I hope we found that ;)

Attached Files



#22 thudo

thudo

    Wacko AI Guy!

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

Posted 18 June 2005 - 03:25 PM

Polaris.. do you need old v1.20 files to compare?

If Relic did break something and we narrow it down then compare the v1.20->v1.30 difference we could determine a 'possible' fix then internally test it.

Edited by thudo, 18 June 2005 - 03:28 PM.

Advanced Skirmish AI Team Lead for the coolest Warhammer40k PC RTS out there:

Dawn of War Advanced AI Headquarters

Latest DoW Advanced AI Download!

#23 Polaris

Polaris
  • Members
  • 49 posts

Posted 18 June 2005 - 06:04 PM

Sure, that will be extremely important to patch the existing function... Pleeez drop the file in my email ;)

#24 thudo

thudo

    Wacko AI Guy!

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

Posted 18 June 2005 - 06:16 PM

Which files do you need from v1.20 other than that mentioned dll?
Advanced Skirmish AI Team Lead for the coolest Warhammer40k PC RTS out there:

Dawn of War Advanced AI Headquarters

Latest DoW Advanced AI Download!

#25 Polaris

Polaris
  • Members
  • 49 posts

Posted 18 June 2005 - 06:24 PM

Which files do you need from v1.20 other than that mentioned dll?

<{POST_SNAPBACK}>


For now, just the W40KMod.dll... If the internal code structure is unchanged we will soon have a working patch! ;)

EDIT: I suppose you should really make this thread private in some way... Things are getting deeper, and we really do not want to have Relic's wrath coming, uh?

Edited by Polaris, 18 June 2005 - 06:25 PM.


#26 Guest_Guest_*

Guest_Guest_*
  • Guests

Posted 18 June 2005 - 08:00 PM

I've found that you don't need to reverse engineer but can replace the broken prereq functions with lua code.

I started work on it and chaos is building vehicles fine now.

I do not plan to finish this for all races as it is a lot of work, I just wanted to see if it can be done.

If you want to fix the problem write lua replacement code for :

prereq:CannotFulfillPrereqs() and

prereq:GetUnfulfilledPrerequisites()

and you are fine.

Good luck.

LarkinVB

LarkinVB

#27 thudo

thudo

    Wacko AI Guy!

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

Posted 18 June 2005 - 10:18 PM

Larkin.. how large is the code for Chaos to fix the prereq system? Is it the same code fix you used before 2-3 weeks back? Is it something you could post? Is the reason it cannot be easily cross-integrated with the other factions is because it calls individual units/buildings so one would have to determine all those for the other factions?
Advanced Skirmish AI Team Lead for the coolest Warhammer40k PC RTS out there:

Dawn of War Advanced AI Headquarters

Latest DoW Advanced AI Download!

#28 Guest_Guest_*

Guest_Guest_*
  • Guests

Posted 18 June 2005 - 10:23 PM

It's not the same code posted 2-3 weeks ago but it's based on it.

Yes, cross integration is labor as you have to set up prereq rules for each and every squad. Since infantry is only partially broken I only tested for chaos vehicles and sac pit units.

I do not post my code as it is incomplete and can be better structured if written for all races/units.

I suggest doing it from scratch if someone is interested. I'm not.

#29 thudo

thudo

    Wacko AI Guy!

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

Posted 18 June 2005 - 11:17 PM

Yeaa I probably agree the work is best spent on other objectives/goals as I seriously doubt Relic will leave this as it is.

Polaris.. sending the file as per your request via private channels. ;)
Advanced Skirmish AI Team Lead for the coolest Warhammer40k PC RTS out there:

Dawn of War Advanced AI Headquarters

Latest DoW Advanced AI Download!

#30 Polaris

Polaris
  • Members
  • 49 posts

Posted 19 June 2005 - 08:14 PM

Sorry for the delay... The call of the beach was tooooooooooo strong :) I am checking mail ;)

#31 Polaris

Polaris
  • Members
  • 49 posts

Posted 19 June 2005 - 08:27 PM

Mods, pleeez lock or delete the thread ;)




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users