• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Several Questions

Status
Not open for further replies.
Level 3
Joined
Nov 9, 2018
Messages
19
Hi everyone, I have several questions today...
  1. What picture format does WCIII use for say, a logo on a custom campaign? The one you see in the upper right corner on the main menu when you're looking through all of your custom campaigns?
  2. How do I add player units to a Unit Group as the player trains them? Mostly so I can have cleaner cutscenes/cinematics when the player is destroying the enemy base with a big army. Or if there's a better way to do this, what is it?
  3. Would anyone be willing to make a simple AI for me that gathers wood, gathers gold, and occasionally sends attacks at the players after a certain condition is met that I could use as a template for later on? I don't really understand how the AI editor works and furthermore, how to stick the AI in the game... Sorry!
Thanks in advance!
 
Level 38
Joined
Feb 27, 2007
Messages
4,951
1. Mostly BLP for all things. I think some accept .TGA too?

2. Use either the “a unit enters playable map area” or “a unit trains a unit” events to run a trigger and add to the right group. Before your cinematic you should make sure to purge the groups of any dead units, too.
 
Level 3
Joined
Nov 9, 2018
Messages
19
So would something like this picture work for adding a new unit to the unit group?
addingunittogroup.PNG
 
Level 12
Joined
Jun 15, 2016
Messages
472
Would anyone be willing to make a simple AI for me that gathers wood, gathers gold, and occasionally sends attacks at the players after a certain condition is met that I could use as a template for later on? I don't really understand how the AI editor works and furthermore, how to stick the AI in the game... Sorry!

Does it have to be with the AI editor? I should have a script like that lying around somewhere, if not it can be done over the weekend either in script or in the editor.
 
Level 12
Joined
Jun 15, 2016
Messages
472
Almost forgot about that. Here's an example of a campaign script for undead which works like you specified, edited from one of the RoC campaign maps. It should work with any map though. All that's missing is to set up a loop so it won't stop attacking, and repeat from some wave, and you're done.

JASS:
//============================================================================
//  Human 05 -- green player -- AI Script
//============================================================================
globals
    player user = Player(1)
endglobals

//============================================================================
//  main
//============================================================================
function main takes nothing returns nothing

    call CampaignAI(ZIGGURAT_1,null)
   call SetCaptainHome(ATTACK_CAPTAIN,-3649,-5446)

    call SetBuildUnit( 1, NECROPOLIS_1      )
    call SetBuildUnit( 1, ACOLYTE           )
    call SetBuildUnit( 1, UNDEAD_MINE       )
    call SetBuildUnit( 1, UNDEAD_ALTAR      )
    call SetBuildUnit( 1, GRAVEYARD         )
    call SetBuildUnit( 2, CRYPT             )
    call SetBuildUnit( 5, ACOLYTE           )
   call SetBuildUnit( 1, LICH               )
    call SetBuildUnit( 8, ZIGGURAT_1        )
    call SetBuildUnit( 8, ZIGGURAT_2        )
    call SetBuildUnit( 1, NECROPOLIS_2      )
    call SetBuildUnit( 1, SAC_PIT           )
    call SetBuildUnit( 1, DAMNED_TEMPLE     )
    call SetBuildUnit( 1, SLAUGHTERHOUSE    )
    call SetBuildUnit( 1, NECROPOLIS_3      )

    call CampaignDefenderEx( 3,3,3, GHOUL       )
    call CampaignDefenderEx( 2,2,2, NECRO       )
    call CampaignDefenderEx( 2,2,2, ABOMINATION )
   call CampaignDefenderEx( 1,1,1, MEAT_WAGON   )
   call CampaignDefenderEx( 1,1,1, LICH       )

    call WaitForSignal()

    //*** WAVE 1 Time elapsed 4min ***
    call InitAssaultGroup()
    call CampaignAttackerEx( 3,3,6, GHOUL       )
    call SuicideOnPlayer(M2,user)

    //*** WAVE 2 Time elapsed 7min ***
    call InitAssaultGroup()
    call CampaignAttackerEx( 4,4,4, GHOUL       )
    call CampaignAttackerEx( 0,0,2, MEAT_WAGON  )
    call CampaignAttackerEx( 0,0,1, NECRO       )
    call SuicideOnPlayer(M3,user)

    //*** WAVE 3 Time elapsed 10min ***
    call InitAssaultGroup()
    call CampaignAttackerEx( 5,5,8, GHOUL       )
    call CampaignAttackerEx( 1,1,4, NECRO       )
    call SuicideOnPlayer(M3,user)

   call SetBuildUpgrEx( 0,0,1, UPG_CANNIBALIZE   )
    call SetBuildUpgrEx( 1,1,1, UPG_SKEL_LIFE     )
    call SetBuildUpgrEx( 1,1,1, UPG_UNHOLY_ARMOR  )
   call SetBuildUpgrEx( 1,1,1, UPG_NECROS        )

    //*** WAVE 4 Time elapsed 13min ***
    call InitAssaultGroup()
    call CampaignAttackerEx( 3,3,4, GHOUL       )
    call CampaignAttackerEx( 1,1,1, NECRO       )
    call CampaignAttackerEx( 1,1,2, MEAT_WAGON  )
    call SuicideOnPlayer(M3,user)

    //*** WAVE 5 Time elapsed 16min ***
    call InitAssaultGroup()
    call CampaignAttackerEx( 6,6,10, GHOUL       )
    call SuicideOnPlayer(M3,user)

   call SetBuildUpgrEx( 1,1,1, UPG_UNHOLY_STR    )
   call SetBuildUpgrEx( 0,0,1, UPG_GHOUL_FRENZY  )
   call SetBuildUpgrEx( 0,0,1, UPG_PLAGUE        )

   //*** WAVE 6 Time elapsed 19min ***
    call InitAssaultGroup()
    call CampaignAttackerEx( 2,2,3, ABOMINATION )
   call CampaignAttackerEx( 1,1,2, MEAT_WAGON  )
    call SuicideOnPlayer(M3,user)

    //*** WAVE 7 Time elapsed 22min ***
    call InitAssaultGroup()
    call CampaignAttackerEx( 6,6,6, GHOUL       )
   call CampaignAttackerEx( 2,2,4, NECRO       )
   call CampaignAttackerEx( 2,2,3, ABOMINATION )
    call SuicideOnPlayer(M3,user)

   //*** WAVE 8 Time elapsed 25min ***
    call InitAssaultGroup()
    call CampaignAttackerEx( 6,6,6, GHOUL       )
   call CampaignAttackerEx( 2,2,4, NECRO       )
   call CampaignAttackerEx( 1,1,2, ABOMINATION )
   call CampaignAttackerEx( 1,1,2, MEAT_WAGON  )
    call SuicideOnPlayer(M3,user)
endfunction

I tried fiddling a bit with the AI editor, but I have a hard time believing it will work. If you want, you can try this: the AI editor gives possible targets for you to attack, and you can decide to attack different targets in different conditions. So, you can make a starting condition that makes all of the targets unavailable, then the AI shouldn't attack anything.
 
Status
Not open for further replies.
Top