Jump to content

Speed

Members
  • Posts

    4139
  • Joined

  • Last visited

  • Days Won

    11

Everything posted by Speed

  1. Why not use invulnerability setting? If that's not a possibility, you can do it with the scripting engine. I created a script a few months ago that you can just insert into any mission that detects incoming missiles that are going to hit a unit and destroys them once they get within a certain radius with trigger.action.explosion. The idea was to eventually turn it into a script that simulates an active protection system. I got busy before I could complete the APS simulation part of the script, but the destroying-incoming-missiles part works fine. I could upload it if you are interested.
  2. mladen: After examining hte log file you most recently provided, an area that I suspect could be involved with this issue is with passworded servers. If you try to connect with the wrong password, it might be that the server.on_connect function is not being called, but the server.on_disconnect function is being called, leading to the client count getting out of sync with the actual number of clients. Like I said, the problem should be temporarily fixed with the code I provided two posts back, but if you could, while running that code, try connecting with the wrong password, that might confirm my suspicions.
  3. Well, if I need to release a new version of Slmod to fix bugs in the current one, then I could probably include a chat log. Last I checked, file appending was disabled (weird) but I believe ED provided some logging functions so I could make my own log. I could time/date stamp each log file so that they didn't overwrite each other. Tomorrow I should FINALLY have my flying machine set up and ready, so I could possibly get started then.
  4. OK, I am unable to test the following code, but it should provide a temporary fix your problem, no matter what the cause is (personally, I think it could be a problem with ED's callback functions). Please replace the SlmodMain.lua and the SlmodTests.lua in ./Scripts/net/Slmodv6_2 with the two attached files. Again, these files are untested at the moment, but I checked through their code a few times so they SHOULD work. I added a bunch of debug messages so that hopefully, the real problem makes itself clear. Also, I added some code that SHOULD double-check the client counter periodically and correct any errors in it- that is the code that should hopefully fix your problem. It only runs every 20 seconds, so you still could get a pause for up to 20 seconds where the old problem would have occurred. If you could kindly run the attached files for a long time in your server, and then upload dcs.log, I would be highly appreciative. It should go a long way towards a more permanent solution to the problem. SlmodMain.lua SlmodTests.lua
  5. Speed

    Instructors

    I respectfully disagree. When I teach someone to operate the A-10C, I DON'T say, "press the big red button" or "press up on the hat under your thumb upwards". No, I give the actual HOTAS command: "press China hat forward long" or "TMS up short". IMO, it is vital that pilots learn the actual A-10C HOTAS buttons, and what they do. So all that matters s that you know what buttons on your joystick correspond to what A-10C HOTAS commands. That means, you need to either memorize that first, or have a quick reference sheet.
  6. What exactly do you want? JTAC? Something else?
  7. There exists no known location in Lua that I know of that sets what systems are on when the plane is air-started. However, in the export Lua environment, you can get and set aircraft switches/gauges. But that's a lot of work for very little gain- I can't see how it would be worth it just for setting initial switch settings for an air start aircraft. Anyway, I believe the function you would need to use in the export Lua environment is the GetDevice function, but I can't confirm that because I do not have access to my flying computer at this time. I haven't done a lot of work in the export Lua environment, I did just enough to learn its capabilities and limitations and utilize a handful of functions.
  8. So what was the problem this log illustrates? From my reading of the log, it looks like the pause when empty feature was working just fine for quite some time, then everyone left. Approximately 4 hours later, Hammer began a join attempt. The game refused to unpause for him. Is that what happened? If so, that would match the symptoms I would expect if the earlier potential problem I found is, in fact, a problem. Did midnight occur for the server between the time when the pause when empty feature was working, and the time it stopped working? BTW, reloading the mission should fix the problem, so a simple -admin restart SHOULD fix the problem. Anyway, I'm attaching a potentially fixed SlmodMain.lua. I have no way of testing it for several days (see my signature). It's identical to your current one except I have replaced two net.get_real_time calls with calls to os.time. Hopefully, that fixes the problem, Please let me know! I like to avoid os.time as much as possible though, because supposedly it can be operating system dependent. SlmodMain.lua
  9. Ok, I found a potential flaw with the pause when empty logic, but it wouldn't cause the server to pause when there are actually players in it. This is the logic: if slmod_pause_when_empty and (net.get_real_time() > slmod_mission_start_time + 8) then -- 8 second window to hopefully always avoid the CTD if not net.is_paused() then slmod_pause_forced = false -- turn off the forced pause if the server is not paused for any reason. end if not slmod_pause_override then if (not slmod_num_clients or slmod_num_clients == 0) and not net.is_paused() then net.pause() elseif slmod_num_clients and slmod_num_clients > 0 and net.is_paused() and (not slmod_pause_forced) then net.resume() end end end if net.get_real_time() rolls over at midnight, then the pause_when_empty setting could stop working at midnight- the server would not pause again when it was empty- until the mission was reset. I'll check it out when I get the time.
  10. I'll look into it. If there's a problem, I'd suspect something with the server.on_connect and server.on_disconnect callback functions... I sure hope not though. Next time you see it happen, upload C:\Users\<Your User Account>\Saved Games\DCS\Logs\dcs.log. Also, every single bit of info you provide could be helpful (like for example, do you have Servman installed?) I ran with the server pause when empty option enabled for about a week on the VTAG dedicated server with no issues. Also, be sure that you understand that even with the server pause when empty option available, is it possible to override it. "-admin pause override" turns it off until the server is restarted. So if you have the pause override enabled and clients join, the server will not unpause. Also, the -admin pause command can force the server to pause even if the pause when empty option is enabled and clients are connected.
  11. Odd. I could have messed something up, but when I did essentially the same test as this, it worked. Did Slmod actually respond to you? After you type -reg, Slmod should respond to you with: "Please enter the password to register you as a server admin (your next chat message in this mission will not be publicly displayed)." If you don't see that, the registration menu is either not working or not enabled. If you enter the password correctly, then it will say, 'Slmod: you have been registered as an admin on this server.' and if you type the password wrong, it will say, 'Slmod: invalid password. DO NOT ATTEMPT TO RE-ENTER THE PASSWORD. Type "-reg" again in chat to start over again!' And just to be 100% clear, you did set slmod_admin_register_password = 'foo' AND NOT slmod_admin_register_password = foo right? It looks like you're implying the former (which is the correct way), and not the latter, but I have to make sure. Anyway, I can't test for myself right now because my gaming PC is packed away. If by some chance the password-based registration menu is broken, then you'll just have to get by with "-admin add <player name>" ;)
  12. What's with Servman 301? Some say it works, some say it doesn't. ----------------------------- Anyway, it would be nice if Servman could hold out a little longer, there should still be a use for it, at least for its chat logs, autoban, mission voting, etc.- I don't plan on working on specialized public server tools in the next Slmod version, at least not at this time (my plans are always changing though). Right now, I'm thinking that the next version of Slmod will likely focus on the getting the stats system up and running, but first I need to get around to completely re-writing the data passing code (what sends your commands from the mission scripting environment to the net environment) to make it much more efficient and clean. The current code is about 1.5 years old and is from a time when I didn't know nearly as much about Lua as I do now. There is no need anymore to print statements to dcs.log, for example, not now that is possible to mod MissionScripting.lua to include a sandboxed io library and create functions to write files directly, or even better yet, use LuaSocket. Meanwhile, with the scripting engine now publicly released, I am slowly working on the AFAC functions at last. Currently, only their "skeleton" exists though (see SlmodCmdblAir.lua). Maybe the next Slmod version can have an initial, basic versions of them without all the bells and whistles I'd like to eventually have. I need to come up with a design that is capable of being slowly scaled up in complexity.
  13. That was actually just the "debugger" that was added in Slmodv6.0 detecting a syntax error in the code. I added it to help alert people when they had messed something up in their code, so that they could see that there was an error right away and not have to go digging through dcs.log for it. The problem is, it's a little obsolete now because it only checks AI triggered actions and DCS is also now a lot more obnoxious when you make a Lua error (removing much of the necessity of this feature), so I probably either need to remove it entirely or upgrade it to search all possible locations that Lua can be entered.
  14. Actually, I think the bearing will always be between 0 and 6... you see, I forgot to convert from radians to degrees :lol: When I tested it real quick, the target was just north of bullseye so of course I didn't notice anything wrong :doh: This should be the corrected script: do --Script that sends a bullseye location of a unit to coalition. Created by "Speed". local unitName = 'C-17 #1' -- change to the name of the unit local coa = coalition.side.BLUE -- change to coalition.side.RED if you want red coalition local msg = 'Enfield1, this is Crystal Palace, the friendly transport is now at bullseye %s' --change to the desired message, %s is where the bullseye coords will go. local displayTime = 20 --time the message will be displayed local metric = false -- if metric == false, then bullseye distance is in nautical miles; change to true to put bullseye distance in kilometers. -- change nothing below this line. --------------------------------------------------------------- local unit = Unit.getByName(unitName) if unit then local function round(num, idp) local mult = 10^(idp or 0) return math.floor(num * mult + 0.5) / mult end local function getNorthCorrection(point) --gets the correction needed for true north, errases error from gnomonic projection. if not point.z then --Vec2; convert to Vec3 point.z = point.y point.y = 0 end local lat, lon = coord.LOtoLL(point) local north_posit = coord.LLtoLO(lat + 1, lon) return math.atan2(north_posit.z - point.z, north_posit.x - point.x) end local bull = coalition.getMainRefPoint(coa) local unitPos = unit:getPosition().p local heading = math.atan2(unitPos.z - bull.z, unitPos.x - bull.x) heading = heading + getNorthCorrection(unitPos) if heading < 0 then heading = heading + 2*math.pi -- put heading in range of 0 to 2*pi end heading = heading*360/(2*math.pi) heading = round(heading, 0) local dist = ((unitPos.z - bull.z)^2 + (unitPos.x - bull.x)^2)^0.5 if metric then dist = round(dist/1000, 0) else dist = round(dist/1853, 0) end local bullMsg = string.format(msg, heading .. ' for ' .. dist) local coaString if coa == coalition.side.BLUE then coaString = 'blue' elseif coa == coalition.side.RED then coaString = 'red' else coaString = 'all' end slmod.msg_out(bullMsg, displayTime, 'text', coaString) end end
  15. 0) Do a quick search to see if the issue is already known and acknowledged 1) Upload relevant files (a mission and/or a track) 2) Give a description of the problem 3) Give precise steps to reproduce 4) If you have done the above steps and you feel your bug report on the forums still hasn't received proper attention, you could try sending a PM to an ED tester. Druid_, Grimes and I have been handling a lot of mission editor/AI issue reporting in the last few months, so for this type of issue, you could send a PM to one of us.
  16. Oh yea, additional note: It might be possible that with the slmod_pause_when_empty option enabled, you could get a CTD while loading a mission due to a bug in the C API side of the Lua net environment. I battled this issue and fixed it in all my tests on two different computers, but who knows- it might rear its head on some of these unusual servers used for hosting missions. Luckily, this bug leaves a very distinct signature in the crash log, so it's easy to determine if your crash was caused by it. If this bug is truly the cause of your crash, it should leave a crash log that looks something like this: Anyway, like I said, I feel strongly that the issue is adverted, but I cannot be 100% sure until I get a broader sample. If you are using the slmod_pause_when_empty option, you get a crash while loading the mission, and you inspect the crash log and it looks something like what I posted above, please let me know! (As a reminder, crash logs are located in C:\Users\<Your Account>\Saved Games\DCS\Logs.)
  17. Slmod Version 6.2 for DCS World Changes from 6.1 (all that I can remember, at least): - Added the Slmod Server Administration tools Allows admins to kick, ban, add admins, pause the mission, reload the mission, change the pause-on-empty setting, load a different mission, etc. More details below. - Added slmod.CA_chatmsg(text, coa) Sends the string text as a chat message to ONLY the combined arms players on coalition coa. coa needs to be either "red" or "blue", but if you specify "all" or leave it blank, it will output the message to all combined arms players on both coalitions. - Slmod settings are now configured in C:\Users\<Account Name>\Saved Games\DCS\Slmod\config.lua. - Added new setting for Slmod: slmod_pause_when_empty. If you set this setting to true in C:\Users\<Account Name>\Saved Games\DCS\Slmod\config.lua, then the server will pause when empty, and unpause when clients join, unless a server admin overrides it with the -admin pause override command. Additional info on the Server Administration Tools: IN GENERAL, PLEASE SEE THE C:\Users\<Account Name>\Saved Games\DCS\Slmod\config.lua FILE FOR ALL THE NEW CONFIG OPTIONS! Installation instructions: No Servman 0) Download and extract http://forums.eagle.ru/attachment.php?attachmentid=73791&stc=1&d=1353363525 1) In "C:\Program Files\Eagle Dynamics\DCS World\Scripts", rename "MissionScripting.lua" to "MissionScripting_original.lua". Now, paste the "MissionScripting.lua" file included with this mod into this directory. 2) In "C:\Program Files\Eagle Dynamics\DCS World\Scripts\net", rename "server.lua" to "server_original.lua". Now, paste the "server.lua" file included with this mod into this directory. CAUTION: MAKE SURE YOU DO NOT CONFUSE THE "server.lua" file LOCATED IN ./DCS World/Scripts WITH THE ONE LOCATED IN ./DCS World/Scripts/net!! 3) Paste the "Slmodv6_2" folder into "C:\Program Files\Eagle Dynamics\DCS World\Scripts\net". Servman 301 CAUTION: Servman 301 is a little buggy now as the code has not been updated or fixed in some time. Slmodv6.2 has also not been checked for Servman compatibility, but I see no reason why it won't work as well as previous versions did. The main issue is the old and unsupported Servman 301 code. Errors in Servman could potentially cause Slmod to malfunction too. Installation Instructions: 0) Download and extract http://forums.eagle.ru/attachment.php?attachmentid=73792&stc=1&d=1353363525 1) In "C:\Program Files\Eagle Dynamics\DCS World\Scripts", rename "MissionScripting.lua" to "MissionScripting_original.lua". Now, paste the "MissionScripting.lua" file included with this mod into this directory. 2) In "C:\Program Files\Eagle Dynamics\DCS World\Scripts\Addons\ServMan3", rename "servman_server.lua" to "servman_server_original.lua". Now, paste the "servman_server.lua" file included with this mod into this directory. 3) Paste the "Slmodv6_2" folder into "C:\Program Files\Eagle Dynamics\DCS World\Scripts\net". Re-installation after auto-update: 1) Open "C:\Program Files\Eagle Dynamics\DCS World". 2) Find and open the latest _backup.<number> folder. 3) Copy the "Scripts" folder. Go up one folder level and paste it into "C:\Program Files\Eagle Dynamics\DCS World". Say "yes" to all folder merges and file overwrites. Slmod does not modify any files that are subject to frequent change, so it's highly unlikely you will overwrite some necessary change that the auto-updater had made (however, following these instructions you will also re-install any other ./Scripts mods you had installed, and I cannot vouch for them). (No Servman) Slmod Version 6.2.zip (For Servman 301) Slmod Version 6.2.zip
  18. When I get moved in to the new place, sure.
  19. That's OK. Just provide the script, steps to reproduce, and as simple of an explanation as possible. You can even send a mission scripting bug to me in Russian- Google Translator does a pretty good job. Just use simple sentences, correct spelling and grammar, and avoid idioms (idioms are expressions that mean something different than what they say). Also, if you see anyone here on the Russian forum report things that appear to be bugs with the scripting engine, please send me a private message and a link to the post. The only reason I didn't respond more quickly to the private message you sent me about event handlers was because I was on a trip.
  20. It's a change I noticed with 1.2.2. I haven't seen it mentioned by the devs anywhere (have any of you? I've been out of the loop until recently), so I'm afraid to ask about it on the slight chance it's in fact a bug. Sometimes that actually happens- a bug gets introduced that looks like a feature and no one reports it :D If it is a bug, it's one bug I want to never be fixed! :)
  21. :cry: I wish I could roll back to the old orange pilot textures. I swear I got shot at less. After all, if it works in the woods of Alabama, why not in Abkhazia too?
  22. Battle Commander can now see all units on their own coalition, even if they are hidden. A vast change for the better. If fog of war only showed units that were being seen by ground units, I'd be fine with it. Unfortunately, it also shows all enemies line of sight and in range to my air units- even if those aircraft are piloted by humans who don't have a clue where the enemy units are! And the detection range is very long for air units too. In other words, it spoils the battlefield, showing me everything. I DON'T WANT THAT. It makes the game very boring.
  23. Bandit, the the future, if it is possible please send me or Grimes a PM about any scripting engine bugs you find. We can investigate them if they are not already known. I will check out Unit.getGroup with multi player clients. Thanks for the report. -------------------------------- If you know a unit's name, there is another way to get information about its group- you can use env.mission. env.mission is a copy of the "mission" table from the mission file. So all the information that is in your mission file is in env.mission too :thumbup:
  24. Added new function slmod.CA_chatmsg(text, coa) Outputs chat message text to all battle commanders (and ONLY battle commanders!) on coalition coa. I just got done playing a very fun Combined Arms Force-on-Force mission. We had 1 battle commander on red, 1 battle commander on blue (me) a blue A-10 pilot, and a blue Ka-50 pilot. It was amazing to actually battle against a thinking, unpredictable opponent. Fog of War was enabled, but all red forces were hidden. Effectively, this gave the Red battle commander access to fog of war, but blue side did not have it. This way, friendly aircraft did not reveal all LOS targets on the map, killing immersion. To replace fog of war with something more immersive and fun, I ran line of sight scripts that output contact alerts to the blue battle commanders with the slmod.CA_chatmsg script. It worked great! Looking forward to more Combined Arms force-on-force battles :) BTW, Slmod 6.2 is VERY close to release now. I just need to document some stuff... unfortunately, I have almost run out of time before I have to pack up the computer to complete my move :( I donno if I will be able to get it released in time.
×
×
  • Create New...