-
Posts
491 -
Joined
-
Last visited
-
Days Won
1
Content Type
Profiles
Forums
Events
Everything posted by ajax
-
That sounds like you opened SP after you opened MP. You can have both open, but SP has to be loaded first. Edit: That is, you can have both open and run a MP mission, but not an SP mission.
-
How do I call functions provided by the global table "net." ?
ajax replied to piXel496's topic in Mission Editor
Table dump attached. Unfortunately, Chromium, 'minizip' is not in the mission-scripting environment. As far as I can tell, it is only available in the mission-editor environment. _G.zip -
How do I call functions provided by the global table "net." ?
ajax replied to piXel496's topic in Mission Editor
Just fyi, I did a table dump of _G, and 'net' is not available in the mission-scripting environment. I'm sure you can get access by hooking into main.lua in {DCS}\scripts\net. You can look at Servman or Slmod to see how it's done. -
How do I call functions provided by the global table "net." ?
ajax replied to piXel496's topic in Mission Editor
I don't know if this will work, but try: _G['net'].is_server() -
Using the SSE function MGRS function coord.LLtoMGRS(GeoCoord latitude, GeoCoord longitude) my script returns, for example, 38T KM XXXXX YYYYY. If you look at the F10 map, there is no grid KM. If you imagine that it would logically be to the left of grid LM, then the location is where I expected it to be. 1) Is there a way to easily convert the UTMZone to a different one? 2) Is there a way to force the SSE to return grids that match the F10 view? Any help is appreciated.
-
And my apologies to Rapier. I mean, who would have thought ED would introduce a reduced character limit for text without telling anyone.:protest:
-
Just in case anyone else is having the same problem, I found the solution: The encoding in Notepad++ needs to be set to 'UTF-8 without BOM'. I don't recall ever changing it, and TBH I don't remember if it was set to that before.
-
Thanks for the explanation, Grimes.
-
Yep, I just now got the same error on a script I was working on. Basically, there is now some limitation on the number of lines of text that can be used in various parts of DCS -- the briefing text, the DoScript text, and probably others. See: http://forums.eagle.ru/showthread.php?p=2085540#post2085540 http://forums.eagle.ru/showthread.php?t=125262
-
I just ran into this today for the first time. A new script I was working on inexplicably faults if loaded as DoScriptFile but works fine as a DoScript command. So that's what I was doing until I apparently passed the limit when I added some comments. For me it happened at line 128.
-
--pixel's code here trigger.action.setUserFlag('1',pixelsRandomResult)
-
Maybe map results of the random function to real values, decreasing the possibilities each time. Example: Result map initially is 1 --> 1 2 --> 2 3 --> 3 4 --> 4 5 --> 5 6 --> 6 7 --> 7 8 --> 8 9 --> 9 10 --> 10 First pass, random(1,10), result is 7. Consult map, do operation on 7. New result map (without 7) is 1 --> 1 2 --> 2 3 --> 3 4 --> 4 5 --> 5 6 --> 6 7 --> 8 8 --> 9 9 --> 10 Next pass, random(1,9), result is 8. Consult map, do operation on 9. New map (without 7 and 9) is 1 --> 1 2 --> 2 3 --> 3 4 --> 4 5 --> 5 6 --> 6 7 --> 8 8 --> 10 Next pass, random(1,8 ), result is 2. Consult map, do operation on 2. New map (without 7, 9, and 2) is 1 --> 1 2 --> 3 3 --> 4 4 --> 5 5 --> 6 6 --> 8 7 --> 10 Next pass, random(1,7), result is 6. Consult map, do operation on 8. And so on.
-
The little boxes are normal. They are just representations of special characters -- line feed, carriage return, etc. Lua doesn't care if you use carriage returns, line feeds, tabs, or spaces. All it cares about is that the keywords are separated by 'white space'. So, if you get an error, chances are there is a syntax error in the script. There is a free program for Windows called LuaEdit that I often use to check for these types of errors. Copy and paste your script into it and run the built in syntax checker.http://luaedit.sourceforge.net/
-
I just downloaded the OP Starvation mission from the ED site. There are no scripts in that mission. I think maybe you are seeing a version mismatch problem. Unfortunately, with these older missions you sometimes have to rebuild them from scratch to get them to work in the newer versions of DCS World.
-
If you want it or need it, add this code to line 501 in special.lua to incorporate the newest mission option, Cockpit Visual Recon Mode: -- mOptions.cockpitVisualRM = true -- also set to un-forced The mod is broken fairly often by updates, so I'll wait to include it in the next file upload.
-
Basically, what I am saying is that there is an error in the script based on the error message. (Obviously, right? :)) Is it one you created yourself, one you downloaded, or one built into the mission? If you are comfortable doing so, you can edit the script yourself; but it would be better for the author make the change. The error message says 'trigger.SetUserFlag(3,True)'. If the script is written like that then you will get this error. The reason is that it should be 'trigger.action.setUserFlag('3',true)'. There is more than one problem with the script statement. (1) The Lua programming language is case sensitive so 'SetUserFlag' will not work -- it needs a lower case 's' in 'Set'. (2) This function requires that the flag number is sent as a string, that is as text not a number. So the 3 needs to be enclosed in quotes, like this: '3' . (Note that either single or double quotes will work.) (3) It looks like maybe a space was inserted between 'Set' and 'UserFlag', too. If so, it needs to be removed. I hope this helps.
-
I think it should be 'trigger.action.setUserFlag()'
-
TBH I haven't been following the wish list thread. There one thing that I've been trying to do but haven't made much progress, and that is: I want to have a function that automatically reads in each miz file in a given folder and resaves it under the current version. I'm having trouble calling the built in unzip routine though.
-
Thanks, Stonehouse. Exactly. These were the things that annoyed me the most, so I did something about it. I tried to duplicate Blindspot's 'change coalition' feature, but I was never able to get the coalition dialog to come up. Maybe someone can offer ideas. This mod only works for 1.2.8 and openbeta. The changes from previous versions were slight, so if anyone needs a version for 1.2.7, let me know.
-
ME_MODS: Enhancements to the the Mission Editor I've had this mod working for a while now, and I thought I would share it with the community. Enjoy! Edit: I should add that the unhide feature sometimes takes several long seconds to complete. Don't get antsy.:) ME_MODS by 159th_Ajax Latest version: 1.10.1 Inspired by Blindspot's ME mod for FC2, this mod adds extra functionality to the Mission Editor's Units List panel. See feature list below. To install, unzip the file and merge into the DCS folder tree. (Backup files are also included in zip file.) Version History v1.2 - Minor bug fix. v1.3 - Added display columns for bort#, skin name, and pilot/unit name on Unit List panel. Note that these are unit characteristics but each row represents a group. Therefore bort, skin, and pilot/unit name refer to the first unit in each group. v1.4 - Allows resequencing borts, renaming units, reassigning Eastern callsigns, and running Lua script. Option file implemented. v1.5 - Reworked for DCSW 1.2.4. v1.6 - Reworked for DCSW 1.2.6. v1.6.1 - Compressed button size to fit smaller screens. No functional changes. v1.7 - Reworked for DCSW 1.2.7. Special.lua file contains script to: 1) set skins, 2) reassign borked Ka-50 freq., and 3) set mission options. Configurable by editing Special.lua. Commentary inside of file. Zip file contains backups of DCS files--just unzip and merge folders. v1.8 - Reworked for DCSW 1.2.8. + OpenBeta. Zip file contains backups of DCS files--just unzip and merge folders. v1.9 - Reworked for DCSW 1.5 v1.9.1 - Reworked for DCSW 1.5.2 v1.9.2 - Reworked for DCSW 1.5.7 v1.10.1 - Reworked for DCSW 2.5.5 Disabled FixBorts function. Features List * Show/hide/toggle units (New buttons) Operates on filtered list in Units List pane * Displays new columns in Units List pane: Bort number Skin Unit name Disabled * Resequences Borts (New button) Linearly within coalition Linearly within each aircraft type Starting numbers for each type configurable * Renames units within groups (New button) Group name + sequence number Format rules configurable Non-flyables only or all units * Launch Lua script file from within the Mission Editor (New button) Hot compiled -- ME restart not required -- provides a hook into the ME for those who like to tinker with Lua. Behavior set in me_mods_options.lua file Provided functions: Print (to log file) coalitions list -- countries, unit/group counts, etc. (off by default) Print (to log file) groups summary list -- coalition, country, group name, skin, etc. (off by default) Print (to log file) units list -- same + unit info (off by default) Print (to log file) air defense units sorted by location N to S Reassign Eastern callsigns (on by default) Set mission options (edit special.lua to change; on by default) Set radio frequency of all client Ka-50s (edit special.lua to change; on by default) Set clients' skins (+ IL-78M and A-50) in a given coalition to specified skins (edit special.lua to change; on by default) See comments in special.lua and me_mods_options.lua for more information ME_Mods.zip ME_Mods_DCS_1_5.zip ME_Mods_DCS_1.5.2.zip ME_Mods_DCS_1.5.7.zip ME_Mods_DCS_2.5.5.zip
-
I reversed 'options' and 'graphics'. Thanks for the correction, Eno.
-
Yes, that is correct. If working, the screen on the server will be black. Edit: I think it should be graphics.options.render3d = false
-
1.2.8 ME trigger problem: Radio Item Add For Coalition
ajax replied to L0op8ack's topic in Mission Editor
Interesting. The first time I joined a RED P-51 I saw the BLUE menu. I switched aircraft, and from that point on I saw the appropriate menu in all aircraft (in dOoOm's mission). Edit: This test was in MP. I tried it in SP and the menu was always wrong for RED aircraft. -
Yes. In fact, this is the method I use to quickly clear the ABRIS. Switch the PVI-800's power off and on.