Daily Dungeon Diver -- intelligent automation with NO-calendar-empowered prediction!

zarqon

Well-known member
Thanks to a recent feature request being implemented, I now have a new version of the resist() function ready to roll out, which searches ALL your equipment for resistance gear, and doesn't need to actually equip the items to determine if you can get resistance. It's on another computer at the moment, however.

But have patience -- I should be able to put it online tomorrow afternoon (that's late tonight for all you North Americans).

EDIT: Alrighty, we've got a new resist() function online, folks. This will select from any resistance gear you have, and doesn't need to bother equipping when testing. The only downside is there is no prioritizing of gear -- but that is unnecessary for the Daily Dungeon, since it switches your outfit back for any combats. Enjoy!
 
Last edited:
There seems to be a bug in the test for resistance - you use all lower case, but it needs to be mixed case:

Code:
> ash numeric_modifier($item[White Satin Pants], "sleaze resistance")
Returned: 0.0

> ash numeric_modifier($item[White Satin Pants], "Sleaze Resistance")
Returned: 2.0

Also is there some way of creating the dailydungeondata.txt file in the data directory instead of the scripts directory? I tried
Code:
load_dailydungeon("../data/dailydungeondata.txt")
but that didn't work for me.
 

zarqon

Well-known member
Use a recent daily build of mafia -- numeric_modifier() is no longer case sensitive. I recommend always trying the latest daily build before submitting bug reports.

For your other question, after the script creates the file in the scripts dir, move it to the data dir. After that, it will stay there unless you delete it. Mafia has little to no handling of paths in any of its file I/O routines (in fact, it ignores them), and since the directories are created in different places for different OS's, relative paths would be useless anyway.
 

Muhandes

Member
Can it use an Exotic Parrot to get elemental resistance? With sugar shield, empathy, sympathy it pretty much gives a free ticket.
 
Last edited:

zarqon

Well-known member
That's an interesting project! Far more complicated than the existing buff/gear checks though, since we would have to calculate the necessary weight to get resistance for the specified element, then see if that weight could be achieved.

I'll put it on my to-do list. Which seems to keep growing faster than it shrinks, sadly enough.
 

namol

New member
There seems to be an issue with the script expecting a return value on line 86.
Value expected (dailydungeon.ash, line 86)
return vprint("There's no chest in room "+roomie+,".",-4);

I have the latest zlib, checklist and dailydungeon
 

Bale

Minion
Looks like that line should be:

PHP:
return vprint("There's no chest in room "+roomie+".",-4);

zarqon stuck in a comma at the wrong place.
 

Raven434

Member
Even with blind set to true, I am still getting:

ddd_dungeonblind TRUE

Loading daily dungeon information for 20100103...
Noblesse Oblige's daily dungeon info is not yet available today.
Unable to load room data.
Unable to complete daily dungeon.
 

Muhandes

Member
Found something of a bug:

Room 4...
Elemental Test!
Checking resistance to spooky...
Searching items for spooky resistance...
Resistance-granting item found: coffin lid
You can't equip an off-hand item while wielding a 2-handed weapon.

[408] Daily Dungeon (Room 0)
You lose 27 hit points
Room 4 cleared.
 

zarqon

Well-known member
This will be fixed in the next release of ZLib. At least, it will return false rather than true if it fails to equip the item. A better solution would be to continue the search if the item fails, but that will have to wait.
 

Spiny

Member
Zarqon, I think you mentioned something recently in one of your threads (maybe zlib?) that resistance checks for the daily dungeon may not work quite right anymore? Is this a good example of that?

Code:
Checking room 8: Did I Leave the Floor On? (heat resistance)...
Checking resistance to none...
Passing through: +1 adv
 

Theraze

Active member
One change I've made, since the checkpoint clear was added... changed the cli_execute "checkpoint" call in the dailydungeon function near the bottom to be "checkpoint clear; checkpoint" because I've had a lot of times where, switching between characters, it wants to equip the gear from the wrong character and I need to run the script 2-4 times until it actually runs successfully. Since clearing checkpoints, whether manually or using the script, I haven't had it try to equip the wrong gear once since...

Edit: Sorry, the clear has to get into line 1 or 2 of the function, since it has to go before the current line 2 where it loads and tests against your equipment whether it thinks you can succeed. As the checks involve equipping your prior outfit, if your last checkpoint pre-testing is from another character, it will try to equip their gear, not your own...

Edit2: Just to be clear, I'm putting it in between these lines:
PHP:
   vprint("Loading daily dungeon information for "+today_to_string()+"...",2);
   cli_execute("checkpoint clear");
   if ((!load_dailydungeon("dailydungeondata.txt") && !to_boolean(vars["ddd_dungeonblind"])) || (count(p) == 9 && dd_precheck() == 0)) return false;

and the issue is with the outfit checkpoint in the precheck, namely here (in the resistance section, I believe):
PHP:
         cli_execute("outfit checkpoint");
         vprint("Passing through: +1 adv","maroon",2);
 
Last edited:
Small request:

Since I also don't like needing many data files I'll add about half-a-dozen lines to the main script so that I won't need it. (Short map file.)

If a small map in the script is out of the question can it at least use the Map Manager? Thanks.
 

Theraze

Active member
You are aware that's a 2 year old, rejected feature request? :)

Anyways, he posts the map in question 3 days later...
PHP:
dchecks["Locked Door"] = new statrange ($stat[Muscle],29,51);
dchecks["A Hairier Barrier"] = new statrange ($stat[Mysticality],29,48);
dchecks["Piledriver"] = new statrange ($stat[Muscle],26,46);
dchecks["Smooth Criminal"] = new statrange ($stat[Moxie],28,44);
dchecks["The Mystic Seal"] = new statrange ($stat[Mysticality],25,41);
dchecks["Yet Another Troll"] = new statrange ($stat[Muscle],24,40);
dchecks["Badger Badger Badger Badger"] = new statrange ($stat[Moxie],26,38);
dchecks["Magic Shell"] = new statrange ($stat[Mysticality],19,29);
dchecks["The Biggest Bathtub Ever"] = new statrange ($stat[Muscle],17,30);
dchecks["Dungeon Fever"] = new statrange ($stat[Moxie],20,28);
 
I'm aware. I have it using the Map Manager locally, just thought Z might want to implement it in the official version. He took the time to make such a useful resource, it might as well be put to good use. ;) It eliminates the need for the user to download two separate files.
 
Top