Matrix Games Forums

Forums  Register  Login  Photo Gallery  Member List  Search  Calendars  FAQ 

My Profile  Inbox  Address Book  My Subscription  My Forums  Log Out

User preference - Doctrine

 
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 >> Lua Legion >> User preference - Doctrine Page: [1]
Login
Message << Older Topic   Newer Topic >>
User preference - Doctrine - 2/13/2021 2:38:18 AM   
michaelm75au


Posts: 13500
Joined: 5/5/2001
From: Melbourne, Australia
Status: offline
Lua can be very useful as a tool. But is only available in the Scenario Editor mode.

One of thing I usually need to do when starting a scenario is to check and change the Side Doctrine settings as needed.
I have always thought about being able to just have a common setting I could import as a User Preference. [WRA is the other one that I spend time on tweaking at the start and would like to handle it in the same way - but this is much more complicated.]

So as a first step I have built a Special Action that can be run in non-edit mode - once you have saved it in a new copy

To get the base settings, you can change the Side Doctrine to suit what you want.
Then via the Lua console, run
local old = ScenEdit_GetDoctrine( {side='playerside'} )
print(old)
It should look something like this ...
quote:

{ refuel_unrep_allied = '0', weapon_control_status_surface = '1', deploy_on_defence = '5', rtb_when_winchester = '1', weapon_control_status_land = '1', fuel_state_planned = '0', engaging_ambiguous_targets = '2', weapon_state_planned = '0', use_aip = '1', fuel_state_rtb = '2', gun_strafing = '0', unrep_selection = '0', use_refuel_unrep = '0', deploy_on_attack = '5', withdraw_on_defence = '0', weapon_control_status_subsurface = '1', dive_on_threat = '0', recharge_on_patrol = '60', maintain_standoff = '1', recharge_on_attack = '10', avoid_contact = '0', kinematic_range_for_torpedoes = '2', use_nuclear_weapons = '0', withdraw_on_damage = '0', weapon_state_rtb = '1', use_sams_in_anti_surface_mode = '0', weapon_control_status_air = '1', deploy_on_fuel = '5', air_operations_tempo = '0', automatic_evasion = '1', ignore_emcon_while_under_attack = '1', withdraw_on_attack = '0', deploy_on_damage = '1', dipping_sonar = '0', ignore_plotted_course = '0', bvr_logic = '1', jettison_ordnance = '0', engage_opportunity_targets = '0', withdraw_on_fuel = '1', quick_turnaround_for_aircraft = '1' }

Copy and paste the table output in a text file.

To use it, load a scenario in Editor mode, and create a Special Action as below. Make it active and repeatable.
quote:

Script:Set user preference - Side Doctrine
local doctrine = {}
local data = ScenEdit_InputBox('Paste the doctrine table to be used')

for k, v in string.gmatch(data, "(%g+) = '(%w+)'") do
doctrine[k] = v
end

local old = ScenEdit_GetDoctrine( {side='playerside'} )
print(old)
local new = ScenEdit_SetDoctrine( {side='playerside'}, doctrine )
print(new)


Save the new scenario.

When you start the scenario up, you can run the SA which will ask for the doctrine string to apply.
Just paste the contents from the earlier text file into it and continue. The new settings should be applied.

Note currently the Player Edit options are not being applied, that is the options are not checked. A future change to SetDoctrine will allow an option on the call to follow the designer's conditions.

This only affects the Side Doctrine (and by implication any other doctrines that inherit it). But it won't change any specific settings you have made to individual unit/group/mission doctrine settings.

The SA is a temporary way to handle this. I am looking at how this can built into CMO so you can just select a file that has your preferences in it and load it on any scenario.

_____________________________

Michael
Post #: 1
RE: User preference - Doctrine - 2/13/2021 2:39:53 AM   
michaelm75au


Posts: 13500
Joined: 5/5/2001
From: Melbourne, Australia
Status: offline
I would be interested in any comments.

_____________________________

Michael

(in reply to michaelm75au)
Post #: 2
RE: User preference - Doctrine - 2/13/2021 3:54:01 AM   
KnightHawk75

 

Posts: 1450
Joined: 11/15/2018
Status: offline
Other than hardcore I'm not sure how many will really use the copy\paste method tbh.
WRA is where the real time sink is imho, def more complicated as mentioned.

"I am looking at how this can built into CMO so you can just select a file that has your preferences in it and load it on any scenario. "
Add Editor\Doctrine\ import |export, then on Side Doctrine screen (to accommodate 'player' mode) just the import button maybe at the bottom right?
Two added Lua functions ScenEdit_ExportDoctrine(side,filepath) and ScenEdit_ImportDoctrine(side,filepath).
If side empty uses current side, if filepath empty uses [scenpath]\[scenname].sidepref
Export is simple old .ini format key=value, and is parsed in as table named [inisectionname] if different sections are even needed that is.
keys and values mirror existing names\values.
Should work for side-doctrine, as for WRA down the road maybe not so much though.

/2cents




(in reply to michaelm75au)
Post #: 3
RE: User preference - Doctrine - 2/13/2021 9:42:10 AM   
Parel803

 

Posts: 579
Joined: 10/10/2019
From: Netherlands
Status: offline
Some doctrine settings are sometimes hard for me to fully understand but I realize there (with WRA) they give me much more how I wanna fight the war. Really like the idea of having some sort of saved layout and being able to re-use.
Would welcome an easier to re-use format of my doctrine and WRA in the future but gonna try this one.

with regards Gert-Jan

(in reply to KnightHawk75)
Post #: 4
RE: User preference - Doctrine - 2/13/2021 1:22:00 PM   
BDukes

 

Posts: 1695
Joined: 12/27/2017
Status: offline

quote:

ORIGINAL: michaelm75au

I would be interested in any comments.


I tend to rely on routine-flow memory now to configure things as I start a scenario. Your idea is definitely smarter and I'd definitely take the time to do it.

I think Knighthawk's got a better implementation idea though. One copy and paste error and a lot of users will bail on it (easy case of the fukits). A preference .ini that can be generated and imported through the UI would be best.

Thanks

Mike


(in reply to michaelm75au)
Post #: 5
RE: User preference - Doctrine - 2/15/2021 1:26:33 PM   
thewood1

 

Posts: 6529
Joined: 11/27/2005
Status: offline

quote:

ORIGINAL: michaelm75au

Lua can be very useful as a tool. But is only available in the Scenario Editor mode.

One of thing I usually need to do when starting a scenario is to check and change the Side Doctrine settings as needed.
I have always thought about being able to just have a common setting I could import as a User Preference. [WRA is the other one that I spend time on tweaking at the start and would like to handle it in the same way - but this is much more complicated.]


If you remember my suggestion for templates, this is one of the instigators for that idea. Only not through lua. But a series of ROE/WRA templates that can be applied to side, group, unit, mission, etc. Those templates can be applied through events or lua to account for posture changes, range to threat, losses, reinforcements, etc.

(in reply to michaelm75au)
Post #: 6
RE: User preference - Doctrine - 2/16/2021 12:54:28 AM   
SeaQueen


Posts: 1451
Joined: 4/14/2007
From: Washington D.C.
Status: offline
I'm not really sure how useful this would be, since I can just change the doctrine settings on my own side, and typically those are situational. It's not like I ALWAYS follow shoot-look-shoot doctrine or whatever. It depends on the scenario.

What I WOULD like to do, is to be able to get an input box for special actions which could accept multiple choice, or text as an input. It would also be nice to be able to do things like, select a special action (e.g. Cyber Attack), have a box pop up that might say something like, "Select the target of your cyber weapon," and then click on a unit to select where the effects might be applied. That'd be SUPER useful and make special actions more interesting because it'd let the player have a little more agency. It might also be handy to be able to do things like click on the map and add a unit at the player's discretion in the position of their choice outside the scenario editor, as a special action, for example.

(in reply to michaelm75au)
Post #: 7
RE: User preference - Doctrine - 2/16/2021 2:01:29 AM   
KnightHawk75

 

Posts: 1450
Joined: 11/15/2018
Status: offline
@SeaQueen
If the player selects the unit prior to the SA, you can use that as the selection\selected unit, yeah it would be great if one could do it after, not sure how that would be implemented though.
Inputbox does accept text right now, but I definitely would love an optionbox multiple choice one to make things less painful when doing choice dialogs.

< Message edited by KnightHawk75 -- 2/16/2021 2:02:59 AM >

(in reply to SeaQueen)
Post #: 8
RE: User preference - Doctrine - 3/5/2021 12:43:46 AM   
jkgarner

 

Posts: 174
Joined: 4/30/2020
Status: offline
Umm, I think you may run into the issue with doctrine setting that I ran into a week go:
Get_Docrtine aned SetDoctrine are not really inverse functions....
The SetDoctrine only changes the settings expressly listed, while GetDoctrine only lists non default.

The process seems awkward at best for the general player.
1st: home many players want to change the side doctrine?
2nd Of those, how many would be comfortable wiht your copy-paste mechanism?

I think you are playing to a very small audience with this one, mate.

(in reply to KnightHawk75)
Post #: 9
RE: User preference - Doctrine - 3/5/2021 1:54:28 AM   
KnightHawk75

 

Posts: 1450
Joined: 11/15/2018
Status: offline
quote:

while GetDoctrine only lists non default.


ScenEdit_GetDoctrine({side="Blue",unitname="my unit name",actual=true}) _does_ return default+non_default. [retail 1147.16]




< Message edited by KnightHawk75 -- 3/5/2021 1:56:37 AM >

(in reply to jkgarner)
Post #: 10
Page:   [1]
All Forums >> [New Releases from Matrix Games] >> Command: Modern Operations series >> Mods and Scenarios >> Lua Legion >> User preference - Doctrine 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

1.313