GitHub repository: Hitonoriol/MadSand
Description: Open world sandbox RPG game.
Topics: game, game-development, libgdx, open-world, rpg, survival

Alpha v0.49.20: tag_name: v0.49.20a
body: ### Changelog
* Tweak damage-dealing system
* Hostile NPCs can now attack any Entity, not just Player
* Entity / world animations, ability to play multiple animations at the same coordinates
* Delay entity targets' actions when they're shot at with projectiles
* Expand previous console input buffer (up to `10` previous commands can now be cycled through using `up` and `down` keys when the console is open)
* `--indent` TextSubstitutor flag: automatically replaces newlines with newline + tab combination
* Add option to disable in-game action suggestion button
* Camera-shaking mechanics
* Shake camera when player is attacked
* Floating in-game camera mechanism
* Enable floating camera when clickAction map cell selection is active 
* Zoom in-game camera via Ctrl + mouse wheel scroll
* Entity movement generalization 
* Melee attack movement animation
* Click the resolution button with RMB to switch to the previous entry
* Make notification duration shorter depending on queue size
* Pause player when targeted by a projectile 
(this can't be done via the entity time processor because all actions are committed in one pass from fastest to slowest entity, making it so that player won't be delayed when attacked by an entity slower than them)
* Add damage/heal animated text
* Fix NPC experience bonus
* Ctrl+I debug hotkey: add N random items to player's inventory
* Sort & filter items in inventory UI
* Fuzzy search items in inventory via ItemSearchPanel
* Search, sort & filter items in crafting menu
* CraftItemSearchPanel -- add option to show only items that player has enough resources to craft
* Add recipes from crafting stations adjacent to player to the crafting menu recipe list if it's been opened from the inventory UI
* Load worlds asynchronously 
* Show elapsed time when loading worlds
* Use slightly modified Kenney Pixel UI skin instead of flat colors
* Use libGDX's AssetManager to load game assets and content asynchronously while displaying a loading screen
* Use TypingLabel for NPC dialog text
* Add new hotkey: `Shift` + `F12` - takes a screenshot without the GUI
* Add new debug hotkey: `Shift` + `V` - marks all tiles on map as already visited
* Add a waypoint to the tutorial quest master upon starting a new game
* Add paragraph (`{p}`) tag to text substitutor

Alpha v0.49.19: tag_name: v0.49.19a
body: * Add "close" button to inventory dialog
* Min stat value when creating a new character is now **2**
* Fix quest loading bug
Alpha v0.49.18.1: tag_name: v0.49.18.1.a
body: ### (contains a critical game-breaking bug, .jar removed)

* Dynamically create PlaceableItems from Tile & MapObject Json objects by loading "placeable" property as a PlaceableItem (if present)
+ Generate ItemLists dynamically as well instead of loading them from .json
* SelectDialog -- selection from scrollable option list
* Widgets -- factories for quick scene2d widget creation
* Item Categories and tiers are now loaded from items.json item entries instead of separate file
* Set some Item Categories & tiers automatically at runtime depending on Item type (for PlaceableItems, CropSeeds, Weapons, Armor, Tools)
* CombatEquipment items now have chance to have a higher level based on player's luck & item tier distribution
* Lower tier roll chances
* WorldGenPreset's lake, cave & dungeon presets now have a default state, which can be overridden by specified JSON on per-biome basis
* ItemCategories is now a singleton
* Min & Max rolls for ItemCategoryList now depend on its tier
* Scale Placeable MapObject/Tile textures to fit in ItemUI button, keeping aspect ratio
* TextSubstitutor now can perform dynamic substitutions (replace tile/object/item names with their id's, evaluate lua expressions + ability to hook a String supplier to substitute specified string)
* Item names can now be used in craft recipes instead of id's, using the substitutor syntax ( e.g: @(item: stick)/3:@(item: rock)/5 )
* rollDungeonEntrance() now actually decides whether to generate a dungeon trapdoor tile or not based on "dungeonProbability" WorldGenPreset field for current biome
* Enumerable now has name() method to unify fuzzysearch by name
Alpha v0.49.18: tag_name: v0.49.18a
body: ### Changelog
* Craft recipe items -- use to learn the recipe stored in them
* Runtime-ize ScriptConsumables (ScriptConsumable is now a concrete class & its subtypes no longer exist) // Every script consumable base item (e.g. Scroll, Pill, Craft Recipe) is now just an instance of ScriptConsumable with set scriptMapName and nameTemplate. Script consumable now also has a universal static factory create(script map, consumable name) -- usage example: ScriptConsumable.create("scrolls", "Teleportation") will create a new teleportation scroll
* Non-unlockable crafting recipes: items which  recipe strings are prefixed with "X" will be marked as non-unlockable, meaning their recipes can only be unlocked via the corresponding SciptConsumables (can only be bought from traders for now)
* Lower starting stat sum to 15
* Lower production rate for Farm Animals
* Notify player about newly unlocked crafting recipes with a popup dialog with their icons
* Fix trading bugs / TradeConfirmDialog slider max value is set to max affordable quantity of the item the player is trying to buy/sell
* NPC lifetime decrease rate now varies depending on the distance from player -- the farther the player is from an NPC the faster it decreases
* Trader dialog layout adjustment
* Enumerable interface -- for things that have "id" property and are loaded from a Map, where the key is the id
* StaticWaypointArrow -- waypoint with constant destination, gets removed when approached
* Mark dungeon entrance location with a Waypoint on map when using a Dungeon Entrance Search Scroll
* Max stat lvl is now 35 + New Luck & Accuracy effectiveness formulas & default formula for other stats
* Player's movement speed now has a bottom limit -- 2 pixels/sec
* "Identified" flag for AbstractEquipment items // identify items after equipping
* Display "Cursed" label next to item's name if it's cursed (only when identified)
* Display equip stat info only when item is identified
* Map.putLoot(x, y) -- roll item category & then roll tier & put rolled items on the ground + max item stacks added using this method depend on Player's luck stat
 * Intelligence is now used as a coef for bonus EXP when gaining main Level EXP (Intelligence 35 = EXP x3)
* TradeCategory -> ItemCategory // TODO: Generate category lists at runtime
* AbstractEquipment "cursed" & "identified" flag rolls now depend on player's luck
* Chance to add items from a random ItemCategory  to dungeon floor based on player's luck
* New item quantity cap system when rolling from ItemCategoryLists
Alpha v0.49.17.1: tag_name: v0.49.17.1a
body: ### Changelog
* Overlay info panel -- displays auto-updating labels with various info + Generalize RefreshableLabels & TextGenerators
* Encumbrance (percentage of occupied inventory space) & its impact on Entity's speed -- 100% encumbrance decreases speed by 35%
* OverlayMouseOverListener now ignores junk InputEvents
* Overlay cleanup
* Explicit gc calls during & after world loading and on screen switch & world.enter()
Alpha v0.49.17: tag_name: v0.49.17a
body: ### Known bugs
`None`

### Changelog
* Crafting menu layout & behavior adjustments
* Show tooltips when hovering over CraftButtons
* Display quantity of item already in the inventory in Craft Button text
* Display & animate caught fish textures & notification text from gamelog when fishing
* Now if you click while there's no fish on the hook, the fishing rod'll get damaged
Alpha v0.49.16.2: tag_name: v0.49.16.2a
body: ### Known bugs
* Attempting to fish crashes the game

### Changelog
* Fix GameDialog-related bugs

Alpha v0.49.16.1 (Hotfix): tag_name: v0.49.16.1ha
body: ### Known bugs
* Using Scroll of Teleportation crashes the game
* Character creation dialog can be closed with ESC, breaking current world

### Changelog
* Fix occasional crash on first in-game tooltip update
* Update StatProgressBar immediately after setting SkillValue
* Waypoint dialog layout adjustments
* Ignore unequip hotkey (F) when holding a cursed item
* Add padding to GameDialog button text
Alpha v0.49.16.1: tag_name: v0.49.16.1a
body: ### Known bugs
* Input bug -- sometimes keys don't get removed from heldKeys

### Changelog
* Rename GPS waypoints via Right click -> Rename
* MapEntity.populateContextMenu() -- to add additional contextual options to the right click menu for MapEntity subtypes
* CharacterCreationDialog & LevelupDialog now ignore keyboard input (& can't be closed with ESC, breaking the game in some cases)
* Scroll of Teleportation no longer crashes the game
* World size is now actually limited by WorldMap's xsz & ysz
* Input dialog can now also be confirmed with Enter key
* WorldMapSaver cleanup
Alpha v0.49.16: tag_name: v0.49.16a
body: ### Known bugs (fixed in v0.49.16.1a)
* Level progressbar in character info window doesn't get updated
* Cursed items can still be unequipped by pressing "F" key
* Text of GameDialog buttons should have some horizontal padding when text is wider than min button width
* Game saver bug: Object Collection from Map.getObjects() gets saved to sector file... This shouldn't happen.
### Changelog

#### Map Waypoints
* Generalize Waypoint Arrows + custom waypoints -- craft GPS waypoints at the Mechanical workbench, place them on map & interact with them to activate navigation to them
* Show description & distance to destination above the waypoint arrow
* WaypointDialog -- show all waypoints in current sector, with ability to toggle visual navigation to them

#### QoL
* "New!" label in front of items that have never been obtained before in craft menu

#### Other changes
* Gui widget package structure cleanup
* MapCell -- used to retrieve and store all possible contents of a map cell
* GameWorldRenderer -> WorldRenderer
* Player.doAfterMovement()
* Calculate skill level progress % correctly
* InputDialog -- will be used to rename map waypoints & for other things that may require user input
Alpha v0.49.15: tag_name: v0.49.15a
body: ### Known bugs
* Levelup stat point bug (has something to do with equipment stats) -- not a bug, occurred on a broken save

### Changelog

#### ResourceProgressBar rework
* Pre-calculate MapObject hits when gathering resources (ResourceProgressBar is now animated smoothly)

#### Skill progression rework
* New Skill effectiveness formulas, proper effectiveness cap (at Lvl. 100 for each skill)
* Skill exp scaling adjustments

#### Bugfixes
* TravelStage now uses MadSand.switchScreen() instead of reset(), which forcibly resumed game focus even when dialogs were still on screen
* Gain Farming EXP when gathering crops
* Process movement of non-visible npcs that are still in render distance
* If NPC gets stuck during pathfinding, it now chooses a random direction to move in

#### Other changes
* Higher rewards for procedural quests
* Don't generate world in headless mode
* Player respawn popup dialog & enhancements
* Lower random encounter chance
* Lower sunrise step to 25 minutes
* OkDialog.setFillScreen()
Alpha v0.49.14: tag_name: v0.49.14a
body: ### Known bugs (fixed in v0.49.15a)
* Random encounter dialog doesn't unfocus the game
* Harvesting crops increases Gathering skill EXP instead of Farming
* Entering dungeon via trapdoor crashes the game
* Skill progression is kinda OP

### Changelog
#### New light system
* Enhanced light system -- darken tiles depending on distance from player
* LightEngine -- contains all light processing stuff, begin() method must be called before any of the update() calls and end() must be called to combine all light maps and add resulting changes to the map
* Generate light level textures on the fly and add them to global texture atlas
* Player luminosity -- light level emitted by player, gets combined with sky light when updating map light
* Sky light -- depends on time of day in the overworld / constant in dungeons
* Store light level inside tiles
* MapEntities now can emit light -- calculate light maps of each light source separately, then combine them and add resulting light levels to the map

#### Items, Objects & Tiles
* Doors are now craftable & placeable
* Campfire, furnace & cooking place now emit light
* Torches -- placeable light sources that can be crafted from 3 sticks, 1 small rock and 1 flint
* Wooden planks can now be broken with an axe
* Gravel paths -- crafted using small rocks & flint. Can be placed as tiles to navigate around the map more easily

#### NPC Lifetime
* NPCs now have a "lifetime" field, when it reaches 0, the despawn process begins (implemented differently depending on NPC subtype)
* Max NPC lifetime cap - 20 days

#### New hotkey
* Toggle camera zoom mode between 100% and 150% by pressing Numpad 5 key

#### Other Changes
* Play MapEntity damage animation on damage() call instead of attack()
* Move pathfinding from Map to separate class -- PathfindingEngine
* Migrate all textures to TextureAtlas
* Resource init cleanup
* Player animation loading optimization
* Skill exp is now stored as double, but is still displayed as an integer
* Resource skills character EXP is now multiplied by RES_EXP_COEF
* Hide mouse tooltip & map cursor when taking a screenshot + include milliseconds in screenshot name
* Move SpriteBatch to GameWorldRenderer
* Direction baseOrdinal() (idx of a 4-way direction, ordered counter-clockwise starting from RIGHT) optimization
* Placeable tiles are now placed underneath the player instead of in front of him
* Spawn traders in Plains biome
* Crop update fix + Game load bug fix
* Movement is now processed using KeyBindManager's polling mechanism
* Trader dialog fix
* LevelupDialog now can't be closed until all stat points are assigned
* ItemFactoryUI production/consumption rate precision is now 4
* "Rest Fully" feature will now skip time until health is fully restored along with stamina
* Lower ItemProducer production/consumption rates + Make crop growth slower
* Increase ResourceObject skill only when gathering resources with a tool that corresponds to this skill (e.g. Axe -> Woodcutting, ...) , increase Gathering skill otherwise
* Show popup dialog on skill levelup
* Trading UI adjustments
* Calculate render radius depending on screen resolution
* Pathfinding OutOfMemory exception fix -- call objectRemoved/objectAdded from the correct map modification methods + reindex graph before starting the path search process
Alpha v0.49.12: tag_name: v0.49.12a
body: * Farm animals now begin to starve when out of food for a long time
* Offline time skip fix
* Game machine HP adjustments
Alpha v0.49.11: tag_name: v0.49.11a
body: ### Changelog
* Fishing bait & Farm animals fix
* GameDialog.makeBordered()
* Board games (BlackJack, VideoPoker, Farkle) fixes & UI adjustments
* "Entrance to the dungeon" quest crash fix
* Place player at random free tile in starting camp instead of fixed coordinates

Crops may still sometimes break
Alpha v0.49.10: tag_name: v0.49.10a
body: ### Bugs:
* Fishing bait can't be equipped
* Starting "Entrance to the dungeon" quest crashes the game
* Weird stuff with crop growth update: there's a chance they'll never switch to the last stage

### Changelog
* Copper ore map object, generate copper ore veins in caves
* Now only 1 piece of equipment at a time can be crafted
* Cursed equipment now can't be unequipped or swapped with another item until fully broken, but can be dropped if it's not currently equipped (fix)
* Farkle minigame -- can be played via interaction with farkle machines in casinos
* Casinos now have 25% chance to spawn a stack of 15-200 coins inside of them
* Click handler fix
Alpha v0.49.9: tag_name: v0.49.9a
body: * Change ItemTooltip width according to its contents on ItemUI refresh()
* Quest journal fix
* "Merge All Stacks" button in loot pickup dialog
Alpha v0.49.8: tag_name: v0.49.8a
body: * Refresh ActionButton properly + fix InventoryUICell equip status display
Alpha v0.49.7: tag_name: v0.49.7a
body: ### Changelog
* Show HP percentage in Entity info string
* Display total item quantity in notification when adding a new item to player's inventory
* Show total weight & price in tooltip for item stacks with more than 1 item
* Access current world instance only via getter
<br>

* ItemPipeline -- transport items laying on the ground or inside ItemFactories in set direction once per set interval
* there are 4 types of them currently: Stone, Copper, Iron, Gold. They differ in speed & mass limits
* Item stacks can pass only one item pipe per tick
* Item pipes:
  * are rotated clockwise on interaction
  * can be rotated in diagonal directions
  * extract ItemFactory product from its storage
* Mechanical workbench -- crafting station for Item Pipes (can be built via Build Dialog)
<br>

* Loot pickup fix
* Generalize all time-dependent MapEntities (ItemFactories, Crops, FarmAnimals, ItemPipelines) -- all these now implement TimeDependent and are stored, updated & saved/loaded together
* TimeScheduler -- schedules TimeDependent update() calls depending on their getUpdateRate()
* Move Take/Add item sliders in ItemFactoryUI up one row
* Crop class now extends MapObject
* MapEntity.add(Map, Pair) abstract method -- add self to specified place on map, used when loading time-dependent MapEntities
* World realtimeTickRate is now 0.1 sec
* Copper ore (is not generated anywhere yet), ingots & craft recipe
* In-game tips, appear randomly in game log
* Fix time scheduler entity removal
* Crops will now "jump" to the last growth stage if they've fully grown during the time skip
* GUI focus fixes
* Character creation fix, the game can finally properly reinit new player & world
* Scripted Item fix. Scripts now actually get executed, if exist
Alpha v0.49.6: tag_name: v0.49.6a
body: * Show notifications (from notify() & warn()) in mouse tooltip (NotificationGenerator)
* TooltipTextGenerator -- generates text for GameTooltip, can be enabled/disabled
* CellInfo --> CellInfoGenerator, extends TooltipTextGenerator
* Every TooltipTextGenerator is now wrapped in its own TooltipLabel
(so GameTooltip now consists of separate labels for each text generator instead of one giant label with concatenated text from all generators)
* Action button will now be hidden correctly when attacking a creature using it
* Show confirm/cancel text block in tooltip when clickAction is set (when using abilities)
* Player is now saved alongside the rest of the World object and can now be only accessed via the getter
* Pause keyboard input polling/listeners when firing a projectile
Alpha v0.49.5: tag_name: v0.49.5a
body: * Generalize leftClickAction() for Items when LMB clicked in InventoryUI (fixes weird inventory UI bugs)
* Move item UI cell bookkeeping to InventoryUI
Alpha v0.49.5-rc4: tag_name: v0.49.5a-rc4
body: ### Changelog
* Damage any AbstractEquipment held by player during resource gathering / melee/ranged attack
* Smooth transitions between quest dialogs
* Player run mode adjustments
* Unified dialog keybind system: any dialog bound to a key can be closed by pressing this key again after opening it
* Any in-game dialog can also be closed by pressing ESC
* Refresh in-game tooltip on attack/successful resource gathering
* execAlways keybinds -- can be executed even when the game is unfocused
* Player now moves correctly even when clicking on map objects/npcs during movement
* Build menu crash fix
* You can now fire projectiles not only at NPCs, but at map objects too
* Pause player action execution for correct amount of time when a hostile NPC is in the FOV
* Schedule player's ranged attack with coords instead of MapEntity reference as target
* Speed up hostile NPC animations if they are faster than player
* Refresh mouse tooltip & ranged attack path when NPC is killed by player
Launcher v2.0 (with Java 18): tag_name: launcher
body: ### Launcher & Auto-updater for MadSand
Contains a minimal JVM required to launch the game, so Java is not required to be installed system-wide.  
Uses this repo's release section to parse changelogs and jar links.  

To launch under Linux, `xrandr` is required.

### Changelog:
* Ability to download and manage multiple game versions
* Set VM & game launch arguments
* Option to display a debug console window along with the game
Alpha v0.49.5-rc3: tag_name: v0.49.5a-rc3
body: ### Upd
Build menu is still completely broken in this build

### Changelog
* Reindex pathfinding graph correctly
* ItemFactory init fix
* player run mode fix
* Skill level impact on resource gathering time is now 5x lower
* Auto-damage (when at 0% hunger or stamina) now stops at 40% HP (TODO: make it dependent on Survival skill(?))
* Keybind buttons in AbilityDialog are now dynamically resized depending on the text
* Utils.panic() -- try/catch wrapper, kills the game if errors are too frequent
Alpha v0.49.5-rc2: tag_name: v0.49.5a-rc2
body: ### Changelog
* Fix single item crafting
* Fix game focus related bugs
* Logging to file is now enabled even in non-debug mode. You can enable additional logging with "debug" launch arg or silence logging completely with "silent" arg
Alpha v0.49.5-rc1: tag_name: v0.49.5a-rc1
body: ### UPD
Ok. Known bugs:

  * Player sometimes can't start gathering resources after LMB click on an object when not looking at it (fixed? in 18e3876)
  * Weird crafting bug (not again) -- "cancel" button sometimes(!) confirms crafting operation instead of cancelling (fixed in dd79a00)
  * Game doesn't resume focus after clicking on interaction button with RMB (to attack a neutral creature) (fixed in 18e3876)
<hr>

### Changelog
* Objects built via Build Menu now drop all ingredients when destroyed
* Placeable objects drop their corresponding item when destroyed
* Render loot at 85% of tile size instead of 100%
* Roll ResourceObject loot depending on how much full damage (hp, not harvestHp) has been done to the object
<br>

* Ranged attack

* NPC ranged attack logic:
  * Approach player if he's farther than <MAX_DST>;
  * Shoot (if able too) or approach player when he's closer than <MAX_DST> but farther than <OPTIMAL_DST>
  * Shoot and don't move if player's <OPTIMAL_DST> or less tiles away
  * Use melee attack if player is 1 tile away
<br>

* NPCs with ranged attack won't shoot if other NPCs are in the way
* Abilities -- Passive & Active
* Ability dialog -- use active abilities & view passive ones
* Store scroll scripts separately from items. Every scroll is just a "base scroll" with randomly picked script and name.
* Scroll of teleportation -- teleport player to a random unoccupied tile
* stackability of items is now decided using .equals() instead of just checking if item is a subtype of equipment -- so that other types of items can be non-stackable or stack only by some rule (e.g. scrolls -- all of them have the same item id, but different names & onUse scripts, so \<Scroll\>.equals() also takes scroll's name into account)
* Cursed equipment -- can't be unequipped
* LootTable deserializer + reuse LootTables from pre-defined list in Globals by using "$" prefix -- for example, $table_name
<br>

* ConditionalEffects -- a map with Item predicates and effect lambdas. Used to refresh procedural changes to textures.
* Currently implemented procedural FX:
    * If equipment piece is cursed (7.5% chance currently), it'll be colorized in red
    * 5% chance to have inverted color
    * 20% chance to have a randomly colorized texture
<br>

* Unequip items on drop
* Close loot dialog when the last item is picked up, loot drop fix, grab bag fix
* ClickAction -- one-time BiConsumer that consumes click position (for one-shot skills, etc)
* Display path from player to cursor when in ClickAction mode (currently can be triggered by pressing Y -- click anywhere on the map to teleport)
* Pathfinding fixes
* Pathfinding graph now refreshes as intended on world load
<br>

* Draw projectile trajectory for player/NPC ranged attack
* Highlight projectile path when hovering over targets with ranged weapon equipped
* Drop projectile item on the ground on miss + use coords instead of target reference when shooting a projectile
<br>

* Pills -- consumables that are used to gain and levelup Abilities
* maxCurPathLen -- specify max length for path to mouse cursor in map cell selection mode
* Blink ability -- teleport for 10 stamina
* Ability dialog adjustments
* postGenScript -- executed after all generation steps have been completed for current location
<br>

* Low-kick and Blink abilities are affected by their levels:
* Low-kick -- +2% damage per level
* Blink -- +1 cell teleport range per level
* Each ability levelup requires x2 more pills than the previous level
* Stack ScriptedConsumables of the same type
* Colorize scripted consumables differently depending on their type
* Don't spend subtick time when turning using arrow keys
<br>

* skipTutorials flag
* AutoCheckBox - refresh specified boolean values automatically on checkbox value change
* Settings menu adjustments
* Attack neutral NPCs by clicking on interaction button with RMB
* Player now can't interact with hostile NPCs (take a quest/trade/...)
* Healing notification in game log
* Game context menu adjustments + "Attack" option now uses ranged attack if player has ranged weapon & projectiles equipped
* Action button adjustments
<br>

* Run ability -- add path to mouse cursor to player's mvmt queue & consume [<path_length> * ability cost] stamina (basically lua-wrapped feature from previous commit)
* Graph node indexing optimization (sorta) + crash fixes
* KeyDialog -- dialog for choosing a key for keybindings
<br>

* Ability hotkey binds + Hotbar that displays all binds
* HotbarAssignable interface -- implemented by Items & ActiveAbilities
* Key selection dialog adjustments
* Settings menu crash fix
* Save prefs on exit
* Inventory/trading tests & fixes

Alpha v0.49.4: tag_name: v0.49.4a
body: * Ranged attack: equip a ranged weapon (Currently only 2 of them exist: Wooden bow & Slingshot) and some projectiles and click on any NPC that's farther than 1 tile from you to shoot
* Wooden bow can be crafted from sticks & plant threads
* Stone arrows can be crafted from sharp sticks & small rocks
<br>

* Mouse click action cleanup
* Death screen layout adjustments
* Separate action cost for ranged attack
<br>

* Chance to miss when using ranged weapons -- depends on distance to target and accuracy stat
* Display chance to miss in the in-game tooltip when hovering over an enemy NPC
* Display projectile damage in tooltip when hovering over a projectile item in inventory or equipment sidebar
* Display NPCs health state always instead of doing it only for known NPCs (which were killed before at least once)
<br>

* Craft multiple items at once by choosing the quantity of item to craft via SliderDialog
* Ranged weapons and projectiles can now be crafted at the Fletching Table (can be built from wood, feathers & flint)
<br>

* Separate damage animation for map objects
* Base ranged attack will now be calculated for distance to the projectile obstacle, if it exists, instead of using distance to target
<br>

* Throwing weapons -- projectiles that can be launched without a ranged weapon (currently only Boomerang)
* NPC aggro animation, heal animation
* Line.rayCast & Line.forEachPoint -- raycast on-the-fly without pre-calculating the line
* Don't close inventory after clicking on non-equippable item
Alpha v0.49.3: tag_name: v0.49.3a
body: * Movement animation speed now depends on Entity's speed stat
Alpha v0.49.2: tag_name: v0.49.2a
body: * NPCs now move instantly (without animation & movement queue) when out of player's view or during the time skip
* NPCs farther than 2.5 * \<player's fov\> tiles away from player won't be simulated during the time skip
* Other time skip optimizations
* NPCs can now see through objects with "nocollide" flag
* Fix: Errors will now be written to errorlog file when the game is launched without the "debug" argument
Alpha v0.49.1: tag_name: v0.49.1a
body: * Generate bitmap fonts of different sizes instead of font scaling
* Time machine -- can be built from iron & time flux powder, allows player to skip World time & realtime ticks using time flux powder
Alpha v0.49: tag_name: v0.49a
body: * You can now rest until the stamina is fully restored (RMB click on your character -> "Rest fully")
(If any hostile NPC spots player while he's resting, the resting process will be interrupted)

* Unique item UIDs are now long values
Alpha v0.48.3: tag_name: v0.48.3a
body: * LootDialog - shows items that are laying on the current tile. You can either pick them up one by one or all at once.
* nutritionalValue for consumables - depends on item's satiation, healing and stamina amounts. Gets added to player's foodTicks (effectively adds n ticks to the next food points decrease)
Alpha v0.48: tag_name: v0.48.2a
body: * Display quest rewards in the last dialog window of quest completion dialog chain
* {ITEM_REWARD} and {EXP_REWARD} text substitutor tags for quest dialogs
* Player's main lvl exp won't be increased when increasing one of the fighting skills anymore
* Procedural quests fix
* Player now has to pay coins to recruit workers for his settlement
* Loot duplication on pick up fix
* Choose quantity of item to drop with slider dialog
Alpha v0.47: tag_name: v0.47a
body: * New procedural quest type: Hunt quest -- kill wild animals and bring meat to npc
* Game text substitutor now replaces {KILL_OBJECTIVE} and {ITEM_OBJECTIVE} with current quest objectives
* Roll Item rewards for procedural quests
* Procedural quest objectives and rewards now depend on player's level
Alpha v0.46: tag_name: v0.46a
body: * Dungeon quest text adjustments
* Restore HP and stamina to max when changing stats during character creation
* New fish that can be caught in saltwater and deep saltwater
* New fishing spot - saltwater (spawns in Cold Plains)
* Abandoned gas stations now have a 30% chance to have a vending machine instead of spawning it always
* Lake generator  from & to params adjustment
* Dungeon generator now fills map with default tile before generating. This fixes occasional bug with grass tiles in dungeon
* 4 new hostile NPCs (spawn on dungeon floors 1 & 2 in Plains biome)
* Reduced daily reward to 1 grab bag
* Nerf grab bag probabilities
* Fishing rod now gets damaged on successful catch
* Grab bag dialog (show list of items player got from a grab bag)
* Loot tables now roll a value [0, 100] once and check it against table entries instead of rerolling a new value for each entry
* Generate abandoned gas stations in Desert & Cold Plains
* Tree seeds -- can be planted on the grass tile, will grow into a lvl 0 tree; Can be crafted at the seed barrel
* New map structure: crop plot
* Previous console input now can be swapped with current text in game console by pressing UP key
* Spawn mushrooms in Cold Plains
* Rose and Lilly - spawn in Plains, can be gathered for plant fiber
* Hammer -- allows to break any object at cost of not getting any resources
* Randomly spawned objects can't  be placed on top of a foreground tile (e.g. water) anymore
* WorldGen can now generate more than 1 lake type in a biome
* Weapon's durability = its lvl * 500
* Weapons now have durability and receive 1 damage per successful hit
* All current structure scripts now use width/height values from structure's java object. Structure header no longer returns them.
* New Map Structure - market stand
* Boxes of carrots, potatoes and apples now drop their respective itemson interaction
* Settlement upgradeSize() method -- increase settlement's width & height by SIZE_UPGRADE_BY; consumes lvl * 500 coins from settlement's warehouse (not used yet)
* Display biome and owner faction in Land dialog + display warehouse contents if there's a settlement in the current location
* Max lvl NPCs now won't be uniquely named if they already have an auto generated name
* Map.locateObject by skill
* Settlement.addWorker method
* Workers in settlements now gather their corresponding resource every realTimeTick
* New map structure in cold plains - igloo
* List all workers in Land menu
* Establish a new Settlement in the current location from the Land menu (only 2 kinds of items are required: Coins (500 * player.settlementsEstablished) & Random material of tier # player.settlementsEstablished)
* fill floor in igloos
* Map.fillTileCircle/fillObjectCircle()
* Fix TradeListContainer.rollTier()
* Regular & Trader NPCs now have a chance to not be able to give procedural quests to player
* New Pair methods: randomInCircle(x0, y0, radius) and randomInTriangle(p1, p2, p3) -- generate a random point inside a shape with specified parameters
* New lua util function: utils:rollLoot(tradeCategory, [tier]) -- returns one item id rolled from specified category
* Sandstone and ice can now be mined with pickaxe
* New map structure in Desert - Pyramid. Can be entered only by breaking its walls with a pickaxe.
* GameDialog addLuaButton(btnText, luaCode) method. Can be used to easily script dialogs from lua using lua code
* SliderDialog - dialog for numerical user input in specified range
* "Might need some help" label in the in-game tooltip when hovering the mouse over an NPC which can give quests
* BlackJack minigame. Can be played by interacting with Video BlackJack machine.
* Removed settings button from the main menu
* Scale rollList roll counts for objects & tiles when generating a new sector according to its area. Now smaller maps won't be cluttered with a ton of objects and bigger ones will have more of them
* Video Blackjack machine now breaks after  a certain quantity of games played
* New map structure: Casino -- generates in Plains and Dead Lands
* Larger locations -- now auto-generated locations can be up to 500x500 in size
* RollList "scalable" flag -- if false, rollCount won't be scaled with map's scaleFactor
* Scale NPC spawn lists and maxStructures overworld preset field according to map area
* Lowered base probability of missing an interaction with an object when gathering resources to 35%
* Changed base food ticks to 2
* New map structure - Ancient Altar. Generates in Dead Lands. Contains 1 dungeon key laying on a stone pedestal, which must be broken with a hammer to take the key.
* New minigame: Video poker. Can be played by interacting with video poker machine that can be found in casinos
* NPCs and Player now have separate stat containers: Stats and PlayerStats
* Consumables no longer replace currently held item on use
* Non-human NPCs now can't give quests to player
* Reduced Exp requirement for Player's level
* Map.addStructure(name, x, y) -- add map structures to specific coordinates
* Equipment with lvl > player's lvl now can't be used (except for lvl 1 items when player is at lvl 0)
* Consumable items now can be used by clicking on them in inventory with LMB
* Map properties and loot are now saved as a json string
* Map objects now have random amount of hp (which affects the amount of resource gathered from them) in range 55% - 175% of base hp.
* Misc statistics table in character info dialog (currently displays total kill count and total count of player-established settlements)
* Display % of HP when hovering over map objects
* Player can now request a procedural quest from NPCs using "Do you need any help?" dialog option when talking to them
* Player is now able to recruit neutral human NPCs to work for his settlement when talking to them
* Diggers now choose a random diggable tile and roll a resource from it every realtime tick
* Display NPCs occupation in dialog title
* Show item icons in settlement's warehouse
* Location.isSettlement(wx, wy) -- check location if a Player/NPC-owned settlement exists in it or if it's a wild/not yet generated land
* Randomly assign all human npcs as workers and one of them as a leader in an NPC-owned settlement
* Animal farm map structure
* Newly generated locations now have a chance to contain a settlement and to be under control of a random faction
* Refresh pathfinding graph when starting a random encounter (fixes crash)
* Move all resources to game jar -> (External files are now only accessed when saving/loading the game)
* Farmer NPC quest - grow 100 cucumbers
* Miner NPC quest - mine 30 iron
* Miner NPC -- spawns near mine entrance in starting location
* InventoryUI is now a GameDialog
* Proper screen resize during the game (press F11 to go fullscreen)
* Use %Title Text% in dialog chain strings to set the default titles for all dialogs in chain
* Dungeon keys tutorial
* Prefs class -- store and save/load preferences
* Settings dialog: options to choose screen resolution and toggle fullscreen mode
Alpha v0.45: tag_name: v0.45a
body: * New map structure: abandoned gas station (contains vending machines[that work as traders] and gas pumps[currently useless])
* Stamina action cost when gathering resources is now determined by Survival skill
* Skill rolls now receive additional % bonus determined by current level progress
* Player join and leave faction methods; not used anywhere yet.
* Fish sprites now decrease in size when the catch timer is active
* MapStructure object now receives structure's width & height from lua script and calculates max coordinates inside the structure. It also now contains methods randX -- random x coordinate inside the structure, randY -- random y coordinate inside the structure, getFreeTile -- find a tile inside the structure that doesn't contain any objects or NPCs; and clear -- delete all objects from the structure. All these methods can be used from lua scripts, making the structure code much shorter.
Alpha v0.44: tag_name: v0.44a
body: * 12 new animals that spawn in Desert, Plains and Cold Plains (can be killed for leather and raw meat)
* Boxing gloves - lvl 1 offhand weapon that can be crafted using sewing machine
* Survival skill roll bonus (affects HP regen and hunger) tweaks
* NPCs with lvl higher than player's now give 3.4 more exp for each level when killed
* NPCs that are spawned with lvl == player.lvl + MAX_LVL_GAP now have a unique name attached to them ("<generated name> the <mob default name>")
* Loot tables fix
* Added Algae covered box to fishing loot table
* Dialogs now have dark background
Alpha v0.43: tag_name: v0.0.43a
body: * ActionButton fix -- now the check occurs only after all timed actions in the world have finished
* realtimeRefresher fix #2. Yep, previous build crashes on new game start.
* Reputation NpcState fix. Aggresive-by-default mobs are now unaffected by the reputation.
* If launched with "debug" flag, print output to the console, otherwise, print standard output to MadSandOutput.log and errors to MadSandCritical.log
Alpha v0.42: tag_name: v0.0.42a
body: (this one crashes too, fock, what tha shiet is happenin)


* Display Location name in top-right corner of the Overlay
* Map locateObject() method -- will(?) be used for resource gatherer NPCs
** Still thinking about the Settlement mechanic.... hmmmm.....
* realtimeRefresher crash fix + item skillDamage fix
Alpha v0.41: tag_name: v0.0.41a
body: ### (UPD Nov 29: oops, it's completely broken -- realtimeRefresher crashes the game 5 seconds after loading the world)

* Save Location info to a separate file
* Reputation system -- increase for quest completion, penalty for killing an NPC that belongs to a certain faction
* Location now has faction field (faction it belongs to)
* Faction reputation list in character info dialog
* Neutral Npcs (that are not hostile by default) from factions with which player has negative reputation will become hostile
* If a hostile Npc was not provoked(hit at least once) and player's reputation with Npc's faction has increased beyond the "hostile threshold", it will become neutral again
* Display Npc status in mouse tooltip: Neutral/Hostile
* Evasion skill -- gets increased when NPC's attack deals 0 dmg to player
* 50% of Melee skill lvl is now added to base attack
* 30% of Evasion skill is added to base Defense value
* The amount of exp that's added to a resource gathering skill is now determined by the lvl of the resource object
* Stat Label refresh no longer restores hp and stamina to max amount
* Iron axe & pickaxe (can be made using anvil)
* Procedural quest timeout check fix
Alpha v0.0.40: tag_name: v0.0.40a
body: * New tutorial NPC - Pirate (Fishing)
* Plains biome dungeon now has more kinds of mobs starting from the second floor
Alpha v0.0.39: tag_name: v0.0.39a
body: * 3 new kinds of wood: Pine (lvl 1), Palm (lvl 2) & Death wood (lvl 3)
* New luck roll probability formula
* Skill rolls for resource skills now receive +35% bonus (maybe a little bit too much, but we'll see)
* EquipStats fix
* TradeList roll fix for non-stackable items (could roll 0)
* Lvl 1 of woodcutting now requires 15 exp to reach
* Equipment sidebar is now refreshed on successful catch when fishing (to refresh the bait quantity)
* Player now has a chance to not spend bait depending on Fishing skill level
Alpha v0.0.38: tag_name: v0.0.38a
body: * Non-unique items can now be equipped in offhand slot (For example, fishing bait)
* First fishing spot type: any water tile that spawns in Plains biome
* Fishing dialog appears when interacting with fishing spot (will contain the fishing minigame)
* To start fishing, approach a fishing spot while holding a fishing rod (crafted from sticks & plant thread) and bait and click the water tile or press enter.
* Fishing minigame: Wait for a fish to start changing color & for the progress bar to appear and click with LMB to catch it. If you don't do this in time, the fish'll get away.
* Fishing skill. Affects max number of fish that can spawn in the minigame, spawn time and catch time. Player gets 1 exp to this skill on successful catch.
* Equipped items are now saved and loaded by their index in inventory
* Worms (fishing bait) can now be dug up from dirt piles that spawn in Plains biome
* Skill requirements are now stored in json file
Alpha v0.0.37: tag_name: v0.0.37a
body: * "Turn in to" column in QuestJournal
* QuestArrow -- arrow that points in direction of an NPC once all the quest objectives have been completed.
(If NPC is not in current location, arrow uses world coordinates and points in direction of the sector NPC is in (relative to current sector))
* Melee skill (doesn't affect anything yet, increased by attacking mobs)
* Map structures + starting location camp is now a structure
* NPC Pathfinding
* Npc levelling
* Generate random structures (+ First test structure in Plains biome - stone shrine)
* Traders now randomly increase prices of items they are selling
* "Endless" Production Stations -- stations that don't consume anything, only produce items:
-- Mushroom basket - produces edible mushrooms
-- Beartrap - produces raw meat
-- Woodcutting place - produces wood. Only 1 is spawned in Plains biome & can't be built from build menu.
* Game log notice on quest objective completion
* Crows & Chickens now drop raw poultry that can be cooked at the cooking place
* Wheat can be processed into flour that's used to craft bread (at the cooking place)
* Farm animals now drop raw meat & leather
* Resting now skips the right amount of time
* Farm animals can now fight back if attacked
* Travelling kits can now be crafted from 5 leather pieces at the sewing machine
* Accuracy stat tweaks
* Display NPC level in the in-game tooltip
* Display item level (for armor/weapons)
v0.0.1a - v0.0.36a: tag_name: v0.0.36a
body: ## Changelog:


### November 2020
* Random name generation for NPCs, set default quest dialog title to NPC's name
* Procedural Quests for traders -- if you complete a task for trader, his currency supply will be replenished
* TraderDialog - now when interacting with a trader NPC instead of opening TradeUI, a dialog with an option to trade, help trader (complete a random task for him), or close the dialog will apper.


### October 2020
* Recipe crates, 1 per sector - interact to unlock a random build recipe
* Fetch, Kill procedural quests
* Fetch quests - spawn an item in current location and ask player to bring it back
* Kill quests - roll mobs from current location's spawn lists
* Critical hits
* Rng attack: attack is now randomized between (str-def)/2 and str-def
* Craft and Resource quests (Craft/Gather specified quantity of specified item)
* You can get a procedural quest from any Regular npc on successful luck roll
* Random dialogs with friendly Regular Npcs
* Player is now part of the "act"-list in world time system
* Quests store NPCs world position and uid (will be used later)
* If there are any hostile mobs faster than player in player's fov, they will act first and player's action will be delayed via actDelayTimer
* Bestiary -- dialog with mob kill count + kill a mob 10 times for its stats to appear in bestiary
* Display Build & Craft recipe unlock progress (currently unlocked / max)
* Context menu now works
* You can now attack neutral mobs (that are not hostile by default) by right clicking them and selecting "Attack" option, or, well, using arrow keys
* New speed formula + unlockable build recipes
* Better(?) NPC time system Npcs and regular per-tick events (player hunger, tile damage, in-game time) are using separate time systems:
* World per-tick events work the same way as before: when player exceeds his max amount of AP, a world tick(1/150 of in-game hour) occurs and AP rolls over
* NPC time, however, now works like this:
- Player commits an action (it can be shorter than a whole tick), and world.timeSubtick(length) gets called, where length is \<action AP cost>/\<Player's speed(max AP)>
- NPCs, from the fastest to the slowest are polled for actions they want to commit, while adding new Player action's length to NPC's tickCharge (actions can't be longer than NPC's accumulated tickCharge)
- If NPC can't do any action that's shorter or equals to its current tickCharge, it skips its turn while accumulating time spent by Player (so slower NPCs still can do their actions, but well... slower.)
* ???
* Repeat
* Display world time and day in top right corner of overlay
* Don't display items with cost 0 in tradeUI list
* Spawn the Old Farmer NPC closer to player's initial spawn point
* Satiation now can't be < 0
* "Your journal is empty" label is now properly centered in quest journal
* Quest objective progress, kill quests + updated QuestJournal
* Kill counter
* Tool hp is now displayed in percents instead of hp points
* You can now smelt 1 iron/gold ore into 2 ingots
* Dynamic stat checks to show tutorial dialogs (lua)
* Palm trees now drop palm sticks, Dead trees - deathwood sticks, pines - pine sticks
* Player's and Trader's coin quantities are now displayed in TradeUI header
* To put currently held item back to your inventory, you can now open your inventory again and click on it (or just use "F" hotkey)
* Stat progressbars in overlay, skill progressbars in character info dialog, scrollable game log
* Highlight damage taken from mobs with different color in game log
* Display Action Button when holding seeds and standing on a "soil" tile
* Display resized item sprite instead of loot bag sprite when only one item is laying on the ground
* Display how much of raw material left in item factory
* Display production status tooltip when hovering over farm animals
* Survived time on death screen is now in days instead of ticks
* (Fix) Random encounters no longer consume Travelling Kits
* Now npcs spawn in every biome
* Mark currently equipped items with blue letter "E" in inventory
* Stat sum fix (now excludes defense)
* Quest journal fix (milti-line text is now displayed correctly)
* You can now equip and unequip Armor/Weapons/Offhand equipment with LMB while in inventory
* Defense stat is now displayed in character info window
* Initial mob spawn now uses separate probability field: initialFriendlyChance
* Notice() now prints messages using alternating colors
* Food item stat adjustments
* initialMobSpawn - roll mob spawn lists on world generation
* You can now build Mine Entrance using build menu
* New quest from Richard - build a sewing machine and craft yourself an armor piece
* New quest from the Old Farmer - Farm Animals tutorial
* New mobs spawn in desert
* More monsters in ambush random encounter
* Mines, mine entrance spawn in Plains biome (1 per location)
* You can mine stone, iron and gold in mines using pickaxes
* Iron can then be smelted into ingots in furnace (use build menu to build it) using coal (produced by campfires)
* Then, you can build an iron anvil and craft iron equipment
* Iron is also used in Wheelbarrow's build recipe (it produces hay, that's required by farm animals)
* New crafting station - Sewing Machine (used to craft beginner armor -- from plant fiber & plant threads)
* More hostile (orc & troll) and neutral (moths) mobs in plains biome
* Now hostile mobs have a chance to spawn during the day (based on luck stat)
* New location is now generated with only 1 layer (the location itself). Other layers (dungeon levels, mines) are generated later when first accessed by player
* Npc movement queue (if npc makes more than 1 step in 1 tick, new movement requests will be queued and performed after the previous ones)
* WorldMapSaver is now in separate class + layers now save with their layer number (will be used in future updates).
* Memory leak fix (the game now consumes 3 times less memory after the world load)
* Prettier CreateWorldDialog
* "Delete" button in Game Load dialog
* Animation queue; Attack animation (displayed when player attacks NPC or NPC attacks player)
* TradeCategory All: roll random items from all categories
* Player is now rendered with correct z-depth
* Objects can now be centered (render with origin point not in the bottom left corner, but in the bottom center)
* NPCs now can't walk through player
* Require a Travelling Kit item to travel to unexplored sector (For now the only way of obtaining a Travelling Kit is by buying it from tool trader)
* New QuestMaster NPC - Old farmer + the first farming quest (tutorial)
* Allow resource gathering in dungeon after all hostile mobs have been killed
* Lower base ResourceProgressBar cooldown once again (0.29 sec)
* Loot tables in dungeonPreset + more loot in the Plains dungeon
* New crafting stations:
1) Furnace -- smelt ore using coal & ore item;
2) Cooking place -- cook raw food (currently only raw meat that's dropped by monsters);
3) Anvil -- craft equipment from iron ingots
* Stamina -- restores when resting/walking & gets decreased by resource gathering & when using items, if it gets too low, player can't gather resources until it increases back
* ResourceProgressBar -- show progress bar when gathering resources
* Display exp reward when killing a mob
* Smoother skillRoll probability increase with each new level (currently up to 64% at \<skill level> 100)
* Update light when player destroys object by harvesting resources
* "fullscreen" launch flag - start the game in fullscreen mode
* QuestListDialog -- if npc has more than one available quest, it's quests can be viewed and chosen from Quest List dialog
* previousQuest Quest field -- if != -1, quest becomes available after the quest with id <previousQuest> has been completed
* New quest -- craft a pint of beer
* Crafting stations -- craft certain items only via interactions with certain map objects
* Craft stations can be built using BuildMenu 
* (first crafting station - seed barrel (craft seeds from plant fiber) )
* Debug mode is now disabled by default. To run the game in debug mode, you must pass the "debug" argument to it (java -jar madsand.jar debug)
* Grab-bag item type -- roll random items from specified loot table
* Daily bonus based on player level -- item grab bags (currently 2 kinds of them: resource & farming bags)
* Non-visible walls are now partially darkened instead of not being rendered at all
* Short LootTable string format: (\<probability>|\<id>/\<quantity>:\<id>/\<quantity>:...) (\<probability>|...)
* Farm animals -- consume hay, produce specified product item
* Weapons & Armor now have a "main stat" -- strength for weapons & defense for armor - it will be rolled first; bonus stat rolls will be performed after the main roll.
* Quantity of item bonus stat rolls is now based on item level
* Add random word to weapon/item name
* Item factory info in tooltip (works for farm animals too)
* Roll trader tier when spawning a trader. Lower tiers have higher chances to roll.
* "Materials" trade category (materials can now be bought from traders)
* Health regen when satiated is now based on Survival skill level
* Time to crop harvest in mouse tooltip
* 10 new crops
* Map and World map positions are now displayed on the overlay (top right corner)
* "Travel to the next sector" button when player is close to the edge of current location
* Dungeon finally has an exit to the surface: DungeonPreset exitFloor field -- specify floor where the exit will spawn
* Random encounters when travelling between sectors. Currently there are 2 of them: (Monster ambush -- small map, 3 to 8 monsters spawn around the player; Wandering trader -- super small map, one trader npc)

### September 2020
* Item factory build menu -- open from bottom overlay panel or by pressing B
* Item factories -- objects that consume some item and produce another item (e.g. Campfire -- consumes wood, produces coal; Wheelbarrow -- consumes plant fiber, produces hay)
* Upgrade item factories using their raw material items
* Crops now grow in realtime
* Cleanup of old Maps that are still loaded in memory
* Realtime tick system
* Clamp player's coords on location switch
* New sprites for desert biome
* TravelScreen - transition screen with progressbar, displayed when travelling between locations
* Location init scripts are now executed instead of worldGen call (if script exists), so if you want to add stuff on top of already generated map, you have to call worldGen instance from lua (more in locations/readme.lua)
* Quest deleteRequiredItems flag
* Location init scripts - if a script with name !x!y.lua exists, execute it before generating the sector for the first time
* New quest - retrieve the dungeon key
* Require a dungeon key to access the dungeon
* Dialog script button: [Button Text @ lua code ]
* Vending machine npc
* erodeTileRectangle - have a chance to place a tile inside a rectangle (for generated structures)
* specialRoomTiles/Walls -- "special" dungeon rooms are now generated with specified walls & floor
* Dungeon floor min/max size fields
* Trader NPCs; Spawn traders in random dungeon rooms
* Loot tables (you can now specify probability of successful loot roll)
* Defense stat -- subtract defense from attack | min attack = 1
* EquipStats fixes: bonuses no longer stack after the save/load cycle; bonus stats are ignored when calculating current statSum()
* Highlight positive / negative equipment stats w\ different colors
* Levelup dialog - lets player increase one stat per levelup
* Reworked equipment sidebar (displays item tooltip on mouseover + if you take a consumable item to your hand, close your inventory and click on its sidebar image, you'll use the item)
* Entity speed is now based on dexterity
* Mobs can now attack in diagonal directions
* Mobs will spend all their action points on attack when they can. (This means that a fast mob can now attack multiple times per turn)
* Manual stat adjustment in character creation menu
* A chance to spawn hostile mobs at night & friendly mobs during the day
* Natural object regeneration every in-game hour with specified probability
* Scroll of Dungeon Entrance Search - finds the coordinates of the dungeon entrance. You can currently get it by accepting the dungeon quest from Richard
* Quest Journal - you can open it by pressing "J" on keyboard or by pressing a button on the bottom hotbar
* F12 - take a screenshot
* Random map size
* Dungeon loot
* Better looking crafting menu
* Save/Load game log, Restore player's direction sprite on load
* You can now attack hostile mobs not only with arrow keys, but using mouse and WASD keys
* Mobs can't starve to death now
* Mobs now actually die when killed
* Exp reward for killing mobs
* Print damage taken from mob to gamelog
* TradeUI (in testing phase - gather some items, approach Richard and press CTRL+T to trade with him)
* Bottom button panel (hotbar)
* Partially darken already seen tiles instead of not rendering them
* Lua-coerced World instance (it's now possible to script most of in-game things using lua)
* Execute lua script on new world creation
* Execute a script each player.doAction() call
* Execute script on character creation
* Json resource lists
* New lua bindings (more in scripts/readme.lua)
* If you want to do a specific one-time thing in a script (e.g. show a dialog when player level ups a certain skill to a certain level, 
	you can use player:registerLuaAction(name) and then check if this action has been done before with player:luaActionDone(name))


Content:

* New Quest (tutorial branch) -- find a dungeon entrance & kill 10 rats
* Coin weight is now 0
* Wood weight reduced to 0.25 & Max inventory weight multiplier increased to 7.5 (because sometimes it was impossible to complete the first tutorial quest... meh)


### 6 Jan 2019
* craft_quantity item field (sets quantity of items player gets after crafting an item by its recipe)
* Now skill level affects number of random drop rolls on successful object interaction
* Stat menu improvements
* Now you can fail interaction with object (based on Luck stat)
* Stat window now can be opened by pressing Q and closed by this key again
*  When player enters the cave, a cave exit tile is created right under him
* Now each turn player has chance to not spend a satiation point based on Survival skill level
* Stone tools' craft recipes adjusted

### 5 Jan 2019
* New tutorial quest from Richard (now there are 3 of them)
* New resources and items: {Plant fiber, Plant thread, Flint pickaxe}
* Now seeds can be crafted from plant fiber
* Satiation restore amounts adjustments for consumables
* Object generation quantities adjustments for biomes
### 4 Jan 2019
* Now if you hover the mouse over the loot, or stand on it you'll see the loot cell contents. To pick up some loot you need to stand on it and click on your character.
* Now info about how much HP and satiation selected consumable item restores is displayed on mouseover in inventory.
* If you have no inventory space and try to pick up some item, a message will appear in the log and item you tried to pick up will be dropped back to the ground.
* You'll now be notified via game log when you unlock a new craft recipe
* Minor fixes and UI adjustments
### 3 Jan 2019
* 8-way object and NPC interaction
* Click on yourself to rest for 1 turn (restores 1 action point per turn)
* New BuildScript commands: 
 `tutorial_show <name>;` - shows a tutorial from tutorial.xml
`dungeon_ascend;` - ascends player 1 dungeon level closer to the surface level
`dungeon_descend;` - descends player deeper into the dungeon
### 2 Jan 2019
* Raycasting Npc FOV
### 31 Dec 2019
* Now if you stand in front of NPC, object or on an interactible tile, a button will appear. By clicking it you can interact with the thing that's in front of you;
* Player now can't damage objects in the dungeon
* New tutorial quest from Richard
* Dungeon entrance in "plains" biome (1 per sector). You can use it by standing on it and interacting with it.
### 30 Dec 2019
* Raycasting lighting system
* Player's FOV decreases from 18 to 23 p.m. by 1 each hour and increases from 4 to 9 a.m. to its initial value
* Multiple dungeon floors (capped by DUNGEON_LAYER_MAX)
* When player enters the floor for the first time, he appears in an existing room.
### 29 Dec 2019
* Currently equipped items are now saving/loading correctly
* Killed for the first time NPCs are added to known npc list, if NPC is on this list, then info about it will be displayed in tooltip on mouseover.
* Randomized npc loot
* Inventory UI now must be initialized separately from Inventory
### 28 Dec 2019
* Weapon / Armor bonus stat roll (based on their level); Attack calculation based on currently held weapon, entity's base strength and accuracy (each level of accuracy halves the chance to miss)

To test weapon stat roll you can craft Stone Sword (or give it to yourself using command player_give 12 1).
Each one you craft or obtain will get unique buffs/debuffs.

* Player can now attack other entities using arrow keys or "Attack" button in the in-game context menu.
* Armor (head/chest/legs): equip/unequip (armor bonus stats are added to entity's when equipped and subtracted when unequipped)
* Sidebar displays player's currently worn equipment
* res.xml file split into separate tiles.xml, objects.xml, items.xml and npcs.xml.
### 25 - 27 Dec 2019
* List of game tips (basically, a tutorial system) that can be displayed at different stages (not so elegant right now, maybe I'll figure out a better solution later)
* Quest cycle: Interaction with NPC => check its quest list => if it has quests, get the first one that's not yet completed and start / complete it
* "use" button in context menu when right clicking on consumable or placeable item
* Dialog chain generator (with specified title and button strings)
Example of syntax:
`#Title# Dialog text [Button text] => #Next Title# Dialog text [Button text]` - will show two dialogs with specified titles and button strings one after another
* In-game tooltip now shows info about objects or NPCs only if mouse is pointing at non-null object or NPC
* Minor fixes and adjustments

To test quest system prototype yourself, approach NPC and press Enter while looking at him.
### 24 Dec 2019
* NpcType (definition and loading)
* Item weight now can be specified in res.xml
* Dialog shitcode removed (new implementation is on the way... maybe)
* Inventory cells get highlighted on mouseover
* Inventory tooltips with item info
* Save format version number in save's header
* Now player can't travel between sectors while underground
### 23 Dec 2019
* Unlockable craft recipes (you must obtain certain items at least once to unlock certain recipes)
* Non-friendly npcs follow player when spot him
* Npcs now can be saved / loaded properly
### 22 Dec 2019
* NPC spawn, render, collisions and smooth movement. (v0.0.0.7-4a only: To test it yourself press p while pointing at some place on map to spawn a dummy npc and then press p again to move npc in random direction)
* 3-state NPC logic prototype: Still, Idle and FollowPlayer states. Now NPCs exist within world time and their actions cost them Action Points, the same as with the player

For now, if you spawn any friendly NPC, it'll just randomly walk around every tick. [You can do this by pressing tilde and entering command npc_spawn &lt;x&gt; &lt;y&gt; &lt;id&gt; and hitting enter]

* Action Point costs are no longer static, i'll figure out some formulas (for costs to depend on certain stats or skills) to calculate them
### 20 - 21 Dec 2019
* Proper-ish stat roll
* Fixed screen switching (between menus n stuff); Now new game button when clicked from pause menu actually creates new world instead of resuming to the old one.
* Technically, NPCs are already in the game! Now i <b>just</b> need to test everything, implement spawn mechanics, their logic and sheed ton of other mob related stuff.
* Player now looks in mouse's direction if you click with <b>middle mouse button</b>
* Save format update: now sector file contains number of layers in its header, which allows to save up to 65535 underground layers in one sector
### 15 Oct 2019
* Player spawn time
* Drop inventory on death
* Foreground tiles
* Nocollide MapObject flag
### 14 Oct 2019
* Tool hp, skill damage (axe deals more damage to trees, etc)
* Craft and Inventory UI improvements
* GameSaver now saves whole location
#### Micro content update
* Some changes to "Plains" biome (more trees and boulders, mushroom spawn)
* New loot from bushes (Sour and Spicy leaves)
* New craftable item: pint of beer [5 Sour leaves, 5 Spicy leaves] (heal 5 hp / 20 satiation)
### 9 Oct 2019
* Objects now can receive any amount of damage (--> damage dealt to objects depends on certain skill level, level 0 and 1 both result in same amt of damage)
* Survival skill now improves healing (by amt * (SurvivalLvl/100)
### 6 Oct 2019
* Skill system (no impact on anything yet, just numberzzz)
### 4 Oct 2019
* Object [harvestHp] param, from which we deduct [something * player's skill level (in future, for now harvestHp just decrements on hit)] (on interaction) and once [harvestHp] reaches zero, object's [hp] decreases and player receives object's [altitem]
* Specific altitems for specific tools (e.g if player hits a tree with empty hands, he'll get sticks, but if he hits it with an axe, he'll get wood)
* Currently held item image display
* Damage from lava
### 2 Oct 2019
* XML templates of biomes for world generator + biome id in map for "natural regeneration" and some other things
### 27 Sep 2019
* World abstraction, which consists of: MapID identifiers {worldX, worldY, layer, id(for sublocations)} paired with Maps (any size up to 65535x65535). Maps contain Tiles, Objects, Loot, ...  ((it works much faster now, though))
* Inventory UI and the system itself (no limitation on item type count, weight limitation instead of it)
* Object interaction and item use system (no implementations yet): now every interaction can be scripted with BuildScript
* Crops, their growth, harvesting, saving
* Save format (nothing too fancy, it just works and works faster than the previous one though) [you can save by pressing G]