Bug - Fixed Friars blessings in daily deeds BEFORE quest is completed

Edir

Member
As the title says - it's a minor issue, but I think that, if you haven't completed the level 6 quest, you shouldn't get the 3 friars blessing puttons in the daily deeds window.
 

Terion

Member
That prescience shows up in a number of places; for example, places like Spookyraven, Cobb's Knob, and Desert Beach all show up in the Go To dropdown, before I've unlocked any of them in a new ascension.
 

DoctorRotelle

Developer
Edir: The button exists if your are level 6 or higher. They disable when you've used the buff.

Terion: All locations are always in that list.

This needs to become a "request" for a boolean friarsCeremonyCompleted (default:false) variable. Sets to true at the same time the quest items are presently deleted from inventory. The DD panel could depend on this variables setting exclusively.
 

jasonharper

Developer
It would also need to detect ceremony completion outside of mafia (or prior to the addition of the code you're describing), by looking at your quest log at login.
 

slyz

Developer
I think Mafia and ASH scripts could benefit from tracking the completion of all the council quests (not just the Island War). Some scripts currently hit questlog.php quite a bit.
 

Bale

Minion
I think Mafia and ASH scripts could benefit from tracking the completion of all the council quests (not just the Island War). Some scripts currently hit questlog.php quite a bit.

That's complicated. Many quests have text that changes during the course of the quest. For instance a Pyramid Scheme...

1. Your father's diary indicates that the key to finding the Holy MacGuffin is hidden somewhere in the desert. I hope you've got your walking shoes on.
2. You've managed to stumble upon a hidden oasis out in the desert. That should help make your desert explorations a little less... dry.
3. The fremegn leader Gnasir has tasked you with finding a stone rose, at his abandoned encampment near the oasis. Apparently it's an ancient symbol of his tribe or something, I dunno, whatever. He's not gonna help you unless you get it for him, though.
4. Gnasir has asked you to prove your honor and dedication to the tribe by painting his front door black. A menial task to be sure, but at least it's not dangerous. Well, unless you're really allergic to paint fumes or something.
5. Gnasir seemed satisfied with the tasks you performed for his tribe, and has asked you to come back later. ... Okay, that's probably long enough.
6. For your worm-riding training, you need to find a 'thumper', something that produces a rhythmic vibration to summon sandworms. It's unlikely that we're talking about bunny rabbits here.
7. You need to find fifteen missing pages from Gnasir's worm-riding manual. Have fun!
8. One worm-riding manual page down, fourteen to go.
9 Two worm-riding manual pages down, thirteen to go. Sigh.
10. You've found all of Gnasir's missing manual pages. Time to take them back to the sietch.
11. You've earned your hooks and are ready to ride the worm. Literally, not in the South-of-the-Border sense.
12. One excitingly-described worm-ride later, you've found the little pyramid with the map of Seaside Town inside. Looks like you're going to need the Staff of Ed to get the location of the Holy MacGuffin's hiding place.
13. You've found the hidden buried pyramid that guards the Holy MacGuffin. You're so close you can almost taste it! (In a figurative sense, I mean -- I don't recommend you go around licking things you find in ancient tombs.)
COMPLETE: The mighty Ed the Undying has fallen! You recovered the Holy MacGuffin! Jolly good show, mate!

Should the preferences have a simple, true:false value? It might be more helpful, especially with respect to opening zones, to have a more complicated value to tell exactly where the character is in the quest. Perhaps a number for each step? Or maybe the value should be the first sentence in the quest log?

Well, my point is that the suggestion is complicated.
 

Fluxxdog

Active member
Honestly, I thought there would be a function that would check if an area was available. Something along the lines of:
boolean area_available(location area name)
...which returns true if you can legitimately access that area. Properties could be set up so that if certain conditions are met, it stores a value of true or false. For example, until you get to LV 6 and visit the council, the Dark Parts of the Woods are unavailable. Then it's true until you complete the ritual, in which is becomes false again.

Hmm... I think I found me something to work on. Only things I need to learn is how to automatically reset properties on ascension and how to easily check if you can access the Slime Tube and Hobopolis.
 

heeheehee

Developer
Staff member
The preferences preAscensionScript and postAscensionScript should help with the resetting properties. One is enough, but in the event that you're already using one (e.g. Bale's newLife.ash), you can use the other.

Also, you might want a series of relay override scripts, especially one for council.php. Slime tube and Hobopolis might be more difficult, especially since you might not be allowed access one day, but get promoted the next. There's no plausible method without hitting the server a bunch of times.
 

DoctorRotelle

Developer
When I was writing up the feature request for the dwarvish factory preferences, I realized my error above. The request should be for a "user level preference" of the format: [int] lastFriarCeremonyAscension. It would hold the ascension number of the last know completion. This would avoid having to adjust it during the ascension routine internally within mafia or via heeheehee's suggestion above, as a user-script. Comparing it to knownAscensions would tell you whether or not it has been recognized as complete. I know we don't look at the quest log or council during the login routine making non-mafia completions hard to discern without a council visit or questlog2 visit. Also, the lastCouncilVisit preference would highlight non-completion if it is less than "6". Conversely, the azazel items indicate confirmation of completion and stale preference values.

Should we care about activity outside of mafia? Yes.
Could a council visit fix/update the proposed "lastFriarCeremonyAscension" & existing "lastCouncilVisit" preferences? Yes.
-parsing the questlog1 isn't reliable as a visit at level 6 before visiting the council at level 6 wouldn't show an active quest and could lead to improper assumption of completion. Though, questlog2 could provide completion confirmation.
Is an ascension script a proper solution for this? No, forcing users to install scripts for regular interface functionality is not inline with present mafia coding practices.
Any visit to the copse could & should update a stale value.
In the gCLI, the "friars food" type commands don't throw an error. If one is successful, that's also a place we could recognize and set the value to the current ascension#.
So, the real question is: Do we care more about actions taken outside of mafia not making our buttons appear immediately (giving 4 places to correct the value), or deal with the bug reports of the "bogus buttons" that appear at level 6?
The only way to force the update at login would be to parse questlog sections. Additional page visits during login are typically avoided due to the present length of the login process and the desire to keep login as brief as possible.

Once again, I apologize for being a terrible writer...
Have a great one folks!!
-=Doc
 

StDoodle

Minion
Actually, to help avoid conflicts with pre & post ascension scripts, it would be kinda awesome if we could get user preferences (both built-in and user-addable) that reset automatically each ascension, similar to once-a-day resets on prefs. that start with "_". Perhaps prefs. starting with "+"?
 

slyz

Developer
Only things I need to learn is how to automatically reset properties on ascension and how to easily check if you can access the Slime Tube and Hobopolis.

Instead of storing a true or false value, store the ascension number. For the slime tube and hobopolis, you will need to hit the server each time you want to check, because Mafia doesn't track when you change clans.
 

Bale

Minion
Do like slyz suggests. Then compare the value of the area to my_ascensions() to tell if it has been opened yet this ascension.
 

DoctorRotelle

Developer
So, there I am, researching the how's and why's of adjusting this issue. I figured it'd be a snap to follow the code and amend it a bit where the eldrich butterknife, etc are removed from inventory. Then I realized it wouldn't be so easy as the removal happens when you visit the council, not when you perform the ceremony. This legacy variation of quest completion is not going to give me what I need, as I need to have it happen when the ceremony is completed (making this happen is well beyond my coding ability). Having this happen at the proper time makes setting the variable trivial. To catch folks who complete the ceremony out of mafia, I think we'd have to have them visit a page that is parsed for info... Since we don't parse quest logs at login, I'd think the only obvious choice would be a manual visit to the copse (please share your ideas and opinions about this! Again, this is beyond my coding ability). Presently, the only "guaranteed" way of knowing any council quest is completed, is by having the kingLiberated variable set to true... This happens a bit late and isn't quite specific enough for this.

Once completed Daily Deeds could be easily adjusted with the following:
Code:
            int lastFriarCeremonyAscension = Preferences.getInteger( "lastFriarCeremonyAscension" );
            int knownAscensions = Preferences.getInteger( "knownAscensions" );
            this.setShown( lastFriarCeremonyAscension==knownAscensions );
            this.setEnabled( !Preferences.getBoolean( "friarsBlessingReceived" ) );
 

jasonharper

Developer
The quest log IS parsed at login, but the only information currently retained from it is whether various NPC stores are available to you.
 

DoctorRotelle

Developer
Would you add code to make that routine set lastFriarCeremonyAscension=knownAscensions, when appropriate? That'd cover out-of-mafia ceremony completion. Then we'd have in-mafia to deal with, as quest items are presently removed in CouncilFrame.java, whereas the quest items were actually removed from inventory when you performed the ceremony. Updating that allows the following code to be appended to the quest item removal code:
Code:
	int knownAscensions = Preferences.getInteger( "knownAscensions" );
	Preferences.setInteger( "lastFriarCeremonyAscension",  knownAscensions);

Without a ceremony completion update (code relocation?), the friar buttons would only appear only after a council visit (?), and the quest items could go negative in inventory in the rare case that someone completed the ceremony out-of-mafia, and only visited the council later within mafia to complete the quest(?) This is a lot of assumptions which depend on me interpreting code which pre-dates my involvement with the project. From my understanding, the L6 code looks pre-friars.

Addendum:
I've been trying for days to add the code to QuestLogRequest.java and I have to give up. I am really not good with writing original code. I have to leave this to more capable hands. Once it is added, I have the coding laid in for boolean friars_available() ash command, and the DD panel code update. FriarsRequest.java is also throwing me, as I feel that a plain request to the friars could announce availability while visiting the copse in the relay browser. Since I can't seem to get lastFriarCeremonyAscension set from the questlog, nor through any other means, my code will not work. Sorry folks, I tried my best.

Another Addendum:
I think I've just about got the code worked out now. Testing is underway. Please standby.
 
Last edited:
Top