Jump to content

Recommended Posts

CivPopulate
maindy.jpg
A script package that populates areas dynamically with civilians and adds traffic to the roads.
* FOR OFP/CWA *

Current version: 1.4.1
DOWNLOAD: http://www.mediafire.com/download/6o5w3m4t4y4b0ap/civPopulate_v141.zip
 

CONTENTS:

  • Template
  • Demo mission in Nogova
  • Demo mission in Nogova to test CoC UA. Debug mode on.

FEATURES:

  • Populate your towns with as many civilians as you want in as many towns as you want
  • Civilians wander the streets or idle lazily inside or near buildings.
  • You can populate your towns with civilians from different addons to increase the diversity of the population
  • Population changes depending on if it's day or night
  • Just one simple, light script is used to manage an unlimited amount of walker civilians
  • Add any pack of civilians by adding templates

*New*

  • Civilian traffic
  • You can now also designate camping areas
  • Populate towns with specific types of civilians
  • Add and remove designated towns and camps on the fly
  • You can pause, resume, reset or completely stop civPopulate
  • You can now really set an unlimited amount of towns and camps (previously there was a limit of 63)

 

USE:

  • Copy and paste the civPopulate folder inside the template directory to that of your mission
  • Add: [] exec "civPopulate\start.sqs" to the init file of your mission or to the init of a game logic you've placed (but don't do both at once)
  • Edit the preferences found in the "civPop_settings.sqf" script
  • In the mission editor, copy or merge to your mission the markers named CP_town_0 (the big blue circle), CP_camp_0 and CP_parking_0 and the CP_spawner unit close to it (the markers and the unit inside the red rectangle). You can also copy the vehicle and player markers if you want to debug the traffic in your mission.
  • Place the CP_spawner in a remote place with about 50m diameter of land (preferably flat)
     

For civilian pedestrians:

townnaming.jpg

  • Copy and paste the CP_town_0 marker over any towns or spots you want the civilians to populate, and edit each copied marker's properties following this directions:
  • Change the color to red for "high" population density, blue for "normal" and black for "low".
  • The size of the marker will indicate the area where the civilians will be placed in and how far walkers populating that area will go.
    townnaming1.jpgtownnaming2.jpg
  • In the name field you'll see something like this: CP_town_0_17. The red number indicates the type of civilians to be used to populate that area. By default it's 0, which indicates that all type of civilians specified in the preferences (in start.sqs) will be used. If you set it to 1 then just the first type of civilians will be used. Set it to 2 to use just the second, etc (so if you have _civilianTypes set to ["cp_afghancivs_pashtun","cp_afghancivs_tajik"] and you set the number to 2, then just the tajik civilians will populate that area). Also note that the "_17" part is an incremental number that is added automatically every time you paste a new marker. You don't need to change that number (unless you want to for some reason).

For campers:
campm.jpg

  • Copy and paste the CP_camp_0 marker over the places where you want to have camping areas.

For traffic:
parkingsc.jpg

  • Copy and paste the CP_parking_0 marker over the roads you want to have traffic in. As there's no way to detect roads in OFP you'll have to place all this by hand for this system to work.

NOTES ON MARKERS:

  • Make sure you are always pasting a copy of the original marker (CP_town_0, CP_camp_0, CP_parking_0) when adding new ones. If you copy and paste from another marker the numbering will be incorrect and the marker won't be detected.
  • There's a limit of 300 markers per type of marker, and another 300 per civilian type (so, 300 for towns, 300 for camps and 300 for parkings, and also 300 for towns of civilian type 0, 300 for those of type 1, etc). Markers with a number higher than that won't be detected. This limit is totally arbitrary (although there has to be one to tell the script when to stop checking). You can change this limit in checkmarkers.sqs.
  • Avoid placing parking markers over bridges, or vehicles placed there will most likely fall into the water. For bridges, just place a couple markers a bit before the start and a bit further the end and vehicles will be able to traverse them without problems.

 

MISC NOTES:

  • Traffic: Although there's a minimum placement distance of 300m from the player you'll sometimes see the cars popping up.
  • Traffic: You'll occasionally hear explosions around you. Don't panic. It's just vehicles exploding and civilians burning to death. New clones will replace them shortly.
  • Traffic: Five vehicles is usually enough to simulate the traffic in any island. With more the chances of they bumping against each other, particularly on the initial placement, are too high, and you'll actually see less traffic than with less vehicles (as they keep being destroyed and relocated).
  • Other: Expect huge house parties if there's just a couple of building with preset positions in a town.
  • Other: Lots of civilians = less FPS. If you set your max population to 700 and you enter a "high" town expect a significant FPS drop. This script package places as many civilians as you want in the spots you want. No more, no less.

CREDITS
Functions:

  • Backoff (createunit2.sqf)
  • Liquid_Silence (distancepos3d.sqf)
  • General Barron (nearestobj.sqf)
  • Tophe of Östgöta Ops (randomBuildingPos.sqf)
  • weasello (rndPosInRadius.sqf)
  • toadlife (shuffle.sqf)
  • Igor Drukov (getrelpos.sqf)
  • bn880 (sortbubble.sqf)

Scripts:

  • Mr-Murray (teleport.sqs)

Music:

  • Dola Re Dola (by Devdas)
  • <unidentified song> (by Amir Jan Saboori)
  • Kopeika <extract> (by et_)

CHANGELOG


v1.4.1

  1. Fix: Fixed some small syntax errors in some of the predefined civ type files that were preventing civPop make use of them
  2. Fix: Updated usage instructions

v1.4
1. Fix: Walker civs roaming outside their designated area and range
2. Fix: Vehicles playing music after resetting
3. Change: Single global array used to store global vars now
4. Change: Walker pedestrians more evenly distributed when first positioned
5. Change: Traffic is a bit more varied. You won't see the same sequence of vehicles all the time
6. Change: Increased activation range for traffic when speed of player is low (such as on foot)
7. New: Specify the exact amount of civilians and vehicles to spawn per each civ and veh type
8. New: Civilian inits and killed eh can be extended by the user with custom code
9. New: Works in MP
10. New: Added definitions for default civs new, default cops, VTE civs and respective vehicles. Also, Faceplant, Dr Pepper’s More civs, DMA Desert Civilians and Tonal civs.
11. Other: Several minor corrections and tweaks

v1.3.4

  • Minor tweaks and release

v1.3.3 (unreleased)

  • Added: civTypes\myCivilianTypes.sqf, vehTypes\myVehicleTypes.sqf - templates to add custom vehicles
  • Changed: previous traffic system rewritten again.

v1.3.2 (unreleased)

  • Changed: Further tweaks to traffic system
  • Added: replace civs and drivers that can't be revived

v1.3.1 (unreleased)

  • Changed: new implementation of vehicle traffic

v1.3 (unreleased)

  • Added: traffic
  • Added: shuffle.sqf - to randomize population, particulary when various definitions are used at once

v1.2 (unreleased)

  • Changed: Markers now used instead of game logics to designate the areas to be populated
  • Added: checkmarkers.sqs - adds the markers to the respective global arrays
  • Added: pause.sqs, shutdown.sqs - to pause/resume/shutdown civPopulate
  • Added: addremove.sqs - adds and/or removes towns and camps on the fly
  • Added: cp_radiomusic - music tracks that civs with a radio can use
  • Removed: addlogic.sqs, cp_afghaneveron.sqf and some unused functions

v1.1 (unreleased)

  • Added: ability to set different types of civilians per town
  • Added: distancechecks.sqs - script that manages the distance checks for all the town and camp logics
  • Added: cp_afghaneveron_pashtun.sqf, cp_afghaneveron_tajik.sqf - new civ definitions, split from cp_afghaneveron
  • Added: addlogic.sqs - now replaces CPtownCheck.sqs
  • Added: cp_walkersOnly - which controls if there are only walkers in towns or a mix of walkers and idlers
  • Removed: CPtownCheck.sqs and some unused functions

v1.0 (unreleased)

  • Depopulating bug fixed
  • Added: populateCamp.sqs, dePopulateCamp.sqs - allows setting camping areas
  • Several corrections and tweaks to the code

v1.0 beta

  • civPopulate released


---
Use this, share this, modify this, whatever you want. Just put my name somewhere if you do so.

Edited by kenoxite
updated to 1.4.1

Share this post


Link to post
Share on other sites

Sounds great, I always had issues with populating maps with civs due to performance.. Traffic would be great as it gives the best illusion of ambient civs.. Thanks

Share this post


Link to post
Share on other sites

I was wondering how to use the demo missions and realized this not for Arma2 :o

Share this post


Link to post
Share on other sites

:D

Don't you guys have that "Ambient Civilians" thing up there? That should do what this does. And most likely way better.

Anyway, you could try to change the .noe or .afghaneveron extensions to .utes or any other island from arma 2 and then move the gamelogics over towns. Maybe it'll work there. Slim chance, though. <- That was silly of me.

Edited by kenoxite

Share this post


Link to post
Share on other sites

I've updated civPopulate.

There's quite a lot of changes and additions in this release, traffic being probably the highlight. Check the first post for more info about those new features and how to use this new version.

Also, I'm afraid it's not backwards compatible with the previous version, as now it makes extensive use of markers instead of game logics to designate areas. Sorry about that.

Share this post


Link to post
Share on other sites

Thanks guys.

civPopulate is updated now to version 1.4. The link in the first post has been updated accordingly.

This version contains several new features, fixes and improvements. This is the changelog:

  • Fix: Walker civs were able to roam outside their designated area and range
  • Fix: Vehicles were playing music after resetting
  • Change: Single global array used to store global vars now
  • Change: civPopulate now initialized by civPopStarter logic. Init.sqs not needed anymore
  • Change: Pedestrians more evenly distributed when populating an area
  • Change: Traffic is a bit more varied. You won't see the same sequence of vehicles all the time
  • Change: Increased activation range for traffic when the speed of player is low (such as on foot)
  • Change: Increased activation ranges for traffic and population when player is flying
  • Change: Vehicle and driver replacement and reviving scripts moved from managevehicles.sqs to their respective EH scripts
  • New: You can now specify the exact amount of civilians and vehicles to spawn per each civilian and vehicle type
  • New: Civilian init and killed eh can be extended by the user with custom code (in civPopCustom\)
  • New: Killed civilians will decrease the overall population of the town they belong to
  • New: Works in MP (but not traffic)
  • New: Compatible with CoC Unified Artillery. Its artillery shells are included as activators, so they can populate the area they’re going to strike and cause civilian casualties
  • New: Areas that have had their population reduced due to assassinations will enter a panic state. While in that state the amount of walkers and population in general will be severely reduced
  • New: You can set your own activator objects (apart from the default ones)
  • New: Added definitions for: default civs new, default cops, VTE civs and respective vehicles. Also, Faceplant, Dr Pepper’s More civs, DMA Desert Civilians and Tonal civs.

  • Other: Several minor corrections and tweaks

As you can see, now you can shell civilians at will, if that's your thing. Among other new features. If you use other methods for artillery other than CoC UA you can also make all this work by creating a game logic when a call for arty is done and place it on the target. Then add it to civPop as an activator this way: civPop set [24, (civPop select 24) + [<game logic>]]. You should remove it after the shelling is done, this way: civPop set [24, (civPop select 24) - [<game logic>]]

While I've updated this today the update was actually created weeks ago, so I'm not sure if I missed something in the changelog. Anyway, if you have any question or bug report feel free to post it here.

I also need to rewrite some stuff from the first post regarding instructions and such. I'll do that later.

Oh, and it now works in MP too. Except for the traffic.

Edited by kenoxite

Share this post


Link to post
Share on other sites

Updated to 1.4.1

Thanks to BobMalarkey for the heads up.

CHANGELOG

v1.4.1
  - Fix: Fixed some small syntax errors in some of the predefined civ type files that were preventing civPop make use of them
  - Fix: Updated usage instructions

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×