Wine Posted January 1, 2014 Posted January 1, 2014 Thx number3 and Grimes Thanks guys, I will take a look at the information given. Greets, Wine. Wine's Skinning Projects
ENO Posted January 2, 2014 Posted January 2, 2014 Eh Grimes- Just wondering... any hints on upcoming changes with 3.3 and 1.2.7 functionality? Would it help if I started running more missions with SLMOD and MIST and submitting logs again? "ENO" Type in anger and you will make the greatest post you will ever regret. "Sweetest's" Military Aviation Art
ENO Posted January 24, 2014 Posted January 24, 2014 Any comments from Grimes or Speed about functionality of the teleport / random zone capabilities in MP? I'd found that clients would unhinge from the server when these events happen and gradually resulted in crashes on a pretty regular basis. Grimes and I had quite a few discussions on the matter and I'm not complaining- but I would love to re-introduce these features into missions. If you guys had some insight on the matter I'd sure appreciate it! "ENO" Type in anger and you will make the greatest post you will ever regret. "Sweetest's" Military Aviation Art
ENO Posted January 24, 2014 Posted January 24, 2014 http://forums.eagle.ru/showthread.php?p=1977779#post1977779 Having this issue... Maybe someone can comment? "ENO" Type in anger and you will make the greatest post you will ever regret. "Sweetest's" Military Aviation Art
ENO Posted January 25, 2014 Posted January 25, 2014 Anyone else needing to re-save MIST in their missions when they create a new version under the release? That seems to be resolving some of my issues. "ENO" Type in anger and you will make the greatest post you will ever regret. "Sweetest's" Military Aviation Art
m9matt Posted January 26, 2014 Posted January 26, 2014 I havn't come across this problem before Eno. I'm going to start using Mist 3.2 again. Does anyone know if it is still good to use in 1.2.7?
Wrecking Crew Posted January 26, 2014 Posted January 26, 2014 Mist 3.2 is working in my v127 install. WC Visit the Hollo Pointe DCS World server -- an open server with a variety of COOP & H2H missions including Combined Arms. All released missions are available for free download, modification and public hosting, from my Wrecking Crew Projects site.
ENO Posted January 26, 2014 Posted January 26, 2014 I think most of my issues stemmed from not doing a clean 127 install... I was having all sorts of problems. "ENO" Type in anger and you will make the greatest post you will ever regret. "Sweetest's" Military Aviation Art
mwd2 Posted February 2, 2014 Posted February 2, 2014 with Unit.getLife(Unit self) i can collect the health. But is there a way to set the health, too. Maybe something like Unit.setLife(Unit self)? Playing: DCS World Intel i7-13700KF, 64GB DDR5 @5600MHz, RTX 4080 ZOTAC Trinity, WIN 11 64Bit Prof. Squadron "Serious Uglies" / Discord-Server: https://discord.gg/2WccwBh Ghost0815
etcher Posted February 4, 2014 Posted February 4, 2014 I think I found a typo in MIST 3.2. : Line 595 should be return {x = Vec2.x, y = land.getHeight({x = Vec2.x, z = Vec2.z}) + adj, z = Vec2.z} instead of return {x = Vec2.x, y = land.getHeight({x = Vec2.x, z = Vec2.z} + adj), z = Vec2.z} The "+ adj" should be out the "land.getHeight" function. Sorry if it has already been reported. And thank you SO much for MIST !!! [sIGPIC][/sIGPIC]
BRooDJeRo Posted February 4, 2014 Posted February 4, 2014 Hello guys. I'm having a problem with Mist 3.2, but want to make sure first if i have done something wrong. I have the following problem. I only use the mist.respawnGroup command. For instance, when i use it on a Su-27 or Su-33 AI aircraft in my case and spawn said aircraft by this script. Use a trigger to detect if airborne by when it's out of a zone at a certain speed, the aircraft presence isn't detected in the engine. It is detected correctly when an aircraft is spawned the conventional method. I load Mist with a 'time more =1' trigger and only use the respawn script in this manner: DO SCRIPT: mist.respawnGroup('401', true) I have the feeling i'm missing some like the need of Mist to have it's own vehicle database build or something. So is this a bug or am i doing it right?
Grimes Posted February 5, 2014 Posted February 5, 2014 Do I understand it correctly that you are using a trigger to detect when to respawn a group? If so, then the you aren't doing anything wrong, its just the triggers don't "see" dynamically spawned units. You basically have to remake the trigger with the lua predicate condition for it to work. The following is basically the same as "group is dead' if not Group.getByName('whatever') then return true end @mwd2 there is no function to set life, I wish there was, but we don't have one currently. @etcher, yeah that one has been known for a while. Just never got around to releasing a full version with the fix. I'll hopefully release the next version of mist soonish. It is mostly bug fixes for various issues discovered since the last release. Namely dynamically spawning functions have been optimized a bit and should now work reliably in MP. It will add two new functions, mist.dynAddStatic and mist.random. Additionally the clone, teleport, respawn functions will now work with static objects. The random function is intended to replace math.random() when used to get smaller sets of numbers. For whatever reason the distribution for math.random() really disfavors the first and last possible value. If the fixes to dynamically spawned AI are in working order I'll move forward on a bunch of functions to add some more flexibility to it. The right man in the wrong place makes all the difference in the world. Current Projects: Grayflag Server, Scripting Wiki Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread) SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum
ENO Posted February 5, 2014 Posted February 5, 2014 I'll hopefully release the next version of mist soonish. It is mostly bug fixes for various issues discovered since the last release. Namely dynamically spawning functions have been optimized a bit and should now work reliably in MP. It will add two new functions, mist.dynAddStatic and mist.random. Additionally the clone, teleport, respawn functions will now work with static objects. The random function is intended to replace math.random() when used to get smaller sets of numbers. For whatever reason the distribution for math.random() really disfavors the first and last possible value. Excellent news! I can take about half a dozen of my missions out of mothball status and stuff them back in my quiver! Thanks Grimes! "ENO" Type in anger and you will make the greatest post you will ever regret. "Sweetest's" Military Aviation Art
BRooDJeRo Posted February 5, 2014 Posted February 5, 2014 (edited) Do I understand it correctly that you are using a trigger to detect when to respawn a group? If so, then the you aren't doing anything wrong, its just the triggers don't "see" dynamically spawned units. You basically have to remake the trigger with the lua predicate condition for it to work. The following is basically the same as "group is dead' if not Group.getByName('whatever') then return true end What im trying to do is the following. Let's say i fly a blue F15. Two Su27's spawn on my take-off and come for me. When they are dead two Su33 will spawn, when they are dead the same first Su-27 will spawn and after them the previous su-33's again. But it's a multi-player mission and has active AI behavior control for when there's no human players on the field and make sure the AI don't walk over the whole mission when there's not a single human around to enjoy it. It's very much possible that a 27 or 33 runs out of fuel and RTB's. For creating a small trigger set to detect this return and deactivate 30 seconds after speed = 0 you also need an airborne detection working on 'when unit is out of zone with a speed of 50+, set trigger x'. Waiting for an automatic de-spawn simply takes too long. It also cleans the field up nicely when there 40-60 fighters (including human players) active on the map I'm not using the 'if' variable in the respawn script as you do, just - mist.respawnGroup('401', true) - on a standard DCS editor death trigger. So what you say is that i need the put that 'airborne' trigger somewhere in the same respawn script? Isn't using the 'lua predicate' the same as making a standard trigger for a unit? The AI behavior part seems copied correctly by the 'true' variable. I've also tried things like mist.makeUnitTable and mist.getGroupData , but tht doesn't seem to pull anything off. I've also seen somewhere that respawned units automatically get added to the database. It must be because it still copies the AI behavior and the rest of it. On speed and zone detection it's almost of the engine doesn't see the unit in the engine. I'm sorry for my newbie-ness in this. I see what code does when i see it, however creating it is a different story. While i'm typing this i've created a small mission with both normal and mist spawn with the same airborne triggering, but there seems to be something wrong with speed detection in general. When you unpauze first before spawn, you already get the test message while units haven't even spawned and don't have speed to detect. Shouldn't an inactive unit always have 0 speed? I'm also willing to PM the mission in question when you're curious what's going on there Grimes.TEST.miz Edited February 5, 2014 by BRooDJeRo
Grimes Posted February 8, 2014 Posted February 8, 2014 Mist 3.3. Release Wiki documentation has been updated here: http://wiki.hoggit.us/view/Mission_Scripting_Tools_Documentation Changelog: -added mist.dynAddStatic() -added mist.random() -added mist.getNextUnitId() -added mist.getNextGroupId() -added shape_name to DBs for static objects to use -added static object support for teleportToPoint, cloneInZone, cloneGroup, teleportInZone, teleportGroup, respawnInZone, and respawnGroup -changed print statements to env.info for some functions -Fixed Bug with makeVec3GL -fixed bug with mist.flagFuncs.point_in_polygon related to the toggle parameter -fixed bug with messages not correctly being sent to the right groups -numerous changes mist.dynAdd and mist.dbUpdate to be more efficient and squash bugs -- mist.dynAdd now returns a string of the groups name instead of the table of the group object. This cascades down to teleportToPoint and its child functions (cloneInZone, cloneGroup, respawnInZone, etc...). Nobody really chimed in on this change, but I'm not adverse to changing it to a groupTable or a group object. I've been having a weird bug as of late when spawning in AI that don't have a unique groupId or UnitId. The units spawn, but it hampers the mist.DBs updating. So I've changed the mist code to start its Ids at a value of 7000 for both groupId and unitId. There is also two globally available values mist.nextGroupId and mist.nextUnitId that are based on the highest Id in the mission. Their related functions will automatically iterate the value + 1 when used. Use this information to correctly create unique Ids. Since Speed is back I'll bug him to update the first post a bit.Mistv3_3.rar 1 The right man in the wrong place makes all the difference in the world. Current Projects: Grayflag Server, Scripting Wiki Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread) SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum
ENO Posted February 8, 2014 Posted February 8, 2014 Holy freakin god- this is the best day of my life... update DCS alongside MIST?! Awesome. "ENO" Type in anger and you will make the greatest post you will ever regret. "Sweetest's" Military Aviation Art
m9matt Posted February 8, 2014 Posted February 8, 2014 Thanks Grimes, Appreciate your hard work :thumbup:
St3v3f Posted February 8, 2014 Posted February 8, 2014 Good stuff Grimes! aka: Baron [sIGPIC][/sIGPIC]
ENO Posted February 8, 2014 Posted February 8, 2014 (edited) I have been excited at the prospect of enhanced random functionality since the "random" function in the ME alone does have its downfalls. I'd read somewhere that it "favours" the first and last options... and the MIST 3.3 would provide a better random alternative. That's what I understood, anyway. Now- I'm looking at the new random function in the wiki... and it does give an example for usage... but I'm still a little lost on exactly how to apply it. The included wiki example: do local randChoice = mist.random(5) if randChoice == 1 then -- do whatever elseif randChoice == 2 then -- do whatever2 elseif randChoice > 2 then -- do whatever3 end Instructions from the new guide: number mist.random (number/number low/high, number high) Returns a random number between the low and high values passed. If a single value is passed this value will act as the high number and a random number between 1 and high will be returned. If two values are passed the first variable is the lowest number that can be returned and the second variable is the highest number that can be returned. The curse of providing updated functions is I'm going to be banging on the door all day long trying to figure out how to put them to use... Unfortunately this one in particular looks like it should be excruciatingly simple but for me it might as well be grade 7 math. For those of you confused by the reference, it took me not only an entire school year of grade 7 but also two subsequent summer school attempts to get a passing grade. So I apologize in advance but any chance someone can walk me through how to apply the random value? Edited February 8, 2014 by ENO "ENO" Type in anger and you will make the greatest post you will ever regret. "Sweetest's" Military Aviation Art
Yurgon Posted February 8, 2014 Posted February 8, 2014 (edited) Now- I'm looking at the new random function in the wiki... and it does give an example for usage... but I'm still a little lost on exactly how to apply it. I'm not using MIST yet, but from the description, mist.random() looks a lot like such functions in other languages, so I'll just write down a couple of examples and hope they clarify things. :) random_number = mist.random(5) -- With only 1 parameter, this parameter will be the highest number returned. -- The smallest number will be 1. -- That means random_number will be 1 or 2 or 3 or 4 or 5 -- That is exactly the same as writing: random_number = mist.random(1, 5) Think of the first version as a short-hand notation for random(1, highest_possible_value). In case you needed a random value in the twenty-whatever range, it could be retrieved like so: random_twen = mist.random(20, 29) -- random_twen will now hold a value larger than or equal to 20 -- and smaller than or equal to 29 The two parameters to this function are simply the lowest and the highest values that are possibly returned. Edit: Okay, I read your post again, so on to applying the values. random_number = mist.random(1, 5) -- the random value will be ranging from 1 to 5 if random_number == 1 then env.info("Random value is exactly 1") -- Spawn group 1 or destroy unit 1 or whatever elseif random_number == 2 then env.info("Random value is exactly 2") -- Spawn group 2 or destroy unit 2 or whatever elseif random_number > 2 then enf.info("Random number is 3 or 4 or 5") -- The chances of this happening are 3 in 5. -- This would be the most likely outcome. -- Spawn group 3 or destroy unit 3 or whatever end Damn, now I have to make up something even remotely useful with my "twen" example... :) random_twen = mist.random(20, 29) -- random_twen ranges from 20 to 29 -- Let's multiply this value by 10 flight_level = random_twen * 10 -- Flight Level, ranges from 200 to 290 -- Convert flight level to feet: alt_ft = flight_level * 100 -- Altitude in feet, ranges from 20000 to 29000 -- Convert altitude in feet to meters [color="Blue"]alt_meters[/color] = mist.utils.feetToMeters(alt_ft) -- Altitude in meters, ranges from 6069 to 8839.2 env.info("Random altitude is " .. alt_meters .. " meters") -- And now set this random altitude to a waypoint: start_point = {} -- Okay, sorry, no clue yet how to get a vector type = "turningpoint" speed = 120 -- 120 metes per second alt_type = "BARO" -- I used Flight Level as example, so altitude type should be BARO wp = mist.fixedWing.buildWP(start_point, type, speed, [color="Blue"]alt_meters[/color], alt_type) -- Et voila, if start_point was in any way a valid vector, -- the "wp" variable would now hold a new waypoint with a random -- Flight Level in the 200 to 290 range Edited February 8, 2014 by Yurgon
ENO Posted February 8, 2014 Posted February 8, 2014 (edited) Thanks Yurgon. (looks like you sniped my second question) I guess the issue I have is how to apply that value... I'm used to the flag equals parameter in the ME- so I know that when I want to make something happen I can add the flag equals parameter. But for this example- let's say that if the result is 24... how do I apply that value to make something happen? Is it a value I can put on a flag so that I can keep a foothold on a familiar concept? Edited February 8, 2014 by ENO "ENO" Type in anger and you will make the greatest post you will ever regret. "Sweetest's" Military Aviation Art
Flagrum Posted February 8, 2014 Posted February 8, 2014 (edited) Thanks Yurgon. (looks like you sniped my second question) I guess the issue I have is how to apply that value... I'm used to the flag equals parameter in the ME- so I know that when I want to make something happen I can add the flag equals parameter. But for this example- let's say that if the result is 24... how do I apply that value to make something happen? Is it a value I can put on a flag so that I can keep a foothold on a familiar concept? You want to use these random numbers with the ME triggers as part of a condition or as parameter to an action, if I understand you correctly? That is not directly possible. Those conditions and actions always use a fixed value that you have to enter in the ME. Instead you would have to use more scripting. You would perhaps define the trigger without a condition and would program your condition directly within the lua code (surround your "action" code with IF ... ENDIF where you check your condition that uses the random function). Maybe the simplest way to use the new random function with the existing ME tools is to set a flag to the result of the function - but for that, you need to use a small script, too (DO SCRIPT or DO SCRIPT FILE as SET FLAG VALUE only accepts fixed values, not lua function results). MIST and/or the DCS scripting engine make that quite easy, though. From there on, you could work with that flag as usual. Use something like this to set a ME flag to a random value (attention: wrote this on the fly, not tested!): do local flagName = "100" local minVal = 20 local maxVal = 29 trigger.action.setUserFlag(flagName, mist.random(minVal, maxVal)) end Edited February 8, 2014 by Flagrum
Yurgon Posted February 8, 2014 Posted February 8, 2014 Thanks Yurgon. (looks like you sniped my second question) Yeah, sorry about that. The instant I'd submitted the reply, I realized that I had answered the wrong question so I went ahead and tried to come up with something useful. :music_whistling: I guess the issue I have is how to apply that value... I'm used to the flag equals parameter in the ME- so I know that when I want to make something happen I can add the flag equals parameter. But for this example- let's say that if the result is 24... how do I apply that value to make something happen? Is it a value I can put on a flag so that I can keep a foothold on a familiar concept? The result of this random number generator is simply a number, so you can do anything with it that you could do with a number, like setting it as a flag value, going through an if/elseif/else condition, using it in an iterator, concatenating it to a string and so on. It's totally up to you. One more example. Let's say there were 5 sound files in the mission named sound1.ogg to sound5.ogg and in a DO SCRIPT container, one of them should be randomly played: local random_number = mist.random(1, 5) local funny_tune = "sound" .. random .. ".ogg" trigger.action.outSound(funny_tune)
Recommended Posts