AdrianeMapMaker
9 years ago
I want to create a topic that might help me to improve my works in Skirmish Maps.
Maybe you can help me in these questions please.
Now lets ask questions,

#how my AI will garrison buildings to protect themselves from my attacks

i want my ai will protect from my attacks they only garrison buildings in Nearest Position


#how my AI will Capture some Tech so far from their base

i want this too, i noticed my ai doesnt capture any tech within their range, except their capture a nearest one then they will capture all in the map


#how my AI will Capture a Supply dock in far position

i have some issues with my AI doesn't take a far-position-depot


I will be happy if someone teach their tutorials here, soon this topic will be actually helpful for other beginners with their own new map😉 👍 .
A part of ZH worldbuilders map making community
https://discord.gg/tJ6zyGb 

UserPostedImage




Sponsor
zero hour mad map maker
9 years ago
The scripts to change the properties of the skirmish AI are a bit complex; they can be found in Windows(C)-> ProgramFiles(x86) -> Command and Conquer Generals Zero Hour -> Data -> Scripts -> skirmishscripts.scb

You can import that script file into your skirmish map.

The screen shot "Skirmish scripts" might contain the script you are looking for to change the tech capturing range of the AI. Though, if this is the script you'll have to change it for all the players.

The "Garrison Orders" could also possibly be the folder that contains the scripts in order for the AI to garrison. Though, this could also be considered a defensive action and could be in "Alerts" I think.

For the supply dock, I couldn't find anything related to that, but with some rummaging I bet you can =)

From going through the skirmish scripts you can do a lot with it, you could even have them build a different base than their preset by changing the building scripts. This is a powerful set of scripts, waiting to be modified. 😉
Skirmish Scripts.png

Click to View Image81 View(s)


Ready for Anything! --- C&C Labs Staff , Maps Staff , Moderator
AdrianeMapMaker
9 years ago
thanks

but wait i don't know how to use flags and what flags doing ,can you please said to me how to use this script ,how did they work?

dang these skirmishscripts are high level scripts ,these are from the developers right.

some of those are i cant understand damn😂 .
just like the got greater than equal....... what!!😁 what is that for.
can you explain some of those too, i already seen these scripts from a downloadable mission.
A part of ZH worldbuilders map making community
https://discord.gg/tJ6zyGb 

UserPostedImage




zero hour mad map maker
9 years ago

thanks

but wait i don't know how to use flags and what flags doing ,can you please said to me how to use this script ,how did they work?

dang these skirmishscripts are high level scripts ,these are from the developers right.

some of those are i cant understand damn😂 .
just like the got greater than equal....... what!!😁 what is that for.
can you explain some of those too, i already seen these scripts from a downloadable mission.

Originally Posted by: adrianemapmaker 



Of course! I'd be glad to considering I work with these scripts all the time!

Let me expand on a few of them; Firstly, the one's that you asked about. If anything seems confusing let me know and I will edit this post to make things more clear! 😇

Flags:
Flags are very useful, considering they turn things on and off. They basically toggle items. Since scripts are activated by descending order (1...2...3...4...etc) flags can be used to keep a script active.

Example: (Applying this in cinematic intros)

Script 1:

*** IF ***
True.
*** THEN ***
Set Flag named '_GAME_ON' to TRUE

Script 2:

*** IF ***
True.
*** THEN ***
Set Flag named '_GAME_ON' to FALSE
The world is revealed permanently for Player 'ThePlayer'.
Start letterbox mode (hide UI, add border).
Disable mouse and keyboard input.
Set timer '_CINE_TIMER' to expire in 1500 frames.
Set timer '_CINE_TIMER2' to expire in 2.00 seconds.
Position camera at Waypoint 'cm_Start1', zoom = 1.00(0.0 to 1.0), pitch = 1.00(1.0==default), looking towards Waypoint 'cm_Look1'.
Set the desired sound volume to 60.00%. (0-100)
Set the desired music volume to 80.00%. (0-100)

Script 3:



*** IF ***
Timer '_CINE_TIMER2' has expired.
*** THEN ***
Move camera to Waypoint 'cm_Pos1a' in 8.50 seconds, camera shutter 0.00 seconds, ease-in 2.00 seconds, ease-out 2.00 seconds.
Look towardWaypoint 'cm_Look1a' during the camera movement.
Set timer '_CINE_TIMER2' to expire in 9.00 seconds.
Enable Script 'Script 4'.

Script 4:

*** IF ***
Timer '_CINE_TIMER2' has expired.
*** THEN ***
Set Flag named '_GAME_ON' to TRUE
Set the desired sound volume to 100.00%. (0-100)
Set the desired music volume to 100.00%. (0-100)
All sound events play at normal volume.


In this short example you can see that the game screen is switched on and off between the Game and the Intro using the flag "Game_ON".


Player has greater than or equal to.....:

This set of scripts are helpful for detecting the current state of the player. Once the current state is detected a desired effect will take place.

Example 1: (Using greater than or equal to for structures/units)

This one seems straightforward, but let's dig deeper!

Script 1

*** IF ***
Player '' has Greater Than or Equal To 4 unit or structure of type 'ChinaTankDragon'
*AND* 2000 is Less Than or Equal the number of credits possessed by Player ''
*** OR ***
Player '' has Greater Than or Equal To 4 unit or structure of type 'ChinaJetMIG'
*AND* 2000 is Less Than or Equal the number of credits possessed by Player ''
*** THEN ***
Have AI Player '' build this upgrade: Upgrade 'Upgrade_ChinaBlackNapalm'


That seems like a lot! So let's break it down.


*** IF ***
Player '' has Greater Than or Equal To 4 unit or structure of type 'ChinaTankDragon'

The first *if* statement checks if the player has build 4 or more Dragon Tanks



*AND* 2000 is Less Than or Equal the number of credits possessed by Player ''

This *And* statement here means that the previous condition (The *If* statement just above) must be TRUE along with THIS statement. In other words both the *if* and *And* statement must be true in order for the script to activate

Going back to the script at hand, this *AND* statement detects if the player has $2,000 or less. Putting it together and the whole condition states that the player MUSThave BOTH $2,000 or less and 4 or more Dragon Tanks



*** OR ***
Player '' has Greater Than or Equal To 4 unit or structure of type 'ChinaJetMIG'
*AND* 2000 is Less Than or Equal the number of credits possessed by Player ''

*OR* sets another condition. If the previous statements above were not met the game checks if these conditions are met.

Just like the dragon tanks this condition detects if the player has 4 or more China Mig's and if the player also has $2,000 or less.


*** THEN ***
Have AI Player '' build this upgrade: Upgrade 'Upgrade_ChinaBlackNapalm'

If the ***OR*** Statement or the ***IF**** statement are true, the follow effect takes place in the ***THEN*** statement






Example 2: (Using greater than or equal to for range)


*** IF ***
Player '' has a tech building within 500.00 of area '[Skirmish]MyInnerPerimeter'
*AND* Player '' has Greater Than or Equal To 1 unit or structure of type 'ChinaBarracks'
*** THEN ***
Set 'China Tech Building Near' to 1


This is pretty self-explanatory so no problem here


Example 3: (Complicated Greater than or equal to)

In the case of this script:

*** IF ***
Flag named 'China Tech Stop Trying' IS FALSE
*AND* Counter '_ESCALATION' IS Greater Than or Equal To 100
*** THEN ***
Set Flag named 'China Tech Stop Trying' to TRUE

The variable is the COUNTER_ESCALATION instead of the THIS_PLAYER.

The COUNTER_ESCALATION is a counter that's set in another script. The counter script does what it says.... It counts! lol. It's like a timer except it counts up and not down. Once this counter reached 100 or more the desired effect will take place: Setting the flag to false.

Important Notes:

  • Greater than or Equal to can be applied to Less Than or Equal to as well
  • Different variables can be used ranging from Counters, Players, and Objects/Units
  • These scripts detect if the conditions are met
See if you can decipher this script! *** IF ***
Flag named 'MORE CRATES' IS FALSE
*AND* Player '' has Less Than 3 unit or structure with Kind is 'CRATE' in the area '[Skirmish]MyInnerPerimeter'
*** THEN ***
Set Flag named 'MORE CRATES' to TRUE


Extras:

In this script you can see how the developers set all the variables. Most of which are flags!

*** IF ***
True.
*** THEN ***
Set Flag named '_INVASION_ALERT' to FALSE
Set Flag named '_INVASION_ALERT_OVER' to FALSE
Set Flag named '_INVASION_ALERT_RESPONSE' to FALSE
Set Flag named 'China Start Garrisoning Buildings' to FALSE
Set Flag named 'China Air Team Is Building' to FALSE
Set Flag named 'China Inf Team Is Building' to FALSE
Set '_ATTACK_WAVE' to 0
Set '_ESCALATION' to 0
Set Flag named 'China Tech Stop Trying' to FALSE
Set '_COUNTER_FOR_ATTACK' to 0



Here one will notice that the Greater than or Equal to has been applied to check when the AI player has taken mast amounts of destruction, and if the conditions are met the AI will sell their buildings and surrender!

*** IF ***
Player '' has Less Than or Equal 0 unit or structure of type 'ChinaVehicleDozer'
*AND* Player '' has Less Than or Equal 0 unit or structure of type 'ChinaCommandCenter'
*AND* Player '' has Less Than or Equal 0 unit or structure of type 'Base Factories'
*** OR ***
2000 is Greater Than the number of credits possessed by Player ''
*AND* Player '' has Less Than or Equal 0 unit or structure of type 'ChinaVehicleSupplyTruck'
*AND* Player '' has Less Than or Equal 0 unit or structure of type 'ChinaInfantryHacker'
*AND* Player '' has Less Than or Equal 0 unit or structure of type 'ChinaSupplyCenter'
*AND* Player '' has Less Than or Equal 0 unit or structure of type 'TechOilDerrick'
*** THEN ***
Set timer 'China - Sell Off Timer' to expire in 10.00 seconds.
Enable Script 'China Sell off'.


Script: China Sell off
*** IF ***
Timer 'China - Sell Off Timer' has expired.
*** OR ***
*** THEN ***
Player '' sells everything.


Let me know if there are any other scripts you are curious about!! UserPostedImage
Ready for Anything! --- C&C Labs Staff , Maps Staff , Moderator
AdrianeMapMaker
9 years ago


Of course! I'd be glad to considering I work with these scripts all the time!

Let me expand on a few of them; Firstly, the one's that you asked about. If anything seems confusing let me know and I will edit this post to make things more clear! 😇

Originally Posted by: Zero Hour Mad Map Maker 



thanksUserPostedImage


Flags are very useful, considering they turn things on and off. They basically toggle items. Since scripts are activated by descending order (1...2...3...4...etc) flags can be used to keep a script active.

Example: (Applying this in cinematic intros)

Script 1:

*** IF ***
True.
*** THEN ***
Set Flag named '_GAME_ON' to TRUE

Originally Posted by: Zero Hour Mad Map Maker 



let emphasize again the Flag
script: set flag to value
the _Game_on ...
i cant see it im sure you do it by yourself how to do it ,Just like the counter?
the script 2 doesn't have any timer used...??? so the script 1 and 2 are being activated at the same time am i right? in this time im using my logic and my common sense to go out in this situation 😂
if i am right, flag is just like a folder that have scripts or the script "with them" (the flags)can activated by a another script????❓ ❓ ❓
can you give me some other examples ma'am or just explain it thanks.

Wow now i know now how to use those greater than or equal script super thanks!!!UserPostedImage
A part of ZH worldbuilders map making community
https://discord.gg/tJ6zyGb 

UserPostedImage




AdrianeMapMaker
9 years ago
Extra question :what will i use in this 2 way ai skirmish map (its only 2 way to go with the other bases) what should i use the waypoint, Center,Backdoor or the Flank??? (only 2 waypoints)
A part of ZH worldbuilders map making community
https://discord.gg/tJ6zyGb 

UserPostedImage




zero hour mad map maker
9 years ago


let emphasize again the Flag
script: set flag to value
the _Game_on ...
i cant see it im sure you do it by yourself how to do it ,Just like the counter?
the script 2 doesn't have any timer used...??? so the script 1 and 2 are being activated at the same time am i right? in this time im using my logic and my common sense to go out in this situation 😂
if i am right, flag is just like a folder that have scripts or the script "with them" (the flags)can activated by a another script????❓ ❓ ❓
can you give me some other examples ma'am or just explain it thanks.

Wow now i know now how to use those greater than or equal script super thanks!!!UserPostedImage



Whoops, sorry about that I will provide more examples!


the script 2 doesn't have any timer used...??? so the script 1 and 2 are being activated at the same time am i right?



Actually Script 1 is still activated before script 2, sorry I forgot to mention that. Like I mentioned scripting is activated in descending order. Since script 1 is BEFORE script 2 it is activated FIRST. Then script 2. (once Script 1 is active it will STAY active until disabled)


Basic Example:




Moving Flag
(Script is a Subroutine)

*** IF ***
True.
*** THEN ***
Set Flag named 'Moving' to TRUE
Enable Script 'Truck move'.
Set timer 'ACTIVE' to expire in 10.00 seconds.


Truck Move (Script is Inactive)

*** IF ***
Flag named 'Moving' IS TRUE
*** THEN ***
Unit 'Supply Truck' EXACTLY follows waypoints, beginning at Waypoint Path 'Truck Path 1'
Enable Script 'STOP'.

STOP (Script is Inactive)

*** IF ***
Timer 'ACTIVE' has expired.
*** THEN ***
Set Flag named 'Moving' to FALSE
Set timer 'Resume' to expire in 10.00 seconds.
Enable Script 'Activate the Flag endlessly'.

Activate the Flag Endlessly! (Script is Inactive)

*** IF ***
Timer 'Resume' has expired.
*** THEN ***
Run Subroutine 'Moving Flag'.



All these scripts activate a Truck moving along a path, once the timer ACTIVE expires the Set Flag is turned to FALSE, thus causing the script that moved the truck to deactivate. However, the timer RESUME is activated as well, and once expired the script "Activate the Flag Endlessly" is activated, causing the Flag to become TRUE again; thus the truck will move along it's path happily again!

UserPostedImage 

Will this extra example help? Or do you have another question? This isn't the best use of a flag, but shows what the nature of it is! =)



Extra question :what will i use in this 2 way ai skirmish map (its only 2 way to go with the other bases) what should i use the waypoint, Center,Backdoor or the Flank??? (only 2 waypoints)



You still need all 3. Just place the BackDoor path very close to the Flank Path. Since they tend to be nearer to each other than with the Center path.

Or you can double title the Path. Both Flank and Backdoor.

Just like this Example:


UserPostedImage 
Ready for Anything! --- C&C Labs Staff , Maps Staff , Moderator
AdrianeMapMaker
9 years ago
this is very useful thanks!!!! i will now just base on your examples

i will do mine "hunting a team",if i am right can you comment it to me
Script1 "flag"-subroutine,active
**if**
player has greater than or equal in an AREA 😁
**Then**
Set Flag named "Seen enemy" to True
Enable script attack after Seen

Script2 "attack after Seen"-inactive

**if**
set value seen enemy to true
**then**
this team attack another team named [???]
set timer named "no hunt" to 50

Script3 "nothing to hunt"-active

**if**
timer expired "no hunt"
**then**
Enable script nothing to hunt1

Script4 "nothing to hunt1" -inactive

**if**
true
**then**
the team named [???] will stop
set the flag named seen enemy to false
A part of ZH worldbuilders map making community
https://discord.gg/tJ6zyGb 

UserPostedImage




zero hour mad map maker
9 years ago
Adriane! That seems perfect to me 😁 ! Glad to see you are learning! Nice scripting work! 👍 👍 👍
Ready for Anything! --- C&C Labs Staff , Maps Staff , Moderator
AdrianeMapMaker
9 years ago
look like i found the answer in the Question how my AI will garrison buildings to protect themselves from my attacks .. from far positioned buildings ... i extract and viewed the maps made by ea an i simply noticed the buildings have their own names and this include in the picture try to see it
Garrisson review.png

Click to View Image47 View(s)


A part of ZH worldbuilders map making community
https://discord.gg/tJ6zyGb 

UserPostedImage




zero hour mad map maker
9 years ago

look like i found the answer in the Question how my AI will garrison buildings to protect themselves from my attacks .. from far positioned buildings ... i extract and viewed the maps made by ea an i simply noticed the buildings have their own names and this include in the picture try to see it

Originally Posted by: adrianemapmaker 



Adriane that's awesome! Learning from EA is the BEST way to get to know the World Builder. Everything I know about the WB is from studying their maps xD
Ready for Anything! --- C&C Labs Staff , Maps Staff , Moderator
AdrianeMapMaker
9 years ago
In those maps ...there's no script implemented ... i think the ai are already have their own implemented scripts on their programs ... still some of those scripts are still need Human Contact .. Just like those garrison script😂 👍
A part of ZH worldbuilders map making community
https://discord.gg/tJ6zyGb 

UserPostedImage




AdrianeMapMaker
9 years ago
Hey Guys What do I need In MultiPlayr Map ....

Just add a Box(Using Polygon tool) And Named it as SkirmishWorld?? and then do the other jobs in pathways,parameters like Inner and outer ??

A part of ZH worldbuilders map making community
https://discord.gg/tJ6zyGb 

UserPostedImage




zero hour mad map maker
9 years ago
All you need in a Multiplayer map is just the Waypoints for the starting positions themselves. No perimeters, no AI paths like Flank, etc, and no Combat Zone. It's as easy as that 😉
Ready for Anything! --- C&C Labs Staff , Maps Staff , Moderator
AdrianeMapMaker
9 years ago

All you need in a Multiplayer map is just the Waypoints for the starting positions themselves. No perimeters, no AI paths like Flank, etc, and no Combat Zone. It's as easy as that ;)

Originally Posted by: Zero Hour Mad Map Maker 



Your about to make a aod map i dont know😂 ... how my ai will work on that map


A part of ZH worldbuilders map making community
https://discord.gg/tJ6zyGb 

UserPostedImage




zero hour mad map maker
9 years ago
Haha sorry but your English is a bit hard to understand in the previous comment 😂 . Are you saying that I'M making an AOD? And are you talking about making a multiplayer map or an AOD map? Hahaha. 😛
Ready for Anything! --- C&C Labs Staff , Maps Staff , Moderator
AdrianeMapMaker
9 years ago
lol.. just answer this :

did i only need in multiplyr map is JUst a pathways?
A part of ZH worldbuilders map making community
https://discord.gg/tJ6zyGb 

UserPostedImage




zero hour mad map maker
9 years ago
Okay ^_^. If you're making a multiplayer map (NOT an AOD), all you need is the Waypoints (Player 1 Start, Player 2 Start, etc.) That's it. You can add anything else as normal; there's no need for areas like inner perimeter because there's no AI to use them
Ready for Anything! --- C&C Labs Staff , Maps Staff , Moderator
AdrianeMapMaker
9 years ago
But did ai will work properly in that map??
A part of ZH worldbuilders map making community
https://discord.gg/tJ6zyGb 

UserPostedImage




zero hour mad map maker
9 years ago
You don't need AI if you're making a multiplayer map. In a multiplayer map it's Human vs Human. No AI. In Skirmish Yes there is AI, in AOD maps Yes there is AI, and in Mission maps Yes there is AI. NO AI in multiplayer maps.....
Ready for Anything! --- C&C Labs Staff , Maps Staff , Moderator