Jump to content

Slmod for DCS 1.5/2.0


Recommended Posts

Well, looks like I'm not quick enough ^^

Zip - VEAF :pilotfly:

 

If you want to learn, talk and fly with french-speaking friends, the Virtual European Air Force is here for you ! Meet us on our Discord and our forum

If you're a mission creator, you may want to check the VEAF Mission Creation Tools (and its GitHub repository) a set of open-source scripts and tools that make creating a dynamic mission a breeze !

Link to comment
Share on other sites

Heh, no worries: you actually kicked my brain into gear and helped me figure it out, so: thanks a lot, man - much appreciated!

i7 - 9700K | 32 GB DDR4 3200 | RTX 2080 | VKB Gunfighter Mk II /w MCG Pro | Virpil T-50CM2 Throttle | TrackIR 5 | VKB Mk. IV

 

AJS-37 | A/V-8B | A-10C | F-14A/B | F-16C | F-18C | F-86F | FC3 | JF-17 | Ka-50 | L-39 | Mi-8 | MiG-15bis | MiG-19 | MiG-21bis | M2000-C | P-51D | Spitfire LF Mk. IX | UH-1H

Link to comment
Share on other sites

You're welcome ! Fly safe, and fly high !

Zip - VEAF :pilotfly:

 

If you want to learn, talk and fly with french-speaking friends, the Virtual European Air Force is here for you ! Meet us on our Discord and our forum

If you're a mission creator, you may want to check the VEAF Mission Creation Tools (and its GitHub repository) a set of open-source scripts and tools that make creating a dynamic mission a breeze !

Link to comment
Share on other sites

  • 2 months later...

anyone figure out why the config rewrites itself yet?


Edited by Chandawg

| CyperPower PC | AMD Ryzen 7 3700X @ 4.4 GHz | 64Gb DDR4 3200 MHz | Radeon RX 5700 8Gb | 32" Samsung Curve| Oculus Rift S | Thrustmaster T160000 HOTAS + Rudder Pedals | Windows 10-64 |

Link to comment
Share on other sites

Which branch of slmod and what version is it loading?

 

It creates a new config for two reasons.

1. The old config is corrupted in some way and it errors in reading it.

2. The config version doesn't match the expected version, so it backs up the old file and creates a new file which likely has new entries. If this is the case you need to manually copy your settings over.

 

I need to come up with a better solution to updating the config. Perhaps whenever I get around to working on the 7_6 version.

The right man in the wrong place makes all the difference in the world.

Current Projects:  Grayflag ServerScripting Wiki

Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread)

 SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum

Link to comment
Share on other sites

is it possible to ignore kamakazi jsut for one thing eg carriers .....

some of the less capable pilots splatter over carriers when trying to land

was wondering if there could be an "ignore carrier kamakazi" flag config flag

added so that people are not penalised for it

 

 

Many thanks for keeping this very useful mod updated and work, have a great weekend

No more pre-orders

Click here for tutorials for using Virpil Hardware and Software

 

Click here for Virpil Flight equipment dimensions and pictures.

.

Link to comment
Share on other sites

Yeah it is possible, it is more a question of practicality and how to organize it. Being a blanket server wide setting, only apply to certain unit types or names, or something you can set on a per mission basis.

 

Suppose there is reason to add it if you have teamhits enabled but the ship is set to invincible. Even if its not invincible the player isn't likely to be the one to get credit for sinking it, well maybe the last one would. You can mitigate it by setting autoAdmin.teamCollisionHit.penaltyPointsAI = 0. Messages will still appear and the hit will be logged, but no points will be applied. I do have a spam filter for hit messages working in a test build, I just need to complete the other stuff I was working on before pushing it to git. Its not the 7_6 build just yet, but I've made some changes to try and prevent the player death code failing in addition to an experiment in saving the LSO grade from the carrier DLC. As mentioned elsewhere it does require some guess work and saving wave-offs isn't current practical.

The right man in the wrong place makes all the difference in the world.

Current Projects:  Grayflag ServerScripting Wiki

Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread)

 SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum

Link to comment
Share on other sites

@Grimes

 

<ALLIES>: This server is running Slmod version 7_5, build 119

 

When you say manually copy the settings, you mean from oldConfig to Config?

 

Also it maybe doing this because, we need last part of the missionScripting commented out.

 

--Stepanovich's code starts again below.
do
--sanitizeModule('os')
--sanitizeModule('io')
--sanitizeModule('lfs')
--require = nil
--loadlib = nil
end


Edited by Chandawg

| CyperPower PC | AMD Ryzen 7 3700X @ 4.4 GHz | 64Gb DDR4 3200 MHz | Radeon RX 5700 8Gb | 32" Samsung Curve| Oculus Rift S | Thrustmaster T160000 HOTAS + Rudder Pedals | Windows 10-64 |

Link to comment
Share on other sites

Yeah it is possible, it is more a question of practicality and how to organize it. Being a blanket server wide setting, only apply to certain unit types or names, or something you can set on a per mission basis.

 

Suppose there is reason to add it if you have teamhits enabled but the ship is set to invincible. Even if its not invincible the player isn't likely to be the one to get credit for sinking it, well maybe the last one would. You can mitigate it by setting autoAdmin.teamCollisionHit.penaltyPointsAI = 0. Messages will still appear and the hit will be logged, but no points will be applied. I do have a spam filter for hit messages working in a test build, I just need to complete the other stuff I was working on before pushing it to git. Its not the 7_6 build just yet, but I've made some changes to try and prevent the player death code failing in addition to an experiment in saving the LSO grade from the carrier DLC. As mentioned elsewhere it does require some guess work and saving wave-offs isn't current practical.

 

 

thanks for replying , if autoAdmin.teamCollisionHit.penaltyPointsAI = 0

 

people could just crash into each other deliberately with no consequences ?

Indeed a best way to handle this .. not sure, but from running a busy training server .. a lot of people do go splat (by mistake) I just dont want to penalise them but still want to stop people doing kamakasi stuff on each other

No more pre-orders

Click here for tutorials for using Virpil Hardware and Software

 

Click here for Virpil Flight equipment dimensions and pictures.

.

Link to comment
Share on other sites

@Grimes

 

<ALLIES>: This server is running Slmod version 7_5, build 119

 

When you say manually copy the settings, you mean from oldConfig to Config?

 

Also it maybe doing this because, we need last part of the missionScripting commented out.

 

Yeah manually edit the file. Check the old config and the new, at the bottom there will be an entry for the config version. If that number isn't what slmod expects, then it will create a new copy. It doesn't matter if you changed anything else in the code.

 

 

thanks for replying , if autoAdmin.teamCollisionHit.penaltyPointsAI = 0

 

people could just crash into each other deliberately with no consequences ?

Indeed a best way to handle this .. not sure, but from running a busy training server .. a lot of people do go splat (by mistake) I just dont want to penalise them but still want to stop people doing kamakasi stuff on each other

 

There are two sets of points, one for AI and one for players. So if a player runs into another player they get whatever the penaltyPointsHuman value is. If they collide with AI they get the penaltyPointsAI score. I'd suspect running into tankers or other AI is less likely than the back of the boat.

The right man in the wrong place makes all the difference in the world.

Current Projects:  Grayflag ServerScripting Wiki

Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread)

 SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum

Link to comment
Share on other sites

Is it possible to execute, scripts from the chat window, say spawn tankers? Also I would like to have clients register to a side on join, is this possible and does anyone have a sample of creating a table from client input? Finally, where do I place the tasks, and is it possible to create tasks from the chat window? I know lots of questions, I just started playing around with slmod, this past week.

| CyperPower PC | AMD Ryzen 7 3700X @ 4.4 GHz | 64Gb DDR4 3200 MHz | Radeon RX 5700 8Gb | 32" Samsung Curve| Oculus Rift S | Thrustmaster T160000 HOTAS + Rudder Pedals | Windows 10-64 |

Link to comment
Share on other sites

The PDF manual has some documentation on your questions. Unfortunately I don't have access to the original document of it, so I haven't been able to update it, but it is still relevant to any of the older features.

 

Is it possible to execute, scripts from the chat window, say spawn tankers?

 

One of the earliest features of slmod that made it useful was the ability to use chat commands to set a flag in the triggers. I have not expanded on this further to execute specific function calls, but you can do it by running certain code based on a flag value. Its one of the few parts of slmod that Speed originally wrote that I've never heavily looked into or modified, but calling a global function should be possible.

 

To set a flag you can make a script function call in your mission with:

 

slmod.chat_cmd('respawn tanker', 1101, 1102, 'blue')

 

This will check to see if the player is on the blue coalition, if they are then it will set flag 1101 to true. If you set flag 1102 to true then the command will effectively be disabled.

 

 

Also I would like to have clients register to a side on join, is this possible and does anyone have a sample of creating a table from client input?

 

At present I do not have any coalition or slot blocking code in slmod. It is something I'd like to add, but haven't got around to it. Blocking slots or doing stuff based on chat are both part of the network API and the callbacks used.

 

 

Finally, where do I place the tasks, and is it possible to create tasks from the chat window? I know lots of questions, I just started playing around with slmod, this past week.

 

Are you asking about the Parallel Tasking System? If so it is similar to the chat_cmd function. The documentation is in the PDF should get you started. I need to add though that both of those were created at a time specifically when the F10 "Other" radio menu only worked for the host and before the mission commands scripting functions were added. Its honestly better to do stuff only within the mission scripting environment if you can than to use a server side mode for it.

The right man in the wrong place makes all the difference in the world.

Current Projects:  Grayflag ServerScripting Wiki

Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread)

 SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum

Link to comment
Share on other sites

Hi guys,

 

We have recently started using SLmod on our server. One of the reason for using it is that we tend to run a high percentage of missions that have time critical elements to them.

 

It does't matter how many times we tell people not to join the server, there is always that one who just does and in doing so he starts the mission timers which then messes the whole mission goals up.

 

One of our members has used SLmod before and said there was a mission pause feature so that the mission is paused at start.

 

We tried it last and all workd fine when an admin was in the pit, but as soon as someone else joined a slot, the mission un paused. The admin had to keep manually pausing the mission after each person joined so that once everyone was in the pit he could then release the mission.

 

Is there any way that it can be setup so that when paused at start, it will stay paused no matter how many people join, and will have to be manually unpaused by an admin?

 

Thanks

 

Richard

Link to comment
Share on other sites

First off, make sure the server is set to "Resume Manual" on the server GUI page under advanced. The server settings and slmod can tend to "fight" if the game settings are on anything other than manual.

 

Two main ways to do this.

1. In slmod config there is a setting: pause_when_empty. Set it to false. With it and the server side resume manual set, then the admin has the only control of pausing and unpausing the server.

2. With pause_when_empty set to true and manual resume set, the admin can use the command "-admin override pause" in chat to force admin only control over pausing/resuming the server.

 

 

So its basically change the config setting in slmod each time or use an admin command without messing with the config.

The right man in the wrong place makes all the difference in the world.

Current Projects:  Grayflag ServerScripting Wiki

Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread)

 SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum

Link to comment
Share on other sites

  • 2 weeks later...

So i have been trying to find some information on this.

How do you unban someone if they have been autobanned??

 

They do not show up in the Banned Client file due to it not being an Permaban.

Do i have to remove their points/stats and restart the server?

Link to comment
Share on other sites

Two main ways to do it. One is to manually edit the file and the other is via admin chat commands.

 

To edit the file, take the server down, find the user in the penalty stats file, find their offenses and either delete a given entry or add an entry of ['forgiven'] = true, to it. Double check you didn't screw up any of the lua formatting and launch the server.

 

Admin chat command is a bit easier to do all you need to know is their UCID. Connect to the server as an admin or do it via the web control.

Type this into chat:

 

-admin score statID <id>

 

It will return a list penalties that they have. You can then forgive each one that you want to with:

 

-admin forgive <id> <type> <index>

 

Type will be one of the following depending on the penalty type. tk, th, ck, ch. So for instance this would forgive the penalty at index 2 for the player with a ucid of 'abcdef'

 

 

-admin forgive abcdef tk 2

The right man in the wrong place makes all the difference in the world.

Current Projects:  Grayflag ServerScripting Wiki

Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread)

 SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum

Link to comment
Share on other sites

Before I go hacking away, is there an easy way to suppress the startup messages?

| CyperPower PC | AMD Ryzen 7 3700X @ 4.4 GHz | 64Gb DDR4 3200 MHz | Radeon RX 5700 8Gb | 32" Samsung Curve| Oculus Rift S | Thrustmaster T160000 HOTAS + Rudder Pedals | Windows 10-64 |

Link to comment
Share on other sites

Disable Message of the Day in the config. Should stop it from appearing on aircraft select.

The right man in the wrong place makes all the difference in the world.

Current Projects:  Grayflag ServerScripting Wiki

Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread)

 SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum

Link to comment
Share on other sites

Two main ways to do it. One is to manually edit the file and the other is via admin chat commands.

 

To edit the file, take the server down, find the user in the penalty stats file, find their offenses and either delete a given entry or add an entry of ['forgiven'] = true, to it. Double check you didn't screw up any of the lua formatting and launch the server.

 

Admin chat command is a bit easier to do all you need to know is their UCID. Connect to the server as an admin or do it via the web control.

Type this into chat:

 

-admin score statID <id>

 

It will return a list penalties that they have. You can then forgive each one that you want to with:

 

-admin forgive <id> <type> <index>

 

Type will be one of the following depending on the penalty type. tk, th, ck, ch. So for instance this would forgive the penalty at index 2 for the player with a ucid of 'abcdef'

 

 

-admin forgive abcdef tk 2

 

Thank you Grimes for that! Chat commands do look easier to use.

I did check the manual but i couldn't see a procedure for it. I did look at the commands but i haven't had the time to read and understand all of the commands yet.

Link to comment
Share on other sites

The manual is severely out of date. I don't have the source file for the pdf. Eventually I'll get everything or at least anything not documented in the manual onto the main wiki on github.

The right man in the wrong place makes all the difference in the world.

Current Projects:  Grayflag ServerScripting Wiki

Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread)

 SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum

Link to comment
Share on other sites

  • 2 weeks later...

Development build got a patch to 7_5 v 122.

 

https://github.com/mrSkortch/DCS-SLmod/tree/develop

 

Gist of it is a bunch of changes to attempt to prevent the log and stat spam from occurring when an unlogged error occurred, thus failing to complete the function and telling the code to no longer think that unit is dead and uncounted for. If it fails it'll let you know once and add the appropriate log message for me to try and debug from it.

 

AutoAdmin

-Fixed issue where penalties were being assessed for penaly actions that would have added 0 to a users score. If a use had enough points to get kicked, they did some action that didn't add to their score, they'd still get kicked. That is now fixed.

 

Menu

-Modified logging to be more descriptive of what it is doing. This is commented out anyway.

 

Stats:

- Added runDeathLogicChecker to remove log and stats spam if runDeathLogic failed to clear for a given unit.

-Changed number of writes before close/reopen of stats file to 10000 from 1000

- Added logger parameter for advChangeStatsValue

- Fixed locality issue for saved nest values.

- Added insertAt for advChangeStatsValue to isnert a value at a specific point in a table.

- Added spam filter for friendly hit messages. Only one should occur for each target every 10 seconds.

- Fixed issue with stats not sending the correct penalty type to autoAdminCheckForgiveOnOffense

- Scheduled autoAdminCheckForgiveOnOffense to occur rather than adding it to the bottom of the function.

- Added tracking for Carrier Wire and LSO score. Currently no way to query for user. Is dependent on the game to send message comment with LSO grade in it.

- Added attempt to bug test by faking an AI as a client. Functionality is dormant.

- Moved multiCrewNameCheck and parseOutExtraClientData higher in the code to address potential locality issue.

- Changed locality of initClient when iterating events

- Fixed failure to display stats if a PvP or Losses entry was missing.

- Fixed bug with adding stats if part of an entry was added.

The right man in the wrong place makes all the difference in the world.

Current Projects:  Grayflag ServerScripting Wiki

Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread)

 SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum

Link to comment
Share on other sites

Hi Grimes !

You didn't approve my pull request ; is there a problem with it ?

We use it on our server and it's dope : I programmed a simple way to link mission code to an automatic flag and a chat command, effectively running things in mission space with chat commands !

Zip - VEAF :pilotfly:

 

If you want to learn, talk and fly with french-speaking friends, the Virtual European Air Force is here for you ! Meet us on our Discord and our forum

If you're a mission creator, you may want to check the VEAF Mission Creation Tools (and its GitHub repository) a set of open-source scripts and tools that make creating a dynamic mission a breeze !

Link to comment
Share on other sites

  • Recently Browsing   0 members

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