Feature - Implemented Restoration details for items

Darzil

Developer
r13380 has the start of this. There are new proxy records for items, minhp, maxhp, minmp, maxmp - guess what they do! Restores panel now shows average restore values based on restores.txt values or expressions (Recovery Items also does, as these panels are the same). Let me know if any data is wrong or restores are missing.

Issues:
I'd prefer to use either the slightly more accurate doubles for average (the difference between 2 average and 2.5 say might be significant when using large numbers), or even show a range, but sort by the average. Was having trouble with the sort however, so haven't done this - doubles didn't sort at all. Any ideas?

I've added the data into ItemDatabase, as the vast majority of restores are items, and it doesn't add an extra database. I reserve the right to change my mind however!

Next step is to use these values for all other Mafia use, making HPRestoreItemList and MPRestoreItemList only control what displays on the panel HP/MP usage.
Step after that will be to build those lists from Preferences instead, to minimise hard coded lists. It'll default to something sensible, but allow players to add lines, though it'll require a restart to see them.
 

Theraze

Active member
Regarding ItemDatabase, will that cause problems with the hot tub, clan sofa, and the various campsite resting adventures?
 

Veracity

Developer
Staff member
Regarding ItemDatabase, will that cause problems with the hot tub, clan sofa, and the various campsite resting adventures?
Darzil could have made a new file - RestoresDatabase, say - to read restores.txt. He decided, for now, to put that code into ItemDatabase.

He did not say "because this is ItemDatabase I will ignore things from restores.txt that are not items."
 

Darzil

Developer
Yeah, this was largely proof of concept and test of RestoreExpression, getting everything this thread requested as a side effect was just gravy. You'll notice that the things I changed didn't previously include any of the non-item restores.
 

Theraze

Active member
Okay, was just checking if the non-items were planned for the future, or if they were part of the hard coded lists that were planned to remain after the work was done. Since post 21 did suggest that some hard coded lists will remain as the end-solution for the restoration system, and the "reserve the right to change my mind" sentence suggests that using ItemDatabase is a decision that may remain as the permanent choice.

Was just trying to clarify, and it seems that the proper interpretation is that the eventual goal is everything tracked and less painful for the devs when it's all shiny and done. :)
 

Darzil

Developer
Oh yeah, eventual goal is we just add a new restore to the file and we're done, and that players can add their own new entries to the restores that Mafia will use list.

Haven't decided whether Mafia will add it's own choices to that list automatically though. Maybe it should just default to "all tradable restores with >0 meat autosell" unticked plus "all skills that don't cost an adventure" ticked, "all skills/locations that do use an adventure or are limited" unticked, and players can add their own override to add other restores to that. Would be useful to have some discussion on that.
 

Veracity

Developer
Staff member
the "reserve the right to change my mind" sentence suggests that using ItemDatabase is a decision that may remain as the permanent choice.
You continue to not understand. Whether the file is read by ItemsDatabase or some other module is completely orthogonal to how non-item restoratives are used. Yes, the Restores panel of the Item Manager will, we assume, show only items, but non-items will be available, somewhere, somehow. "using ItemDatabase" as a "permanent choice" has nothing whatsoever to do with that.
 

Darzil

Developer
Basically I'm not a Java expert, I'm still learning. I suspect the map in ItemsDatabase currently includes the skills and locations, and I could just use it as is from elsewhere. However, that'd be slightly awkward from a philosophical standpoint, though practical, so I might move it to it's own file. No one should care other than Devs though, as it shouldn't affect what works.

I would love suggestions on how users would like the Use restores section to work, with an emphasis on little apparent change, streamlined future support needs, user configurability and an understanding that the list itself is determined on load, not on change.

At present I have decoupled the list in use these restores from the item manager restores list, which means we could just make the list hard coded and take some rare/valuable restores off the list without making them vanish from item manager restores list. However, I'd far prefer to not have to maintain a hardcoded list, and would like users who want to consider rare/valuable restores to be able to.
 
Last edited:

Darzil

Developer
r13387 - removed some items which were not mainly restores. Added some daily limited restores, they have blank values once used. Birdform only restores have blank values when not in birdform.
Pref(pref name) in expressions now accept Booleans, which are given a value of 1 for true and 0 for false, affects modifiers.txt, monsters.txt and restores.txt.
Effect(effect name) now valid in restores.txt.
 

Darzil

Developer
r13389 - I did move the code to RestoresDatabase.
The daily limited restores now show the proper values once used, but do not appear in restores once used.
A new proxy record for items, .dailyusesleft shows the number of times left the restore can be used today. -1 means it isn't limited.
restores.txt now includes columns for adventure cost, daily uses left and notes.
 

Darzil

Developer
r13395 - Started largely so I could check stuff, but might be useful:
Command "restores" or "restores available" - tells you details about restores you currently have available.
Command "restores obtainable" - tells you details about restores you currently have available or are tradeable.
Command "restores all" - tells you details about all restores.
Also adds various other little checks, and adds RestoreDatabase.restoreAvailable( name ) for determining availability.
 

Darzil

Developer
Yes. It could be expanded to cover populating the restores pages, but that's pretty much another project entirely.
 
Top