Let's fix the AI ourselves
#1 Guest_Polaris_*
Posted 16 June 2005 - 07:36 AM
A first attempt, mostly to check out if the whole idea is realistic, could be made on prereq:CannotFulfillPrereqs(), that Thudmeizer reported to be broken here.
In order to fix such function, the following steps must be performed:
* locate faulty code
* reverse engineer the faulty code
* correct the faulty code
* patch/implement the fixed code
Also, there is the need for a *experienced* modder to support me with informations about the whole modding system and the original AI implementation.
#2 Guest_Guest_*
Posted 16 June 2005 - 09:23 AM
I won't do this nor assist as I wasted too much time with this already.
Also I'm not sure wether I nailed the problem as the AI starts building vehicles in the end (though it takes years for chaos).
IMO it's Relic job to fix this.
Good luck if still want to try. Maybe you can get a job at Relics afterwards.
Larkin
#3 Guest_Guest_*
Posted 16 June 2005 - 10:55 AM
Maybe it's possible to reverse engineer and fix.
That's what we wanna investigate. In my opinion (and believe me, I am quite skilled in Reverse Engineering ) this can be done.
IMO it's Relic job to fix this.
Sure, but I really like this game, so, if they are not going fix things, I'll do that.
Good luck if still want to try. Maybe you can get a job at Relics afterwards.
LOL
#4 Guest_Guest_*
Posted 16 June 2005 - 12:18 PM
The question for me is just this : Can I do something better instead of trying to fix it ? Currently the answer is : Yes.
Modding should be fun, right ?
Larkin
#5 Guest_Polaris_*
Posted 16 June 2005 - 01:12 PM
I like the game too. But not THAT much.
The question for me is just this : Can I do something better instead of trying to fix it ? Currently the answer is : Yes.
Modding should be fun, right ?
Larkin
Well, I really can't blame you... But take this as a more difficult challenge
#6
Posted 16 June 2005 - 01:40 PM
We chatted briefly about your coding skills.
You probably need all the AI scripts regarding preq. Thats easy to give you. You then take all the relevant AI code, find out how the logic works, then build your patch around it.
Larkin is right though: its Relic's job to do this and my concern is reverse-engineering an exe is probably not legal. I can certainly see a possible conflict with releasing it. I mean, we can attempt it then release it internally to us for future testing .
Heck, I'd sooner have you on our team as a regular member going through and enhancing what AI code we already have. Your skills would easily meld with the rest of the talent we have pooled here.
TuD.
Dawn of War Advanced AI Headquarters
Latest DoW Advanced AI Download!
#7 Guest_Polaris_*
Posted 16 June 2005 - 02:21 PM
The "legality" problem is a big issue: as soon as I am loading the program binaries inside my "tools-of-the-trade" I am infringing the game copyright agreement.
*But* - hey we have purchased the game, I really do not like playing skirmishes with crazy chaos raptors that wander without reason. Obiovously, we can end up in making this patch private, and in this way we can avoid any problem.
Now, I must understand a few things: I *suppose* that DOW mod development is like plugin coding: you insert in your code a set of primitives that Relic Mod Tools make available, am I right?
Maybe a small code example could clarify thingies.
#8
Posted 16 June 2005 - 02:52 PM
As for where examples are:
For the Demand system do a search for the word "demand" and here are the relevant .ai files:
cpu_manager.ai
buildbasestrategy.ai
strategy.ai
For the preq. system its:
buildunitplan.ai
strategy.ai
Larkin knows this area quite well though and could elaborate.
Dawn of War Advanced AI Headquarters
Latest DoW Advanced AI Download!
#9
Posted 16 June 2005 - 07:19 PM
If you want a very (very) rough briefing on the AI files and how they work, as well as some musings on the demand system take a look here.
Other than that I would be happy to help you out - PM me if you want to chat about the AI files and so on.
Flenser
#10
Posted 17 June 2005 - 04:43 PM
Hi Polaris - sounds like you are attempting Mission Impossible, but since I would love you to succeed I am happy to help
Hehhe... You should not be so pessimistic. The idea is to spot what they do and have a quick patch... Difficult but not impossible.
I have some question based on the code I have seen coming from your mod. For example function prereq:CannotFulfillPrereqs() was targeted as the first operation that needs patching. So, it is used in the following way (coming from the function CpuManager:PrintDemands()):
if prereq:CannotFulfillPrereqs() then
self:Print( xval, yval, "true" )
else
self:Print( xval, yval, "false" )
end
Now my question is: you actually wrote scripts that invoke functions (like CannotFulfillPrereqs()), but where this commands are stored? Also, where can I find documentation on that?
This information is required in order to locate the code (the actual command) that needs patching.
Awaiting feedback...
Edited by Polaris, 17 June 2005 - 04:45 PM.
#11
Posted 17 June 2005 - 04:51 PM
Maybe perhaps I should get Corsix in on this convo too as he's been deep in the code before as well examining higher-level functions.
Dawn of War Advanced AI Headquarters
Latest DoW Advanced AI Download!
#12
Posted 17 June 2005 - 04:58 PM
NOTE: Due to the _barely legal_ content of these posts, I suggest we find another way of continuing this "project".
#13
Posted 17 June 2005 - 05:30 PM
function prereq:CannotFulfillPrereqs() was targeted as the first operation that needs patching
While it is correct that the prerequisite system is crippled in some way, we do not know exactly what has gone wrong or where to look. CannotFulfillPrereqs() is a good start, however, as is GetUnfulfilledPrerequisites() and PrerequisitesFulfilled().
Take a look at the AI wiki on the Relic Developers Network - zipped version attached, since registration is required at RDN.
This is the only documentation Relic have made available on the AI, and its sparse nature is one of the reasons this is all taking so long
Thud - I am sure you can come up with another - less public - way for Polaris to contact us if he has any questions. I would prefer you not give him my work email however given the nature of my job.
Cheers,
Flenser
Attached Files
#14
Posted 17 June 2005 - 05:33 PM
If anybody spots something interesting, let me know (no CannotFulfillPrereq, sorry )
HMMM: How to attach?
#15
Posted 17 June 2005 - 05:37 PM
I'll have to see if I can create a private forum here that requires username/password. That would work best.
Dawn of War Advanced AI Headquarters
Latest DoW Advanced AI Download!
#16
Posted 17 June 2005 - 05:50 PM
Edited by Polaris, 17 June 2005 - 05:53 PM.
#17
Posted 17 June 2005 - 09:23 PM
That would make sense. I must say that I admire your idea; although pulling it off may well be hard. Time for the cdoe ninjas...Ok, new infos: I have scanned *every* fuck**ng DLL in the GAME, but no information was found ----> Lua interpreter is hardwired inside W40K main executable.
#18
Posted 17 June 2005 - 10:22 PM
Dawn of War Advanced AI Headquarters
Latest DoW Advanced AI Download!
#19
Posted 17 June 2005 - 10:36 PM
#20
Posted 18 June 2005 - 10:43 AM
Also, found something related to prerequisite in W40KMod.dll (sorry for the asm, but I really want to be sure I am going toward the right way ):
.text:0F288C15 push dword ptr [ebp-24h] ; Prerequisite string
.text:0F288C18 mov eax, [eax+4]
.text:0F288C1B mov eax, [eax]
.text:0F288C1D push eax ; Building name
.text:0F288C1E push offset aPrereqsNotMetF ; "prereqs not met for building %s. Prere"...
.text:0F288C23 push 53434152h
.text:0F288C28 call ds:dbWarningfAux(ulong,char const *,...)
This basically means:
dbWarningfAux(0x53434152,"prereqs not met for building %s. Prereqs:(%S)", Bname, PrereqString);
So, if we land here, we have previously checked if the prereqs have been fulfilled, and the prereq are NOT right.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users