Jump to content


Photo

AI tutorial


  • Please log in to reply
8 replies to this topic

#1 cahik_

cahik_

    Sage engine ruler

  • Project Team
  • 1,896 posts
  • Location:Czech Republic
  • Projects:Rhovanion Alliance
  •  T3A Team Chamber Member and Crazy animator

Posted 08 July 2006 - 07:47 PM

Topic of BFME2 AI has been discuss in other topic. So i decide to make tutorial on what i know so far about making AI for new units, spells and abilities.

If you have any question feel free to ask. I will try to help :p

enjoy it :p

Attached Files


Posted Image

Posted Image
Posted Image


#2 zimoo

zimoo

    Ecthelion of the Fountain

  • Project Team
  • 2,009 posts
  • Location:Devon, England
  • Projects:Lurking until the off topic begins...
  •  Guardian of the Books

Posted 08 July 2006 - 07:57 PM

Well I knew how to do those things (thanks to our discussion on MSN), but this will certainly help out other people. Great job :p
Posted Image
Posted Image
Posted Image
Posted Image
Posted Image
Posted Image

Playing games? Ah, you'll never be a good modder if you get involved in actually playing them!


#3 Phil

Phil

    Force Majeure

  • Network Leaders
  • 7,976 posts
  • Location:Switzerland
  • Projects:Revora, C&C:Online
  •  Thought Police
  • Division:Revora
  • Job:Network Leader
  • Donated
  • Association

Posted 08 July 2006 - 09:47 PM

Hmm... looks helpful and proper. Good job :thumbsup: . (What a pity I don't have BFME2... *sigh*)

BTW: Someone move this to the User Submitted section.

revorapresident.jpg
My Political Compass

Sieben Elefanten hatte Herr Dschin
Und da war dann noch der achte.
Sieben waren wild und der achte war zahm
Und der achte war's, der sie bewachte.


#4 Pixel

Pixel

  • Hosted
  • 2,451 posts
  • Location:London, UK

Posted 08 July 2006 - 09:58 PM

Thank you Cahik! :p Reading it now :p

#5 gansnudel

gansnudel
  • Members
  • 25 posts

Posted 24 July 2006 - 07:47 AM

A couple of corrections/additions:

AI_SPELLBOOK_ALWAYS_FIRE: this has nothing to do with increasing fire, it simply triggers the ability everytime the cooldown is over. I use it for warg howl and goblin poison blades in my mod.

AI_SPECIAL_POWER_CAPTURE_BUILDING: this simply enables a AI unit to capture buildings like outposts/inns, when it is near them.

AI_SPELLBOOK_STRUCTURE_BASEKILL: don´t use this for spells that can´t be targeted directly on buildings(like the balrog), the AI will often try to cast that spell directly on top of the building, so it won´t work unless the building gets destroyed some other way.

AI_SPELLBOOK_STRUCTURE_BREAKER_PREF_WALLS : Similar to the above that doesn´t work well. You can witness that this doesn´t work well sometimes with an elven AI. It often summons ents directly after a fortress goes down on the spot where the fort used to stand. Works pretty fine for wyrms though.

AI_SPELLBOOK_ARMY_BREAKER :
This is probably the most useful one. It works great for everything where you want to target a bunch of enemy troops with an ability that has a good range. In my mod I use it for dragon teleport, balrog wings, ranger longshot and the fortress abilities like wizard tower/gorgoroth spire.

AI_SPECIAL_POWER_BASIC_SELF_BUFF:
This seems to trigger when the unit is on roughly half health, not when it is surrounded so for boosts with a rather low cooldown, you may rather want to use always_fire.

SpecialPowerRadius : My testing suggests that this is actually a range parameter, which determines how far the target unit can be away from the casting unit.
So for abilities that are used in close combat you want a very low radius, e. g. wormtongue´s backstab has 50 and works, whereas morgulblade has 100 basegame and doesn´t seem to work.

#6 Fingulfin

Fingulfin

    I Like Pi3. Do you?

  • Hosted
  • 1,752 posts
  • Location:California, USA
  • Projects:Staying Alive.
  •  This place looks familiar. I can't remember why.

Posted 24 July 2006 - 09:31 PM

Quick Question: How do you get the AI to build a new building? Didn't seem to be covered :p
Posted Image
--------------------------------------
"You look like a ghost of your former self..."

#7 Gumby22don

Gumby22don
  • Project Team
  • 144 posts
  •  AWD Development Team
  • Division:BFME
  • Job:Co-Designer: RoR 1 and 2

Posted 25 July 2006 - 03:33 AM

o come on, you know that's not a quick question Fingulfin. don't lie.

Don
have a great day
Posted Image

#8 zimoo

zimoo

    Ecthelion of the Fountain

  • Project Team
  • 2,009 posts
  • Location:Devon, England
  • Projects:Lurking until the off topic begins...
  •  Guardian of the Books

Posted 25 July 2006 - 11:50 AM

Quick Question: How do you get the AI to build a new building? Didn't seem to be covered wink.gif


You edit the .bse files found in bases.big, then add them to your mod files :p
Posted Image
Posted Image
Posted Image
Posted Image
Posted Image
Posted Image

Playing games? Ah, you'll never be a good modder if you get involved in actually playing them!


#9 Der Alte

Der Alte
  • Members
  • 60 posts

Posted 11 February 2007 - 04:28 PM

Great tutorial :shiftee:

But pls could anyone tell me - if I want the AI first to build up a bigger army before it attacks - what must I do ???




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users