View Full Version: Dungeon Keeper AI

Keeper Klan Forum > Mapmaking / Editing > Dungeon Keeper AI



Title: Dungeon Keeper AI
Description: Force AI to do certain things


sonicx73 - June 20, 2008 10:03 AM (GMT)
I'm just making a map for Dungeon Keeper and I wonder
if there is any way to force the computer player to dig to my dungeon after a certain time and attack me.
The only way i find which is not a real solution to add a party of tunnellers to my level after a certain time which belong to the computer to dig to my dungeon. The imps take over the neutral territory and if I attack an imp the computer will drop down his creatures.
I tried to implement the call to arms command(Attack Safe) and gave the computer the call to arms spell at the beginning of the level but it didn't happen anything.

SET_COMPUTER_PROCESS(PLAYER1,"ATTACK SAFE ATTACK",-1,100,22,100,0)

I do not know what the values after the -1 are because I found that command on a other page as it is. I read that the Computer will cast the Call to Arms command to my Dungeon Heart, but nothing happens.

Mefistotelis - June 20, 2008 12:07 PM (GMT)
You will have to experiment. We do not know how the ATTACK processes works.

Actually we only know DIG and BUILD ones.

Be sure to use computer type 0 - in other types, the command may not work.

This code will make PLAYER2 and PLAYER3 attack PLAYER1 with CTA just at start of the game:
CODE

COMPUTER_PLAYER(PLAYER1,0)
COMPUTER_PLAYER(PLAYER2,0)
COMPUTER_PLAYER(PLAYER3,0)
SET_COMPUTER_PROCESS(PLAYER1,"ATTACK SAFE ATTACK",-1,0,0,0,2)


Note that there is a second attack process: "ATTACK PLAN 1".

You may check what we know here:
http://keepersofthedungeon.net/mefistoteli...ripting_ref.htm

sonicx73 - June 20, 2008 01:31 PM (GMT)
Thanks for your response. Do you know any other commands to make the AI stronger or more aggressive?
The only command I know is to set an aggressive player COMPUTER_PLAYER(PLAYER1,6)
I tested it and I saw that the training room the AI build is really small for the large amound of creatures I gave him. For the next step I implemented this command

SET_COMPUTER_PROCESS(PLAYER1,"BUILD A TRAINING ROOM",1,6,6,6,13)

The training room is larger, but he build it right after the treasure room, but i set the required index at 13 which would be the hatchery, thats kinda strange.

By the way is there a huge difference between the standard
COMPUTER_PLAYER(PLAYER1,0) and the aggressive player.

Did you notice any difference when you turned on the attack plan 1 ?

Mefistotelis - June 20, 2008 03:51 PM (GMT)
QUOTE (sonicx73 @ Jun 20 2008, 01:31 PM)
Did you notice any difference when you turned on the attack plan 1 ?

Processes are not turned on by SET_COMPUTER_PROCESS(), but by COMPUTER_PLAYER().
SET_COMPUTER_PROCESS only alters the parameters of every process.

About the training room - yes, that's strange it's not built after hatchery...
You can try lowering its "priority" - this should help in setting the correct room order.

As about other ways of making computer stronger - I know only script commands, which are all listed in the reference.

sonicx73 - June 20, 2008 04:00 PM (GMT)
First thanks for your time.
About the "priority" for the training room. Isn't 1 the lowest priority or does it go the other way ? I mean as higher the value is as lower is the priority ?
And for the attack plan 1 i ment, if the behaviour of the computer player is different, the way he act, or does simply nothing happen, when this parameter is set.

Mefistotelis - June 20, 2008 08:39 PM (GMT)
Larger values means greater priority. But most of the priorities are negative (<0) so "1" is actually very high. Try -5 or -10.

I never made an extensive tests to the ATTACK commands, so I can't really tell how they affect the game. I can only assume they contain conditions which have to be met before computer starts the attack.

One of the parameters may be the amount of creatures the player has, or sum of all creatures experience. For others - I have completely no idea.

I also do not know what is the difference between two attacks.

If you wish to make some tests, please report about your conclusions 8).




Hosted for free by InvisionFree