dane48 Posted January 28, 2011 Share Posted January 28, 2011 I don't understand why when some missions are flow, there is a score that is received and other times, even when taking out mulitiple targets, there is no score. I need to check some more but it seems when using a user made mission, I have not received a score, yet when using default or my own there are scores?? Curious "To most people, the sky is the limit. To those who love aviation, the sky is home."-----anonymous Link to comment Share on other sites More sharing options...
Greb Posted January 28, 2011 Share Posted January 28, 2011 Just learned this one, doing a special project and had to get it down. The score is set in the ME under Mission Goals. I had to learn it in order to give an "End of Mission" message. If I you are using one of my missions and not getting a score it's was due to my ME ignorance and I apologize for that. ALTHOUGH!!! I have come up with some stuff that will knock your socks off, and it will be posted .....SOON! 1 Link to comment Share on other sites More sharing options...
nomdeplume Posted January 28, 2011 Share Posted January 28, 2011 Yes, the score assigned is completely up to the mission author. If the mission is part of a campaign the scores have a special meaning: below 50% and you regress to the previous stage of the campaign (or fail the campaign if you're at stage 1). A score of exactly 50% means you stay on the stage of the campaign you're on. A score of above 50% means you progress to the next stage of the campaign. For single missions, the score doesn't really effect anything other than how you feel about yourself, and even then only if you actually look at it. :) 1 Link to comment Share on other sites More sharing options...
Greb Posted January 28, 2011 Share Posted January 28, 2011 Yes, the score assigned is completely up to the mission author. If the mission is part of a campaign the scores have a special meaning: below 50% and you regress to the previous stage of the campaign (or fail the campaign if you're at stage 1). A score of exactly 50% means you stay on the stage of the campaign you're on. A score of above 50% means you progress to the next stage of the campaign. For single missions, the score doesn't really effect anything other than how you feel about yourself, and even then only if you actually look at it. :) You can also use it to set trigger within in the Mission. Like if player scores more or less then, then this trigger goes off or etc..... Link to comment Share on other sites More sharing options...
dane48 Posted January 28, 2011 Author Share Posted January 28, 2011 Thanks fellows. Will be looking for that area in the mission goals. "To most people, the sky is the limit. To those who love aviation, the sky is home."-----anonymous Link to comment Share on other sites More sharing options...
Grimes Posted January 28, 2011 Share Posted January 28, 2011 Mission goals (aka scores) are also quite useful when used in triggers. In a multiplayer mission we can check whether a player has spawned their aircraft and then adjust overall mission parameters or difficulty based on the number of players in game. With a trigger we then compare the different values, if its less than 2 players an enemy counter attack would be fairly light. If its more than 2 players the mission could up the number of enemy groups that spawn. Mission goals combined with triggers allow for the creation of just about anything. 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 Link to comment Share on other sites More sharing options...
Speed Posted January 28, 2011 Share Posted January 28, 2011 Mission scores are alright, but scripting is better. You can set a global lua variable that can be whatever value you want it to be. If something dies, you can just do a script like score = score + 5 And then your victory conditions can be like, if score > 166.67 then trigger.setUserFlag(500, true) else trigger.setUserFlag(501, true) end 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 More sharing options...
Gonzo01 Posted January 28, 2011 Share Posted January 28, 2011 If you set up the Mission Goals in the Mission Editor, and you assign 50 points to Blue team if a unit is detroyed: in my case a Factory, shouldn't this award 50 points to the blue team. I check that the unit is dead, but it never assigns any points, even though I received a screen messages that the building was destroyed. When I hit the apostrophe key it still shows a score of zero. Link to comment Share on other sites More sharing options...
Speed Posted January 28, 2011 Share Posted January 28, 2011 (edited) Well, again, your issues would be solved in a switch to scripting. Make a unit, name him "scoreman" (or f***face, it doesn't matter), put him up in the corner of the map away from everyone. 1) Initialize: Create a triggered action, a run script action for the unit. Name it "initialize score" Under the script field, put: score = 0 This sets a global variable called "score" that stores the score of the custom scoring system. 2) Now, lets say you want to add 2.5 points for killing a tank. Make a triggered action for "scoreman", a run script action. Name it, "Tank killed". In the script window, put: score = score + 2.5 Do this for every kind of unit you want to add to the score with. For example, if there is infantry in your mission, you might want to make a "Infantry killed" script: score = score + 0.1 The default goal scoring system cannot go to such low numbers, it can only do whole numbers up to 100! 3) Now we need to run these scripts at the appropriate times. What a detail below is the simpliest way, though one of the more time consuming as you have to make a trigger for each unit that dies. Make a "Mission Start" trigger. Set the conditions as Random(100), and the actions as "AI Action- Run Script("initialize score"). So the first thing your mission does is create a global .lua variable called "score", equal to zero at mission start. Now, make a trigger for every unit that you want to add to the score. Say there are 30 tanks. Make 30 triggers (an easy task with the "Clone" feature), one for each tank. Each trigger will be: Once-> Unit Dead('<Name of tank>') -> AI Action(Run Script- "Tank Killed") So each time one of the tanks dies, the script: score = score + 2.5 is run. Do this for all unit types and score values you desire. Now, as I said, this is one of hte more time consuming, but, the easiest to understand. In my mission I am getting ready to release, assuming Beta 5 does not break it, I use a while loop that runs through all 130 units I want to check. Much less grunt work, but harder for .lua initiates to understand. 4) Victory conditions Now, at the end of the mission, you'll want some way to evaluate the score. Make a final script for the unit "scoreman". Name this script, "Evaluate Score". In the script box, put something like: if score > 112.5 then trigger.setUserFlag(500, true) end Now, if the global variable "score" has a value greater than 112.5 then flag 500 will be true. An if/else evaluation looks like what I posted in my previous post on this thread. So finally, you have a trigger in the mission editor that says, Once-> Flag is true (500) -> Message to all ('Victory is ours!') So, detailed knowledge of .lua is not necessary to make some basic scripts that are superior to what the Mission Editor has to offer. Edited January 28, 2011 by Speed 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 More sharing options...
nomdeplume Posted January 29, 2011 Share Posted January 29, 2011 I think the scoring might be a little buggy/incomplete at the moment, but I'm not positive. I've only added scoring to one of my missions, and wasn't really testing it. It consisted of a few goals using the "group alive less than" to award additional points at particular percentages. When testing it, I'm fairly sure I got some of the points, but then they went away. This might be an issue just with the "group alive less than" rule, or a more general issue. It might be worthwhile trying this: set a flag when the event occurs (i.e. in the trigger that shows the message indicating the building was destroyed), and set the mission goal just to check that flag. Link to comment Share on other sites More sharing options...
Greb Posted January 29, 2011 Share Posted January 29, 2011 I think the scoring might be a little buggy/incomplete at the moment, but I'm not positive. I've only added scoring to one of my missions, and wasn't really testing it. It consisted of a few goals using the "group alive less than" to award additional points at particular percentages. When testing it, I'm fairly sure I got some of the points, but then they went away. This might be an issue just with the "group alive less than" rule, or a more general issue. It might be worthwhile trying this: set a flag when the event occurs (i.e. in the trigger that shows the message indicating the building was destroyed), and set the mission goal just to check that flag. I played a lot with the "Group less then alive" this week. It seems to work OK...although it took me a while to understand it. LOL!!! I wanted to trigger a Mission accomplished message using the score and it did quite well. Although what seemed off to me was the difference in scoring from the trigger menu to the score in the Mission goal. ....it could just be I'm not getting it...so take my rant with a grain of salt! :D Link to comment Share on other sites More sharing options...
Ripcord Posted March 15, 2011 Share Posted March 15, 2011 Well, again, your issues would be solved in a switch to scripting. Make a unit, name him "scoreman" (or f***face, it doesn't matter), put him up in the corner of the map away from everyone. 1) Initialize: Create a triggered action, a run script action for the unit. Name it "initialize score" Under the script field, put: score = 0 This sets a global variable called "score" that stores the score of the custom scoring system. 2) Now, lets say you want to add 2.5 points for killing a tank. Make a triggered action for "scoreman", a run script action. Name it, "Tank killed". In the script window, put: score = score + 2.5 Do this for every kind of unit you want to add to the score with. For example, if there is infantry in your mission, you might want to make a "Infantry killed" script: score = score + 0.1 The default goal scoring system cannot go to such low numbers, it can only do whole numbers up to 100! 3) Now we need to run these scripts at the appropriate times. What a detail below is the simpliest way, though one of the more time consuming as you have to make a trigger for each unit that dies. Make a "Mission Start" trigger. Set the conditions as Random(100), and the actions as "AI Action- Run Script("initialize score"). So the first thing your mission does is create a global .lua variable called "score", equal to zero at mission start. Now, make a trigger for every unit that you want to add to the score. Say there are 30 tanks. Make 30 triggers (an easy task with the "Clone" feature), one for each tank. Each trigger will be: Once-> Unit Dead('<Name of tank>') -> AI Action(Run Script- "Tank Killed") So each time one of the tanks dies, the script: score = score + 2.5 is run. Do this for all unit types and score values you desire. Now, as I said, this is one of hte more time consuming, but, the easiest to understand. In my mission I am getting ready to release, assuming Beta 5 does not break it, I use a while loop that runs through all 130 units I want to check. Much less grunt work, but harder for .lua initiates to understand. 4) Victory conditions Now, at the end of the mission, you'll want some way to evaluate the score. Make a final script for the unit "scoreman". Name this script, "Evaluate Score". In the script box, put something like: if score > 112.5 then trigger.setUserFlag(500, true) end Now, if the global variable "score" has a value greater than 112.5 then flag 500 will be true. An if/else evaluation looks like what I posted in my previous post on this thread. So finally, you have a trigger in the mission editor that says, Once-> Flag is true (500) -> Message to all ('Victory is ours!') So, detailed knowledge of .lua is not necessary to make some basic scripts that are superior to what the Mission Editor has to offer. This is very good gouge here, Speed. I did not know what those script boxes were for. Thanks for this. Ripcord [sIGPIC][/sIGPIC] Link to comment Share on other sites More sharing options...
Grimes Posted March 15, 2011 Share Posted March 15, 2011 It might be worthwhile trying this: set a flag when the event occurs (i.e. in the trigger that shows the message indicating the building was destroyed), and set the mission goal just to check that flag. Using a flag to check a value works quite well. Afterall the clone feature is not currently present in the mission goals tab. 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 Link to comment Share on other sites More sharing options...
Walshtimothy Posted July 12, 2023 Share Posted July 12, 2023 On 1/28/2011 at 7:20 PM, Speed said: Well, again, your issues would be solved in a switch to scripting. Make a unit, name him "scoreman" (or f***face, it doesn't matter), put him up in the corner of the map away from everyone. 1) Initialize: Create a triggered action, a run script action for the unit. Name it "initialize score" Under the script field, put: score = 0 This sets a global variable called "score" that stores the score of the custom scoring system. 2) Now, lets say you want to add 2.5 points for killing a tank. Make a triggered action for "scoreman", a run script action. Name it, "Tank killed". In the script window, put: score = score + 2.5 Do this for every kind of unit you want to add to the score with. For example, if there is infantry in your mission, you might want to make a "Infantry killed" script: score = score + 0.1 The default goal scoring system cannot go to such low numbers, it can only do whole numbers up to 100! 3) Now we need to run these scripts at the appropriate times. What a detail below is the simpliest way, though one of the more time consuming as you have to make a trigger for each unit that dies. Make a "Mission Start" trigger. Set the conditions as Random(100), and the actions as "AI Action- Run Script("initialize score"). So the first thing your mission does is create a global .lua variable called "score", equal to zero at mission start. Now, make a trigger for every unit that you want to add to the score. Say there are 30 tanks. Make 30 triggers (an easy task with the "Clone" feature), one for each tank. Each trigger will be: Once-> Unit Dead('<Name of tank>') -> AI Action(Run Script- "Tank Killed") So each time one of the tanks dies, the script: score = score + 2.5 is run. Do this for all unit types and score values you desire. Now, as I said, this is one of hte more time consuming, but, the easiest to understand. In my mission I am getting ready to release, assuming Beta 5 does not break it, I use a while loop that runs through all 130 units I want to check. Much less grunt work, but harder for .lua initiates to understand. 4) Victory conditions Now, at the end of the mission, you'll want some way to evaluate the score. Make a final script for the unit "scoreman". Name this script, "Evaluate Score". In the script box, put something like: if score > 112.5 then trigger.setUserFlag(500, true) end Now, if the global variable "score" has a value greater than 112.5 then flag 500 will be true. An if/else evaluation looks like what I posted in my previous post on this thread. So finally, you have a trigger in the mission editor that says, Once-> Flag is true (500) -> Message to all ('Victory is ours!') So, detailed knowledge of .lua is not necessary to make some basic scripts that are superior to what the Mission Editor has to offer. This is very helpful. cheers. 12 years later but still 1 walshtimothyWW2 virtual flier - currently playing on 4ya ww2 - youtube channel here https://www.ww2adinfinitum.blog - https://projectoverlord.co.uk/ Link to comment Share on other sites More sharing options...
Recommended Posts