Page 1 of 1

Now with attachments: Scenario build help - Autodetect

Posted: Sun Mar 13, 2022 4:47 pm
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 14 times
Tech support Baltic Brawl 2022.pdf
1
(350.9 KiB) Downloaded 5 times
Best
Kenneth Osbaeck
kennethosbaeck@me.com

Re: Scenario build help - Autodetect

Posted: Sun Mar 13, 2022 5:57 pm
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?

Re: Scenario build help - Autodetect

Posted: Mon Mar 14, 2022 2:48 am
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?

Re: Now with attachments: Scenario build help - Autodetect

Posted: Thu Mar 17, 2022 7:23 pm
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 336 times
/Kenneth

Re: Scenario build help - Autodetect

Posted: Thu Mar 17, 2022 7:24 pm
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...

Re: Now with attachments: Scenario build help - Autodetect

Posted: Fri Mar 18, 2022 2:58 am
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.