Universal Recovery Script

Theraze

Active member
The issue though is that if you're going that way and making it context aware, you really want it to be fully context aware... if all your hipster combats are done, it should go back to only restoring 1 hp. Unfortunately, that isn't included in official tracking yet, meaning that the only way to do that would be to either switch away from the mini-hipster, about 90% useless since you're not getting in combats anyways, or making it a manual toggle (though one that you could manually set with a between battle script) where you actually have control...

Regarding bounty hunters, I'd rather it die in a second or two and move on to the next, potentially stat adventure, than waste the time going through a fight I'm likely to lose anyways, because I've been spending time in the Temple instead of getting shiny new gear levelling in more difficult zones. Though that's me. :D
 

Aankhen

Member
The issue though is that if you're going that way and making it context aware, you really want it to be fully context aware... if all your hipster combats are done, it should go back to only restoring 1 hp. Unfortunately, that isn't included in official tracking yet, meaning that the only way to do that would be to either switch away from the mini-hipster, about 90% useless since you're not getting in combats anyways, or making it a manual toggle (though one that you could manually set with a between battle script) where you actually have control...
No doubt Mafia will track Hipster combats eventually. If that’s the only objection, sure, it wouldn’t hurt to wait until then.
Regarding bounty hunters, I'd rather it die in a second or two and move on to the next, potentially stat adventure, than waste the time going through a fight I'm likely to lose anyways, because I've been spending time in the Temple instead of getting shiny new gear levelling in more difficult zones. Though that's me. :D
I’d much rather have a chance at winning than lose an easy-to-predict fight through lack of preparation. ;)
 
Last edited:

Theraze

Active member
Heh. I already put together the hipster tracking patch, it's just waiting for enough people to test it and say... yeah, that works...

I don't object to making the code smarter. It's just I really hate the one-off partially handled exceptions... if we're tracking weird combats that break your normal automation rules, track as many as we can, don't just do the hipster as a permanent partial bit...

But yeah, if/once hipster tracking is approved, making the code aware about the hipster being equipped and <7 hipster combats today sounds like a good plan. In addition to requiring health if you have a currently active bounty from the nemesis... anything else similar to those that break into normal zones? Suppose that holidays would qualify as well... the food-fest and drunk-fest monsters will break into your Temple runs... What am I missing?
 

Bale

Minion
I'll fix that problem with the hipster. I've already noticed it myself and took care of it on my local copy, though I haven't rolled it out yet since I find my solution inelegant. Expect it to be updated soon.
 

Theraze

Active member
Ah, the hipster tracking is now part of base code... but not really useful in an automated sense yet. Do we want a new command to pull that information?

For that matter, do we need a command to pull all sorts of that information? Could have it pull just about anything that has limits, long as we know what we want before we start asking for it to be considered for main addition...
 

slyz

Developer
Aren't the different Mafia properties enough? Getting the information is as simple as get_property("_hipsterAdv").to_int().
 

Theraze

Active member
Ninjad? Anyways, yeah, so true. :D I need to try not to think in the morning. Not sure if to_int() is needed or not... believe the property is already an int.

So hipster adventures can get tracked now in scripts, which means that what we need is a(s) full (as possible of a) list of combat location overrides. Nemesis hitmen, food/booze-fest, hippy until 7 adventures happen that day... what else?

Edit: Regarding int-ness, while it's an int, get_property always returns a string, so the to_int() is a good policy...
 
Last edited:

Bale

Minion
But yeah, if/once hipster tracking is approved, making the code aware about the hipster being equipped and <7 hipster combats today sounds like a good plan. In addition to requiring health if you have a currently active bounty from the nemesis... anything else similar to those that break into normal zones? Suppose that holidays would qualify as well... the food-fest and drunk-fest monsters will break into your Temple runs... What am I missing?

I think that the best way to detect if the nemesis is gunning for you is if you have the quest hat, but not the volcano map.

As for FoB and El Dia, we've got gameday_to_int() and gameday_to_string(). I'd rather use gameday_to_int(), but what is the integer for Boozember 7 and Martinus 2? Also, I seem to remember that mafia has a setting for holidays, but I cannot find it. Does anyone know what I'm half-remembering?
 

Theraze

Active member
Okay... here's the list from HolidayDatabase:
Code:
  HolidayDatabase.HOLIDAYS[ 1 ][ 1 ] = "Festival of Jarlsberg"; // Jarlsuary 1
  HolidayDatabase.HOLIDAYS[ 2 ][ 4 ] = "Valentine's Day"; // Frankuary 4
  HolidayDatabase.HOLIDAYS[ 3 ][ 3 ] = "St. Sneaky Pete's Day"; // Starch 3
  HolidayDatabase.HOLIDAYS[ 4 ][ 2 ] = "Oyster Egg Day"; // April 2
  HolidayDatabase.HOLIDAYS[ 5 ][ 2 ] = "El Dia De Los Muertos Borrachos"; // Martinus 2
  HolidayDatabase.HOLIDAYS[ 6 ][ 3 ] = "Generic Summer Holiday"; // Bill 3
  HolidayDatabase.HOLIDAYS[ 7 ][ 4 ] = "Dependence Day"; // Bor 4
  HolidayDatabase.HOLIDAYS[ 8 ][ 4 ] = "Arrrbor Day"; // Petember 4
  HolidayDatabase.HOLIDAYS[ 9 ][ 6 ] = "Labór Day"; // Carlvember 6
  HolidayDatabase.HOLIDAYS[ 10 ][ 8 ] = "Halloween"; // Porktober 8
  HolidayDatabase.HOLIDAYS[ 11 ][ 7 ] = "Feast of Boris"; // Boozember 7
  HolidayDatabase.HOLIDAYS[ 12 ][ 4 ] = "Yuletide"; // Dougtember

Which cause breaks?
 

Winterbay

Active member
The ones that give extra random monsters are:
Code:
HolidayDatabase.HOLIDAYS[ 5 ][ 2 ] = "El Dia De Los Muertos Borrachos"; // Martinus 2 (day 34)
HolidayDatabase.HOLIDAYS[ 11 ][ 7 ] = "Feast of Boris"; // Boozember 7 (day 87)

The other ones are either voluntary or doesn't have any monsters. I think the calculated day-number is correct.
 

Bale

Minion
Days 34 and 87. Thanks!

On those days, or if hipsters might suddenly attack, it will restore HP/MP at the adventure.php locations. It still won't restore HP/MP if mining since attacks cannot happen there.

Hmm... Actually, I'm thinking it should STILL not restore MP at the temple. It really sucks to restore MP when it can be istantly sucked away. You'll just have to count on in-combat MP restoration in those cases, but at least you'll have HP.

Does that sound good?
 
Last edited:

Bale

Minion
Works for me... the HP is directly useful for combat, MP is useful only sofar as you use skills...

Sometimes MP is necessary, sometimes not. Depending on play-style. In any case, a character should be able to survive without MP for a few combats at the Hidden Temple.
 

shoptroll

Member
Note sure if this is a bug or not, but I saw this in my CLI a few minutes ago:

Map modified within foreach (Universal_recovery.ash, line 1454)
 

Bale

Minion
I have no idea. As far as I know that error can only be caused by adding or removing a key from a map other than the current value of the foreach.

I don't seem to be doing that there so I'm clueless.
 

StDoodle

Minion
Shoptroll, you're not using a really old version of mafia are you? I remember that error cropping up a while back, but it's been months.
 

shoptroll

Member
It's one of the more recent (post 14.2) daily builds. I'm at work so I don't have exact number.

It could've been caused by a blank page or something. Right around the time that happened the relay browser server seized up on me and I had to terminate Mafia and start it back up.
 
Top