Mining as a Victory Condition

Post new mods and scenarios here.

Moderator: MOD_Command

Post Reply
User avatar
SeaQueen
Posts: 1432
Joined: Sat Apr 14, 2007 4:20 am
Location: Washington D.C.

Mining as a Victory Condition

Post by SeaQueen »

Sea mining is often as important for its ability to deter or constrain a given course of action, as it is for its ability to actually destroy ships. If someone knows there's sea mines somewhere, they generally just won't go there unless they have no other choice. Because of their ability to influence an enemy on levels beyond the purely tactical consideration of destroying ships, mines have operational (e.g. constraining maneuver) and strategic implications (e.g. legal considerations, treaty considerations), which suggests that sometimes just placing or clearing them is a win. A great historical example would be the mining of Haiphong Harbor with B-52s during the Vietnam War. They didn't lay the mines to destroy ships. They laid the mines so that they wouldn't have to (they'd just stay bottled up in port and not leave). Just seeding the minefield was a win. Similarly, during Operation Earnest Will, US minesweeping helicopters and minesweepers worked to keep the sea lanes opened to commerce, and minimize the impact on the global economy. Successfully clearing the mines was a victory which was frustrated by Iranian minesweepers, aircraft, CDCMs, etc.

How would one implement the successful placement or removal of sea mines as a victory condition?
User avatar
BeirutDude
Posts: 2789
Joined: Sat Apr 27, 2013 9:44 am
Location: Jacksonville, FL, USA

RE: Mining as a Victory Condition

Post by BeirutDude »

I don't think the mine counts as a unit so the only thing I can think of is if the mine layer is in the area for a certain length of time the mines likely would have been laid. I was working on a straits of Hormuz and modified some Iranian Amphibs to lay mines and that was what I was working on for the mines.
"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!
User avatar
SeaQueen
Posts: 1432
Joined: Sat Apr 14, 2007 4:20 am
Location: Washington D.C.

RE: Mining as a Victory Condition

Post by SeaQueen »

It sounds like there needs to be some sort of LUA function that tests if there's mines in a designated area, so we could write a condition to test for it.
User avatar
Roby7979
Posts: 1065
Joined: Tue Feb 20, 2018 4:12 pm
Location: Italy,Rome

RE: Mining as a Victory Condition

Post by Roby7979 »

ORIGINAL: SeaQueen

It sounds like there needs to be some sort of LUA function that tests if there's mines in a designated area, so we could write a condition to test for it.


It's a great idea, there would be a lot of very interesting hypothetical scenarios
User avatar
SeaQueen
Posts: 1432
Joined: Sat Apr 14, 2007 4:20 am
Location: Washington D.C.

RE: Mining as a Victory Condition

Post by SeaQueen »

It'd be nice if we could do something like return the number of mines in a given area, and then write a LUA condition which looked something like:

local minesCleared = false
local nmines = ScenEdit_MinesInArea(<reference points>)

if (nmines <= victoryConditions.fracCleared * scenarioParameters.n0mines) then
minesCleared = true
else
minesCleared = false
end

returned minesCleared

User avatar
BeirutDude
Posts: 2789
Joined: Sat Apr 27, 2013 9:44 am
Location: Jacksonville, FL, USA

RE: Mining as a Victory Condition

Post by BeirutDude »

That sounds like the route to go, but way beyond my skills
"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!
User avatar
Gunner98
Posts: 5880
Joined: Fri Apr 29, 2005 12:49 am
Location: The Great White North!
Contact:

RE: Mining as a Victory Condition

Post by Gunner98 »

You are on to something I think.

Currently I do as BeirutDude suggests: If a minelayer is in an area for XXX amount of time - objective achieved

On the other foot, for clearing mines, you can put an enter area trigger beyond the minefield. If the unit gets there you can assume that there is a channel in the minefield - objective achieved.

Not slick but it works.

B
Check out our novel, Northern Fury: H-Hour!: http://northernfury.us/
And our blog: http://northernfury.us/blog/post2/
Twitter: @NorthernFury94 or Facebook https://www.facebook.com/northernfury/
Cik
Posts: 671
Joined: Wed Oct 05, 2016 3:22 am

RE: Mining as a Victory Condition

Post by Cik »

it might be neat to have a more generalized "measure thing in this box" function. i'm thinking that not only could you use such a thing for mines, but it could also be used for measuring air/sea control.

"if you can keep more than 4 ships of type FFG, DDG, SSN in this box for 4 hours, you win"

or

"keep more than 8 fighters armed with the following weapons on station in this box" etc.

i've never managed to figure out a way of iterating through assets in a particular geographical area though, and checking conditions against them.. is such a thing possible?
User avatar
SeaQueen
Posts: 1432
Joined: Sat Apr 14, 2007 4:20 am
Location: Washington D.C.

RE: Mining as a Victory Condition

Post by SeaQueen »

You can already check to see if any units are in an area using triggers. Mines on the other hand are special for some reason.

I don't believe that if you use the GetUnit() command with just a side it'll return all the units on that side, sadly. Such a functionality definitely could be useful.

Instead I'll do things like create tables of guids for unit types I'm interested in (e.g. SAMs, CDCMs, surface ships, etc.) and iterate through them. On a practical level that seems to work well enough, although sometimes it gets time consuming to build the table.
Rory Noonan
Posts: 2418
Joined: Thu Dec 18, 2014 1:53 am
Location: Brooklyn, NY

RE: Mining as a Victory Condition

Post by Rory Noonan »

ORIGINAL: SeaQueen

You can already check to see if any units are in an area using triggers. Mines on the other hand are special for some reason.

I don't believe that if you use the GetUnit() command with just a side it'll return all the units on that side, sadly. Such a functionality definitely could be useful.

Instead I'll do things like create tables of guids for unit types I'm interested in (e.g. SAMs, CDCMs, surface ships, etc.) and iterate through them. On a practical level that seems to work well enough, although sometimes it gets time consuming to build the table.

To get a list of units on a side:
local sideUnits = VP_GetSide({side='SideName'}).units
print (sideUnits)

That will give you a list of the GUID and name if I recall correctly. If you want to expand the data in the table you can tack on the following:
local unitTable = {}
for k,v in ipairs (sideUnits) do
local unit = ScenEdit_GetUnit({guid=v.guif})
table.insert(unitTable,unit)
end
print (unitTable) --warning, that's going to be a wall of data

Hope that helps!
Image
Post Reply

Return to “Mods and Scenarios”