• Screenshot issue fixes
    1. Fix save dialog appearing in savefile screenshot.  
    Don't swap buffers when rendering for screenshots, since glReadPixels reads the back buffer.
    1. Fix positioning for savefile screenshot.  
    Needed to flip the Y-coordinate due to coordinate system differences between SDL and OpenGL.
    1. Fix to not gamma adjust pixels of savefile screenshots when using shaders.  
    Savefile screenshots looked to bright on the load game dialog because the pixels were saved with the gamma already applied.  The gamma got applied again when displayed.
        Note: There is a lingering gamma adjustment made in game/modules/tome/class/Game.lua with the comment "Reset gamma setting, something somewhere is disrupting it, this is a stop gap solution".  I left this adjustment in when not doing a savefile screenshot, although I don't see why it's necessary.
    1. Simplify SDL gamma calculation and restore default gamma on exit.  
    When testing with shaders off, the gamma for the entire display would be changed and not restored on exit.  Fixed that and also simplified the calculation to just use SDL_SetWindowBrightness, which calculates a simple gamma ramp behind the scenes.
    1. Fix to gamma adjust pixels of user screenshots when not using shaders.  
    Unlike savefile screenshots, user screenshots are meant to be displayed outside the game.  They should have the gamma applied to the pixels so the picture will reflect what the game looked like when the screenshot was taken.  When shaders are used for gamma, this happens by default.  When shaders are not used, the gamma adjustment must be made to the pixel values during the save.
    See merge request !522
    DarkGod authored
    Browse Files »
  • DarkGod authored
    Browse Files »
  • DarkGod authored
    Browse Files »
  • Autoclear zones
    This is a debug option that takes a list of zones and automatically clears them.  All enemies are killed, looted, various stats per zone are logged, and any escorts found are applied at the end of the path.  Campaigns can define shortcut list of zones and races/zones can define special behavior to go with those shortcuts to handle things like tier1 not being the same for all builds.
    At the moment this is mostly to quickly advance test characters to the phase of the game you want without having to make unsafe assumptions about character state, but I'd like to expand it later to let me simulate repeated runs and average data on them.  For example, I was recently wondering of the exact average impact of exp bonuses/reductions given how they interact with zone level caps.  Would be very useful for answering that.
    There is a lot of hacky stuff done to make this work (2 turns forced after zone move, steps to avoid dialogs) so its likely there are more special cases I haven't noticed yet.
    Please god let me never have to artificially force escorts again that is way uglier than you'd think.
    Example strings:
    - trollmire, ruins-kor-pul, rhaloren-camp
    - tier1, old-forest
    - tier1, tier2, dreadfell
    See merge request !524
    DarkGod authored
    Browse Files »
  • NPC pathing update
    (NPC SHOVE BEHAVIOR):  Currently the AI is incredibly bad at moving towards a player if another NPC is in the way because it prioritizes attempting to shove them in the majority of cases even if a sidestep would work.  Additionally, the shove algorithm factors things like size.  This does not make sense.
    - Shove pressure no longer exists
    - Shoving now only compares ranks and always works if greater, else always fails
    - Shoving will now attempt to move the target aside but if it fails will swap positions with them instead.  This favors a "spreading out" by default but makes sure that the biggest threats can advance through lesser ones in tight quarters
    - Shoving no longer costs the shoved any turn energy
    - New move script "move_astar_advanced".  This always checks actor blocking but doesn't block if it could successfully swap or shove them.  This is autoassigned to randbosses
    - move_astar now calls ActorAI.moveDirection instead of Actor.move allowing it to potentially shove allies
    - Fixed ActorAI.aiSeeTargetPos not checking for invalid target location guesses the first turn it doesn't see the target directly
    - Randbosses can now open doors and move others
    See merge request !523
    DarkGod authored
    Browse Files »