HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

AI & JASS changes after Patch. MUST READ for Jass and Trigger People

10-11-2002, 04:59 AM#1
DKSlayer
No changes at all to andy of the human.ai, elf.ai, orc.ai, undead.ai. It's funny though. On all 4 of those files look at the date they were created and modified September 9, 2002(My Install no Updates). Yet every other script file says the date of Today (after Updates) I just thought that funny since even the campaign AI's have todays date.

common.ai they added this.
native MeleeDifficulty takes nothing returns integer
Used here under the StandardAI function

if MeleeDifficulty() == MELEE_NEWBIE then
call SetTargetHeroes(false)
call SetUnitsFlee(false)
call SetGroupsFlee(false)
call SetSmartArtillery(false)
else
call SetTargetHeroes(true)
call SetUnitsFlee(true)
call SetGroupsFlee(true)
call SetSmartArtillery(true)
endif
Their is more to the StandardAI() but it's not revelent. They did not add these other functions they were already in common.ai just not used till now. Personally I think it somehow checks to see how good you are. No clue on how that would pull that. Maybe out of your profile, that might save your wins loses and through a set number of stuff it deciededs if you are noobie or not. Man that would be hilarious to be displayed on peoples comp. You are playing with 3 newbies. SOJAm, Antwon, and Player1.
They also added these globals.
constant integer INSANE = 4 // not used
constant integer MELEE_NEWBIE = 1
constant integer MELEE_NORMAL = 2
constant integer MELEE_INSANE = 3
The Insane one is for the dificulty thing and the melee ones are for that function I pointed out above.

Ok for the Blizzard.j file here is what is different.
call TriggerRegisterDialogButtonEvent( t, DialogAddButton( d, GetLocalizedString( "GAMEOVER_QUIT_GAME" ), GetLocalizedHotkey("GAMEOVER_QUIT_GAME") ) )
call TriggerAddAction( t, function EndGameBJ )
First line was modified a bit and Second line was added totally this is in the MeleeVictoryDialogBJ and MeleeDefeatDialogBJ and GameOverDialogBJ. This appears to stop people from continue playing after game. But I have not tested so once again someone tell us.
Also in the GetStoredRealBJ function this was uncommented now
//call SyncStoredReal(cache, missionKey, key)
so it can be used.

For the Common.j File they removed this line.
Under the Display AI Heading
native DialogSetAsync takes dialog whichDialog returns nothing
and added this line
native DialogAddQuitButton takes dialog whichDialog, boolean doScoreScreen, string buttonText, integer hotkey returns button
That's all for that file.

Found my answer about the the campaign .ai files, they have been updated here is the code that has been added.

h4_orange.ai
//Human Level 4 Orange AI
function do_cheats takes nothing returns nothing
call Cheat("showmap")
call Cheat("av")
call Cheat("dg")
call Cheat("warnings")
call Cheat("viewres")
// call Cheat("superspeed")
set debug_fast_attacks = true
endfunction

Most .ai files have this they are just different in which cheats are somewhat stated. This is also interesting haven't played with it but I am guessing it either allows those cheats or disables those cheats. Remember these vary map to map. Someone should try this and post back. I actually am starting to think this does those cheats for that computer player. So Orange on level 4 had these ones enabled.

I Compared these very carefully to see where all the AI changes were made. I hope this helped somehow.