PDA

View Full Version : Boolean flagging for stability?



Peo
02-20-2010, 02:57 PM
To the tech savy the title says all. To the nontech savy boolean is a true or false statement which works wonders.

I've had problems flagging for different quests. My FvS was improperly advanced in the Delera's Tomb chain which stated I completed the Necromancer's Tomb without ever entering it, probably due to farming but I'm told sharing does this. The same FvS did ADQ1 and got killed too much in ADQ2 forcing me to join a much larger party currently on ADQ1 and upon completion I was improperly flagged for ADQ2. Those two are the only quests I have tried going out of order on and both have messed up as a result.

Recently, my newly created Bard's first run though Delera's Tomb, no farming tactics at all used but casual mode was used, and completed Delera's Tomb but is unable to get the Necromancer's Tomb betowed no matter how many times to talk to any of the four NPCs. I'll let you know how abandoning and repeating works out later.

Honestly it makes me wonder just what kind of system is used to track what quests you have done. I figured there was a simple flag system like, well... like a flag system...

Example

enum DelerasTomb
{
None = 0,
TheMysteryofDelerasTomb = 1,
TheMissingParty = 2,
FreeDelera = 4,
ReturntoDelerasTomb = 8,
ThralloftheNecromancer = 16,
Done = 32
}
...
Checking for DT3
if ( (Character.DelerasTombFlags & DelerasTomb.ReturntoDelerasTomb) == DelerasTomb.ReturntoDelerasTomb )
BestowDT4Quest();
...
Advancing from DT3 to DT4
if ( (Character.DelerasTombFlags & DelerasTomb.ThralloftheNecromancer) == 0 )
Character.DelerasTombFlags |= DelerasTomb.ThralloftheNecromancer;
But the way the first Delera's Tomb problem and the ADQ error mess up when you repeat certain quests it's almost as if an integer is used and simply increased each time without checking for problems that may happen from doing so.

Please make quest advancement stable.

***

Also while I'm posting in here. How about a cumulative loot chance? I've looted 3 different chests in DS's explorer area a total of about 50 times over the last two weeks (avoiding the ranshack penalty) and have not gotten the spell ring or bloodstone, and this is no joke, today back to back runs in DS yeilded two rings of storing to my party members while all I got out of the nearly 30 loot runs in the chests were a pair of Dynastic Falcatas (which are in the auction for the next 3 days, check them out). Last week another party member looted a bloodstone out of it. Flat percentile chances leads to fustrating moments where someone who just bought DS and on his first try gets an item you may have spent 6 months chasing that make you want to punch a developer. A little odds stacking to roll up the different rare loots so at most you're stuck pulling out 3~4 rare items before you get the one you wanted would be nice.

Newtons_Apple
02-20-2010, 03:07 PM
Perhaps you might be interested in this (https://home.eease.com/recruit2/?id=474952&t=1) site?

Angelus_dead
02-20-2010, 03:09 PM
I've had problems flagging for different quests. My FvS was improperly advanced in the Delera's Tomb chain which stated I completed the Necromancer's Tomb without ever entering it, probably due to farming but I'm told sharing does this. The same FvS did ADQ1 and got killed too much in ADQ2 forcing me to join a much larger party currently on ADQ1 and upon completion I was improperly flagged for ADQ2.
You might get a meaningful reply if you elaborate on what "improperly flagged" means.

And by the way, enumerations are not booleans.

Peo
02-20-2010, 03:51 PM
Perhaps you might be interested in this (https://home.eease.com/recruit2/?id=474952&t=1) site?
I lack the experience required. I've never worked on a console game and I can only claim 5 years of tinkering if you count patching characters into MUGEN. Also I've never done anything with SQL. I'll probably post an app anyway, what's the worst that could happen? Comment I'm clueless and not fix anything?

@Angelus_dead. As my post says, I provided three examples where quest flagging has messed up for me. Two of which I have submitted in game tickets for and one of which (DT's chain as the FvS) the admin who responded told me it is a known bug. What I presented is boolean, it uses numbers which can be misleading but I assure you there is no add & subtract formulas used like the math you learned in school. The & and | are used for binary based comparisons of values.

Say you have the TheMysteryofDelerasTomb, TheMissingParty, & FreeDelera numbers. Your total is 7. When checking for ReturntoDelerasTomb(8) you use 7 And 8 and see if it equals 8, it don't so they lack that [completion in this example] flag and need to have the quest bestowed on them when the proper NPC is spoken to. However, if they had 15 would be the TheMysteryofDelerasTomb, TheMissingParty, FreeDelera, and ReturntoDelerasTomb then it would equal 8. Since they have the ReturntoDelerasTomb flag they need to do DT4, aka the necromancer's tomb.

Or (the '|' symbol in C++/C#/Java ) can be used to add or remove the flag without the errors created by using plus or minus. Though if not checked before use it will reverse the flag. IE doing ADQ1 twice would mean you flagged for completion, then you'll be flagged as need to do, which means you need to do it a 3rd time to be marked for completion again. This problem doesn't seem to be present at this time so the problem isn't in checking the flag before trying to compute Or on it.

Angelus_dead
02-20-2010, 04:04 PM
@Angelus_dead. As my post says, I provided three examples where quest flagging has messed up for me.
You provided insufficient detail for people reading here to know what happened to you. Potentially if you gave more detail the responses might be better.

You said you were "improperly flagged". What does that mean? What software behavior led you to decide you were "improperly flagged"?


What I presented is boolean, it uses numbers which can be misleading but I assure you there is no add & subtract formulas used like the math you learned in school.
No, it is not boolean. You evidently don't know what that word means.

marshalknight
02-20-2010, 04:12 PM
You provided insufficient detail for people reading here to know what happened to you. Potentially if you gave more detail the responses might be better.

You said you were "improperly flagged". What does that mean? What software behavior led you to decide you were "improperly flagged"?


No, it is not boolean. You evidently don't know what that word means.

I would have to agree with this... Boolean is a True/False,Yes/No,0/1.. enums are not boolean, though they do work similar.

Angelus_dead
02-20-2010, 04:18 PM
I would have to agree with this... Boolean is a True/False,Yes/No,0/1.. enums are not boolean, though they do work similar.
Well, he's storing boolean data in bitfields and using enums to access them.

That's an archaic complication for programming in general, a bad practice for quest control in particular, and a needlessly technical distraction from whatever point he's trying to make.

Bloodhaven
02-20-2010, 04:23 PM
http://www.ehow.com/video_4774399_simplifying-boolean-algebra.html

Peo
02-20-2010, 04:55 PM
You said you were "improperly flagged". What does that mean? What software behavior led you to decide you were "improperly flagged"?


I've had problems flagging for different quests. My FvS was improperly advanced in the Delera's Tomb chain which stated I completed the Necromancer's Tomb without ever entering it, 1 probably due to farming but I'm told sharing does this. The same FvS did ADQ1 and got killed too much in ADQ2 forcing me to 2 join a much larger party currently on ADQ1 and upon completion I was improperly flagged for ADQ2. Those two are the only quests I have tried going 3 out of order on and both have messed up as a result.

Recently, my newly created Bard's first run though Delera's Tomb, 4 no farming tactics at all used but casual mode was used, and completed Delera's Tomb but is unable to get the Necromancer's Tomb betowed no matter how many times to talk to any of the four NPCs. I'll let you know how abandoning and repeating works out later.
1. Farming, playing the same quest over and over.
2. Already completed 1 and did it a second time leading to problems with 2.
3. Did quests out of the intended order.
4. I blame casual mode, as that was the only thing that I was the only change from past nonfarming run thoughs.


Well, he's storing boolean data in bitfields and using enums to access them.

That's an archaic complication for programming in general, a bad practice for quest control in particular, and a needlessly technical distraction from whatever point he's trying to make.I have a personal inquiry on why it is considered bad practice and archaic.

Perhaps if I simply said "make quests work" rather than saying anything else things wouldn't be derailed, however I assuming many have already said something like that had went for a different example since the bugs are still present. Nothing says attention like the drama someone else chiming in saying my example is horrible and numbers != true or false so by all means continue if that is how things must be done.

Newtons_Apple
02-20-2010, 05:28 PM
http://www.ehow.com/video_4774399_simplifying-boolean-algebra.html

That clears everything up thank you.

Angelus_dead
02-20-2010, 05:41 PM
1. Farming, playing the same quest over and over.
2. Already completed 1 and did it a second time leading to problems with 2.
3. Did quests out of the intended order.
4. I blame casual mode, as that was the only thing that I was the only change from past nonfarming run thoughs.
You still haven't given a description of how the problem of being "improperly flagged" exhibited itself.


I have a personal inquiry on why it is considered bad practice and archaic.
Basically because it means prioritizing conserving memory over readability and maintainability. That can be appropriate for very low-level software, but not something like quest advancement in a game.

Peo
02-20-2010, 10:17 PM
You still haven't given a description of how the problem of being "improperly flagged" exhibited itself.


Basically because it means prioritizing conserving memory over readability and maintainability. That can be appropriate for very low-level software, but not something like quest advancement in a game.Oooh as in the outcome of not being correctly flagged for the quest? Exactly what you think. No Voice of the Master for me as I was unable to correctly complete the quest chain to received the quest reward. Same for ADQ though less of a problem since the rare raid items are inside the end chest rather then given as a reward.

I find it readable as all you would really be working with is something like, if ( GetFlag( Character, DelerasTomb.TalkToHugoAgain ) ) or whatever which contains all the unsightly code. *shurgs*

Zombiekenny
02-20-2010, 11:13 PM
The problem is that sharing changes your flag. Your screwed up way of messing with the flag doesn't make it any more stable than the current one when sharing of the quest is the culprit, not the flagging state.

Also, learn terminology please. Boolean is true or false. In C/C++/some other languages it is 0 is false, anything other value will evaluate to true, this is sometimes abused like you are suggesting, but it makes for ugly code, and is not really good programming practice. You are suggesting an unnecessary removal of abstraction that would make problems more difficult to debug, with no real gain, since the flag itself is not where the problem likely lies.

A simpler fix would be disabling that stupid share button for quests that are part of a chain. Or fixing share so it doesn't touch your flags on a chain quest, but only shares part 1 if you haven't already started it or something.

Cedwin
02-20-2010, 11:51 PM
Deleras is broken in to two separate quests, rather than one long quest chain.

Take a look after you complete it, you will have
(completed) Delera's Tomb
(completed) Thrall of the Necromancer

Delera's Tomb is in a chapter format, meaning each part is Delera's Tomb - chapter 1, chapter 2, chapter 3.

The Thrall of the Necromancer is a completely separate quest.

If you accept a share from someone, it resets Delera's Tomb, but NOT Thrall of the Necromancer. If you start doing the quest with Thrall still marked as completed, when you get to that part of the quest, Delera just says "The girl was so young.". You cannot advance any further until you reset Thrall, which unfortunately resets the entire thing.

A resolution to this would be to either add Thrall of the Necromancer as the final chapter in the Delera's chapter format quest, or link the quests together somehow so if one is reset, they both are.

chubbs99
02-21-2010, 12:30 AM
I've had similar happen to me before. Got into a group for Delera's after already completing it, and before I even got to House J, someone shared the quest with me. It wasn't until trying to get into Thrall did I see it was still set to complete. So I hit abandon to reset everything and I could atleast get inside and help them finish. Its a minor bug, but still a bug with the share button.

As for thrall, just because I haven't seen it mentioned or asked in this thread. You are aware that Thrall is ML 7 to get into right? I've been in a few groups for Delera's that had 1 person not able to get into thrall for that reason. Highly annoying too. But there is atleast the option of a few quick runs of Dead Girl to get them leveled if they are close.

Gnorbert
02-21-2010, 12:49 AM
Actually... you can have the quest for Thrall at level 5. Did a group today and all the level 5s had no problem getting it. The two level 4s in the group could not.

LyrandarMemory
02-21-2010, 01:02 AM
Like Angelus already said:
1) It's memory usage optimization which negatively affects readability and maintainability.
2) It seems that you have lost track of your current Quest advancement. Like Angelus already said: You might want to give a non-technical explanation of what's wrong. Did you just join a group, not looking on which part you were? Did you forget to update the quest chain by talking to the quest giver? What does your quest journal say?


Something like this would be more useful than the enum for monitoring quests:

public interface QuestState {
public String getQuestName( );
public boolean isQuestChain( );
public int getChainPart( );
public boolean isFinished( );
public boolean updateQuestState( int currentChainPart );
}


public interface QuestStateMonitor {

public boolean addNewQuestState( QuestState state );
public QuestState getQuestState( String questName );
public void resetQuestState( String questName );
public Collection<QuestState> getAllQuestStates( );
}

Peo
02-21-2010, 10:41 AM
Got invited to run the ADQ quest. ADQ1 was shared to me and we completed it. When I spoke to the genie the only thing he told me was to reset, which put me back on ADQ1 again and I cannot enter ADQ2.

Yeahee, I love this system used here ^_^
Redoing chains for 0 rewards is fun.

I think there is a point here. Never share any quest, the system is screwed to badly to work right.

Zombiekenny
02-21-2010, 11:10 AM
...ADQ1 was shared to me...
Here is your problem. Click 'No' on shares of quests in a chain, and go grab them. It makes for no issues. Also talk to the Djinn twice, just to make sure.

Cedwin
02-22-2010, 09:22 PM
Here is your problem. Click 'No' on shares of quests in a chain, and go grab them. It makes for no issues. Also talk to the Djinn twice, just to make sure.

I've noticed on some of the quest chains they're starting to gray out the option to share the quest. Perfect example is the catacombs, or the crypts in the necropolis.

Kaeldur
02-22-2010, 09:50 PM
Well, he's storing boolean data in bitfields and using enums to access them.

That's an archaic complication for programming in general, a bad practice for quest control in particular, and a needlessly technical distraction from whatever point he's trying to make.

I disagree that it's bad practice and archaic... It's much more efficient (cpu-wise), I think that alone is a good enough argument to use this.

Smelt92
02-23-2010, 09:24 AM
Small but maybe important point about #4. You state that you ran delara's with your NEWLY created bard on casual and can not enter thrall of the necromancer....You know there's a minimum level requirement to enter that quest? Can be over come by going with team mates of sufficiently high level, but you cannot actually advance to that quest and therefore no reward. Not sure but I think the min level is 7.

Dendrix
02-23-2010, 11:27 AM
As for thrall, just because I haven't seen it mentioned or asked in this thread. You are aware that Thrall is ML 7 to get into right? I've been in a few groups for Delera's that had 1 person not able to get into thrall for that reason. Highly annoying too. But there is atleast the option of a few quick runs of Dead Girl to get them leveled if they are close.

I did Delera's yesterday at level 6, and we had a level 5 in the group. for sure it's not minimum level 7.