• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

[General] How to access original campaign map AI?

Status
Not open for further replies.
Level 3
Joined
Jul 26, 2018
Messages
17
I opened up one of the Reign of Chaos maps " Orc 03: Cry of The Warsong" in world editor. I would like to study and potentially tweak the AI in this map. But I don't know how to access the AI script listed in the trigger editor using the AI editor.

AI script question.jpg
 
You'll need to export it first before you can access it. Those AI can be found in a sub-folder called "Scripts" within the MPQ folder. Use an MPQ Editor to locate that file and extract it.
In 1.30+ you need CASC editor to gain access to these materials.
Okay, so I was able to extract the AI using CASC. But I can't seem to open the files in World editor. Is there something extra I have to do to the files to open them in the ai editor in world editor?
 

Attachments

  • ai script question 2.jpg
    ai script question 2.jpg
    83.4 KB · Views: 477
You can open them in Notepad. They are plain text files...
Code:
//============================================================================
//  Orc 3 -- blue player -- AI Script
//============================================================================
globals
    player user = Player(0)
endglobals
//============================================================================
//  main
//============================================================================
function main takes nothing returns nothing
    call CampaignAI(HOUSE,null)
	call SetReplacements(1,1,3)

    call SetBuildUnit( 8, PEASANT       )

	call CampaignDefenderEx( 1,1,2, FOOTMEN		)	
	call CampaignDefenderEx( 0,0,1, PRIEST		)
	call CampaignDefenderEx( 1,1,1, RIFLEMAN	)
	call CampaignDefenderEx( 1,1,1, MORTAR		)
	call CampaignDefenderEx( 0,0,1, ARCHMAGE	)
	
	call WaitForSignal()

	// *** WAVE 1 ***
	call InitAssaultGroup()
    call CampaignAttackerEx( 3,3,5, FOOTMAN		)
	call CampaignAttackerEx( 2,2,3, RIFLEMAN	)
	call CampaignAttackerEx( 1,1,1, ARCHMAGE	)
    call SuicideOnPlayer(0,user)

	call SetBuildUpgrEx( 0,0,1, UPG_MELEE		)
	call SetBuildUpgrEx( 0,0,1, UPG_ARMOR		)
	call SetBuildUpgrEx( 0,0,2, UPG_MASONRY		)
	call SetBuildUpgrEx( 1,1,1, UPG_DEFEND		)
	call SetBuildUpgrEx( 0,0,1, UPG_PRAYING		)
	call SetBuildUpgrEx( 0,0,1, UPG_SORCERY		)

	// *** WAVE 2 ***
	call InitAssaultGroup()
    call CampaignAttackerEx( 2,2,4, FOOTMAN		)
	call CampaignAttackerEx( 2,2,4, RIFLEMAN	)
    call SuicideOnPlayerEx(M9,M9,M8,user)

	call SetBuildUpgrEx( 1,1,1, UPG_LEATHER		)
	call SetBuildUpgrEx( 1,1,1, UPG_RANGED		)
	call SetBuildUpgrEx( 1,1,1, UPG_GUN_RANGE	)

	// *** WAVE 3 ***
	call InitAssaultGroup()
    call CampaignAttackerEx( 4,4,6, FOOTMAN		)
	call CampaignAttackerEx( 2,2,3, RIFLEMAN	)
	call CampaignAttackerEx( 1,1,1, MORTAR		)
	call CampaignAttackerEx( 1,1,1, ARCHMAGE	)
    call SuicideOnPlayerEx(M9,M9,M8,user)

	call SetBuildUpgrEx( 1,1,2, UPG_MELEE		)
	call SetBuildUpgrEx( 1,1,2, UPG_ARMOR		)
	call SetBuildUpgrEx( 1,1,2, UPG_PRAYING		)
	call SetBuildUpgrEx( 1,1,2, UPG_SORCERY		)

	loop
		// *** WAVE 4 ***
		call InitAssaultGroup()
		call CampaignAttackerEx( 3,3,4, FOOTMAN		)
		call CampaignAttackerEx( 3,3,2, RIFLEMAN	)
		call CampaignAttackerEx( 2,2,2, MORTAR		)
		call SuicideOnPlayerEx(M9,M9,M8,user)

		// *** WAVE 5 ***
		call InitAssaultGroup()
		call CampaignAttackerEx( 5,5,6, FOOTMAN		)
		call CampaignAttackerEx( 1,1,1, PRIEST		)
		call CampaignAttackerEx( 2,2,2, SORCERESS	)
		call CampaignAttackerEx( 1,1,1, ARCHMAGE	)
		call SuicideOnPlayerEx(M9,M9,M8,user)

	endloop
endfunction
 
Status
Not open for further replies.
Back
Top