Deinon
  • Deinon
  • 50.25% (Neutral)
  • Captain Topic Starter
8 years ago
I am designing a Generals Challenge mission for the "A Global Crisis" mod, which added Israel and Syria as factions. Currently working on the Syrian General's challenge mission, the Israeli General's mission will come later if this first goes well.

I am incorporating a lot of unique features into it, with as much scripting as I can manage so as to have the computer play smart and use different strategies and dialogue based on which faction you are playing as. The Syrian general is particularly hostile to the GLA, confused as to why China would be fighting him, and needles the American and Israeli generals mercilessly in scripted dialogue, with a few lines poking at the fourth wall. An excerpt from the map.str file:

HeroBuilt:USA
"General Masakh:\nOh no, Colonel Burton?\nGeneral, the 1980's called. They want their B-movie action hero back!"
End

HeroDead:USA
"General Masakh:\nPerhaps you'll give your next commando some body armor, General?\nOr at least a shirt..."
End



ANYway... the Syrian General's base is heavily defended, with a city lying between it and the player, who constructs their base on the grounds of a defunct civilian airport. Kill the soldiers manning the defensive bunkers, and more come to replace them. Roll up to the side entrances, and you'll get slammed by roadside bombs (which infantry specialists move to replace if your advance is repelled). Attack the base via one entrance, and forces will be scrambled out of another one to catch you from behind in a pincer. If and only if you escalate to using nuclear weapons (which the Israeli, American Superweapon, and Chinese generals all have), the Syrian general escalates in kind. Not to mention, while all of this is going on, a GLA faction hostile to both the Syrian forces and the player (unless you are GLA) trickles in forces from the east in a bid to capture the city.

I wanted to add one feature in particular. I've been trying to think how I'd play if I were on the computer's side; how I'd defend against various threats.

If the player targets base defenses with tomahawks or scuds, how do I tell a specific aircraft to hunt specifically for tomahawks or scuds as its top priority? I don't want the player to be able to passively park a long-range missile unit just beyond the range of the defensive bunkers and prod away at them until they're destroyed. The idea is for the computer to take targeted action to counter this. The base isn't impregnable, but it will not be a walk in the park.
Sponsor
SkyMix_RMT
8 years ago
Make a big area at around the location a player would position his artillery to destroy the base defenses, then make a script that checks if units of type artillery are in the area and make the air team attack anything in the area.
Check out:
My Music  (Techno/House/Experimental)
My Website  (GeneralsCentral)
My Youtube Channel  (Inactive)
World Builder Community Discord 
Deinon
  • Deinon
  • 50.25% (Neutral)
  • Captain Topic Starter
8 years ago

Make a big area at around the location a player would position his artillery to destroy the base defenses, then make a script that checks if units of type artillery are in the area and make the air team attack anything in the area.

Originally Posted by: SkyMix_RMT 

Seems to work well enough for now, will probably try refining it in the future. Wasn't sure if it's possible to set targeting priorities to an object list or something.
SkyMix_RMT
8 years ago
Also you can divide the area into multiple ones, this way the air team gets better targeting. It also can avoid decoys set by the player. As for the priorities, I'm not really sure, I haven't worked with the world builder in a while, try too look for something, I wish you good luck.

Check out:
My Music  (Techno/House/Experimental)
My Website  (GeneralsCentral)
My Youtube Channel  (Inactive)
World Builder Community Discord 
i^love^mixery
8 years ago
What you are looking for is a so called attack priority set.

Open any official generals challenge map and look up a script folder called "Paperwork". It should be self-explanatory.


Btw, those military briefings are actually funny, lol. Good work!
Deinon
  • Deinon
  • 50.25% (Neutral)
  • Captain Topic Starter
8 years ago

What you are looking for is a so called attack priority set.

Open any official generals challenge map and look up a script folder called "Paperwork". It should be self-explanatory.


Btw, those military briefings are actually funny, lol. Good work!

Originally Posted by: i^love^mixery 

Thanks :)

There's a lot more (a LOT more) where that came from. Some is funny, some is needling (some of it based on insights from people I know who lived there - we have our blind spots), some of it dead serious. The game changes tone significantly if you use nukes near the city. Fallout spreads out over the city (in wells not unlike the Nuke General's map), and the map is expanded to show refugees fleeing from it toward a makeshift camp guarded by UN troops who are hostile if you approach. They continue pouring out of the city in its direction for the rest of the match (being removed and respawned upon reaching the map's edge), and occasional angry mobs from the city assault your base. Even before the nuke, if you garrison a building in the city, civilians pop out of it and flee as soon as your units enter it.

More select dialogue:

CiviliansHurt:China
"General Masakh:\nHey! You don't get to do that!\nOnly I get to do that."
End
CiviliansHurt:USA
"General Masakh:\nYou have to love these Americans. They are here to 'free' you...\neven if they have to kill every last one of you!"
End
CiviliansHurt:Israel
"General Masakh:\nFor every one of my people you kill,\nten shall rise against you!"
End

PlayerManyVehicles:China
"General Masakh:\nSo you intend to roll tanks through my streets, General.\nRemind me, why are you here?"
End
PlayerManyVehicles:USA
"General Masakh:\nYes, build more tanks, General.\nYou did not have enough of them parked in the desert back home."
End

PlayerManyAntiAir:GLA
"General Masakh:\nOh, you don't like being bombed, is that it?\n*chuckles* Noted."
End

ImBeingNuked:China
"General Masakh:\nDo I owe you money, or something?"
End

IveBeenNuked:China
"General Masakh:\nAfter this is over, General, we must sit down\nso you can explain why you are SO BISSED OFF!!!"
End

ImBeingNuked:US
"General Masakh:\nSpreading more 'freedom and democracy,' General?"
End

PlayerManyInfantry:China
"General Masakh:\nOh, General, so your plan is to throw men at us until\nwe run out of bullets? Wait, don't do that..."
End

LeafletDrop:US
"General Masakh:\nHa! You need better translators, General!\nWhat is this... 'covfefe'... you speak of?"
End

Syria:IsraelProducesReporters
"General Masakh:\nReporters? No, no free press in my country! Get out! GET OUT NOW."
End

HeroDead:China
"General Masakh:\nAnd China's keyboard warrior is down! Really, General, not even a sidearm?"
End

OilCapture:USA
"General Masakh:\nOh, look! The Americans are 'liberating' our oil!\nWho could have seen that coming?"
End

GeneralsCarTrashed:01
"General Masakh:\nI liked that car..."
End

GeneralsHouseTrashed:01
"General Masakh:\nCome now, was that really necessary?"
End

One thing I need is for the Angry Mobs in the civilian faction to not have guns, only rocks and molotovs (also important for the opening cinematic). I've been playing around with the Map.ini file with little success.