Unused Quest Flags Act 2

This forum is for discussions on how to edit what can not be edited through the txt files, needless to say this isn't about battle net hacking.

Moderators: Nefarius, Havvoric

Post Reply
User avatar
devurandom
Forum Regular
Angel
Posts: 897
Joined: Sat Mar 07, 2015 9:07 pm
United States of America

Unused Quest Flags Act 2

Post by devurandom » Fri Jul 14, 2017 8:07 am

Hi,

Anyone have a list of unused quest flags for Act 2?
expanding A2Q2 for Obelisk.. have most of that working.

Thanks!
Assembly Reference | 1.13d Code Edits | UVLoD | BaseMod Plugin

Fiat paper money is the most elaborate and well devised form of slavery the world has ever seen..

User avatar
Necrolis
Senior Admin
Throne
Posts: 9125
Joined: Sat Mar 25, 2006 1:22 pm
Location: The Land of the Dead
Contact:
South Africa

Hand-picked

Re: Unused Quest Flags Act 2

Post by Necrolis » Fri Jul 14, 2017 10:32 am

Do you perhaps mean the quest states in the bit array? because that is per quest; so you'd need to put this into which ever quest you are expanding. Act 2 also has some additional unused quests (indices seven & eight).
Image
Netiquette, Do you USE it?!?! | Nefarius' Fixed TXT Files | Terms Of Service
Blackened | Day of Death | D2GFEx
"What was yours is mine. Your land, your people, and now your life." - Lim-Dul, the Necromancer
Judgement is Final, Death is Eternal

User avatar
devurandom
Forum Regular
Angel
Posts: 897
Joined: Sat Mar 07, 2015 9:07 pm
United States of America

Re: Unused Quest Flags Act 2

Post by devurandom » Fri Jul 14, 2017 11:17 am

Necrolis" wrote:Do you perhaps mean the quest states in the bit array? because that is per quest; so you'd need to put this into which ever quest you are expanding. Act 2 also has some additional unused quests (indices seven & eight).
yes.. I guess so. from what I can tell A2Q2 uses all the available flags from 2-11 (decimal). Some seem to be set in error... quest sets Flag 0x0A, and 0x0B as soon as the Horadric Staff is made.

I need a way to store if player has activated each Obelisk. so looks like I could use some unused quests to accomplish that. Will investigate your suggestion further.

07 <<not used???>> Act 1 finisher lets you go to next act
08 a2q0 act introduction

Thanks!
:)
Assembly Reference | 1.13d Code Edits | UVLoD | BaseMod Plugin

Fiat paper money is the most elaborate and well devised form of slavery the world has ever seen..

User avatar
Mnw1995
Junior Member
Paladin
Posts: 100
Joined: Sat Apr 02, 2011 6:28 pm

Re: Unused Quest Flags Act 2

Post by Mnw1995 » Fri Jul 14, 2017 12:43 pm

It is a bit confusing how they've setup quests, as there are 2 different Ids for each quest (Necrolis called them Chain Id and Flag No here: viewtopic.php?f=8&t=28434&p=412899#p412899)

To store custom quest states you'll need free space in the bit array which is passed to D2Common.#11107 to #11110 (v1.10) as first argument.. The second argument of those functions is the quest's flag no..

As far as I can say, these are the defined flags for the bit array in vanilla:

Code: Select all

enum D2QuestStateFlagIds
{
	QUESTSTATEFLAG_A1Q0 = 0,
	QUESTSTATEFLAG_A1Q1 = 1,
	QUESTSTATEFLAG_A1Q2 = 2,
	QUESTSTATEFLAG_A1Q3 = 3,
	QUESTSTATEFLAG_A1Q4 = 4,
	QUESTSTATEFLAG_A1Q5 = 5,
	QUESTSTATEFLAG_A1Q6 = 6,

	QUESTSTATEFLAG_A1COMPLETED = 7,

	QUESTSTATEFLAG_A2Q0 = 8,
	QUESTSTATEFLAG_A2Q1 = 9,
	QUESTSTATEFLAG_A2Q2 = 10,
	QUESTSTATEFLAG_A2Q3 = 11,
	QUESTSTATEFLAG_A2Q4 = 12,
	QUESTSTATEFLAG_A2Q5 = 13,
	QUESTSTATEFLAG_A2Q6 = 14,

	QUESTSTATEFLAG_A2COMPLETED = 15,

	QUESTSTATEFLAG_A3Q0 = 16,
	QUESTSTATEFLAG_A3Q1 = 17,
	QUESTSTATEFLAG_A3Q2 = 18,
	QUESTSTATEFLAG_A3Q3 = 19,
	QUESTSTATEFLAG_A3Q4 = 20,
	QUESTSTATEFLAG_A3Q5 = 21,
	QUESTSTATEFLAG_A3Q6 = 22,

	QUESTSTATEFLAG_A3COMPLETED = 23,

	QUESTSTATEFLAG_A4Q0 = 24,
	QUESTSTATEFLAG_A4Q1 = 25,
	QUESTSTATEFLAG_A4Q2 = 26,
	QUESTSTATEFLAG_A4Q3 = 27,

	QUESTSTATEFLAG_A4COMPLETED = 28,

	QUESTSTATEFLAG_A1Q1EX = 29,

	QUESTSTATEFLAG_A2Q7 = 30, // <-- Unused Quest
	QUESTSTATEFLAG_A2Q8 = 31, // <-- Unused Quest

	QUESTSTATEFLAG_A3Q7 = 32,

	QUESTSTATEFLAG_A4Q4 = 33,

	//Unused: 34

	QUESTSTATEFLAG_A5Q1 = 35,
	QUESTSTATEFLAG_A5Q2 = 36,
	QUESTSTATEFLAG_A5Q3 = 27,
	QUESTSTATEFLAG_A5Q4 = 38,
	QUESTSTATEFLAG_A5Q5 = 39,
	QUESTSTATEFLAG_A5Q6 = 40,

	QUESTSTATEFLAG_A1INTRO = 41,
	QUESTSTATEFLAG_A2INTRO = 41,
	QUESTSTATEFLAG_A3INTRO = 41,
	QUESTSTATEFLAG_A5INTRO = 41,
};
whereas these are the chain ids:

Code: Select all

enum D2Quests
{
	QUEST_A1Q0_WARRIVGOSSIP = 0,
	QUEST_A1Q1_DENOFEVIL = 1,
	QUEST_A1Q2_BLOODRAVEN = 2,
	QUEST_A1Q3_MALUS = 3,
	QUEST_A1Q4_CAIN = 4,
	QUEST_A1Q5_COUNTESS = 5,
	QUEST_A1Q6_ANDARIEL = 6,

	QUEST_A2Q0_JERHYNGOSSIP = 7,
	QUEST_A2Q1_RADAMENT = 8,
	QUEST_A2Q2_HORADRICSTAFF = 9,
	QUEST_A2Q3_TAINTEDSUN = 10,
	QUEST_A2Q4_HORAZONTOME = 11,
	QUEST_A2Q5_SUMMONER = 12,
	QUEST_A2Q6_DURIEL = 13,

	QUEST_A3Q0_HRATLIGOSSIP = 14,
	QUEST_A3Q1_LAMESENTOME = 15,
	QUEST_A3Q2_KHALIMFLAIL = 16,
	QUEST_A3Q3_GIDBINN = 17,
	QUEST_A3Q4_GOLDENBIRD = 18,
	QUEST_A3Q5_TRAVINCAL = 19,
	QUEST_A3Q6_MEPHISTO = 20,

	QUEST_A4Q0_TYRAELGOSSIP = 21,
	QUEST_A4Q1_IZUAL = 22,
	QUEST_A4Q2_DIABLO = 23,
	QUEST_A4Q3_HELLFORGE = 24,

	QUEST_A1Q1EX_NAVI = 25,

	QUEST_A2Q7_UNUSED_GUARDGOSSIP = 26,
	QUEST_A2Q8_UNUSED_GUARDGOSSIP = 27,

	QUEST_A3Q7_DARKWANDERER = 28,

	QUEST_A4Q4_MALACHAI = 29,

	//30 unused?

	QUEST_A5Q1_SHENK = 31,
	QUEST_A5Q2_RESCUESOLDIERS = 32,
	QUEST_A5Q3_PRISONOFICE = 33,
	QUEST_A5Q4_NIHLATHAK = 34,
	QUEST_A5Q5_ANCIENTS = 35,
	QUEST_A5Q6_BAAL = 36
};
I think, you could use the flag no's I marked as unused and maybe there is even space after Id 41. Maybe Necrolis knows more about this..
Last edited by Mnw1995 on Fri Jul 14, 2017 7:48 pm, edited 1 time in total.

User avatar
kidpaddle94
Forum Legend
Principality
Posts: 2057
Joined: Thu Aug 13, 2009 2:54 pm
Location: localhost
Canada

Re: Unused Quest Flags Act 2

Post by kidpaddle94 » Fri Jul 14, 2017 7:14 pm

The 7th quest of each act from what I've seen marks the completion of the act. Or at least, this is what the waypoint/quests GUI uses to unlock tabs for the next act, and a few other things if I remember right

Code: Select all

enum D2C_OrinalQuests
{
	QUEST_A1Q1 = 1,
	QUEST_A1Q2 = 2,
	QUEST_A1Q3 = 3,
	QUEST_A1Q4 = 4,
	QUEST_A1Q5 = 5,
	QUEST_A1Q6 = 6,
	QUEST_A2Q1 = 9,
	QUEST_A2Q2 = 10,
	QUEST_A2Q3 = 11,
	QUEST_A2Q4 = 12,
	QUEST_A2Q5 = 13,
	QUEST_A2Q6 = 14,
	QUEST_A3Q1 = 17,
	QUEST_A3Q2 = 18,
	QUEST_A3Q3 = 19,
	QUEST_A3Q4 = 20,
	QUEST_A3Q5 = 21,
	QUEST_A3Q6 = 22,
	QUEST_A4Q1 = 25,
	QUEST_A4Q2 = 26,
	QUEST_A4Q3 = 27,
	QUEST_A5Q1 = 35,
	QUEST_A5Q2 = 36,
	QUEST_A5Q3 = 37,
	QUEST_A5Q4 = 38,
	QUEST_A5Q5 = 39,
	QUEST_A5Q6 = 40,
	QUEST_NONE = -1,

	QUEST_A1COMPLETED = 7,
	QUEST_A2COMPLETED = 15,
	QUEST_A3COMPLETED = 23,
	QUEST_A4COMPLETED = 26,
};

Code: Select all

if (QUESTS_CheckQuestFlag(*D2CLIENT_sgptQuestFlags, QUEST_A1COMPLETED, QFLAG_REWARDGRANTED))

User avatar
Mnw1995
Junior Member
Paladin
Posts: 100
Joined: Sat Apr 02, 2011 6:28 pm

Re: Unused Quest Flags Act 2

Post by Mnw1995 » Fri Jul 14, 2017 7:50 pm

Yeah, you are right, seems I have missed that even though I already replaced the waypoint panel code..So only Act2Q7 and Act2Q8 are unused then...

Corrected my post above..

User avatar
kidpaddle94
Forum Legend
Principality
Posts: 2057
Joined: Thu Aug 13, 2009 2:54 pm
Location: localhost
Canada

Re: Unused Quest Flags Act 2

Post by kidpaddle94 » Fri Jul 14, 2017 7:55 pm

I also seem to remember there was one for the cow level, I'd have to look it up again

User avatar
Mnw1995
Junior Member
Paladin
Posts: 100
Joined: Sat Apr 02, 2011 6:28 pm

Re: Unused Quest Flags Act 2

Post by Mnw1995 » Fri Jul 14, 2017 8:11 pm

Cow Level uses some flags of Act1Q4:

Portal Creation:

Code: Select all

...
	if (D2GAME_CreatePortalObject(pGame, pUnit, pRoom, pCoord.nX, pCoord.nY, LEVEL_MOOMOOFARM, 0, 60, 0))
	{
		D2GAME_QUESTS_SetGlobalState(pGame, QUESTSTATEFLAG_A1Q4, QFLAG_CUSTOM7);
		return 1;
	}
...
Cow King Quest Drop:

Code: Select all

...
	D2COMMON_SetQuestState(pPlayerData->pQuestData[pGame->nDifficulty], QUESTSTATEFLAG_A1Q4, QFLAG_CUSTOM6);
	...
	nCounter = 8;
	pQuestArg->pTarget->dwDropItemCode = ' spv';
	do
	{
		D2GAME_DropItemAtUnit(pQuestArg->pGame, pQuestArg->pTarget, 0, &nItemLevel, 0, -1, 0);
		--nCounter;
	}
	while (nCounter);
...

User avatar
devurandom
Forum Regular
Angel
Posts: 897
Joined: Sat Mar 07, 2015 9:07 pm
United States of America

Re: Unused Quest Flags Act 2

Post by devurandom » Fri Jul 14, 2017 11:56 pm

Mnw1995" wrote: To store custom quest states you'll need free space in the bit array which is passed to D2Common.#11107 to #11110 (v1.10) as first argument.. The second argument of those functions is the quest's flag no..
I'll use that to handle a custom message in Quest log. that part is mostly worked out.

However, I think I'll set flags in Quest ID #16 temporarily for each Obelisk when activated
then clear those flags when A2Q2 is finished.


The other day I was experimenting with new character.
changed asm code to trigger the setting

A1Q1 flag 0x0F

result ---> A1Q2 BloodRaven set to "quest finished".

It seems

A1Q1 Flag 0x0F == A1Q2 Flag 0x00


Thanks alot for all the info.
Very Helpful!
:)
Assembly Reference | 1.13d Code Edits | UVLoD | BaseMod Plugin

Fiat paper money is the most elaborate and well devised form of slavery the world has ever seen..

User avatar
Necrolis
Senior Admin
Throne
Posts: 9125
Joined: Sat Mar 25, 2006 1:22 pm
Location: The Land of the Dead
Contact:
South Africa

Hand-picked

Re: Unused Quest Flags Act 2

Post by Necrolis » Sat Jul 15, 2017 10:38 am

kidpaddle94" wrote:The 7th quest of each act from what I've seen marks the completion of the act. Or at least, this is what the waypoint/quests GUI uses to unlock tabs for the next act, and a few other things if I remember right
These are the welcome back message triggers, just like introductions they are pseduo-quests. They are also not what I was refering to (I have checked these by myself when I replaced the quest core, and Nefarius has confirmed them with his work):

Code: Select all

    QUEST_ACT4_QUEST4                  = 0x1B, // shatter diablo's soulstone (dss)
    QUEST_ACT4_WELCOME_BACK            = 0x1C, // used by travel code, only....
    QUEST_ACT1_QUEST7                  = 0x1D, // no reference left
    QUEST_ACT2_QUEST7                  = 0x1E,
    QUEST_ACT2_QUEST8                  = 0x1F,
    QUEST_ACT3_QUEST7                  = 0x20,
    QUEST_ACT4_QUEST5                  = 0x21,
    QUEST_ACT4_QUEST6                  = 0x22,
I'd just like to mention that extending the bit array isn't too difficult, you need only expand the allocator, the sync packet and the save code, the client is the issue as it has a hardcoded byte array... You can go check my post in the quest structures and functions post. Here are the full lists seeing as those weren't posted yet:

Code: Select all

enum eD2VanillaQuestChains
{
    QUESTCHAIN_ACT1_INTRO                   = 0x00,
    QUESTCHAIN_DENOFEVIL                    = 0x01,
    QUESTCHAIN_BLOODRAVEN                   = 0x02,
    QUESTCHAIN_TOOLSOFTRADE                 = 0x03,
    QUESTCHAIN_DECKARDCAIN                  = 0x04,
    QUESTCHAIN_COUNTESS                     = 0x05,
    QUESTCHAIN_ANDARIEL                     = 0x06,
    QUESTCHAIN_ACT2_INTRO                   = 0x07,
    QUESTCHAIN_RADAMENT                     = 0x08,
    QUESTCHAIN_HORADRICSTAFF                = 0x09,
    QUESTCHAIN_TAINTEDSUN                   = 0x0A,
    QUESTCHAIN_ARCANESANCTUARY              = 0x0B,
    QUESTCHAIN_SUMMONER                     = 0x0C,
    QUESTCHAIN_TALRASHA                     = 0x0D,
    QUESTCHAIN_ACT3_INTRO                   = 0x0E,
    QUESTCHAIN_LAMESEN                      = 0x0F,
    QUESTCHAIN_KHALIM                       = 0x10,
    QUESTCHAIN_GIDBINN                      = 0x11,
    QUESTCHAIN_GOLDEN_BIRD                  = 0x12,
    QUESTCHAIN_COUNCIL                      = 0x13,
    QUESTCHAIN_MEPHISTO                     = 0x14,
    QUESTCHAIN_IZUAL                        = 0x15,
    QUESTCHAIN_HELLFORGE                    = 0x16,
    QUESTCHAIN_DIABLO                       = 0x17,
    QUESTCHAIN_ACT4_QUEST4                  = 0x18,
    QUESTCHAIN_ACT1_QUEST7                  = 0x19,     // probably for moo moo farm
    QUESTCHAIN_ACT2_QUEST7                  = 0x1A,
    QUESTCHAIN_ACT2_QUEST8                  = 0x1B,
    QUESTCHAIN_ACT3_QUEST7                  = 0x1C,
    QUESTCHAIN_ACT4_QUEST5                  = 0x1D,
    QUESTCHAIN_ACT4_QUEST6                  = 0x1E,
    QUESTCHAIN_SHENK                        = 0x1F,
    QUESTCHAIN_RESCUEBARBS                  = 0x20,
    QUESTCHAIN_ICEPRISON                    = 0x21,
    QUESTCHAIN_NIHLATHAK                    = 0x22,
    QUESTCHAIN_THEANCIENTS                  = 0x23,
    QUESTCHAIN_BAAL                         = 0x24,
	QUESTCHAIN_INTRODUCTION_START			= 0x25
};

enum eD2VanillaQuests
{
    QUEST_ACT1_INTRODUCTION            = 0x00,
    QUEST_DEN_OF_EVIL                  = 0x01,
    QUEST_SISTERS_BURIAL_GROUNDS       = 0x02,
    QUEST_TOOLS_OF_THE_TRADE           = 0x03,
    QUEST_RESCUE_DECKARD_CAIN          = 0x04,
    QUEST_THE_FORGOTTEN_TOWER          = 0x05,
    QUEST_SISTERS_TO_THE_SLAUGHTER     = 0x06,
    QUEST_ACT1_WELCOME_BACK            = 0x07,
    QUEST_ACT2_INTRODUCTION            = 0x08,
    QUEST_RADAMENTS_LAIR               = 0x09,
    QUEST_THE_HORADRIC_STAFF           = 0x0A,
    QUEST_THE_TAINTED_SUN              = 0x0B,
    QUEST_THE_ARCANE_SANCTUARY         = 0x0C,
    QUEST_THE_SUMMONER                 = 0x0D,
    QUEST_THE_TOMB_OF_TAL_RASHA        = 0x0E,
    QUEST_ACT2_WELCOME_BACK            = 0x0F,
    QUEST_ACT3_INTRODUCTION            = 0x10,
    QUEST_LAM_ESENS_TOME               = 0x11,
    QUEST_KHALIMS_WILL                 = 0x12,
    QUEST_BLADE_OF_THE_OLD_RELIGION    = 0x13,
    QUEST_THE_GOLDEN_BIRD              = 0x14,
    QUEST_THE_BLACKENED_TEMPLE         = 0x15,
    QUEST_THE_LORD_OF_HATRED           = 0x16,
    QUEST_ACT3_WELCOME_BACK            = 0x17,
    QUEST_THE_FALLEN_ANGEL             = 0x18,
    QUEST_THE_HELLFORGE                = 0x19,
    QUEST_TERRORS_END                  = 0x1A,
    QUEST_ACT4_QUEST4                  = 0x1B, // shatter diablo's soulstone (dss)
    QUEST_ACT4_WELCOME_BACK            = 0x1C, // used by travel code, only....
    QUEST_ACT1_QUEST7                  = 0x1D, // no reference left
    QUEST_ACT2_QUEST7                  = 0x1E,
    QUEST_ACT2_QUEST8                  = 0x1F,
    QUEST_ACT3_QUEST7                  = 0x20,
    QUEST_ACT4_QUEST5                  = 0x21,
    QUEST_ACT4_QUEST6                  = 0x22,
    QUEST_THE_SIEGE_OF_HARROGATH       = 0x23,
    QUEST_RESCUE_ON_MOUNT_ARREAT       = 0x24,
    QUEST_PRISON_OF_ICE                = 0x25,
    QUEST_THE_BETRAYAL_OF_HARROGATH    = 0x26,
    QUEST_THE_RITE_OF_PASSAGE          = 0x27,
    QUEST_EVE_OF_DESTRUCTION           = 0x28,
    QUEST_NPC_INTRODUCTIONS			= 0x29,
};

enum eD2VanilliaQuestFlags
{
    VFLAG_REWARD_GRANTED                = 0,
    VFLAG_REWARD_PENDING                = 1,
    VFLAG_QUEST_STARTED                 = 2,
    VFLAG_QUEST_LEAVE_TOWN              = 3,
    VFLAG_QUEST_ENTER_AREA              = 4,
    VFLAG_CUSTOM_1                      = 5,
    VFLAG_CUSTOM_2                      = 6,
    VFLAG_CUSTOM_3                      = 7,
    VFLAG_CUSTOM_4                      = 8,
    VFLAG_CUSTOM_5                      = 9,
    VFLAG_CUSTOM_6                      = 10,	//0xA
    VFLAG_CUSTOM_7                      = 11,	//0xB
    VFLAG_UPDATE_QUEST_LOG              = 12,	//0xC
    VFLAG_PRIMARY_GOAL_ACHIEVED         = 13,	//0xD
    VFLAG_QUEST_COMPLETED_NOW           = 14,   //0xE
    VFLAG_QUEST_COMPLETED_BEFORE        = 15,   //0xF
};
A note about QUESTCHAIN_INTRODUCTION_START, there are a few quests in this chain, one for each act that trigger the intros, they all share QUEST_NPC_INTRODUCTIONS to determine if they should run, but they have a separate bit-array for the states for each NPC.
Image
Netiquette, Do you USE it?!?! | Nefarius' Fixed TXT Files | Terms Of Service
Blackened | Day of Death | D2GFEx
"What was yours is mine. Your land, your people, and now your life." - Lim-Dul, the Necromancer
Judgement is Final, Death is Eternal

User avatar
Mnw1995
Junior Member
Paladin
Posts: 100
Joined: Sat Apr 02, 2011 6:28 pm

Re: Unused Quest Flags Act 2

Post by Mnw1995 » Sat Jul 15, 2017 12:03 pm

The bit flags of Act1Q7 are unused, but the quest itself is not.. It is used for Navi's gossip (rogue between Blood Moor and Cold Plains) and therefore only checks the flags of the Den of Evil quest

User avatar
devurandom
Forum Regular
Angel
Posts: 897
Joined: Sat Mar 07, 2015 9:07 pm
United States of America

Re: Unused Quest Flags Act 2

Post by devurandom » Sun Oct 08, 2017 8:06 am

Have all the obelisk code (Act II Horadric Staff sub quest) working for a few months now, but forgot to say thanks to everyone for posting info.

:)
Assembly Reference | 1.13d Code Edits | UVLoD | BaseMod Plugin

Fiat paper money is the most elaborate and well devised form of slavery the world has ever seen..

User avatar
tmuhlhausen
Junior Member
Paladin
Posts: 104
Joined: Sat Aug 24, 2019 6:43 pm
Canada

Re: Unused Quest Flags Act 2

Post by tmuhlhausen » Sun Jan 05, 2020 9:38 am

Mnw1995 wrote:
Sat Jul 15, 2017 12:03 pm
The bit flags of Act1Q7 are unused, but the quest itself is not.. It is used for Navi's gossip (rogue between Blood Moor and Cold Plains) and therefore only checks the flags of the Den of Evil quest
I understand this is from a long time ago but i noticed something im curious about

you mentioned Navi. I was just messing around in hireling.txt, happened to set Navi's ID which is 266 as the class for a new set of act 1 hirelings in hopes that the melee columns would be similar to what im trying to acheive. I am able to equip items still but they disappear. any idea where there are going or any information even. they dont seem to disappear to no where though as he says he will put them to good use

Edit:

Also notice here.. he seems to have a similar setup in monstats2 "hireling wise" i guess you would say, except he uses a only a
lbow where as rouge1,rouge2,rouge3 and both sbw and lbw

Post Reply

Return to “Code Editing”