Jump to content
Sign in to follow this  
Fantastic MR Fox

Custom Configuring the SOM Module, need help

Recommended Posts

So I'm trying to configure the SOM module but I cant seem to get it to work. It still runs as normal with the default settings in the mission. Here is what I have in my init.sqs:

private ["_pool", "_hq", "_callsigns", "_initialDelay", "_autoReinforce", "_secOpDistances", "_settings"];
_pool =
[
"ambush"
];

_hq = false;

//Team text, team speech, H.Q. text, H.Q. speech.
_callsigns = ["Alpha", ["Alpha"], "HQ", ["HQ"]];

//Delay in seconds before starting random SecOps selection.
_initialDelay = 60;

//Should an automatic Reinforce be triggered when there are casualties?
//Default is true.
_autoReinforce = false;

//Distance from player the missions spawn at.
_secOpDistances = [5000, 1000];

_settings =
[
_pool,
_hq, 
       _callsigns, 
       _initialDelay, 
       _autoReinforce
_secOpDistances
];

_som setVariable ["settings", _settings];

Can anyone tell me what I'm doing wrong here? I'm trying to change the distance from the player the missions spawn at, the time until the first one starts and which missions are used. Also is it possible to define what side will be spawned for the missions. It seems to default to US/RU but I need Takistani Insurgents. Any help would be appreciated.

Share this post


Link to post
Share on other sites

_settings =
[
       _pool,
       _hq, 
       _callsigns, 
       _initialDelay, 
       _autoReinforce
       _secOpDistances
];

_settings =
[
       _pool,
       _hq, 
       _callsigns, 
       _initialDelay, 
       _autoReinforce,
       _secOpDistances,
];

I'm not sure if you require the comma after _secOpDistances as it's the end, but you missed it out on _autoReinforce therefore ending there although that wouldn't break it completely and I can't spot anything else personally as I'm still way newbie at scripting.

Share this post


Link to post
Share on other sites

Ok got it figured out I found the SOM Module discussion thread and I'm currently working my way through it. For reference sake:

In init.sqs place this line near the start:

execVM somsettings.sqf

Then create somsettings.sqf and place this code into it

//Configure SOM module with custom settings. Must run during the first 2 seconds of a mission.

private ["_pool", "_hq", "_callsigns", "_initialDelay", "_autoReinforce", "_secOpSpacing", "_randomActivation", "_secOpDistances", "_settings"];

//List of secops.
//Default: ["ambush", "attack_location", "defend_location", "destroy", "escort", "patrol", "rescue", "search", "trap"]
_pool = ["ambush", "attack_location", "destroy", "escort", "patrol", "rescue", "trap"];

//Enable or disable HQ.
//Default: true
_hq = true;

//Team text, team speech, H.Q. text, H.Q. speech.
//Default: ["ALPHA", ["Alpha"], "H.Q.", ["HQ"]]
_callsigns = ["Razor", ["Razor"], "H.Q.", ["HQ"]];

//Delay in seconds before starting random SecOps selection. Only seems to affect the first secops.
//Default: 30
_initialDelay = 30;

//Should an automatic Reinforce be triggered when there are casualties?
//Default is true.
_autoReinforce = true;

//??? Delay between sec ops?
//Default: 30
_secOpSpacing = ((random 300) + 300);

//??? From 0 to 1. 0 means no secops starting. With 1 they do start. Some kind of chance variable?
//Default: 0.7
_randomActivation = 0.4;

//Min Max distance of sec ops.
//Default: [300, 700]
_secOpDistances = [5000, 10000];

_settings = [_pool, _hq, _callsigns, _initialDelay, _autoReinforce, _secOpSpacing, _randomActivation, _secOpDistances];

//BIS_SOM is module name.
BIS_SOM setVariable ["settings", _settings];

Name the SOM module (this is key part that wasn't clear to me before) BIS_SOM. You can see it referenced in the code above.

No answer yet on setting the enemy faction that the manager spawns for the mission. Hopefully the answer is contained somewhere later on in that thread. If I find it Ill post it again here for reference.

edit:

Damn, my hopes are crushed. Seems like its currently not possible to set the enemy faction spawned by the SOM. Or rather it would require a large amount of work and I don't have much hope BIS are going to fix it any time soon.

Edited by Fantastic MR Fox

Share this post


Link to post
Share on other sites

Nemorz is correct. You do not need that last comma.

Also, you can just put one of the following in the SOM init box:

this setVariable ["settings", [["ambush", "attack_location", "destroy", "escort", "patrol", "rescue", "trap"], "true", ["Razor", ["Razor"], "H.Q.", ["HQ"]], "30", "true", "300", "0.4", [5000, 10000]]];"

If you want to name the SOM, and the name is BIS_SOM:

BIS_SOM setVariable ["settings", [["ambush", "attack_location", "destroy", "escort", "patrol", "rescue", "trap"], "true", ["Razor", ["Razor"], "H.Q.", ["HQ"]], "30", "true", "300", "0.4", [5000, 10000]]];"

5000 to 10000 on the spawn distance will put you off the valid map grid.

EDIT: Ooops, forgot something. ... Yes! The answers to your questions are in the SOM thread. Another one of them being, NO, you cannot change the spawning factions.

Edited by CyOp

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×