Matrix Games Forums

Forums  Register  Login  Photo Gallery  Member List  Search  Calendars  FAQ 

My Profile  Inbox  Address Book  My Subscription  My Forums  Log Out

New scenario for testing: Operation MI- The Battle of Midway (2025)

 
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 >> New scenario for testing: Operation MI- The Battle of Midway (2025) Page: [1]
Login
Message << Older Topic   Newer Topic >>
New scenario for testing: Operation MI- The Battle of M... - 10/5/2020 4:24:50 PM   
orca

 

Posts: 474
Joined: 11/6/2013
Status: offline
Time: Dec 1, 2025 00:000:00
Scenario duration: 3 days

Sides:
Axis (China units) -->Defending Midway
Allies (US units)-->Attacking Midway

Scenario Designer Note: This is a fictional scenario inspired by the historic World War Two Battle of Midway. The scenario pits modern (and hypothetical) Chinese against US forces and hopefully results in an engaging and challenging scenario.

Background:

The Battle of Midway, fought between Allied and Axis fleets in the Pacific Ocean, began on December 1 2025. The Allies had not lost a naval battle in years, and had nearly destroyed the Axis fleet just six months earlier in a surprise attack on Pearl Harbor, Hawaii.

In the 6 months after the devastating strike on Pearl Harbor, the Allies have continued to advance throughout the Pacific. However the Axis has regrouped and is now a growing threat. The Allied and Axis fleets faced off in the Battle of the Coral Sea approximately 1 month ago during which carriers from both sides were sunk. This battle convinced the Allies of the need to destroy the remaining Axis fleet.

Midway Island is a fairly isolated atoll, so named because it is midway between North America and Asia in the North Pacific. Midway is the focus of Operation MI, the Allied plan to smash the Axis resistance to their dominance of the Indo-Pacific. A large Allied carrier strike force followed by an amphibious invasion force is heading towards Midway. The Allies correctly predict that the Axis would consider Midway vital and the invasion would draw out Axis forces, including the carriers. The Allies then plan to defeat the Axis fleet in a decisive battle.


Any feedback is welcomed. I've utilized a lot of LUA (and I'm not even close to a LUA expert) so if there are LUA errors let me know. I'm also particularly interested in others comments on force balance and axis strike and recon missions.

Thanks.

Attachment (1)
Post #: 1
RE: New scenario for testing: Operation MI- The Battle ... - 10/6/2020 9:09:54 AM   
Parel803

 

Posts: 201
Joined: 10/10/2019
From: Netherlands
Status: offline
Just opened it, looks impressive. Also try to learn from you're lua in the special actions and events.
with regards

(in reply to orca)
Post #: 2
RE: New scenario for testing: Operation MI- The Battle ... - 10/6/2020 9:26:41 AM   
Parel803

 

Posts: 201
Joined: 10/10/2019
From: Netherlands
Status: offline
Me newby, but is in the event of points-allies: allies CG Tico destroyed, the class missing at the trigger?

(in reply to Parel803)
Post #: 3
RE: New scenario for testing: Operation MI- The Battle ... - 10/6/2020 3:20:13 PM   
orca

 

Posts: 474
Joined: 11/6/2013
Status: offline
Update Operation MI- The Battle of Midway (2025) 1.01

-removed unused remnant triggers, actions, events from earlier version
-added load out special actions for all MQ-25A

thanks to post by Parel8003

Attachment (1)

(in reply to Parel803)
Post #: 4
RE: New scenario for testing: Operation MI- The Battle ... - 10/6/2020 3:52:29 PM   
orca

 

Posts: 474
Joined: 11/6/2013
Status: offline
Update Operation MI- The Battle of Midway (2025) 1.02
-updated carrier magazines

Attachment (1)

(in reply to orca)
Post #: 5
RE: New scenario for testing: Operation MI- The Battle ... - 10/6/2020 6:23:10 PM   
orca

 

Posts: 474
Joined: 11/6/2013
Status: offline
Update Operation MI- The Battle of Midway (2025) 1.03
-additional carrier magazine updates

Attachment (1)

< Message edited by orca -- 10/6/2020 6:37:24 PM >

(in reply to orca)
Post #: 6
RE: New scenario for testing: Operation MI- The Battle ... - 10/7/2020 1:25:01 PM   
KnightHawk75

 

Posts: 690
Joined: 11/15/2018
Status: online
v1.03

Upload loadup:
Lua script execution error: [string "scenario start- update magazines"]:21: attempt to call a nil value (global 'ScenEdit_ClearMagazine'
)

Check LuaAction: "Scenario start-update magazines-axis" The CV Type 002 line should likely be ScenEdit_ClearAllMagazines.

Still looking around, but I like attempts at making it dynamic (some loadout choice pkg, hit X enemy could loses Y,dmg=% of lost comms,etc). Good stuff, suggest clearing the log before release too, easy to forget.

edit:
activate-recon UAV Ford - Event has no associated Action, this may be getting assigned\re-assigned later but having it empty initially causes a gui lock (can't close screen) without putting something in there (I put the action "activate-recon UAV Ford" in there).


"activate-strike ASBM alpha" event has two time triggers, one random, one specific. The specific one is set for 10-10-2025 ~two weeks before the scene (which the Scene Description says is dec 1,2025 btw not September).

edit2:
In the set-reference point script actions, while it may not ultimately matter (ie probably work as they are) the following vars should all be prefaced with "local", otherwise you're setting these globally each time and I'm pretty sure that's not what is intended.
minVarlat=-15
maxVarlat=15
varlat=math.random(minVarlat, maxVarlat)/10

minVarlon=-10 
maxVarlon=10
varlon=math.random(minVarlon, maxVarlon)/10


Course you could also just wrap all that into one global function at startup to reuse.
-- included in a startup script that runs before anything else--
function gGetLatLonVariation(min1,max1,min2,max2)
 math.randomseed(os.clock() + os.time());
 local varlat = math.random(min1, max1)/10;
 local varlon = math.random(min2, max2)/10;
 return varlat,varlon;
end
--

--replacement line in set reference point scripts. avoiding duplicate code.
local varlat,varlon = gGetLatLonVariation(-15,15,-10,10)
--print(varlat ..' , '.. varlon);



< Message edited by KnightHawk75 -- 10/7/2020 2:59:24 PM >

(in reply to orca)
Post #: 7
RE: New scenario for testing: Operation MI- The Battle ... - 10/7/2020 3:34:53 PM   
KnightHawk75

 

Posts: 690
Joined: 11/15/2018
Status: online
v1.03

SA: Sabotage attack on Hawaii OTH radar SA.
The action is marked repeatable I'm assuming that's maybe intentional (or just for dev-testing) since it's 50/50 on being successful for -100 points.

That said it will never actually be successful because...
if a==1 then
--success
ScenEdit_SpecialMessage('Allies','Mission success: the Special Forces team has destroyed the Hawaii OTH radar')
if myunit ~= nil then 
ScenEdit_DeleteUnit({side="Axis", guid='2QQSQX-0HM2T33SUEIOB'})
end
This will never run because myunit will always be nil (unless you have some global 'myunit var' which you shouldn't and don't), as you didn't assign it anything first (ie getunit() ), also the success message will be displayed even though it failed.

Corrected script:
local a=ScenEdit_GetScore("Allies") -- a corrected to local var.
ScenEdit_SetScore('Allies',(a-100),'-100 Points')
a=math.random(1,2)

if a==1 then
--success
  local myunit = ScenEdit_GetUnit({guid='2QQSQX-0HM2T33SUEIOB'}) --get the unit first into a local var.
  if myunit ~= nil then  -- now check it.
    ScenEdit_DeleteUnit({guid=myunit.guid}); --remove unit then message after it succeeds.
    ScenEdit_SpecialMessage('Allies','Mission success: the Special Forces team has destroyed the Hawaii OTH radar')
  end
else then
  --failure
  ScenEdit_SpecialMessage('Allies','Mission failure: the Special Forces team have been killed and/or captured and were not able to destroy the Hawaii OTH radar');
end
SA: Cyber attack on Axis satellite communications network:
minor: add 'local a;' as the top line, (or local a = .... in line 1) otherwise you're using\creating a global var.

Also consider using a global function created at startup to reduce all the duplicate code or even just a local function at the top of the SA.
--in global startup script--
--preface function with local for one only available in the SA itself.

function gSetUnitOutOfComms(unitguid,value) -- parameters string unitguid, bool value. 
 if ((unitguid ~='') and unitguid ~= nil) and ((value ~= nil) and type(value) == 'boolean') then
  local myunit = ScenEdit_GetUnit({guid = unitguid});
  if myunit ~= nil then 
    print('original value: ' .. tostring(myunit.outOfComms)); --check current value
    if myunit.outOfComms ~= value then --only flip it if it needs flipping.
      ScenEdit_SetUnit( {guid=myunit.guid, OUTOFCOMMS=value} ); --engage out-of-comms
      print('new value: ' .. tostring(myunit.outOfComms)); --check updated value
    end 
  end
 else
  print('gSetUnitOutOfComms() error missing guid parameter or boolean value');
 end
end
-- end of function

--How to use in the SA and\or other scripts to call\use above function 
gSetUnitOutOfComms('2QQSQX-UNITGUIDHERE1',true); --this way all those if then's just become 1 line per unit.
gSetUnitOutOfComms('2QQSQX-UNITGUIDHERE2',true); --as you can see this saves a ton of lines.
--etc..
gSetUnitOutOfComms('2QQSQX-UNITGUIDHEREX',false); 



< Message edited by KnightHawk75 -- 10/7/2020 4:17:33 PM >

(in reply to KnightHawk75)
Post #: 8
RE: New scenario for testing: Operation MI- The Battle ... - 10/8/2020 3:55:22 PM   
orca

 

Posts: 474
Joined: 11/6/2013
Status: offline
Thanks KnightHawk for you input.

I made the LUA corrections you suggested. I haven't added the global functions yet as the current LUA for this while cumbersome does work. But your script is much better and I will change this at a later date.

As for the "activate-strike ASBM alpha", I intended there to be 2 triggers. My intention is that the either trigger would run the event. Is it not best to have 2 triggers for the same event? Regardless I separated them into 2 events. The time trigger DF-26 is supposed to be set later than the scenario time so that it doesn't run unless that trigger is changed. The trigger is changed to an appropriate time by the action SetTrigger-time trigger DF-26 which is triggered when an H-6J is launched (event=coordinate-strike ASBM alpha with H-6J strike). This resets the time trigger DF-26 to "coordinate" with the H-6J strike. This is my attempt to use LUA as a time trigger. I'm not sure it's working correctly with the DF-26.

But I also use this method of time trigger for the J-15 and J-16 strikes to change their loadouts back to AAW after the strike. I'm pretty sure it works for these.

I changed the scenario time to match the time in the scenario title & description.

The special actions are supposed to be one time only but I'm keeping them repeatable for now for testing purposes.

I cleared the logs. Is there a LUA script I can use to clear them every time at when the scenario is loaded?

(in reply to KnightHawk75)
Post #: 9
RE: New scenario for testing: Operation MI- The Battle ... - 10/8/2020 3:56:33 PM   
orca

 

Posts: 474
Joined: 11/6/2013
Status: offline
Update Operation MI- The Battle of Midway (2025) 1.04
-above described updates. Thanks to KnightHawk75

Attachment (1)

(in reply to orca)
Post #: 10
RE: New scenario for testing: Operation MI- The Battle ... - 10/9/2020 12:50:47 AM   
KnightHawk75

 

Posts: 690
Joined: 11/15/2018
Status: online
You can have two triggers on same event, it just seemed usual given the time used in one of them which is why I asked, but what you said makes sense since it's getting updated later. As for a function to I can use to clear the logs, don't think there is one, just via gui.

Thanks for the updates.

(in reply to orca)
Post #: 11
RE: New scenario for testing: Operation MI- The Battle ... - 10/10/2020 11:49:34 AM   
Lukew

 

Posts: 33
Joined: 8/14/2019
Status: offline
This scenario won't open Error You have (explicitly or implicitly) attempted to load a database that does not exist on the DB folder.

What database did you use to create the scenario and where do I locate said database? Thanks.

(in reply to KnightHawk75)
Post #: 12
RE: New scenario for testing: Operation MI- The Battle ... - 10/10/2020 12:27:57 PM   
BeirutDude


Posts: 1860
Joined: 4/27/2013
From: Jacksonville, FL, USA
Status: offline
Also probably also created with the Build 11 BETA.

_____________________________

"Some people spend an entire lifetime wondering if they made a difference. The Marines don't have that problem."
PRESIDENT RONALD REAGAN, 1985

I was Navy, but Assigned TAD to the 24th MAU Hq in Beirut. By far the finest period of my service!

(in reply to Lukew)
Post #: 13
RE: New scenario for testing: Operation MI- The Battle ... - 10/10/2020 2:25:39 PM   
orca

 

Posts: 474
Joined: 11/6/2013
Status: offline
Yes, it’s with the newest beta build. I always update to these and didn’t think about the fact that it could be an issue. So I guess this scenario will only work for those who also update to the this beta.

quote:

ORIGINAL: BeirutDude

Also probably also created with the Build 11 BETA.


(in reply to BeirutDude)
Post #: 14
RE: New scenario for testing: Operation MI- The Battle ... - 10/10/2020 7:12:55 PM   
BeirutDude


Posts: 1860
Joined: 4/27/2013
From: Jacksonville, FL, USA
Status: offline
quote:

Yes, it’s with the newest beta build. I always update to these and didn’t think about the fact that it could be an issue. So I guess this scenario will only work for those who also update to the this beta.


I didn't think about it either. I usually build them with the latest "Official" database and Build, but the one I'm working on right now I had to use the Beta due to an issue with Cargo that was resolved in the Beta. Thus I didn't think about it myself.

_____________________________

"Some people spend an entire lifetime wondering if they made a difference. The Marines don't have that problem."
PRESIDENT RONALD REAGAN, 1985

I was Navy, but Assigned TAD to the 24th MAU Hq in Beirut. By far the finest period of my service!

(in reply to orca)
Post #: 15
RE: New scenario for testing: Operation MI- The Battle ... - 10/11/2020 5:11:47 AM   
KnightHawk75

 

Posts: 690
Joined: 11/15/2018
Status: online
I think beta 1147.9 and up have auth for db487.

I never think about it either cause I'm always trying out the new goodies and forget to swap it back (lower) when building testcases and stuff unless I'm conscious of it or think a db issue is involved.


(in reply to BeirutDude)
Post #: 16
RE: New scenario for testing: Operation MI- The Battle ... - 10/12/2020 3:11:49 PM   
Lukew

 

Posts: 33
Joined: 8/14/2019
Status: offline
Thankyou. Where exactly do I find the beta build?

(in reply to orca)
Post #: 17
RE: New scenario for testing: Operation MI- The Battle ... - 10/12/2020 5:35:10 PM   
KnightHawk75

 

Posts: 690
Joined: 11/15/2018
Status: online
On the main\default section of the CMO forums, the most recent beta built is usually\always pinned at the top in the first couple listed.

https://www.matrixgames.com/forums/tm.asp?m=4889956

(in reply to Lukew)
Post #: 18
RE: New scenario for testing: Operation MI- The Battle ... - 10/12/2020 5:36:16 PM   
orca

 

Posts: 474
Joined: 11/6/2013
Status: offline
I believe this is the most recent beta.

https://www.matrixgames.com/forums/tm.asp?m=4889956

(in reply to KnightHawk75)
Post #: 19
Page:   [1]
All Forums >> [New Releases from Matrix Games] >> Command: Modern Operations series >> Mods and Scenarios >> New scenario for testing: Operation MI- The Battle of Midway (2025) 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.137