Now with attachments: Scenario build help - Autodetect

Post bug reports and ask for game support here.

Moderator: MOD_Command

Post Reply
User avatar
Kennetho
Posts: 65
Joined: Sat Mar 24, 2018 7:23 am
Location: Denmark

Now with attachments: Scenario build help - Autodetect

Post by Kennetho »

Tech support Baltic Brawl 2022.pdf
1
(350.9 KiB) Downloaded 5 times
Dear Tech support

I’ve spend approximately 10 months developing a huge scenario. Russia vs NATO.

I have encountered several technical issues I would like your help with.
Baltic Brawl.zip
Save game
(5.36 MiB) Downloaded 7 times
Issue number 1 - postures

For some reason the scenario starts with postures "hostile".

Although I’ve changed the postures to “unfriendly” time and time again, when the scenario is loaded, postures start “hostile”.

I’ve had some Lua help from the community to force this and there is now an event “Postures” that forces “unfriendly” postures when the scenario is loaded.
So that took care of the issue initially.

However, this lua activates every time the scenario is re-loaded.
So when you’ve re-load the scenario, what should be "hostile" starts “unfriendly”.

How do I make the postures “unfriendly” from when the scen loads?

Issue number 2 - Autodetect
All Russian forces are auto detected from when the scenario starts, why?

After app. 01:06 all Russian forces are autodetected. Submarines and ground units deep inside Russia.

For all sides I’ve run “Drop all contacts”. I’ve unchecked “unit is auto-detected” and “Collective responsibility”.

Examples in pdf with pictures:

When Russian planes scrambles they are immediately identified by type and unit number.

In the below case a SU-30SM from 120 SAP.

The above issues only apply when playing "normal" game mode - not when playing in editor!??!

I hope you are able to solve these issues.

Please see pdf which includes pictures.
Automatic detection.pdf
2
(494.16 KiB) Downloaded 15 times
Tech support Baltic Brawl 2022.pdf
1
(350.9 KiB) Downloaded 5 times
Best
Kenneth Osbaeck
kennethosbaeck@me.com
Last edited by Kennetho on Thu Mar 17, 2022 5:28 pm, edited 4 times in total.
thewood1
Posts: 10288
Joined: Sun Nov 27, 2005 6:24 pm
Location: Boston

Re: Scenario build help - Autodetect

Post by thewood1 »

Do you really think that anyone can provide an answer without at least a save? How is anyone supposed to know what all of your settings are?
KnightHawk75
Posts: 1850
Joined: Thu Nov 15, 2018 7:24 pm

Re: Scenario build help - Autodetect

Post by KnightHawk75 »

However, this lua activates every time the scenario is re-loaded.
So when you’ve re-load the scenario, what should be "hostile" starts “unfriendly”.

How do I make the postures “unfriendly” from when the scen loads?

Code: Select all

local v = ScenEdit_GetKeyValue("MySceneRunOnceMarker");
if (v==nil) or v~="1" then
    --..your code to set things to unfriendly here.
    --.. that said none of this should be really be necessary in the first place. 
    ScenEdit_SetKeyValue("MySceneRunOnceMarker","1");
end
That will make it so the set to unfriendly code only runs the very first time the scene is opened, upon reloads from save it will not happen(unless someone has manually changed the marker stored in the save).

You forgot to mention that with Issue 2 - The problem isn't seen in the editor but only the player.
ref for issue2: https://www.matrixgames.com/forums/view ... 3&t=262954

There is no pdf or scene attached even though post suggest there was, perhaps forgot to attach to the post?
Last edited by KnightHawk75 on Fri Mar 18, 2022 2:59 am, edited 1 time in total.
User avatar
Kennetho
Posts: 65
Joined: Sat Mar 24, 2018 7:23 am
Location: Denmark

Re: Now with attachments: Scenario build help - Autodetect

Post by Kennetho »

Hi Knighthawk,

Again, thanks for your help.

I tried running your above lua. But it fails.
Do I copy/paste the full lua or do I need to edit it?

Please see attachement from lua console.
Hostile scenedit lua.JPG
Hostile scenedit lua.JPG (81.1 KiB) Viewed 337 times
/Kenneth
User avatar
Kennetho
Posts: 65
Joined: Sat Mar 24, 2018 7:23 am
Location: Denmark

Re: Scenario build help - Autodetect

Post by Kennetho »

thewood1 wrote: Sun Mar 13, 2022 5:57 pm Do you really think that anyone can provide an answer without at least a save? How is anyone supposed to know what all of your settings are?
A 1000 apologies. :o
For some reason the attachments didn't ... well get attached.
Should be there now...
KnightHawk75
Posts: 1850
Joined: Thu Nov 15, 2018 7:24 pm

Re: Now with attachments: Scenario build help - Autodetect

Post by KnightHawk75 »

Attachment still missing for whatever reason.
Kennetho wrote: Thu Mar 17, 2022 7:23 pm Hi Knighthawk,

Again, thanks for your help.

I tried running your above lua. But it fails.
Do I copy/paste the full lua or do I need to edit it?
/Kenneth
Yeah you do, that's what I get for writing a snippet on the forums and not in the editor which I try to never do but I did.
use this... I mangled the setkeyvalue line without thinking as well as the if.

Code: Select all

local v = ScenEdit_GetKeyValue("MySceneRunOnceMarker");
if (v==nil) or v~="1" then
    --..your code to set things to unfriendly here.
    --.. that said none of this should be really be necessary in the first place. 
    ScenEdit_SetKeyValue("MySceneRunOnceMarker","1");
end
I have corrected the original post as well.
Post Reply

Return to “Tech Support”