Jump to content

Slmod- multiplayer server mod for new mission logic functionality


Recommended Posts

Ah thanks Speed. I really appreciate this especially as it's such a basic problem.

 

Attached is the log file and the mission file. Note that the log has .txt added to it to bypass the forum file filters. Also, I'm doing a basic msg test now copied right from the SLmod manual but the results still fail when they shouldn't.

 

I've checked again that the files are all in the right places and directories. I also verified that I have wscrit.exe (and files are pointing to it) as I saw that was a problem for somebody else.

 

Running the EXE as an admin and this was a maual install of the NON Servman version.

 

This appears to be the key problem:

00069.798 ERROR Actions: [string "slmod.msg_out('Hawg1 destroy enemy bunker',..."]:1: attempt to index global 'slmod' (a nil value)

 

I shortened the string as I thought maybe the "," was causing issues.

 

I did some reading over at LUA and it seems that either I'm outputting nothing or the expected return is nothing...hence the nil. But that's as far as I've gotten.

 

Again, thanks...I've tried to do as much investigation on my own but I'm either missing the obvious (most likely) or there is something odd here with my set-up.

 

Slmod is not installed on your computer. Be aware that every time you do an auto-update, any modified files are moved to a _backup folder in the main DCS World directory. Thus, after an auto-update, you will need to select all files inside the _backup folder, then copy them back into the DCS World directory, merging all folders and copying and replacing (overwriting) all duplicate file names. It takes about five seconds.

 

Once I get back to my flying machine, I'll see if I can work out a proposed method with c0ff for making net mods more compatible with the auto-updater- but for now, you need to do this extra step after you do an auto-update.


Edited by Speed
  • Like 1

Intelligent discourse can only begin with the honest admission of your own fallibility.

Member of the Virtual Tactical Air Group: http://vtacticalairgroup.com/

Lua scripts and mods:

MIssion Scripting Tools (Mist): http://forums.eagle.ru/showthread.php?t=98616

Slmod version 7.0 for DCS: World: http://forums.eagle.ru/showthread.php?t=80979

Now includes remote server administration tools for kicking, banning, loading missions, etc.

Link to comment
Share on other sites

:censored:

 

Yep, that was it. Copies those two files back into their respective directories and poof, all is good.

 

Thank-you very much Speed. I'm sure this wont be the last question but I hope the future ones are a bit more challenging than this one...also hope to produce something that might amuse you too one day with this gem of a tool.

 

+10!

Link to comment
Share on other sites

Today, due to multiple requests, I added the "slmod_pause_when_empty" variable. If you set this variable true in \Saved Games\DCS\Slmod\config.lua, then your server will pause itself automatically if no clients are connected. When a client connects, it will unpause. However, even if this option is enabled, the server can be forced to pause if you are an admin and you use the "-admin pause" command.

 

I also added another option to \Saved Games\DCS\Slmod\config.lua, "slmod_admin_register_password". This allows you to set a password that allows players to register themselves as admins on the server by typing "-reg <password>" in chat.

 

Finally, I put the stats system aside (at least until I think of a solution for the UCIDs-changing problem, or it's fixed) for now. Started work on the AFAC functionality which will allow you to call in AI air strikes via chat messages.

 

I'll try to get Slmod version 6.2, which will include the admin tools (but no stats keeping and probably no AFAC functions) released within two weeks or so. Actually, there are so many changes to the internal guts I might be justified in calling it Slmod version 7.0. Who cares, just semantics.


Edited by Speed

Intelligent discourse can only begin with the honest admission of your own fallibility.

Member of the Virtual Tactical Air Group: http://vtacticalairgroup.com/

Lua scripts and mods:

MIssion Scripting Tools (Mist): http://forums.eagle.ru/showthread.php?t=98616

Slmod version 7.0 for DCS: World: http://forums.eagle.ru/showthread.php?t=80979

Now includes remote server administration tools for kicking, banning, loading missions, etc.

Link to comment
Share on other sites

Bug report: I still can't see the "donations" button anywhere.

 

:p

ChromiumDis.png

Author of DSMC, mod to enable scenario persistency and save updated miz file

Stable version & site: https://dsmcfordcs.wordpress.com/

Openbeta: https://github.com/Chromium18/DSMC

 

The thing is, helicopters are different from planes. An airplane by it's nature wants to fly, and if not interfered with too strongly by unusual events or by a deliberately incompetent pilot, it will fly. A helicopter does not want to fly. It is maintained in the air by a variety of forces in opposition to each other, and if there is any disturbance in this delicate balance the helicopter stops flying; immediately and disastrously.

Link to comment
Share on other sites

Today, due to multiple requests, I added the "slmod_pause_when_empty" variable. If you set this variable true in \Saved Games\DCS\Slmod\config.lua, then your server will pause itself automatically if no clients are connected. When a client connects, it will unpause. However, even if this option is enabled, the server can be forced to pause if you are an admin and you use the "-admin pause" command.

 

 

Thank you for that.

Is it included in the current version that is available for download ?

dUJOta.jpg

 

Windows 11 | i9 12900KF | 64GB DDR4 | RTX 3090 | TM Warthog HOTAS | Saitek Combat Rudder Pedals | TM MFDs + Lilliput 8" | TIR5 Pro

Link to comment
Share on other sites

Thank you for that.

Is it included in the current version that is available for download ?

 

No, not for at least a week. I have created it here on my laptop, but I can't test it because I'm away from my flying machine.

Intelligent discourse can only begin with the honest admission of your own fallibility.

Member of the Virtual Tactical Air Group: http://vtacticalairgroup.com/

Lua scripts and mods:

MIssion Scripting Tools (Mist): http://forums.eagle.ru/showthread.php?t=98616

Slmod version 7.0 for DCS: World: http://forums.eagle.ru/showthread.php?t=80979

Now includes remote server administration tools for kicking, banning, loading missions, etc.

Link to comment
Share on other sites

Hi Speed,

 

thanks for developing this modification. It powers up dcs by some nice features!

 

I have some questions regarding the stability and infrastructure of the modification. On our server we recently noticed on-going and contionous traffic after starting a dcs multiplayer mission combined with your modification.

 

Is there any passage in your modification which can cause network traffic? Maybe listening on a certain socket / port? Sending or receiving data from localhost, etc? I have had a short look to your lua scripts and found some net.* commands, however since I'm completly new to lua I don't even have a guess if such commands can cause network traffic?

 

The caused bandwidth is around 128 KBit/s and our switch recognizes this traffic as incoming traffic - but that's all we get to know...

Kind regards,

JaBoG32_Chrissi

Link to comment
Share on other sites

Hi Speed,

 

thanks for developing this modification. It powers up dcs by some nice features!

 

I have some questions regarding the stability and infrastructure of the modification. On our server we recently noticed on-going and contionous traffic after starting a dcs multiplayer mission combined with your modification.

 

Is there any passage in your modification which can cause network traffic? Maybe listening on a certain socket / port? Sending or receiving data from localhost, etc? I have had a short look to your lua scripts and found some net.* commands, however since I'm completly new to lua I don't even have a guess if such commands can cause network traffic?

 

The caused bandwidth is around 128 KBit/s and our switch recognizes this traffic as incoming traffic - but that's all we get to know...

 

No, there is no network code in it- that would require that the clients have Slmod code on their machines too to send that data- and then it wouldn't be Slmod anymore ;). The net commands refer to the "net" Lua environment (namespace). Except for net.send_chat, net.pause, net.resume, net.load_mission, these functions probably send no data over the network at all. Some of the other functions used should send data (such as a_out_text_delay) but the amount of data sent by all these functions should be FAR, FAR less than 128 kbps. And there is certainly no process in Slmod that should be continously sending data over the network. And as you point out, this network traffic you're noticing is incoming, not outgoing.

 

While very unlikely, I suppose it's within the realm of possibility that one of ED's C functions I am using has a bug that is causing the server to request excessive incoming traffic from clients. If you want to establish a causative relation, try uninstalling Slmod, running the server for a while, see if the traffic is gone, then reinstall it, see if the traffic comes back, then uninstall it again, see if it's gone, and reinstall it again and see if it's back. I'd say three times would be enough to warrant an investigation as to what could be going on. I've never seen anything like this, but then again, I've never compared network traffic with and without Slmod because Slmod should only cause a very slight, and intermittent, increase in outgoing traffic (as it sends chat messages/text messages to clients).

 

Edit: I need to ask- why would your switch recognize data being sent from localhost- localhost is the machine itself, right? The computer sending data to itself over one of its own ports, right? Why would your switch/router see that?


Edited by Speed

Intelligent discourse can only begin with the honest admission of your own fallibility.

Member of the Virtual Tactical Air Group: http://vtacticalairgroup.com/

Lua scripts and mods:

MIssion Scripting Tools (Mist): http://forums.eagle.ru/showthread.php?t=98616

Slmod version 7.0 for DCS: World: http://forums.eagle.ru/showthread.php?t=80979

Now includes remote server administration tools for kicking, banning, loading missions, etc.

Link to comment
Share on other sites

Edit: I need to ask- why would your switch recognize data being sent from localhost- localhost is the machine itself, right? The computer sending data to itself over one of its own ports, right? Why would your switch/router see that?

 

I already asked this point myself. I can't explain it either...

 

I've attached two files showing the traffic.

 

In the first picture you can see a continous incoming traffic around 128 KBit/s. In my opinion this traffic is generating some high cpu load which denies us from connecting via VNC or Remote Desktop and is therefore resulting in some sort of freeze.

 

At the same time this sort of block-traffic occurs, the lua.dll of dcs is generating an error report. You can see the error report in picture 2, line 2. => Name des fehlerhaften Moduls: lua.dll (name of module)

 

Does lua.dll manage the runtime of your modification?

 

The first graph:

Earlier before the traffic graph was generated, we had dcs running on our server. At some certain point there was a trigger, which caused this ongoing traffic you can see coming from the left and blocked us out from our own server. Roughly at time 1600 lcl we performed a hard-reset and startet dcs again around 2030 lcl. No problems so far and the traffic graph looks normal...

 

The second graph:

You can see dcs running between times 1600 and 2300 lcl. However, already at this point, the sort of block-traffic was caused. In the graph, you can see some passages straigth and level. At this point, we still had access to our server. However, after setting up the mission at 1200 lcl, the block-traffic was again caused and blocked us out from our server.

 

 

Before we used your modification we didn't encounter this problem. After doing a couple of hard resets on our server, we decided to deinstall slmod again. And again, we did not encounter this problem so far. So, we already did some testing. We will continue testing in the next days.

 

I hope the graphs provide some information in understanding our concern...

 

Maybe there is a passage in the script which results in an infinite loop, which causes our problem? What do you mean regarding the c functions in dcs by ed?

 

 

Thanks in advance for your help!

Unbenannt.JPG.101aa66734b5de595e45e8afc1d50483.JPG

Unbenannt1.thumb.jpg.db5713a6920d1e5d8c996af3f7cf0c57.jpg

Kind regards,

JaBoG32_Chrissi

Link to comment
Share on other sites

I already asked this point myself. I can't explain it either...

 

I've attached two files showing the traffic.

 

In the first picture you can see a continous incoming traffic around 128 KBit/s. In my opinion this traffic is generating some high cpu load which denies us from connecting via VNC or Remote Desktop and is therefore resulting in some sort of freeze.

 

 

Well, nothing in Slmod should be generating that much traffic, so if it is somehow related, it has to be a bug of some sort with DCS and Lua. I find this unlikely.

 

At the same time this sort of block-traffic occurs, the lua.dll of dcs is generating an error report. You can see the error report in picture 2, line 2. => Name des fehlerhaften Moduls: lua.dll (name of module)

 

Does lua.dll manage the runtime of your modification?

I need this error report, and I need dcs.log. dcs.log is at C:\Users\<Your Account Name>\Saved Games\DCS\Logs\dcs.log.

 

The first graph:

Earlier before the traffic graph was generated, we had dcs running on our server. At some certain point there was a trigger, which caused this ongoing traffic you can see coming from the left and blocked us out from our own server. Roughly at time 1600 lcl we performed a hard-reset and startet dcs again around 2030 lcl. No problems so far and the traffic graph looks normal...

 

The second graph:

You can see dcs running between times 1600 and 2300 lcl. However, already at this point, the sort of block-traffic was caused. In the graph, you can see some passages straigth and level. At this point, we still had access to our server. However, after setting up the mission at 1200 lcl, the block-traffic was again caused and blocked us out from our server.

 

 

Before we used your modification we didn't encounter this problem. After doing a couple of hard resets on our server, we decided to deinstall slmod again. And again, we did not encounter this problem so far. So, we already did some testing. We will continue testing in the next days.

 

I hope the graphs provide some information in understanding our concern...

 

Maybe there is a passage in the script which results in an infinite loop, which causes our problem? What do you mean regarding the c functions in dcs by ed?

 

Thanks in advance for your help!

 

I just can't see how Slmod could be generating that much net traffic. It doesn't work over the net! Personally, I think it's another case of Slmod being in the wrong place at the wrong time and getting blamed for something it has nothing to do with. People always point fingers at the mod first before they suspect the game. That has probably happened about 10 times in this thread already, and Slmod hasn't been to blame yet. However, I won't wholly discount the possibility that there is a problem of some kind. Slmod has been running on other dedicated servers just fine, with no issues logging in to them with team viewer.

 

What do you mean by "some kind of freeze"? An infinite loop in Lua will result in an infinite loop in the game (because they are on the same thread), but you will still be able to log into the server with remote desktop software. The game is stuck in an infinite loop, but to windows, it's still working. You should be able to log in to the server using whatever remote desktop software you use, see DCS frozen, and be able to kill it with the task manager. It should not lock you out.

 

Anyway, yea, run your server without Slmod a few days, see if the problem comes back- if it doesn't, reinstall Slmod, and see if the problem returns. If it does, then upload a dcs.log here. Hopefully, by that point, I will be back home, and I will be able to investigate stuff myself. Keep me posted how it goes!

Intelligent discourse can only begin with the honest admission of your own fallibility.

Member of the Virtual Tactical Air Group: http://vtacticalairgroup.com/

Lua scripts and mods:

MIssion Scripting Tools (Mist): http://forums.eagle.ru/showthread.php?t=98616

Slmod version 7.0 for DCS: World: http://forums.eagle.ru/showthread.php?t=80979

Now includes remote server administration tools for kicking, banning, loading missions, etc.

Link to comment
Share on other sites

Speed, may I point you to a posting i´ve made regarding instabilities in a mission that eventually led to the "freezing" Chrissi described.

 

http://forums.eagle.ru/showthread.php?t=94953

The attachment contains a number of dcs crashlogs, a dxdiag file and the miz-file in question.

 

Just to make sure, we´re not trying to blame Slmod for the issues we´ve experienced but we´re analyzing our problem in, what we belive is a systematic fashion. And with that we try to isolate the cause.

 

Thanks again for your effort with providing the community such a great tool.

 

Regards Herby

[sIGPIC][/sIGPIC]

Link to comment
Share on other sites

Speed, may I point you to a posting i´ve made regarding instabilities in a mission that eventually led to the "freezing" Chrissi described.

 

http://forums.eagle.ru/showthread.php?t=94953

The attachment contains a number of dcs crashlogs, a dxdiag file and the miz-file in question.

 

Just to make sure, we´re not trying to blame Slmod for the issues we´ve experienced but we´re analyzing our problem in, what we belive is a systematic fashion. And with that we try to isolate the cause.

 

Thanks again for your effort with providing the community such a great tool.

 

Regards Herby

 

Sorry if I sounded a little defensive, it's just that that I'm not saying Slmod isn't to blame, I'm just saying this:

Slmod is probably 100 to 1000 times less complex than DCS. However, Slmod is a mod that uses parts of DCS that the vanilla game doesn't. So for Slmod to be causing a problem, either it needs to have a bug (and generally, bugs in Lua do not cause things in the game to not work- the Lua simply won't work), or the parts of the game code it depends upon has to have a bug. Since the parts of the game code it depends upon is just a tiny percentage, and the mod is vastly smaller than DCS, it is very unlikely to be the root cause of a DCS problem you are having.

 

Also, in this particular case, since Slmod contains no network code, that makes it even less probable to be the source of the problem. If you were reporting something like, "game is freezing sometimes in missions that use Slmod", then I'd think it more likely that Slmod could be the cause. But excessive network traffic just makes no sense in relation to Slmod, which contains no network code.

 

Anyway, for any bugs you have with DCS itself, it's far more likely to be caused by DCS, or even, something outside of DCS interfering with DCS, than some comparatively small mod. That said, I still recommend uninstalling mods as one of the first steps to trouble-shooting. It's very easy to eliminate mods as a potential source of your problem then. And it also depends on the mod itself- things that significantly fool around with mission editor functionality or add new vehicles, that kind of stuff, are far more likely to cause problems than radio mods or server mods.

 

So anyway, like I said, keep me posted as to what you find. I can think of a few remote possibilities where Slmod could be involved, and of course, there could be something I haven't thought of yet.

 

As far as radio crashes go- one of the testers told me he thought he had found one with the Ka-50 radios. Contacting someone on the radio crashed him I think, at least once. I donno if it was reproduced though, I didn't check- I was getting ready to go on the trip that I am currently on. I hope to be getting back to testing soon so that I can help out to nail that potential bug down (among other things), if it hasn't been already.


Edited by Speed

Intelligent discourse can only begin with the honest admission of your own fallibility.

Member of the Virtual Tactical Air Group: http://vtacticalairgroup.com/

Lua scripts and mods:

MIssion Scripting Tools (Mist): http://forums.eagle.ru/showthread.php?t=98616

Slmod version 7.0 for DCS: World: http://forums.eagle.ru/showthread.php?t=80979

Now includes remote server administration tools for kicking, banning, loading missions, etc.

Link to comment
Share on other sites

What do you mean by "some kind of freeze"? An infinite loop in Lua will result in an infinite loop in the game (because they are on the same thread), but you will still be able to log into the server with remote desktop software. The game is stuck in an infinite loop, but to windows, it's still working. You should be able to log in to the server using whatever remote desktop software you use, see DCS frozen, and be able to kill it with the task manager. It should not lock you out.

 

I do not mean a typical freeze, where you're unable to move your mouse or do any keyboard input. By contrast, I think the server is still running normally when this block-traffic occurs, but cpu load goes up to 100% percent (maybe an infinite loop which is triggered in bad circumstances and has nothing to do with your mod). As a result of the cpu load, we're unable to login - because the server just doesn't has the freetime/power to handle vnc or remotedesktop process. I notice such an issue sometimes while doing some work in applications. When there is an infinite loop somewhere in the critical part of an application, it just kills anything else...

 

Maybe? I don't know what happens exactly in this moment, because we don't see it :/

 

But, as already mentioned by you, we will continue testing and hope to find the problem which triggers the problem...

 

Thanks so far for your postings!


Edited by JaBoG32_Chrissi

Kind regards,

JaBoG32_Chrissi

Link to comment
Share on other sites

Speed, for the radio crashes, could you reread the posting i linked above.

 

I´ve attached a number of missionfiles today which allow to reproduce that exact error.

 

Yea, but I can't do anything with them right now- still away from DCS, on a trip, and just able to use my crappy laptop. Quite likely, it's been reported already, but if not, I will make sure to do it when I get back.

Intelligent discourse can only begin with the honest admission of your own fallibility.

Member of the Virtual Tactical Air Group: http://vtacticalairgroup.com/

Lua scripts and mods:

MIssion Scripting Tools (Mist): http://forums.eagle.ru/showthread.php?t=98616

Slmod version 7.0 for DCS: World: http://forums.eagle.ru/showthread.php?t=80979

Now includes remote server administration tools for kicking, banning, loading missions, etc.

Link to comment
Share on other sites

Question on one of the functions;

I use unit in moving zone and right now in order to make it work properly you need to have three triggers to make this check whether a unit is in or out. One continuous trigger to set flags and two switch triggers to do actions based on whether the unit is in or out. Is there a way to modify the function so if the unit leaves the zone it resets the flag back to false. Wont this allow me to eliminate at least the continuous trigger? Right not if I have 10 groups check to see if they are near group B, I have to make 30 triggers. Also is there a way to use triggers in LUA script instead of through the mission editor? Arent these switch triggers If then statements? Thanks for the advice.

I was in Art of the Kill D#@ it!!!!

Link to comment
Share on other sites

It would be possible to modify it to turn off the flag, but I'm not sure that's a good idea. It could be added as an additional input variable, I suppose.

 

Right not if I have 10 groups check to see if they are near group B, I have to make 30 triggers.

I don't quite understand why you need 30 triggers. Can't you just do this?

slmod.units_in_moving_zones{ 
units = {
	'[g]EnemyTanks1', 
	'[g]EnemyTanks2', 
	'[g]EnemyTanks3', 
	'[g]EnemyTanks4', 
	'[g]EnemyTanks5', 
	'[g]EnemyTanks6', 
	'[g]EnemyTanks7', 
	'[g]EnemyTanks8', 
	'[g]EnemyTanks9', 
	'[g]EnemyTanks10'
	},
zone_units = {
	'[g]FriendlyTanks'
	},
radius = 6000,
flag = 101
}

****Note that Lua is not white space or carriage return sensitive, unlike crappy competing scripting languages **cough** Python **cough**. So the above code works just as well as if it had been all placed on a single line, but is VASTLY more readable.****

 

Flag 101 will be set true when any of the units within the groups "EnemyTanks1" through "EnemyTanks10" comes within 6000 meters of any of the units within the group "FriendlyTanks".


Edited by Speed

Intelligent discourse can only begin with the honest admission of your own fallibility.

Member of the Virtual Tactical Air Group: http://vtacticalairgroup.com/

Lua scripts and mods:

MIssion Scripting Tools (Mist): http://forums.eagle.ru/showthread.php?t=98616

Slmod version 7.0 for DCS: World: http://forums.eagle.ru/showthread.php?t=80979

Now includes remote server administration tools for kicking, banning, loading missions, etc.

Link to comment
Share on other sites

It would be possible to modify it to turn off the flag, but I'm not sure that's a good idea. It could be added as an additional input variable, I suppose.

 

 

I don't quite understand why you need 30 triggers. Can't you just do this?

slmod.units_in_moving_zones{ 
units = {
	'[g]EnemyTanks1', 
	'[g]EnemyTanks2', 
	'[g]EnemyTanks3', 
	'[g]EnemyTanks4', 
	'[g]EnemyTanks5', 
	'[g]EnemyTanks6', 
	'[g]EnemyTanks7', 
	'[g]EnemyTanks8', 
	'[g]EnemyTanks9', 
	'[g]EnemyTanks10'
	},
zone_units = {
	'[g]FriendlyTanks'
	},
radius = 6000,
flag = 101
}

****Note that Lua is not white space or carriage return sensitive, unlike crappy competing scripting languages **cough** Python **cough**. So the above code works just as well as if it had been all placed on a single line, but is VASTLY more readable.****

 

Flag 101 will be set true when any of the units within the groups "EnemyTanks1" through "EnemyTanks10" comes within 6000 meters of any of the units within the group "FriendlyTanks".

 

Got this. My dilemma is when the unit leaves the zone. I was hoping that flag 101 would be set to false if they leave the zone. I use this function to check whether a group is in or out of supply. I do this check for each group. So at this time I have to do the following for each group (creating a new set of flags for each group);

Continuous Trigger

condition - Time Since flag (102,60)

Action - Set flag off (101), Set Flag off (102)

 

Switch Trigger

Condition - Flag is True (101)

Action- Group AI On ( group enemy Tanks 1)

Flag on (102)

 

Switch Trigger

Conditions - Flag is false (101)

Action - Group AI Off ( group enem Tanks 1)

 

If the Function can reset the flag to False when the unit leaves the zone wont this eliminate the need for continuous Trigger and possibly the first switch trigger? Now Ive gone from 3 triggers to 1 trigger per group.

I was in Art of the Kill D#@ it!!!!

Link to comment
Share on other sites

The reason the function works as it is- it leaves the flag on rather than turn it back false- is that it is more logically complete. If the function automatically turned it back off, then your trigger logic might miss momentary "in zone" events that you would actually want to detect (the documentation might not say so, but the interval variable, that determines how often you check for "in zone" status, can actually be set to a number less than 1- so you could use this to detect fast moving objects very quickly passing through a small zone). Furthermore, if you were trying to do this same thing through triggers, you'd have to have extra trigger logic to turn off the flag when the units were outside of zone as well. "Momentary" triggers do not exist by themselves, you have to build them. For these two reasons, I decided to make the behavior that the flag turned on and stayed on.

 

Additionally, the point of Slmod, in this function's case, is to simply trigger logic, which it does- if you had 10 "zone units" and 10 units, you'd need at least 100 triggers. Three is a HELL of a lot better than 100. So Slmod succeeds in this, and I considered the functionality "good enough". You are correct though- it could be made even more simple for some cases. What I need to do is provide a further optional variable to some functions that, if set true, makes it so flags turn off if the conditions that function detects are no longer being met.

 

You don't need three triggers to make the flag that Slmod modifies constantly reflect the condition the function detects. When the conditions are being met, the flag is being set true every interval seconds (interval is an optional input variable of several Slmod functions, including units_in_moving_zones). Remember that the interval variable defaults to 1 if not specified. So if you need a flag to continuously reflect the in zone/out of zone condition, and interval is 1, then do this:

 

Switched -> Time Since Flag (X, 2 seconds) -> Flag off (X)

 

Remember that the game's internal "time since flag" timer is reset to zero every time the flag is set true, even if it was already true.

 

If you specify the interval variable of the slmod.units_in_moving_zones function to a time less than 1 second, then you could even reduce the time since flag number from 2 to 1.

 

Finally, avoid Time Since Flag (X, Y seconds), where Y is some number equal to, or very close to, the value of interval- the behavior of this is likely not deterministic. That's why I used Time Since Flag(X, 2)- interval was 1. If interval had been 10, then I would have used Time Since Flag (X, 11).


Edited by Speed

Intelligent discourse can only begin with the honest admission of your own fallibility.

Member of the Virtual Tactical Air Group: http://vtacticalairgroup.com/

Lua scripts and mods:

MIssion Scripting Tools (Mist): http://forums.eagle.ru/showthread.php?t=98616

Slmod version 7.0 for DCS: World: http://forums.eagle.ru/showthread.php?t=80979

Now includes remote server administration tools for kicking, banning, loading missions, etc.

Link to comment
Share on other sites

slmod.units_LOS

 

slmod.units_LOS( table unitset1, number altoffset1, table unitset2, number altoffset2, number

flag, number stopflag, number interval, number checks, number radius)

 

Notes:

This function DOESwork on multiplayer client aircraft!

 

Hei Speed,

 

Can I use that function on multiplayer session with AI....just to understand...I can not use that as client in multiplayer but bettwen AI´s I can use?!?

 

Thanks brow.

Link to comment
Share on other sites

Speed wanted to drop a line to let you know your switch command was exactly what I needed. In combination with making Lua script files to load all the move in zone scripts I was able to eliminate and simplify my mission trigger load. Now it works beautifully. Ive got an entire Heavy Brigade Combat Team all going through supply checks with their HQ units to keep unit integrity in the mission. Thanks much for your help.

I was in Art of the Kill D#@ it!!!!

Link to comment
Share on other sites

slmod.units_LOS( table unitset1, number altoffset1, table unitset2, number altoffset2, number

flag, number stopflag, number interval, number checks, number radius)

 

Notes:

This function DOESwork on multiplayer client aircraft!

 

Hei Speed,

 

Can I use that function on multiplayer session with AI....just to understand...I can not use that as client in multiplayer but bettwen AI´s I can use?!?

 

Thanks brow.

 

Sorry for the late response. See my signature, I updated it so I don't have to keep telling folks :)

 

The slmod.units_LOS works with all ground units and air units, be they human controlled or not.

Intelligent discourse can only begin with the honest admission of your own fallibility.

Member of the Virtual Tactical Air Group: http://vtacticalairgroup.com/

Lua scripts and mods:

MIssion Scripting Tools (Mist): http://forums.eagle.ru/showthread.php?t=98616

Slmod version 7.0 for DCS: World: http://forums.eagle.ru/showthread.php?t=80979

Now includes remote server administration tools for kicking, banning, loading missions, etc.

Link to comment
Share on other sites

Speed does slmod.mapobj_destroyed also apply to static objects placed on the map. Is there a function that checks the health of static objects

mapobj_destroyed only works on map objects.

 

Currently, there is no method of checking the health of mission-specific static objects in Slmod. The reason is there is no easy way to check static object health through Lua.

 

There will probably be a method to check mission-specific static object health in the scripting library that Grimes and I are working on. I could probably port the code into Slmod too. The method I created to do this is to correlate the location of the destroyed object to the known locations of the static objects at mission start. If an object that was destroyed is at the same location that a static object was, and the object that was destroyed was not a unit of some sort, then the object that was destroyed was almost certainly the static object.


Edited by Speed

Intelligent discourse can only begin with the honest admission of your own fallibility.

Member of the Virtual Tactical Air Group: http://vtacticalairgroup.com/

Lua scripts and mods:

MIssion Scripting Tools (Mist): http://forums.eagle.ru/showthread.php?t=98616

Slmod version 7.0 for DCS: World: http://forums.eagle.ru/showthread.php?t=80979

Now includes remote server administration tools for kicking, banning, loading missions, etc.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...