-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merge develop into main branch #66
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Modified slmodEvents to use mostly the scripting engine events instead of co-opting the debriefing events.
Move the dispaly stats to its own file. Simply cut and paste job.
statsDisplay for hooks.
Callbacks: -Added custom_stats_net to sandbox -Manual merges from 7_5 Events, Libs, Units: -Updated to 7_5 versions MissionScripting: -Slight change to how basicSerialize and oneLineSerialize are defined -Added slmod.customStat Stats: -Added custom stat saving, first iteration StatsDisplay: - Fixed load message Utils: -Fixed getClientRtId because the input value was named something different than what was actually used by the code.
First working prototype of modified config design. Goal is to keep existing, valid settings and conditionally add new settings based on changes of the config file. Any changes force the script to check and rewrite the config file with updated data. Config - Loading old config into local settings - Opens config and checks datatypes - Currently heavily WIP as I add basic serialization for tables and nested values. Default -Deleted most entries as I gradually experiment and add support for the different formats of settings. -New format is table { help: Help text, can be by itself for added ----- breaks or whatever. val: Value to be saved nest: Table entry value gets saved in tab: Whther the val needs to have spaces in location } Note help can have its own tabbing because it is stored within multiline text [[text]] so the formatting is kept.
Progress made on loading dynamic config. Config: added a local basic serialize function added a local function to add spaces to the written file for tabs. added simplified and very limited table serializer that doesn't go very deep and is limited to numerical indexes. (Because the config is setup that way.) - Lots and lots of logging added -Modified the writing thing to use the 3 new functions added. Default.cfg: Started re-adding more entries in new formatting.
Config: - Probable fix for loading value set to false that defaults to true. - Realized it wasn't correctly saving in the same format used by slmod for nested tables. Need to fix. Started making changes for that, but didnt finish. Default: -Added notes to top for general rules and information regarding adding settings. -Changed nest from a simple string to mimic nest in Stats. -Re-added all of the settings in the new format.
Took a break, came back to this and finally got it working. Default -Added root entry for any table entry in a nest. Forgot why. -Added missing entries. -Fixed naming of entries. -Added ver (for 'verify') the contents of a table. This will be used to reference the valid entry types for a folder. Config - Fixed annoying issue related to false/nil values being erased and changing a saved value if it didn't match the default value. -Added table validation check, will iterate the type names of a table and see if they are the correct format, if not it will try to replace that one value or the whole entry. - Fixed issue in seralizer when table indexes saved as strings. - Fixed saving and loading of the whole file. Now cleanup the code and start working on the rest of slmod v7_6.
Config: -Added directory for Campaign Stats Default: - Added stats_level - Added kd_specifics - Added assists_level - Added stats_coa - Added MOTD_show_settings - Added enable_player_death_message - Added MOTD_show_coord - Added MOTD_timeout MetaStats. - Initial notes for campaign stats MOTD - Added checks for settings for whether or not to display more messages as part of the MOTD Stats: - Added entries for campaign stats, still TODO - Converted nest values to use function getNest to build the nest table based on current settings - Added WIP message function telling a player how they died - Changed getHitData() to return the full table - WIP of runDeathLogic to support kill assists, stats on a per weapon basis, stats for how a player died, and "specific" stats for actual typeNames of what a player has killed. - Added take-off stats from different types of objects like FARP, airbase, austere, and ships. - Added refueling stats assuming ED fix the refueling event for clients
List of changes up to when I got assists working for the first time. AutoAdmin - Added some logging due to error that was occurring, need to invesitgate but not alone. Config -Fixed issue loading and saving a false value Default -Fixed nil value for custom_MOTD Events -Fix issue with spawning events MetaStats - Initial batch of additions for campaign stat tracking MissionScripting - Added slmod.setCampaign command Stats - Init additions for campaign stat tracking - Fixed construction of validHits table for calculating assists. - Renamed some values for where stats are saved.
Working prototype of saving stats for a coalition. Stats -Added check to advChangeStatsValue to accept coa parameter -on mission load if config for coalition stats has it enabled, will add values to main stats table - Moved inAirClients so can add stat if player left aircraft while in air. -runDeathLogicl; modified to support AI stats -runDeathLogic; added death stats to show what killed a target and with what weapon. Need to modify nest for categories -Track coalition player flight time. Should further modify this get the totals and save once. -Changed events code to support player and AI stats. - saveStat is now a conditional variable for whether or not to save. Will be based on settings so that all the extra checks for AI actions dont take place if it isnt saving their stats. -Removed legacy formatting and checks when creating weapon data if a shot event was never registered for the weapon that caused a hit. - Changed refueling time for "long" refeul to 1 minute. Not that the event was fixed, just thought about it a little and decided to change it.
Default.cfg -Readded write_mission_stats_files due to accidentally deleting it -Adjusted tabs of some help messages -Added pvp_as_own_stat setting MetaStats -Modified code to initialize campaign stats MissionScripting - Fixed passing table re-writing a value. Stats -Added campaign stats to slmod.stats.resetFile() code -Added functions to create and write campaign stats table keys -Added slmodStats.startCampaign(fileName) -Added campaign stats to advChangeStatsValue -Modified advChangeStatsValue to deep copy vars table when saving stats to coalition -deeop copy for nextIDNum just in case -Modified events and runDeathLogic to fully support coalition and AI stat logging -trackFlightTimes: added entry for adding coa flight times -trackFlightTimes: Added check to update the meta stats flight times only if the value has changed. -custom_stats_net: Added some error checking/logging.
Config -Changed version number - Removed some logging MetaStats -Added camapign stats that were missing MissionScripting.lua -Removed log message Stats -Check for when campaign stats aren't active -added function to get mission and campaign stats for stats display -Removed a bunch of logger messages StatsDisplay -Added campaign stats to stats modes -Added func to return stats by mode -Modified display functions to get stats via new function -Modified stats dispaly to account for new format. Still in testing -Modified aircraft stats to display last 5 LSO scores if saved.
AutoAdmin -Removed log messages MissionScripting -Removed loading of default config, just loads the one setting that is used within Stats -Added Total value for weapons kills -Reset of campaign stats on mission change StatsDisplay -LSO stats formatting changes -Count stats within weapons.kL inside of aircraft table
Events -Added checks to prevent errors associated with scenery objects Metastats -Potential fix for error when adding to max clients stat for a campaign Stats -Added better error handling for scenery objects in stats.
Events - Fixed error caused by pilot landing event -Fixed error caused by hitting weapons Stats -Fixed naming of AI stats -Moved multiCrewDefs -Added check for strings in aircraft names during mission load to add entries to multiCrewDefs folder. Meant for future proofing when object names are not 100% known. -Added extra check during multicrewDefs checking. -Fixed takeoff stats -Changed takeoff and landing stats to use event.target instead of event.place.
-Removed pilot death from default death stat. Primarily meant for ground/ships since it is not relevant. -Added check so that coalition stats aren't saved to penalty stats file -Fixed object death on no damage for AI. -Added bounced stat for number of times an aircraft bounces on landing. A bounce is defined as a take-off landing event that has a take-off event from the same player occuring within a few seconds.
Stats -Changed hitHumans and hitAIs to single hitObjs -Fix crashLanding stat -Minor refactor of landing, takeoff, and bounce stats. -- landedUnits now is saved for players and AI if valid -- No longer saves extra takeoff/landing during bounce events. -- If aircraft is a plane and landed on a ship and takes off, it counts as a bolter. (Note Refueling Event/Stop does not occur on clients, if it gets fixed this will automatically start working again) -Refueling event now adds aircraft to refuelings table -Refueling stop event now checks the refuelings table. No longer iterates back to find the unit.
Stats -Fixed syntax error -Added "baseList" for stats_level 2 that lists each airbase taken off from and landed.
7 6 to develop branch.
-Stats fixed error in error handling that ended up causing more errors. If you had been using build 138 you must either downgrade or update other wise your stats will be FUBAR.
-Fixed error caused when mix and matching assist stats with no assist stats -Fixed check if total value was missing from a given category.
StatsDisplay -Added debugging lines and possible fix to error when trying to display stats. Stats. -Added check and possible fix if objtype isnt present but the unit is known. -Added a check for logger messages that appear only with AI stats enabled.
-Added a function to the mission env for kicking a player to spectator. -Possible fix for displayInit timing
Commented out a logging message left in while testing something.
Fixed issue of stats not displaying due to an added stat value for losses being present. -Added pilotError and crashLanding stat to stats display.
-Added option for json stats export. -- It is a simple boolean setting that will save a copy of any stats file that is written in slmodStats.lua as a json. This includes the main stats file, penalty stats, campaign stats, and mission stats. - Added stats writting buffer. This will reduce the amount of writes to the stats file. For example instead of updating an entry for 20 rockets one shot event at a time, it will just save it as +20. Fixed: Dakka in Huey and Mi-8 naming for multicrew seats. Fixed: Multicrew defs and auto generation of naming if a multicrew unit type is not pre-defined. Fixed: Crash stat not counting when AI stats are disabled and player is killed by AI. Added WIP Feature: Best and Current life stats. Setting will be visible in the config file but is not enabled in the code via commented out lines.
Stats buffer possibly causing issues. Removed for now.
Moved the conversion of a json file to only run if it is enabled. Note there is possibly a bug with converting to json with extremely large files. If you enable it I recommend checking DCS.log to see if slmodTests.lua is loaded. If not then you should disable the json setting and restart. Also removed some logging from the slmodConfig.
-AdminMenu Fixed: Lua error when loading admin list if the file hasn't been created yet. -Config Fixed: Lua error on first creation of the config file requiring a 2nd load for slmod to work. Was caused by saving false and nil setting values as strings. Added "helpSpec" value for any help entries with multiline strings [[ TEXT ]] Clarified: Documentation for custom folder locations.
Manually added 'SA342' to aircraft database because every Gazelle type returns that as the weapon used in collision hits but for whatever reason that string was never populated in the database.
Fixed some errors in the PvP stats tracking.
Hotfix for slmod failing to load due to mistakenly merging a change.
Callbacks - Added slmod.current_mission_safe_name to onMissionLoadBegin just so it is done once and accessible. Config -Create Mission Events folder -Fix for loading default value types that failed sometimes Default: -Changed events_output to number value. 0: off 1: single slmodEvents file 2: Events are outputted in a file for each mission - Added events_format to choose between lua and json for the export format to be used. Events - Added export of events on a per mission basis. - Changed format of outputted file to be a valid lua table. Was slmod.events = {}. Now slmodEvents = {} Libs - Moved some reset functionality into another function - WIP adding functionality to be able to set custom config settings within a mission script. The idea being to temporary overwrite any slmod setting for a given mission. Say disable TK punishment in a mission. metaStats - Added local changeMetaStats function because it doesnt really need to be global and use that global function for everything there. - Created oDate so it doesnt keep having to call os.date()
Events Fixed: lua error occurring on ejection related events Stats Added: handling for the new "landing quality mark" event so that carrier traps are correctly saved. Change is backward compatible with 2.5.6 as I haven't removed the old code relying on the "comment" event.
Fixed an issue with gun stats caused by slight event format change in the patch.
-Stats Fixed a bug that created incorrectly named multicrew stats when a player died StatsDisplay -Added extra checks when gather stats data for display to not silently error. Errors originally caused by the stats bug and changes to events AdminMenu - Added error checking to cleanup command.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Communitive changes from 7.5 to 7.6.
-Rewrote config file format
-Added assists stats
-Added coalition stats
-Added AI stats
-Added json export
-Added campaign stats
-Added custom stats via mission script commands
-Added LSO landing score stat
-Added kick to spectator mission script function
-Added events output per mission
-Fixes for DCS 2.7