Home » MODDING HQ 1.13 » Flugente's Magika Workshop » New feature: easily placed extra civilians
New feature: easily placed extra civilians[message #344843]
|
Sun, 03 April 2016 17:20
|
|
Flugente |
|
Messages:3507
Registered:April 2009 Location: Germany |
|
|
At least in the stock 1.13 maps, sectors are very empty and devoid of civilians. They also don't have to say that much.
This is rather sad. Unfortunately, adding civilians to maps requires the use of the map editor. For someone not used to the editor, this is not a simple task.
For this reason, I've decided to add a new functionality that allows us to create civilians on any map we want much more easily. And while I am known to rant against the usage of LUA more than often (jsut ask the guy's in IRC ;) ), in this case, LUA scripts are the best place to do this (xml being to inflexible in this case).
There is now a new function used in Scripts/strategicmap.lua in HandleSectorTacticalEntry():
...
-- Flugente: if this sector has not yet been liberated by the player, there might be some civilian enemy personnel here
-- the idea is that these people are government employed, and won't stay around once you take the sector
-- parameters of CreateCivilian:
-- - tile where person should be created on the map
-- - civilian group they should belong to (see also CivGroupNames.xml)
-- - bodytype
-- - vest colour (-1 for random)
-- - pants colour (-1 for random)
-- - hair colour (-1 for random)
-- - skin colour (-1 for random)
-- - optional item 1 (-1 for nothing)
-- - optional item 2 (-1 for nothing)
-- - optional item 3 (-1 for nothing)
-- - optional item 4 (-1 for nothing)
if ( fHasEverBeenPlayerControlled == false ) then
-- surface sectors
if ( bSectorZ == 0 ) then
-- central SAM
if ( sSectorX == 8 and sSectorY == SectorY.MAP_ROW_I ) then
CreateCivilian(16081, CivGroup.RADAR_TECHNICIAN_GROUP, Bodytype.MANCIV, Vest.GREYVEST, Pants.GREENPANTS, -1, -1, 210, 635, -1, -1)
CreateCivilian(15443, CivGroup.RADAR_TECHNICIAN_GROUP, Bodytype.REGFEMALE, Vest.GREYVEST, Pants.GREENPANTS, -1, -1, 210, 635, -1, -1)
CreateCivilian(10944, CivGroup.RADAR_TECHNICIAN_GROUP, Bodytype.REGMALE, Vest.GREYVEST, Pants.GREENPANTS, -1, -1, 210, 8, -1, -1)
-- Drassen SAM
elseif ( sSectorX == 15 and sSectorY == SectorY.MAP_ROW_D ) then
CreateCivilian(11297, CivGroup.RADAR_TECHNICIAN_GROUP, Bodytype.MANCIV, Vest.GREYVEST, Pants.GREENPANTS, -1, -1, 210, 8, -1, -1)
...
This function allows creating a custom civilian with user-defined visuals and a few items. In my examples, I've used the idea I had here and added
-
radar technicians to SAM sites and airports - prison wardens to prisons (complete with gasmask, nightstick and handcuffs)
- airport staff to airports
- barrack staff to the Alma barracks
- scientists to Orta
- factory workers to factories
- outspoken civilian supporters of the regime to Balime (you can't tell me they've all fled to Meduna)
-
secretaries to places that seem like they'd have some. This also includes dialogue. These new civilian groups so far don't do anything unusual (I nevertheless list them in the code, in case we later want special code for them).
In the above example, the civilians are only created when the player has never liberated this sector before - whether you use that is up to you.
This feature can be turned on and off via ALLOW_EXTRA_CIVILIANS in Ja2_Options.ini and is set to be off by default.
This is savegame compatible.
This has been added to the trunk in r8132 & GameDir r2311. Using the new exe without the new GameDir does not cause anything dangerous, for once. It just makes me sad.
[Updated on: Sun, 03 April 2016 17:26]
I know now that it could never work between us, as much as we wanted to, it could never be! Not because you're a rabbit, but because you're black.
If you want, you can donate to me. This will not affect how and what I code, and I will not code specific features in return. I will be thankful though.Report message to a moderator
|
|
|
|
|
|
New feature: easily placed extra civilians
By: Flugente on Sun, 03 April 2016 17:20
|
|
|
Re: New feature: easily placed extra civilians
By: smeagol on Sun, 03 April 2016 17:59
|
|
|
Re: New feature: easily placed extra civilians
By: CVB on Sun, 03 April 2016 19:27
|
|
|
Re: New feature: easily placed extra civilians
By: Flugente on Sun, 03 April 2016 19:45
|
|
|
Re: New feature: easily placed extra civilians
By: CVB on Sun, 03 April 2016 22:30
|
|
|
Re: New feature: easily placed extra civilians
By: Flugente on Sun, 03 April 2016 22:46
|
|
|
Re: New feature: easily placed extra civilians
By: CVB on Sun, 03 April 2016 23:56
|
|
|
Re: New feature: easily placed extra civilians
By: Kitty on Sun, 05 May 2019 19:11
|
|
|
Re: New feature: easily placed extra civilians
By: CVB on Tue, 05 April 2016 09:53
|
|
|
Re: New feature: easily placed extra civilians
By: Flugente on Tue, 05 April 2016 14:07
|
|
|
Re: New feature: easily placed extra civilians
By: CVB on Tue, 05 April 2016 17:02
|
|
|
Re: New feature: easily placed extra civilians
By: Flugente on Tue, 05 April 2016 23:50
|
|
|
Re: New feature: easily placed extra civilians
By: CVB on Wed, 06 April 2016 16:16
|
|
|
Re: New feature: easily placed extra civilians
By: Flugente on Thu, 07 April 2016 01:06
|
|
|
Re: New feature: easily placed extra civilians
By: CVB on Thu, 07 April 2016 14:44
|
|
|
Re: New feature: easily placed extra civilians
|
|
|
Re: New feature: easily placed extra civilians
By: Wil473 on Thu, 07 April 2016 19:49
|
|
|
Re: New feature: easily placed extra civilians
By: CVB on Mon, 11 April 2016 21:02
|
|
|
Re: New feature: easily placed extra civilians
By: Flugente on Mon, 11 April 2016 21:13
|
|
|
Re: New feature: easily placed extra civilians
|
|
|
Re: New feature: easily placed extra civilians
By: Slax on Sun, 15 May 2016 21:35
|
|
|
Re: New feature: easily placed extra civilians
|
|
|
Re: New feature: easily placed extra civilians
By: Kitty on Mon, 03 June 2019 01:01
|
|
|
Re: New feature: easily placed extra civilians
|
|
|
Re: New feature: easily placed extra civilians
By: Kitty on Mon, 03 June 2019 06:46
|
|
|
Re: New feature: easily placed extra civilians
|
|
|
Re: New feature: easily placed extra civilians
By: tais on Sun, 03 April 2016 22:04
|
|
|
Re: New feature: easily placed extra civilians
|
|
|
Re: New feature: easily placed extra civilians
By: Kitty on Sun, 05 May 2019 18:56
|
|
|
Re: New feature: easily placed extra civilians
By: Kitty on Mon, 03 June 2019 00:47
|
Goto Forum:
Current Time: Mon Dec 02 01:07:24 GMT+2 2024
Total time taken to generate the page: 0.02888 seconds
|