View Full Version : ARMA Script: CSL populate island v1
ColonelSandersLite
Dec 19 2006, 03:19
This suite of scripts and demo mission have one purpose in mind. Populate Sahrani without lag!
In the demo mission, currently most of the coastal regions of the southwest kingdom is populated. I will finish up a full population template in a future release, with fixes for any bugs reported.
In the demo mission, these coastal regions are populated with over 500 civilians and causes no lag with my modest AMD Sempron 3400+ Socket 754 64-Bit.
Right now, there is one known limitation. People walk in the middle of the road. This is an AI behaviour and I don't know if I can actually do aything about it.
I'm also considering addind vehicle traffic, but I'm unsure if that's something I really want to do yet. This mostly has large scale dynamic missions in mind, where firefights are very likely. Generally, people won't be driving a bus through the middle of a firefight (The groceries can wait till tomorrow Martha! ). Feedback and opinions on this subject is very much desired.
Please feel welcome to report any bugs/feedback/suggestions/etc here.
ARMA Script: CSL populate island v1 @<hidden> armedassault.info (ftp://www.armedassault.info/armad/other/CSL_populate_island_v1.Sara.rar)
Ofpec Mirror (http://www.ofpec.com/smf/index.php?action=dlattach;topic=29026.0;attach=768)
ColonelSandersLite
Dec 21 2006, 09:40
For the sake of completeness, questions asked by Hillslam on ofpec, and answers. A little reformated for easier readability.
HillSlam:
In fact I was just daydreaming at work about a mission design I plan on working up tonight and needed a populated town to bring it to life.
ColonelSandersLite:
Piece of advice here.
If you're going to use this to populate a single/couple of towns, use a whole bunch of smaller population centers. You'll see what I mean if you look at the map and init.sqs.
The way it's rigged up right now in the demo mission is more to be a generalised wholely populated island with only moderate attention to detail.
HS:
Tried it last night and it worked like a charm. What, no women???
CSL:
The game doesn't have them.
If they where available, I would have made a version with women children, and old people that you could use too, at the mission designers preference.
HS:
Also - it seems to work just fine with the Urban Patrol Script. Although I wasn't sure if the baddies bodies were getting cleaned up along with the civilian casualties - I'll have to double check. I don't think they did.
CSL:
My script will not clean up the bodies of the soldiers. It only handles the civillians. If you're interested in body removal for everyone else, I'll point you to this thread on my body removal script (http://www.ofpec.com/index.php?option=com_smf&Itemid=36&topic=29020.0). That script is already in this mission, you'll want the instructions there though if you want to call it manually.
HS:
One question - is there a variable or way to control how much/ how often the civies yell? Ala "Go go go" and "Don't shoot"? Apologies if its already in there, I didn't catch it.
CSL:
I'm looking into a way to disable the civies command chats. I don't know if it's actually possible though.
There's a potential workaround for you though. If you're not wanting more than 144 civs in the town (that's the group limit in arma), you could always make each civ his own group. That would help.
Instructions if you wish to attempt this:
change this block of code in CSL_PopulateIsland.sqf from this:
<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">
if (((_spawnCounter mod 5) == 0) or (_spawnCounter == _numberOfCivs)) then
{
// calls script B (the group reduction/spawn control script)
[_populationCenter, _areaWidth, _areaHeight, _unitCount, _unitTypes, _unitPositions] execVM "CSL_PopulateIsland\CSL_PopulateIsland_B.sqf";
// just a small delay to make sure the next script has time to grab those
// arrays without them being reset
sleep 0.1;
// reset the variables holding the info to pass to script B (the group reduction/spawn control script)
_unitCount = 0;
_unitTypes = [];
_unitPositions = [];
};
[/QUOTE]
to this:
<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">
// calls script B (the group reduction/spawn control script)
[_populationCenter, _areaWidth, _areaHeight, _unitCount, _unitTypes, _unitPositions] execVM "CSL_PopulateIsland\CSL_PopulateIsland_B.sqf";
// just a small delay to make sure the next script has time to grab those
// arrays without them being reset
sleep 0.1;
// reset the variables holding the info to pass to script B (the group reduction/spawn control script)
_unitCount = 0;
_unitTypes = [];
_unitPositions = [];
[/QUOTE]
HS:
Thanks - that is helpful.
NeMeSiS
Dec 21 2006, 15:38
ftp://www.armedassault.info/armad....ara.rar (ftp://www.armedassault.info/armad/other/CSL_populate_island_v1.Sara.rar)
Its nice so i uploaded it to a mirror which doesn require registration http://forums.bistudio.com/oldsmileys/smile_o.gif
ColonelSandersLite
Dec 21 2006, 23:41
Awesome. I'll have to keep you informed of any updated versions in the future.
ColonelSandersLite
Dec 25 2006, 01:40
Bug found in my populate island script as of version 1.0 (I can't believe I missed that...). I will be releasing a fixed version (v1.1) very soon though.
For those of you using that script and would like a quick fix:
In CSL_PopulateIsland_B.sqf add the following line at line number 206:
<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">{_x doMove [(getPos (units _group select 0) select 0)+10, (getPos (units _group select 0) select 1)+10, 0]} forEach units _group;[/QUOTE]
It should look like this:
<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">
// increment the counter
_unitFillCounter = _unitFillCounter + 1;
// debugging code. only enable to convince yourself it's working correctly
//player sidechat "group restored";
};
{_x doMove [(getPos (units _group select 0) select 0)+10, (getPos (units _group select 0) select 1)+10, 0]} forEach units _group;
// cleans the group when not in use anymore
[_group] execVM "CSL_Utility\CSL_RemoveGroupWhenDeadSimple.sqf";
_groupInStorage = false;
[/QUOTE]
otester
Dec 30 2006, 23:43
I don't mean to be a bit of a noob but where do I install this?
Would you consider adding a bit to you 1st/2nd post so noobs like me can get this running?
just take the entire folder named "populate%20island%20v1.Sara"
and place it in
"C:\Documents and Settings\YourUserName\My documents\ArmA"
this is actually the folder where your home made missions are stored .
Hutson[16AA]
Dec 31 2006, 16:51
Does this work in MP?
ColonelSandersLite
Jan 1 2007, 04:31
@<hidden>
Thanks for catching otester's post. I've been pretty busy the past couple of days and didn't notice it.
@<hidden>[16AA]
Unfourtunatly, no. I don't have 2 machines capable of running ARMA, so MP testing isn't really an option.
Anyone who can do the appropriate testing, and want's to take a stab at it is free to do so.
If someone decides to do that port either:
1: You pass it along, and I include it in the package. You get full credit for the MP conversion,
2: You post it seperately on your own. I would appreciate credit for the original, but frankly, it's not really necessary. It's not like I'm here for the money, women, and fame.
Sorry to bring back such an ancient topic... but with some editing, couldn't this script allow a sahrani where the player can drive around and find OPFOR infantry, vehicles ETC. for a massively dynamic mission? http://forums.bistudio.com/oldsmileys/biggrin_o.gif
cobra427
Jul 27 2007, 03:02
I think Evo uses basicly the same system to spawn the enemy when you enter the town so ... yea it could work
ColonelSandersLite
Jul 27 2007, 08:44
Sorry to bring back such an ancient topic... but with some editing, couldn't this script allow a sahrani where the player can drive around and find OPFOR infantry, vehicles ETC. for a massively dynamic mission? http://forums.bistudio.com/oldsmileys/biggrin_o.gif
I was actually working on a militarized version of this script ages ago, but never finished it. If I remember, I got really busy with paying work and this made my patience for video games short. Combine the arma bugs in those days with that factor (really, look changelog (http://community.bistudio.com/wiki/ArmA:_Version_History) since Arma V1.02), and you have an equation for becoming less involved.
The first version of this concept was actually militarized believe it or not, and was made for ofp. If I recall, you can find it in my old ofp scripts pack can be found on my webspace.
Thing was, that I wanted to beef it up for arma. I was working with some of the new scripting features to do things like make a sector's garrison react aggressivly to hostile interlopers and such.
Oh, I assure you that while I haven't really looked at evolution's code, it's methods will have to be quite different due to issues with arrays in MP games.
Bergmania
Jul 30 2007, 20:58
About the adding traffic.. I was thinking of maybe it's not that bad idea.. But I was more thinking of people fleeing the battlearea.. jamming up the roads and such..
ColonelSandersLite
Aug 1 2007, 05:46
About the adding traffic.. I was thinking of maybe it's not that bad idea.. But I was more thinking of people fleeing the battlearea.. jamming up the roads and such..
Traffic is something I'm most definitely not going to put in these scripts. In fact, they may become superseded altogether by something in the works which would allow you to place traffic if desired.
gassybutt
Aug 2 2007, 03:15
ColonelSandersLite, is it possible to modify the current script that calls the civilians (civilian type array) to respawn opfor soldiers? Or is there more involved?
horrgakx
Oct 31 2007, 07:18
I downloaded this & read the readme.txt, wow it looks complicated to install - do I need to do all that script modification???
ColonelSandersLite
Oct 31 2007, 18:32
@<hidden>
You could, but the script wouldn't handle it very well. I would suggest kronzky's UPS instead for that purpose. Although, I've got a side project that I need to finish along the lines of that. If you're familiar with the shining anvil mission I did the scripting for, I built a custom suite of patrol scripts for it. Sooner or later, I'll put together a public release of those scripts with more features (unit reduction is the big one). Think UPS on steroids http://forums.bistudio.com/oldsmileys/biggrin_o.gif.
@<hidden>
If it could have been any simpler, the unnecessary steps would have been stripped out of the readme or marked as optional. I *suggest* that you start with the demo mission, and work your way out from there if you're having trouble.
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.