Friday, October 27, 2017

Change Log: 2.46.871 (1.5 Upgrade Release)

1.5 Upgrade Release!
As of release 2.46.871, the Manager now supports Kingdom Death 1.5!

Release 2.46.871 also contains a bunch of feature upgrades and enhancements. This is probably the biggest upgrade of the Manager since the Anniversary Release:
  • Settlement Sheet storage controls have been (massively) upgraded and no longer reload the Settlement Sheet when you update storage!
  • Endeavors are a first-class citizen of the API now (i.e. they're no longer just attributes of Innovations) and the Campaign Summary endeavors UI has been (massively) upgraded, both in terms of functionality and appearance.
  • Campaign Summary controls for managing Departing Survivors have been upgraded so that returning survivors from Special Showdowns is now supported.
  • Numerous back-end enhancements intended to improve overall performance of the Manager.
As far as overall performance goes, anyone who has used the Manager in the last two weeks has probably noticed that general performance has gotten progressively worse over the last few releases.

For release 2.46.871, I identified and solved several problems affecting performance on all views. Things should be noticeably faster/better now, though not perfect. Performance will be an ongoing concern through the next few releases.

(Since the first release of the API, the legacy webapp has been double-dipping on its API calls. This has been a major source of poor performance since the Anniversary Release of the Manager last winter. As of 2.46.871, this is no longer a factor.)

At any rate, this release is a big-ass release (of the kind that I really don't like to do, but keep ending up doing anyway...) and it will certainly have bugs. I expect I'll be doing break/fix releases through the weekend, so please report any issues when you see them!

...and that's about it for now! Happy 1.5 release!

Thanks for using the Manager!

Corrections and Fixes

  1. Addressed an issue where the 'Acid Palms' A&I from older survivors could cause display issues and throw exceptions in the API log. -Eugene S
  2. Fixed an asset issue where 'Dash' was not in the Survival Actions available in the PotSun campaign. -Louis C
  3. Removed an apostrophe from the Fighting Art asset handle for "King's Step" (which was in the assets file as "king's_step" and broke all kinds of shit, b/c handles can't have punctuation).
  4. Survivor Sheet Fighting Art and Disorder "cards" now use "Metrophobic" as their body font (which is closer to how the actual cards look).
  5. Fixed the "cards" subtitles (i.e. the part that goes " - secret fighting art - ") so that it looks smaller at wide resolution.
  6. Fixed a typo that caused settlement/survivor bonuses to not appear on the Campaign Summary.
  7. Addressed a major API performance bug affecting settlement load times:
    1. Settlement objects are now initialized with an attribute called survivors that is the output of a vanilla self.get_survivors() call.
    2. Settlement serialize() requests that retrieve user assets, now use self.survivors instead
    3. The get_players() method has been refactored to use self.survivors
    4. Refactored the Settlement's get_population() method to use self.survivors
    5. Refactored the Settlement's get_eligible_parents() method to use self.survivors
    6. Refactored the Settlement's return_survivors() method to use self.survivors
  8. Fixed two bugs affecting Campaign Summary survivor search: survivor notes will now appear and epithets, fighting arts, etc. will now appear by their names (rather than handles).
  9. Fixed a bug in the survivor class set_bleeding_token() methods that threw an API error when trying to return departing survivors.
  10. Addressed a wide-resolution presentation issue where the Campaign Summary alert re: no survivors was positioned incorrectly.
  11. Fixed a longstanding bug that caused Campaign-specific survivor attribute controls to appear in campaigns that didn't use them.
  12. Fixed an issue where new survivors where not initialized with the correct version of the Disorders asset list and got a totally unnecessary pass through the conversion function.
  13. Addressed a Javascript bug in the Campaign Summary Survivor Search where having repeating A&I handles could cause page rendering issues. 
  14. Addressed an issue affecting the Survivor Sheet where the settlement could initialize before the survivor and hide the spinners: now, when loading the Survivor Sheet, the sheet initializer gets to kill the loaders. 
  15. Normalized the font sizes on the Survivor Sheet 'card' assets at tablet resolution (so they're not different between FA's and D's.)
  16. Worked a nasty-ass namespacing/recursion/defaulting bug in Models.AssetCollection.__init__() that caused asset 'sub_type' values to be overwritten in some cases.
  17. Fixed a pernicious little bug in Models.GameAsset.initialize_asset() where initializing items whose attribute values had any kind of quotes could throw an exception.
  18. Fixed a typo in the Survivor class method set_bleeding_tokens() that prevented API requests from setting bleeding tokens. -Khoa
  19. Fixed a bug in survivor name randomization where, in extremely rare circumstances, a survivor could end up with a list of names as his name. Ooops.
  20. Fixed a bug that could cause new settlements to throw a traceback if they had a survivor die in LY0.
  21. Addressed a few presentation issues at mobile width introduced in the last release.
  22. Adding/Removing Endeavor tokens from the Campaign Summary no longer reinitializes the view.
  23. Fixed/revised some redundant CSS that made the button to manage departing survivors on the Campaign Summary view behave strangely across various browsers.
  24. Fixed a bug in the Survivor class method is_departing() that could return a misleading Boolean.
  25. Fixed a bug in the Settlement class that prevented Final Boss monsters from being added to Nemesis Encounter options on the Timeline.
  26. Fixed a bug where certain types of Disorders (e.g. 'Secretive') could cause tracebacks on returning to the Settlement.
  27. Fixed a JS scope issue in settlementSheet.js that prevented settlement rename operations.
  28. Fixed a typo in the "Prima Donna" disorder.

Application Enhancement

  1. Incrementing Weapon Proficiency score on the Survivor Sheet now shows the full page spinner and refreshes the view if the score is three or eight, i.e. if we're applying a specialization or mastery.
  2. Updated the CSS for Survivor Sheet "cards" so that they can have tables now (thanks, Bone Whisperer!)
  3. Re-implemented the Campaign Summary endeavors as AngularJS + API:
    1. Endeavors are broken out by type (campaign, innovation, etc.)
    2. Innovation-related endeavors have their 'type' info now
    3. Endeavors have been totally restyled to look more like how they look on Innovation/Location cards, w/r/t their icons, colors, etc.
    4. Endeavors lines now have 'cost detail' bars for additional (e.g. resource) costs.
    5. Survivor endeavors (e.g. Matchmaker) can now show up in the list!
    6. Settlement attributes can now be evaluated to determine if an endeavor is available
  4. Re-implemented Campaign Summary view 'Special Rules' as AngularJS + API (which should speed things up a bit, since there's no legacy webapp call to the API for these).
  5. Deprecated the legacy webapp session.Session.set_api_assets() method (which was a transitional bit of code that double-dipped the API calls). 
    1. Removed the code from
    2. Removed the call to it in the new() method for sessions.
    3. Removed the Session object's get_api_asset() and set_api_asset() methods.
  6. Deprecated the vestigial user class method get_campaigns(), which is no longer used (since the Dashboard upgrade).
  7. Deprecated the get_special_rules() method of the Settlement object and ported it to the API.
  8. Removed user calls to deprecated methods, get_settlements() and get_survivors().
  9. Ported the Settlement's update_timeline_with_story_events() method to the API.
  10. The Campaign Summary view no longer pulls ANY assets from the legacy webapp!
  11. Deprecated the vestigial appRootController from kdmManager.js
  12. Enhanced kdmManager.js logging for initialize() method so that it includes a level/facility on each line.
  13. The Campaign Summary view survivor search now uses the /settlement/get_survivors/<oid> route, which is lightweight/faster. Should help page loads.
  14. Departing Survivors can be returned from Special Showdowns now:
    1. Updated the Campaign Summary UI to set the settlement's special_showdown_type attribute (see API below)
    2. Expanded the AngularJS app to allow showdown type setting.
  15. Deprecated loadSurvivors() call from the Campaign Summary view (survivor search). The main API call is used to populate Survivor Search now.
  16. Refactored the Settlement Sheet Lost Settlements controls (in kdmManager.js and in settlementSheet.js) so that they no longer make their own API call. The controls are now initialized in the main initialize() method. Should help page load/refresh speeds.
  17. Added Inspirational Statue support to the Settlement Sheet:
    1. Built Settlement Sheet controls that appear after 'Sculpture' has been innovated
    2. Wrote a controller in settlementSheet.js for the new controls
    3. Built out API support (see below) and made the feature have a pretty, auto-checking button.
    4. Gear rules are tracked by the Manager now. I haven't got them all keyed in yet, but the hooks are there.
  18. Added Monster Volumes support to the Campaign Summary/Settlement Sheet:
    1. Built Settlement Sheet controls that appear after 'Records' has been innovated
    2. Wrote a controller in settlementSheet.js for the new controls
    3. Built out API support for adds and removes (see below)
    4. Monster Volumes now appear on the Campaign Summary view
  19. Updating the Settlement Sheet's Lost Settlements no longer reinitializes the view.
  20. Defeated Monsters list only appears on the Campaign Summary if the settlement has defeated monsters.
  21. Innovations, Principles, Bonuses and Locations now only appear on the Campaign Summary if the settlement has some.
  22. Added Lantern Research/Pulse Discovery support to the Settlement Sheet and Campaign Summary:
    1. Controls appear if the settlement has the Exhausted Lantern Hoard
    2. Wrote a controller in settlementSheet.js
    3. Built out API support
    4. Pulse Discoveries appear on the Campaign Settlement as they are unlocked (i.e. depending on the setting of the level)
  23. Keyed in new Strange Resources: Black Lichen, Cocoon Membrane and Lantern Tube.
  24. Added a new Special Showdown icon and updated the font color in the timelines to use the proper Special Showdown red (#DC2426 or thereabouts).
  25. Moved 'First Day' into the default timeline LY 1 events, since SEs happen during the update timeline phase as part of the new LY. Updated PotSun and PotStars accordingly, since the whole Manager runs on 1.5 rules now.
  26. Refactored the Survivor Sheet special attributes. They're hella fancy now, son. Also: they use a set of pure API hook-ups, so no more reloads. Also skinned them to look real nice at all break points and, with any luck, as we need to add more in the future, they should
  27. Finally closed out the longstanding project of replacing all Survivor Sheet elements with AngularJS/API versions.
  28. Deprecated the Survivor's update_expansion_attribs() and get_expansion_attribs() methods from the Legacy Webapp.
  29. Started the project to refactor Settlement Storage:
    1. Created a new Settlement Sheet storage 'digest' that allows you to click on an item to see details
    2. Created a modal UI for editing storage that uses the API (and does not refresh the view).
  30. Removed Innovations from legacy
  31. The legacy webapp no longer attempts to update settlement mins.
  32. Completely deprecated the legacy webapp's file, which means that literally 100% of the game assets are managed by the API now!
  33. Added the API version and a little note about 1.5 support to the Dashboard exclamation mark modal.
  34. Cleaned up the presentation (a bit) on the Dashboard Twitter modal at all three breakpoints. It still looks like ass, obviously, but now...slightly better.
  35. Banished all HR elements from the Campaign Summary view.
  36. User Asset (Settlement, Survivor) views load somewhat more nicely now, i.e. hiding some HTML junk until the settlement is initialized.

API Development

  1. Created a bug_fixes() method for the Survivor object. Added it to the beginning of the object's normalize() method.
  2. Updated specialization and mastery info for clubs.
  3. Changed the sort order on Survivor Sheet Survival Actions to reflect the new Core game sheets.
  4. Added support for the 'Endure' Survival Action:
    1. Updated the assets file
    2. Keyed in the 'Destiny' innovation.
    3. Updated PotLantern, PotSkull, Bloom People, Green Knight campaign asset definitions to include it.
  5. Implemented Survivor inheritance (b/c I have a sneaking suspicion it will be a thing in AKD:M):
    1. Created a new A&I attribute, 'inheritable' (Boolean). 
    2. Updated the Survivor class new() method  to do inheritance and log it to the event log.
    3. Updated the Survivor Sheet biography to include it.
  6. The Survivor class new() method now saves BEFORE parent operations, i.e. at the end of phase one of creation.
  7. Updated A&Is to 1.5:
    1. Crystal Skin (which also now has a hard max of one)
    2. Leprosy (slight wording change)
    3. Partner
  8. Updated FAs to 1.5:
    1. Clutch Fighter
    2. Rhythm Chaser
    3. Leader
    4. SFA: Beast of Caratosis
    5. SFA: Lucernae's Lantern
    6. SFA: Grace of Dormenatus
    7. SFA: Bone Whisperer
    8. SFA: Scholar of Death
    9. SFA: Synchronized Strike
  9. Updated Innovations to 1.5:
    1. Cooking
    2. Drums
    3. Face Painting
    4. Forbidden Dance
    5. Heart Flute
    6. Partnership
    7. Pictograph
    8. Pottery
    9. Records
    10. Sacrifice
    11. Saga
    12. Sculpture
    13. Song of the Brave
    14. Storytelling
    15. Principle: Cannibalize
    16. Principle: Romantic
    17. Principle: SotF
  10. Implemented Endeavors as a separate asset/model pair in the API:
    1. Created and
    2. The Settlement object now has a method called get_available_endeavors() which creates a list of dictionaries (where each dict is a list of endeavors). This is used on the Campaign Summary (and related views) to show available endeavors. 
  11. Innovation assets now have an 'innovation_type' attribute (which is basically their type for the intents and purposes of categorizing their endeavors).
  12. Ported endeavors from to
    1. Bed
    2. Bloodletting
    3. Guidepost
    4. Momento Mori  
    5. Nightmare Training
    6. Scarification
    7. Scrap Smelting
    8. Shrine
    9. MH - Settlement Watch
    10. MH - War Room
    11. SS - Shadow Dancing
    12. SS - Sauna Shrine
    13. FK - Petal Spiral
    14. Gorm - Nigredo
    15. Gorm - Albedo
    16. Gorm - Citrinitas
    17. Gorm - Rubedo
    18. LK - Black Mask
    19. LK - White Mask
    20. LK - Stoic Statue
    21. SS - Filleting Table
    22. Spid - Legless Ball
    23. Spid - Silk-Refining
    24. Spid - Choreia
    25. Slender - Dark Water Research
    26. DBK - Round Stone Training
    27. DBK - Subterranean Agriculture
  13. Ported the get_special_rules() method of the Settlement object from the legacy webapp to the API. It basically works the same way, but with fewer hacks.
  14. Survivors may now be serialized to dictionaries (just like settlements) using the 'return_type' kwarg of their serialize() method.
  15. The Settlement object's serialize() method can no longer be used to retrieve a settlement's event log (there's special routes for that: use them).
  16. Created a new settlement route get_survivors which does exactly what it sounds like. Should perform way faster than the normal get route for Survivor Search, etc.
  17. Ported legacy endeavors from to
    1. Lantern Hoard (4)
    2. Bone Smith (1)
    3. Weapon Crafter (2)
    4. Skinnery (1)
    5. Leather Worker (1)
    6. Organ Grinder (3)
    7. Stone Circle (1)
    8. Barber Surgeon (1)
    9. Gormchymist (1)
    10. The Sun (3)
    11. Sacred Pool (3)
    12. Throne (4)
  18. Built in debug speed/performance metering (in the form of print debugs that only print on non-prod environments) to the Settlement serialize() method, since its such a piggy.
  19. Inspirational Statue support:
    1. Added a new get_available_fighting_arts() method to the Settlement object that gets non-secret Fighting Arts from living survivors
    2. Added output from the new method to serialize() 'game_assets' elements
    3. Created a new set_inspirational_statue() method and route.
    4. Added the new route to the docs
  20. Monster Volumes support:
    1. Added a get_available_monster_volumes() method to the Settlement object that initializes monster objects from defeated monster strings, uniqifies that list, removes items that are already in the settlement's list and spits out a list of options.
    2. Added the output of get_available_monster_volumes() to the serialize() 'game_assets' element
    3. Added a get_monster_volumes() method to the settlement that returns a blank list if the settlement hasn't got any.
    4. Added 'monster_volumes' to the Settlement's serialize() sheet.
    5. Added add_monster_volume() and rm_monster_volume() methods and routes
    6. Documeted the routes.
  21. Lantern Research Support:
    1. Added lantern_research_level attrib to the Settlement's serialize() 'sheet' element
    2. Added a new get_lantern_research() method to the Settlement class
    3. Added set_lantern_research_level() method to the Settlement class
    4. Created a route for the new method; added it to the docs.
  22. Updated the default timeline to match the new Settlement Sheets (1.5)
  23. Added the 'King's Man' as an option to special showdowns for campaigns with 'Armored Strangers' on the timeline.
  24. Campaign asset definitions now have a 'final_boss' attrib. I also updated all of the existing assets to have one. Campaign 'final boss' monsters are automatically sorted to the bottom of the defeated monsters options lists.
  25. Departing Survivors can be returned from Special Showdowns now:
    1. Added a new route /settlement/set_showdown_type/<oid> which facilitates UI stuff (see above)
    2. Updated the return_survivors() method of the Settlement class and the return_survivor() method of the Survivor class to handle different types of returns.
    3. Returning survivors no longer automatically applies Hunt XP (since the Hunt XP rewards are all over the place in 1.5 rules now).
  26. Settlements are now initialized with a self.campaign object. Refactored a bunch of methods in the Settlement object to just use the self.campaign campaign object. Should help performance a bit (i.e. by not initializing an asset dict every five seconds).
  27. Added the GSK to all timelines and campaign asset definitions that use him.
  28. Re-implemented Survivor 'special' attributes as an API feature:
    1. Added new asset definitions to assets/
    2. Updated PotSun and PotStars campaign asset definitions to reference new handles belonging to the new definitions
    3. Created a new models file for the new asset type.
    4. Added a method to the Settlement object called get_survivor_special_actions() that is used to set a game_assets element on serialize()
    5. Added a new Survivor class method called set_special_attribute() that sets/unsets a special attribute. Created a route for it.
    6. Documented the route.
    7. Wrote a conversion method for the Survivor class and added it to the normalize() stuff for survivors: the 'expansion_attribs' list is now a thing of the past.
    8. Updated the Dragon Traits checker to use handles instead of (deprecated) 'expansion_attribs' names.
  29. Campaign objects now have a baseline() method that enforces certain attributes as defaults so that working with objects can be lazier.
  30. Updated Savior assets to 1.5
    1. Added STR/EVA/LUCK bonuses to the 'Dream of...' A&Is
    2. Keyed in new 'Caratosis', 'Lucernae' and 'Dormenatus' descriptions
    3. Updated all savior assets to reference "Life Exchange" (rather than "Red Life Exchange", "Blue Life Exchange", etc.)
    4. Keyed in "Life Exchange" A&I
    5. Ripped out all of the over-engineering I did in advance of 1.5 (thinking that there were going to be major changes). Savior versioning is no longer a feature.
  31. Added a baseline() method to the models.expansions.Expansion class as well.
  32. Updated the GameAsset base class serialize() method (in so that the method can accept a 'return_type' kwarg and come back as a dict, if necessary.
  33. Created to do interactive, CLI tools of asset models
  34. Added get_sub_types() method to Models.AssetCollection base class methods.
  35. Keyed in a few causes of death from resources (e.g. Radiant Heart, etc.).
  36. Wrote a __repr__() method for AssetCollection objects that says how many assets are in them. Makes the logs easier to read.
  37. The Settlement object's is_compatible() method can inspect objects (i.e. class instances) now.
  38. Devised an interim Settlement Sheet storage solution that will allow us to transition to the real deal refactor (at some point in 2018):
    1. Created a new Settlement method called get_settlement_storage() that creates a 'digest' and 'collection' representation of settlement storage that is JSON-friendly.
    2. Ported gear from Legacy Webapp to API: created and
    3. Added a new assets file, assets/ to track storage location assets and a models file for it.
    4. Gear and Resources AssetCollection objects have a private method get_all_keywords() that spits out a set of all keywords (across all assets).
    5. Initializing a gear or resources AssetCollection object will force the 'rules' and 'keywords' attributes onto all asset dicts that do not already have them (i.e. as empty lists)
    6. The AssetCollection base class methods now include get_assets_by_type() and get_assets_by_sub_type() that allow for lazy lists of handles by asset type/sub.
    7. Created a route called /settlement/get_storage/<oid> that gets you the fancy, JSON-friendly settlement storage.
  39. Refactored the Settlement object to initialize an Innovations AssetCollection as self.Innovations and replaced/refactored all miscellaneous initializations of that AssetCollection in the module (and there were a lot!).
  40. Creating a new settlement has clearer/better settlement event logging and uses the set_name() method to set the settlement's name (which also has new event logging).

No comments:

Post a Comment