Difficulty variance using special actions design demo

Post new mods and scenarios here.

Moderator: MOD_Command

Post Reply
User avatar
VFA41_Lion
Posts: 229
Joined: Wed Jan 29, 2014 11:16 pm

Difficulty variance using special actions design demo

Post by VFA41_Lion »

In literally my first foray into using lua scripting anywhere, I wanted to see if I could modify the difficulty of a scenario using the newly released feature, special actions. This very small and dirty scenario is the result.

In game, you are Blue side, commanding a US carrier battle group. Opposing you is Red side, another US carrier battle group.

This is the default difficulty, red vs blue, approximate identical strengths and weaknesses.

If you go to special actions in the game menu, you can select either EASY difficulty, which adds a third carrier battle group to help fight Red, or HARD difficulty, which makes that third group instead turn hostile on you.


I tried using what I thought was a lua command to modify a special action to disable the other one when using one, but it doesn't appear to work, so as it is now, you can select one difficulty and then the other later on whenever. I gotta go to work now so I won't be able to respond for the rest of the day, but I would definitely appreciate constructive comments and help! :)

V2 changes
Fixed the special action not disabling
added scenario descriptions
Attachments
Scen Featu..demo (2).zip
(217.96 KiB) Downloaded 8 times
Rory Noonan
Posts: 2418
Joined: Thu Dec 18, 2014 1:53 am
Location: Brooklyn, NY

RE: Difficulty variance using special actions design demo

Post by Rory Noonan »

Had a look hoping it was something easy I could help with... I would have tried the same thing you have, I'm not sure what to recommend.

I'm trying to read through 'Programming in Lua' and 'Beginning Lua Programming' but both are exceptionally dry reads [8|]

Actually I suggest posting this on the QA board, I think some more Lua adept people are there.

http://qa.commandmodernairnavaloperations.com/
Image
Rory Noonan
Posts: 2418
Joined: Thu Dec 18, 2014 1:53 am
Location: Brooklyn, NY

RE: Difficulty variance using special actions design demo

Post by Rory Noonan »

Found your problem!

Where you have:

Code: Select all

ScenEdit_SetSpecialAction ("Select easy difficulty", false)

You need to have:

Code: Select all

ScenEdit_SetSpecialAction({ActionNameOrID="Select hard difficulty", IsActive="False"})

I found the clues that pointed me to this here:
tm.asp?m=4011908 under 'SCENARIO EDITING & SCRIPTING'
Image
User avatar
VFA41_Lion
Posts: 229
Joined: Wed Jan 29, 2014 11:16 pm

RE: Difficulty variance using special actions design demo

Post by VFA41_Lion »

Thanks very much for the help, apache! That fixed it completely. :)

I re-uploaded the current version and even put it on steam workshop :o
Post Reply

Return to “Mods and Scenarios”