HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Custom Units...

02-18-2003, 12:54 AM#1
MarSara
If I create a custom unit, base it off of a Great Hall and only change its Trained unit to a unit based off the Peon (except the peon can build 2 extra buildings)... As in I create a complete copy of the Orc units, will the AI know how to use them?

If not is it possible to create a AI script that can? And if I have to create a new script can you give me a brief instruction on how to get it right, because when ever I add a file to my map wc3 never seems to read it.
02-18-2003, 01:36 AM#2
SkylineGT[FB]
the AI wont be able to do anything with ur custom unit, or any custom unit(i think).

and i dont know anything about making an AI script.
02-18-2003, 01:46 AM#3
MarSara
Thanks for the reply.

I guess there is always the option of making triggers to do an AI... at least I know it will work that way.
02-18-2003, 02:27 AM#4
SkylineGT[FB]
good luck!:D
02-18-2003, 02:53 AM#5
STURMguy22
the only way to get the computer to use ur custom unit, is either with triggers or custom ai, so id go over to the ai forum and ask that question

maybe they will have some tips to give u
02-18-2003, 03:14 AM#6
Guest
You would have to create a copy of the Orc.ai that uses your custom units.

You WILL need NEW constant variables that are normally defined in the common.ai file. Luckily, you can just put these at the top of your new orc.ai file you are making (i would rename it).

The constants look like this (from the common.ai):
Quote:
//--------------------------------------------------------------------
// ORCS
//--------------------------------------------------------------------

// orc heroes
constant integer BLADE_MASTER = 'Obla'
constant integer FAR_SEER = 'Ofar'
constant integer TAUREN_CHIEF = 'Otch'

// special orc heroes
constant integer GROM = 'Ogrh'
constant integer THRALL = 'Othr'

// orc hero abilities
constant integer CRITICAL_STRIKE = 'AOcr'
constant integer MIRROR_IMAGE = 'AOmi'
constant integer BLADE_STORM = 'AOww'
constant integer WIND_WALK = 'AOwk'

constant integer CHAIN_LIGHTNING = 'AOcl'
constant integer EARTHQUAKE = 'AOeq'
constant integer FAR_SIGHT = 'AOfs'
constant integer SPIRIT_WOLF = 'AOsf'

constant integer ENDURANE_AURA = 'AOae'
constant integer REINCARNATION = 'AOre'
constant integer SHOCKWAVE = 'AOsh'
constant integer WAR_STOMP = 'AOws'

// orc units
constant integer GUARDIAN = 'oang'
constant integer CATAPULT = 'ocat'
constant integer WITCH_DOCTOR = 'odoc'
constant integer GRUNT = 'ogru'
constant integer HEAD_HUNTER = 'ohun'
constant integer KODO_BEAST = 'okod'
constant integer PEON = 'opeo'
constant integer RAIDER = 'orai'
constant integer SHAMAN = 'oshm'
constant integer TAUREN = 'otau'
constant integer WYVERN = 'owyv'

// orc buildings
constant integer ORC_ALTAR = 'oalt'
constant integer ORC_BARRACKS = 'obar'
constant integer BESTIARY = 'obea'
constant integer FORGE = 'ofor'
constant integer FORTRESS = 'ofrt'
constant integer GREAT_HALL = 'ogre'
constant integer LODGE = 'osld'
constant integer STRONGHOLD = 'ostr'
constant integer BURROW = 'otrb'
constant integer TOTEM = 'otto'
constant integer ORC_WATCH_TOWER = 'owtw'

***NOTE: There are some more including Orc Upgrades***

You DO NOT want to use the same variable names for your new custom units. You also don't want to duplicate any existing units that you will be using. Just leave those out of your new .ai file.

The rest should be self explanatory once you look at the Orc.ai file.
02-18-2003, 03:42 AM#7
MarSara
Your not going to believe this, but the first time I tired creating an AI, that was only done by triggers, worked!

- Trains Peons
- Builds Necessary Burrows
- Trains an army
- attacks random enemys
- if attacked will enact revenge
- if hero dies will rebuild that hero
- if a building is destroied it will rebuild it.
:ggani: