Scuttling????? (Full Version)

All Forums >> [New Releases from Matrix Games] >> Command: Modern Operations series >> Mods and Scenarios



Message


BeirutDude -> Scuttling????? (12/29/2021 10:50:34 PM)

Had a scenario where a nuclear carrier had 81% damage and both nuclear reactors were destroyed but the hulk remained afloat. Seems to me like a radioactive hulk in that condition would be scuttled ASAP. Perhaps the option to scuttle a stricken vessel might be considered.




Kushan04 -> RE: Scuttling????? (12/29/2021 11:15:17 PM)

If you want, it would be really simple to work up lua script to do this.




BeirutDude -> RE: Scuttling????? (12/30/2021 7:48:51 PM)

Yeah I was thinking about that, but then the designer would have to consider this a possibility for every scenario with a ship involved. Seems like it would be a simple feature to add, so its flexible.




Gunner98 -> RE: Scuttling????? (12/31/2021 8:34:47 PM)

I think your right Al, a feature would be good.

As an interim, a Special Action with player input of the ship name would work. It would be a standard script (like the Game timer) and easy to add for any designer.

Any takers on building that?

B




BDukes -> RE: Scuttling????? (12/31/2021 11:09:23 PM)

Sounds good to me too. I always lose and it is better the send the pain right too the bottom[:)]




KnightHawk75 -> RE: Scuttling????? (1/10/2022 8:19:19 AM)

I'm confused what special action do you want, one that just allows you to fast-kill a selected unit on the playerside?
If so the follow will allow that.
local function ScuttleSelectedUnit()
    local sUnits=ScenEdit_SelectedUnits()
    local retval;
    if (sUnits.units ~=nil) and #sUnits.units > 0 then
        if #sUnits.units > 1 then ScenEdit_MsgBox('You have more than one unit selected, please only select one unit.',0); return; end
        for k,v in pairs(sUnits.units) do  --loop though selected unit table
            retval,u = pcall(ScenEdit_GetUnit,{guid=v.guid}); --get the unit.
            if (retval and u~=nil) and u.type ~='Group' and u.side == ScenEdit_PlayerSide() then  --are we valid and not a group?
               if ScenEdit_MsgBox('Are you sure you want to scuttle unit ' .. u.name ..' ?',4) == 'Yes' then
                   ScenEdit_KillUnit({guid=v.guid});
                   ScenEdit_MsgBox('The unit has been scuttled!',0);
               end
            elseif((u~=nil) and u.type =='Group') then  --are we valid and also a group?
                ScenEdit_MsgBox('You have a group selected, please select an individual unit.',0);
                return;
            else
                ScenEdit_MsgBox('Could not obtain the unit object for the selected unit with guid: ' ..tostring(v.guid), 1);
            end
            u=nil;
        end
    else
      ScenEdit_MsgBox('Please select one or more units first.', 0);
    end
    sUnits=nil;
end
ScuttleSelectedUnit()




BeirutDude -> RE: Scuttling????? (1/10/2022 10:58:55 PM)

Well both the computer side and the player. I will try your the Lua code out for the human. But some things I've noted is an entire computer side/AI Task Group coming to a stop because the HVU is crippled and dead in the water when they would have scuttled/detached it as well. So the AI should either detach the cripple or scuttle her to fight on. I can't remember what scenario it was where I slaughtered the AI as they were sitting ducks still attached to the command vessel.

Thanks for the code. It should help the human player (though they can just detach a cripple as well).




KnightHawk75 -> RE: Scuttling????? (1/11/2022 5:57:12 AM)


quote:

ORIGINAL: BeirutDude

Well both the computer side and the player. I will try your the Lua code out for the human. But some things I've noted is an entire computer side/AI Task Group coming to a stop because the HVU is crippled and dead in the water when they would have scuttled/detached it as well. So the AI should either detach the cripple or scuttle her to fight on. I can't remember what scenario it was where I slaughtered the AI as they were sitting ducks still attached to the command vessel.

Thanks for the code. It should help the human player (though they can just detach a cripple as well).


Well the ai side is different in that you'll need to scan for exact circumstances\conditions you want say every minute... over a sides units or subset there of, or a list of units you provide, checking conditions, be it damage over a certain %, specific engine components existing and status 'destroyed', whatever. Not complicated, just would not be a SA, but Lua action tied to regular timed trigger.




BeirutDude -> RE: Scuttling????? (1/11/2022 11:29:51 PM)

quote:

Not complicated...


Well perhaps for you, but it's a giant leap for me (and I do appreciate your help!!!!!!!). I've gotten better at using Lua functions and some very. very basic coding, but not everyone is a programmer and I'm sure my code is as primitive as it gets. Look I know the Devs have done a great job with the game, but relying on folks to program things to develop scenarios is fraught with issues. Have you noticed the numbers of scenarios being submitted has gone down? I know I'm striving for less units that can do more in mine, but I wonder if people are getting turned off by Lua scripts? I'm not sure but...




KnightHawk75 -> RE: Scuttling????? (1/12/2022 7:10:59 AM)

quote:

Have you noticed the numbers of scenarios being submitted has gone down?

I had not.
quote:

but I wonder if people are getting turned off by Lua scripts?

I see it as one is either going to make a scene or not (and decide to share it or not), Lua only can help make it operate more the way an author desires, so I don't see how it would be a turn off, it's an optional additive to a scene, and often changes the answer to 'can I do xyz in a scene?' from a no to a yes. If anything over the years it's been nice to see some who initially were hesitant to touch lua start doing so.




Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
0.625