Matrix Games Forums

Forums  Register  Login  Photo Gallery  Member List  Search  Calendars  FAQ 

My Profile  Inbox  Address Book  My Subscription  My Forums  Log Out

Survivor script/scen based on angsters downed pilot

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
  Printable Version
All Forums >> [New Releases from Matrix Games] >> Command: Modern Operations series >> Mods and Scenarios >> Survivor script/scen based on angsters downed pilot Page: [1]
Login
Message << Older Topic   Newer Topic >>
Survivor script/scen based on angsters downed pilot - 8/13/2018 5:10:41 AM   
Whicker

 

Posts: 662
Joined: 6/20/2018
Status: offline
I dig the downedpilot idea so I went way overboard and edited the one angster created and TyphoonFr/Gunner98 modified.

I have tested it a fair amount, works well so far, and all events/triggers/actions/refpoints seem to get deleted as needed. I'm sure there is something wrong with it that I just haven't found yet.

Major changes:

- survivor instead of pilot as any unit can have a survivor (ships or AC, probably ground units but that is not tested)
- configurable number of survivors based on unit subtype (set in event action)
- configurable max speed and altitude for pickup - ie rescue unit must be below 100 ft and 10 kts (subs must be surfaced)
- configurable success and failure scores, which are multiplied by number of survivors - this is scary, out of control if there are lots of survivors. Could be much worse than the unit lost point penalty. I kinda think the success points should be 0, and the failure points 1. Though its all relative to the other point awards/penalties.
- survivor unit is a life raft if over water, ground unit if on ground (actual dbids are configurable, beware the type). All survivors of a given unit are represented by that one unit
- survivor unit is set to a configurable neutral side - which must exist (needed to allow pickup by different types of units)
- configurable time it takes to rescue each survivor.
- configurable crew survival percent for multi crew units. Can be used in tandem with the trigger firing percentage likelihood
- enhanced survivor message
- survivor time to live is set to a random time between 30 minutes and 30 hours. Hard coded but could be made more easily configurable

Most of the configuration is at the top of the main script. The action for creating the survivor has the configuration for the number of crew/passengers for a given subtype. Subtypes are like MPA or AWAC though I do not have much info on what they all are. To find them there is a function you can run from the lua console to show the OOB and that is modified to show the subtype of each unit next to its name - GetOOBWithSubType().

The number of crew/passengers/possible survivors is passed into the Create Survivor action like so:

---Create Survivor
local crew = 1 --default
if
ScenEdit_UnitX().subtype == '6001' then crew = 3
elseif
ScenEdit_UnitX().subtype == '6002' or ScenEdit_UnitX().subtype == '3101' then crew = 12
elseif
ScenEdit_UnitX().subtype == '7101' then crew = 75 -- C5 Galaxy?
elseif
ScenEdit_UnitX().subtype == '3106' then crew = 350 --CG
elseif
ScenEdit_UnitX().subtype == '4002' then crew = 0 -- E3 Sentry testing 0 crew, should be no survivors
end
CreateDownedPilotFromTriggerUnit(ScenEdit_UnitX(),crew)

If you only want 1 possible survivor then you can just have:
CreateDownedPilotFromTriggerUnit(ScenEdit_UnitX())

The survivor side should be set to friendly for the player side and neutral for the enemy side. If the enemy side is hostile, they may kill the unit, which is not covered - so none of the triggers/actions/events will get deleted if that happens.

This is probably a little too much, but it was fun to play with.

The scen attached has been updated 08/15/2018, fixed a few things like planes on the ground triggering survivors.

Any further updates will be on the post below:

https://commandops.github.io/posts/survivors-script/


Attachment (1)

< Message edited by Whicker -- 8/16/2018 3:23:42 AM >
Post #: 1
RE: Survivor script/scen based on angsters downed pilot - 8/13/2018 12:20:15 PM   
SeaQueen


Posts: 1244
Joined: 4/14/2007
From: Washington D.C.
Status: offline
If a C-5 or E-3 goes down, don't kid yourself. Nobody is getting out of those alive.

(in reply to Whicker)
Post #: 2
RE: Survivor script/scen based on angsters downed pilot - 8/14/2018 5:05:49 AM   
Whicker

 

Posts: 662
Joined: 6/20/2018
Status: offline
I added a max success/failure score to it as it seemed like the scoring could get out of control if there were a lot of crew.

I posted the code and what events/triggers/actions are needed to set it up so it will be easier to actually use.

https://commandops.github.io/posts/survivors-script/

I assume this type of thing is ok/encouraged? as in modifying someone else's code and sharing it.

(in reply to SeaQueen)
Post #: 3
Page:   [1]
All Forums >> [New Releases from Matrix Games] >> Command: Modern Operations series >> Mods and Scenarios >> Survivor script/scen based on angsters downed pilot Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts


Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI

0.109