Alpha 0.5.14 released. Important features: item durability, repair npcs, container and sign state persistence, new low memory server option, craftable lamps and sconces, and bug fixes.
Item durability has been something that I have wanted to add for awhile, but was unsure of how it would be received. After hosting a poll and receiving a unanimous 'YES', item durability is finally a 'thing' in Lugdunon.
A durable item is an item that possesses a 'durability' property. As these items are 'used' their durability decreases, which can have a negative effect on that item's performance. When an item's durability reaches 0, the item 'breaks' and is removed from the player's inventory. Items also slowly lose their value as they lose durability.
Three distinct item types are now capable of being 'durable' items: tools and weapons, equipment that bestows a defense bonus, and crafting aids.
Tools and weapons lose durability each time they are used with higher grades having a much higher durability than lower grades, meaning that they can be used for longer before wearing out. Weapons and tools that damage a gatherable resource will do progressively less damage as their durability decrease. It should be noted that the charcoal artist's set has been treated as durable, affording 8 'charges' per set. This also means that artist set's are no longer stackable. The crafting recipe has also been updated to reflect this change and return one item instead of eight.
Equipped items that bestow a defense bonus take damage from attacks. Currently a single equipped item is selected at random to receive damage from each attack. These items also incur a 10% (by default, but can be configured by server admins assigning a decimal percentage value to the 'item.death.penalty' world.cfg property) damage loss when a player is killed. This 'death penalty' cannot reduce an item to less than 1 durability however, so equipment will never break from dying alone.
Crafting aids, items used in crafting yet are not themselves consumed in the process, also now take damage whenever an item that uses aid is crafted. This includes millstones, lapidary wheels, coin blanks, steel hammers, and steel knives.
One final note, is that should this behavior be undesirable for a particular server, all the server admin need do is remove the durability property from the item definitions in etc/items.json.
Container and Sign State Persistence
Containers (chests and barrels) and signs now retain their state after being recovered, or transitioning from a placed item to an inventory item. In the context of a container this means that the contents are preserved, although they will not be accessible until the container is again placed within the world. In the context of a sign this means that any writing or drawing on a sign will remain upon the sign. This does mean, of course, that signs and containers are no longer stackable.
Tooltips for signs and containers now offer some extra information as well. Signs will display a small preview image of the sign's contents. Containers will show how many items are contained within.
Repair of items is available via specially flagged NPCs. In the default campaign / world, this responsibility is that of Korisos, now standing just to the west of the blacksmithing quarter in the Bibracte market.
Items can be repaired one at the time, or all at once, provided you have the funds. The repair cost is less than the cost of purchasing a new item (by default it is discounted 10% but can be adjusted by a server admin) so it is advantageous to repair your items instead of purchasing or crafting new ones altogether.
This past week saw the default servers strained to the limits of their memory. Both alesia and bibracte are run on VPS instances with 1gb of ram. By default, the server caches sprites and their composites in memory to afford quick delivery when requested by a client.
To lessen the burden, the AssetManager implementation has been refactored to an interface with two alternate implementations: the default is the original in memory implementation, and the alternative is a file system caching implementation that cuts the memory usage on the demo servers by about 40%. As a result, play on the demo servers should now be much more responsive and stable.
Server admins can specify the AssetManager used by supplying the class name as the value of the 'asset.manager' property in the world.cfg. The two current implementation classes are:
Craftable Lamps and Sconces
With candles becoming temporary light sources in 0.5.13, a more permanent method of lighting your farm, plantation, cottage, empire, etc was needed. With that in mind there are now craftable streetlamps and wall sconces available in game. There are 6 of each in the following colors: red, orange, yellow, green, blue, and violet. These lamps require a stained glass, a new item crafted via smelting, in their construction and are crafted with the blacksmithing skill.
Special thanks again goes to Brash Endeavors for suggesting the transitioning of candles to a temporary item and providing player craftable versions of the already existing lamps and wall sconces.
- Fixed missing tileset graphics for sugarbeets and pumpkins.
- Fixed a misalignment with the violet streetlamp tileset.
- Fixed an issue that was causing CommandRequests built on IServerInvokedCommand and IManagementInvokedCommand instances to incorrectly report the opCode as 0.
- Fixed an issue that was causing erroneous keybound event triggers after command console was focused.
- Fixed an issue with net.lugdunon.currency.gsc.Currency. toShortDisplayString() returning 'undefined' if currency value is 0.
- Fixed an issue that was causing improper crafting result updates.
- Fixed an issue with the enter key inadvertently re-triggering the console hide immediately after being shown.
- Fixed an NPE when using the gm /spawn command with an invalid argument.
Other Changes of Note
- The client now prefers .mp3 files to .ogg. This lessens the download times a bit on browsers with .mp3 support for the audio tag.
- Increased all pigment base costs from 5c to 1s.
- net.lugdunon.state.World.saveState() now saves all account states (including active characters) as well.
- When a save is invoked, composites are now purged before a State.instance().getWorld().saveState() is initiated.
- Added the ability for individual commands to override the default command complete threshold.
- Changed net.lugdunon.state.character.movement.free. FreeDirectionalMovement to calculate interpolation based on tile traversal constant + latency instead of a running avg of tile transition response times.
- Charcoal Artist's Set is no longer stackable, and has a durability of 8. Recipe altered to create a single instance instead of a stack of 8.
- Coin Blanks are now durable items.
- Millstones are now durable items.
- Lapidary wheels are now durable items.
- All equipment that bestows a defense bonus is now a durable item.
- NonPlayerCharacters now contain a generic properties object for the storing of arbitrary information.
- Added net.lugdunon.command.core.misc.PlaySoundCommand so that the server can trigger a sound to play on a single client or across an entire instance.
- Added BarrelBreak and ToolBreak sound assets.
- Retriggered keydown events will now have a repeatedTrigger property set to true.
- net.lugdunon.item.renderer.DefaultRenderer now supports net.lugdunon.state.item.tooltip.ITooltipExtension.
As always, the full change log for 0.5.14 is available here