Home   Help Search Login Register  

Author Topic: Scripts for battalion sized battles  (Read 1965 times)

0 Members and 1 Guest are viewing this topic.

SeXyWombat

  • Guest
Scripts for battalion sized battles
« on: 28 Jul 2005, 20:14:05 »
I want to make a set of scripts allowing OFP to simulate dynamic, large scale battles. The general idea is to have single soldiers (or vehicles in case of armor/mechanised units) moving across the map, each of them counting as a platoon. They're setCaptived and have combatMode "BLUE", so basically they are there just to track the movement of bigger units. When they get near the player, entire platoon is spawned around them and they're moved under the ground level or to remote location. When they're away, units are deleted and the "marker" guy get's back up and continues moving on. If such units make contact with OPFOR in the "marker mode", script calculates the outcome of battle and spawns some dead bodies/wrecks around. I have one big problem with this idea - each "marker dude" has to have a set of parameters like number of soldiers remaining in platoon, ammo (high, medium, low), unit type, squad count etc. I could do this using global variables, but it's neither efficient, nor easy to manage (and I guess I'd have to make a separate set of some scripts for each platoon). So here it goes:
1. Any ideas how to solve my main problem ?
2. Is assigning a set of parameters managed by single script for each unit even possible ?
3. What would you recommend for controlling the unit actions in "near the player" mode ? Maybe some enchanced AI scripts available at OFPEC would do the trick after some modifications ?
4. What would you recommend for controlling unit actions in "strategic mode" ? Personally, I'd just give them set of objectives with warying priorities, and if some unit gets wasted or routed doing important mission, the closest allied platoon will take over. Again, this comes down to assigning new parameters managed by single script I guess.

I know it's a big project, but right now I'm willing to do this if it can be done. But I need some help of people who have more experience with scripting to move on. Feel free to suggest any features you think might be good for the mission of this type - right now it's mostly in the brainstorming phase.

bdfy1

  • Guest
Re:Scripts for battalion sized battles
« Reply #1 on: 28 Jul 2005, 20:45:09 »
nice idea :)
FIRST CHECK OUT "tAKE THE AIRPORT" MISSION.
Quote
The general idea is to have single soldiers (or vehicles in case of armor/mechanised units) moving across the map
What about full squads with AI disabled ? You can move them with playmove or setvelocity.  It should be less luggy and provide greate scene.
You can switch it on when needed with script( I posted script for infantry )
Quote
When they get near the player
What do you mean "near"? It should be at least 2km or so...
Quote
3. What would you recommend for controlling the unit actions in "near the player" mode
If you're speaking abou controlling several squad then ther're variants:
1. simple following ( see Resistance mission "First Strike" )
2. drug'n'drop markers  like in "Take the airport"
3. you can command up to 3 squads through radiomenu tricks  (I can remember only russian mission-examples )
PS : And remember that OFP have group number limit :(




SeXyWombat

  • Guest
Re:Scripts for battalion sized battles
« Reply #2 on: 28 Jul 2005, 20:56:06 »
Ah, I sense a misunderstanding. Player is not in command. Player is a grunt in a really big battle, that's supposed to last for hours.

"What about full squads with AI disabled ? You can move them with playmove or setvelocity.  It should be less luggy and provide greate scene.
You can switch it on when needed with script( I posted script for infantry )"
I could use markers instead, but I think single soldiers/vehicles are easier to manage (no need for scripting except some dynamic waypoints) and you don't have to worry about unrealistics movement speeds, which are out of proportion compared to players unit. Disabling their AI is a good idea (excluding "Move", of course).

"What do you mean "near"? It should be at least 2km or so.."
Yeah, I agree. I think it's the best distance possible.

"remember that OFP have group number limit"
With 20 platoons per side (and thats 600 men !) you still have 43 groups that can be spawned when near the player :)

"If you're speaking abou controlling several squad"
I meant AI (or a script, to be more specific) controlling those squads, not the player.

bdfy1

  • Guest
Re:Scripts for battalion sized battles
« Reply #3 on: 28 Jul 2005, 22:31:25 »
Have you checked "Take the airport" ?
Quote
I meant AI (or a script, to be more specific) controlling those squads, not the player.
I've never seen anything like this :(

Offline Blanco

  • Former Staff
  • ****
Re:Scripts for battalion sized battles
« Reply #4 on: 28 Jul 2005, 22:59:57 »
Sounds like a bigscale mission...Have you tried CoC AI on Demand from Bn880?

I dunno where I've found it but it's in my waiting list for a checkup.  :)
What I understand from the readme it's pack of scripts to spawn units (MP compatible)  around the player only when they are needed to reduce lag issues.

See the attachment.


« Last Edit: 28 Jul 2005, 23:02:39 by Blanco »
Search or search or search before you ask.

SeXyWombat

  • Guest
Re:Scripts for battalion sized battles
« Reply #5 on: 29 Jul 2005, 00:13:10 »
Good stuff Blanco,  I have an alternative now :) Thanks. But still I'd like to hear answers to my questions.

Offline RobinHansenDK

  • Members
  • *
  • I'm a llama!
Re:Scripts for battalion sized battles
« Reply #6 on: 04 Aug 2005, 11:59:54 »
Quote
nice idea
FIRST CHECK OUT "tAKE THE AIRPORT" MISSION.

I've seached for a long time now, but were can I find this mission?

Offline Blanco

  • Former Staff
  • ****
Search or search or search before you ask.

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Scripts for battalion sized battles
« Reply #8 on: 10 Aug 2005, 20:49:14 »
#Bump
Plenty of reviewed ArmA missions for you to play

OFPJunkie

  • Guest
Re:Scripts for battalion sized battles
« Reply #9 on: 04 Dec 2005, 10:02:06 »
Interesting Idea...until all the single soldiers run into each other and spawn 3000 units! woohoo? errr.....sort of.

Offline Roni

  • Members
  • *
  • Play the Game !
Re:Scripts for battalion sized battles
« Reply #10 on: 15 Jan 2006, 06:31:33 »
Hi SW

Among my various half baked projects I have been working on a script that I've called "trumanShow.sqs".  What the script is intended to do is create a mob of mingling civilians in each town that the player visits no matter where he goes, then delete them as soon as the player leaves the area.

What the script will eventually (!!) do is camcreate a group of civilians at the town nearest to each player then set them mingling in a semi-random fashion.  Each tick of the cycle a random civilian will doMove to either a random nearby point or to a random nearby civilian.  Once the payer moves on to another town all the civvies will be camDeleted and new civvies will be created at the new town.

The final version of the script will allow the mission designer to specify which areas are towns and what the population of each one is.  Ideally, the mission designer shouldn't have to define which unit is a player, the script should just work out which unit needs to be able to "see" civvies and create them accordingly.

My current sticking point is working out how to keep the script from constantly identifying a certain town as the "nearest object" for the first time.  The script should say "okay - your nearest town is now Montignac, here's 35 people wandering around.  So long as you don't move any closer to Gravatte you can watch them wander, but if you move 10m to the north then all the little Montignards will disappear and I will create 15 new Gravattians for you to watch . . .".  What it shouldn't do is keep saying "okay, you're still next to Montignac, here's another 35 Montignards for you to watch . . .".

For your purposes, you could use a similar script that only creates viewable units whenever the player is within "range" of it.  With a viewdistance of (say) 800m and the usual intervening foliage I'd say that a reasonable distance would be around 500m.  In other words, move your group leaders, and if they are within 500m of a (the?) player then add the appropriate units to the group.

Another script that I am just finishing makes a hunting group continuously move towards a specified target group, unless the group count is below a certain (morale) level).  Combined with a respawn script it makes for a tense mission as the players continually knock back their pursuers, trying to finish them off for good while dodging the other pursuers that are still on their trail.

The first mission that I've used this in has six full strength Soviet groups (approximately 60 units at full strength) vs one group of Resistance payers with respawn to group and a script that allows recruiting at each town.  It gives a pretty good feel of a running battle.  Last night I tested it out with a friend, we played it four times, with one run through that lasted about two hours with the last three members of our group running out of town at least three times with two BMP squads and a T72 platoon in hot pursuit each time !

Once I get this mission working exactly as I like I intend to try using the hunt script in a head to head style mission, with 5-6 groups on each side battering each other senseless.  So far I've tested it with one squad vs one squad and the results have been pretty impressive.  I've tested it playing as a civvie observer - it's fun watching one side then the other charge, get whittled down, then run away with the other side in hot pursuit.  Even with just the one group on each side there is a good running battle feel to it.

So to answer your questions -

1 - Yes, it is possible to use single units or even just array variables to substitute for whole groups until the player runs in to them.  I see no reason why you couldn't have an infinite number of units recorded in arrayready for use as and when required.

2 - Yes, it is very easy to have one version of this script running, with a whole mess of different variables defined for each group.

In the above hunt and seek mission that I detailed I have six versions of the hunt and seek script running throughout the mission, with no less than ten variables defining the behaviour of each group.  Some groups are cautious and slow, others are aggressive and quick, some are elite, some aren't etc.

3 - See the above hunt script.  My script is pretty involved and has lots of gloss (groups set up camp at night etc) but the core is dead simple.

All I've done is create six groups, each with one waypoint.  The script then locks this waypoint so that it is never "finished", then keeps moving the waypoint position (setWPPos) either on to the nearest enemy unit (if the group is okay) or back to the group's start point (if group is broken).

Easy as !

4 - I haven't used onMapSingleClick command yet but I've always thought that it would be a REALLY great way to control multiple groups.

Since this command returns the click position, all you need to do is write the script so that if the click is within (say) 50m of a group (using an array of each group's leader's position) then the click will "select" that group, otherwise it will move the selected group's waypoint to the clicked position (setWPPos).

I hope that any of this helps.

Cheers



Roni