Home   Help Search Login Register  

Author Topic: Group Spawner Script (OBSOLETE)  (Read 6220 times)

0 Members and 1 Guest are viewing this topic.

Offline myke13021

  • Contributing Member
  • **
  • Myke
Group Spawner Script (OBSOLETE)
« on: 12 Feb 2007, 03:16:00 »
Dynamic Group Creator Version 0.92 (RC1)

Well, i'm done. Completely rewritten the whole Groupspawn script and tested it on self-hosted and also dedicated server environment.

What is it good for?
This is mainly thought to be used on big Missions to save performance. Instead of placing dozens of unit in each place, each AI consuming CPU power, you can use this script instead. This way you can simulate huge missions with hundreds on enemies patrolling in target area.

How does it work?
This is only a short overview as the full instructions would be far too large. You just place one single trigger, covering your selected area and run the script from this. The script will now create 100 possible waypoints (water and buildings will be recognized and left out) and then wait for any player approaching the area. Once in viewdistance (set by missionmaker), the script will create the groups, which are predefined by mission maker.

So instead of preplacing Units in the editor, you just place one trigger which calls the script and you'll have a whole area full of enemy troops.

For further information please read the included readme.txt

UPDATE:
- fixed minor bug that causes some groups were'nt created ({_x createunit [_pos... error message)
- fixed: ArmA limitations of 144 groups per side. This limit is still present, but now it is limited to 144 Groups at the same time. As soon older groups are deleted (killed), new groups can be created. Practically unlimited Groups is now possible.
- added: new script for creating attacking groups, see Demo Mission.

- OBSOLETE -

New Dynamic Group Creator released.
« Last Edit: 07 Nov 2007, 20:20:48 by Spooner »

Offline Cheetah

  • Former Staff
  • ****
Re: Group Spawner Script
« Reply #1 on: 14 Feb 2007, 23:53:08 »
Sounds pretty interesting. So you use a script to determine when to spawn units and use UPS to control their movement if I understand it correctly?

Would be nice if you could add a larger sample mission to show what can be accomplished with this. Maybe a mission where to player has to attack a town and you place differents groups with varying parameters. You can then use hints to tell the player what's going on. Because right now, I don't really know how to look at this script. What's the additional value of it compared to UPS? That you don't have to create units?
Like missions? Help with Beta Testing! or take a look at the OFPEC Missions Depot for reviewed missions!

Offline myke13021

  • Contributing Member
  • **
  • Myke
Re: Group Spawner Script
« Reply #2 on: 16 Feb 2007, 02:20:37 »
Well, the basic idea behind this is to save CPU resources on large scale coop missions. If you plan to make a mission with not more than 80 enemy units, then you will not need this. But if you plan to create a Mission which covers, lets say, complete South Sahrani with some patrols in each town (let's say 10 patrols) then you'll have hundreds of units which has to be calculated by the CPU (AI, movement, scanning for enemies and so on). I saw Missions with over 1000 Editor placed Units and we played on a high end dedicated server but CPU wans't able to handle this huge amount of Units.

What my script does, well, in fact what you can do with this script, is having such large maps without having the issue that CPU couldn't handle it.

Lets take an example: Your Mission starts near Cayo, you fight your way up to the north, take the Airport and so on. Last point in the briefing will be to take Corazol. And lets further say you place 10 Patrols with 10 units each, means that CPU has to handle 100 units for Corazol for hours (guessing this is a long mission). In fact, you don't need 100 Units most of the time. It is enough when they're there as soon as players approach the area. So you just place 10 independent Units as group leaders, in theyr init line you call the script and give it a "trigger distance", let's say 800. So, as soon a player comes into this radius, the rest of the patrol spawns around the already present Groupleader. And as soon the 100 units will be needed, they'll be there.

Please forgive me, i'm not so good explaining things, especially in english. I'll make a Demo mission for it and upload it ASAP. In the meantime, i hope you got a general idea what the script does.

Offline myke13021

  • Contributing Member
  • **
  • Myke
Re: Group Spawner Script
« Reply #3 on: 16 Feb 2007, 03:26:40 »
New Version 0.7 available.

Read original post, plz.

Offline sharkattack

  • Former Staff
  • ****
Re: Group Spawner Script
« Reply #4 on: 16 Feb 2007, 19:38:04 »
nice script ...
but after groups have spawned they seem to have bother following the move command on dedicated server .. works a treat in singleplay or if i host ...
"HOLY SARDINE" - see Shark-Attack meet his match

Offline myke13021

  • Contributing Member
  • **
  • Myke
Re: Group Spawner Script
« Reply #5 on: 17 Feb 2007, 00:05:07 »
I just played a 5 houres session with a map which makes excessive use of this groupspawn. Never had a problem with not moving. Sometimes they'll make a break (smoke a cig) for about 1 minute but then move along.

If this is not this what you've seen, please send me an example so i can check this and, if it's really a bug, fix it.

:edit:
This mission was hosted on an old Athlon XP2400 with 1 gig Ram. The Mission had far over 1000 enemies but the PC could handle it. Also my i-net connection which isnt really fast on upload (256k) could manage it without having unplayable lags. Now imagine this on an dedicated professional server.

Offline myke13021

  • Contributing Member
  • **
  • Myke
Re: Group Spawner Script
« Reply #6 on: 18 Feb 2007, 05:57:20 »
Got all scripts newly done from scratch. I've completely rewrote the Groupspawner scripts. Now Group Leader units are no longer needed. You can have a whole Town with no units at all at beginning, with popping up groups as soon player comes in visual range.

The scripting itself is done, just need to test it in MP.

General features:
- Dynamic group creation with random movement.
- Up to 3 different Grouptypes can be created simultaneously (if you know a little scripting, expanding this is easily possible)
- Random patrol script included. You never know where thy are or where they go.
- Check for Water or buildings to avoid groups would be spawned in water or on/in houses.
- Dead body removal included. Dead units will sink into ground and be deleted. Can be disabled.
- Adding own grouptypes can be easily done.
- Simple Demomission will be included.

As soon i did some MP tests, i'll go public with the new version. Stay tuned.

Planned features:
At the moment it isnt possible to spawn Vehicles. In one of the upcoming versions, this will be included.

What is it good for?
You can make huge coop missions with thousends of enemies waiting for you, without having major problems with server performance.

Offline myke13021

  • Contributing Member
  • **
  • Myke
Re: Group Spawner Script
« Reply #7 on: 20 Feb 2007, 23:43:05 »
Dynamic Group Creator Version 0.9 available

Please read first post for more inormations and download.

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re: Group Spawner Script
« Reply #8 on: 21 Feb 2007, 09:58:05 »
Please try to avoid making consecutive posts.   Use the Modify button in the top right hand corner.  ;)
Plenty of reviewed ArmA missions for you to play

Offline myke13021

  • Contributing Member
  • **
  • Myke
Re: Group Spawner Script
« Reply #9 on: 21 Feb 2007, 11:57:10 »
I'm sorry macguba

Indeed, i used the edit function since the changes were major. I just thought to add a reply to let the people know there's something new.

Please accept my apologises, will think of it next time.

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re: Group Spawner Script
« Reply #10 on: 22 Feb 2007, 08:19:48 »
Quote
I just thought to add a reply to let the people know there's something new
At least before the latest downtime editing a post in a thread should show the 'new' logo next to the thread title.. :)

If my memory serves me right that is :scratch:
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

Offline Blanco

  • Former Staff
  • ****
Re: Group Spawner Script
« Reply #11 on: 08 Mar 2007, 02:48:36 »
Wow, gonna try this for sure.Sounds great  :good:
Search or search or search before you ask.

Offline colligpip

  • Members
  • *
Re: Group Spawner Script
« Reply #12 on: 09 Mar 2007, 15:50:13 »
Wow, gonna try this for sure.Sounds great�  :good:


O yeah i like this I set it up so it was like armed assualt space invaders - good fun


Is there anyway i could set this so that if i was flying over in a chopper the trigger would not activate. I know i could limit the distance it spawns but then it would effect ground troops as well . The reason being you make a map and the second you fly over in a chopper it sets all the trigs off. I would like it so that it is only triggered by infantry but i do not know how i could do this any ideas? sorry if this obvious.
« Last Edit: 09 Mar 2007, 17:46:23 by colligpip »

Offline myke13021

  • Contributing Member
  • **
  • Myke
Re: Group Spawner Script
« Reply #13 on: 09 Mar 2007, 18:13:57 »
Look in the nbs_groupspawner.sqs for this section:

Code: [Select]
; Defining Enemy Class
~0.5
? (_enemyside == EAST): _enemy = ["SoldierEB", "BMP2", "T72", "ZSU", "URAL", "BRDM2", "UAZMG", "KA50", "MI17_MG", "SU34"]
? (_enemyside == WEST): _enemy = ["SoldierWB", "Truck5tMG", "HMMWV50", "StrykerBase", "M1Abrams", "M113", "AH1W", "UH60MG", "AH6", "AV8B", "Ship"]
? (_enemyside == GUER): _enemy = ["SoldierGB", "AH6_RACS", "MH6_RACS", "Vulcan_RACS", "M113_RACS"]
; --------------------------------------------------------------------------

Now, if you won't the groups to be created if you fly with a blackhawk over the area, just delete the corresponding class, in this case "UH60MG". This also affects the UH60 with FFAR as it is a subclass of the UH60MG.

I suggest you make these changes just in the mission you're actually making and keep the "original" files untouched.

Offline colligpip

  • Members
  • *
Re: Group Spawner Script
« Reply #14 on: 10 Mar 2007, 09:40:22 »
Thanks that worked well. I had a mission with capture points its good when you fly in land and hundreds of enemy suddenly appear makes you jump. How would i go about setting up a trigger so when all enemy in trigger have gone they respawn a certain amount of times. Sorry i fairly new to arma editing.

Offline colligpip

  • Members
  • *
Re: Group Spawner Script
« Reply #15 on: 15 Mar 2007, 21:53:25 »
Is it posible to have this so that when no player is near the group disapear then when near reapers. You could relaly fill the whole island then. as it is if you trigger them they dont disapear so you can get alg if you run about a lot. UNless i have missed somthing

Offline myke13021

  • Contributing Member
  • **
  • Myke
Re: Group Spawner Script
« Reply #16 on: 15 Mar 2007, 23:09:29 »
sadly the script doesn't support some sort of caching units when no player is near. But usually you design a map with several Mission targets. Then it is easy to start the script in staggered order. Instead of start the script at mission beginning, you tell the trigger to fire (and therefor start the script) once previous objective is done.

However, it would be nice to have caching abilities and as soon i get the idea how to solve this, i'll for sure introduce this into the script. But for now i suggest you do it the way dscribed above.

Offline colligpip

  • Members
  • *
Re: Group Spawner Script
« Reply #17 on: 16 Mar 2007, 02:24:44 »
I want to be able to just fill up the whole map with triggers and fight from one side to the other :-)

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re: Group Spawner Script
« Reply #18 on: 16 Mar 2007, 08:39:26 »
@myke
CoC had a thing called AI on Demand which did that caching you're talking about..
I don't think they ever really released it for the wider public as a finished product..

Anyway, it's for OFP but you could get the idea on how to do the caching from there..
It's not actually that hard ;)

Lemme see if I can find a link for you..
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

Offline Mr.Peanut

  • Former Staff
  • ****
  • urp!
Re: Group Spawner Script
« Reply #19 on: 20 Apr 2007, 21:00:08 »
I've got AI on demand at home on my pc. It was only released as part of a mission. If you look at the BI Forums under OFP/Addons you'll find mapfact's DAC by silola. It also caches units. I'll attach AI on demand to this post when I got home.


Edit: attachment (CoC_AD.zip) lost in the crash of 2009; try this post at the BI forums - WEK
« Last Edit: 20 Jan 2011, 00:07:42 by Walter_E_Kurtz »
urp!

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re: Group Spawner Script
« Reply #20 on: 21 Apr 2007, 15:56:35 »
Wow, I had completely forgot about this..  :blink:  :no:

I think I was on this just before my PC went fubar...
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

Offline 70gunner

  • Members
  • *
Re: Group Spawner Script
« Reply #21 on: 16 Jun 2007, 00:02:33 »
Just a question, when you create a group with the script how to group(ex team = group this) him so to use in other trigger  (ex({not alive _x} count units team) == count units team) run into this and considering to use it in a mission on the whole iland

70gunner

Offline myke13021

  • Contributing Member
  • **
  • Myke
Re: Group Spawner Script
« Reply #22 on: 24 Jun 2007, 01:12:27 »
A short statement:

As the Dynamic Group Spawner basic idea is based on Mapfact's Dynamic AI Creator (DAC) for OFP and was just intended as interim solution until Mapfact's DAC for ArmA will be released, i will no longer work on it as the DAC seems to be released shortly. It makes no sense for me to work on something what others can do better and more flexible. My greatest respect to the Mapfact Team, specially Silola.

For sure if some questions come up, i will try to provide support as good as i can. And to make it clear: My DGC is free to use, share, extend, improve, shorten and whatever else comes to your mind. I have absolutely no intention to say "it's my work and you have to ask". Use it in whatever way feels comfortable for you.

However, if you have problems with the DGC, feel free to contact me on email.