Page 1 of 1

DYnamic content quests Possible?

Posted: Mon Mar 25, 2019 7:55 am
by Ememjr
many quests are dynamic in such a way that
a kill quest may have a differnt mob to kill(rat,snake,beetle) and or a varying number of mobs to kill such as 5,6,7,8)
which could result in the quest offering
kill 8 rats, or kill 7 beetles, or kill 5 snakes, all determined at the time the quest is executed.

anyone experiment with this yet,

some reason i dont think we can support that at this time but i could be wrong
becuase of the way our quest progress is stored

if we recieve a quest to kill random number of rats and got 7
if we log out it is marked as not complete
when we log back in
does it not execute that step so we could in fact get a 6 , and the quest actually change

an idea i had is if we could implement a way with lua commands to create a savable quest variablebased on quest id that is only valid if the quest is not complete

so i the above example does a mob=random 1-3 to get snake,rat, or beetle
and qty = random 5-8
the lua command could be QuestSaveParameter( mob), and QuestSaveParameter(qty)

when the quest is initiate you would have to QuestLoadParameter(mob) and QuestLoadParamater(qty)
do a check if the existed or not ( cannot return a 0)

if it does not exist then you will random for the values if they did exist then you would use those values and the quest will reload with the previous values

Re: DYnamic content quests Possible?

Posted: Mon Mar 25, 2019 3:46 pm
by Jabantiz
Yes it is possible, I set up quest flags (I think that is what I called them) which if I remember right is a bitmask. A Quest in thundering steppes uses it, I think it was from a hunter or trapper dwarf by the gate to antonica.

Re: DYnamic content quests Possible?

Posted: Mon Mar 25, 2019 3:58 pm
by Ememjr
thanks that is awesome, exactly what i was looking for i could not find anything on the wiki for it

Re: DYnamic content quests Possible?

Posted: Mon Mar 25, 2019 4:41 pm
by Jabantiz
I just looked and it is "HuntingForTrapperBorgus.lua" in thundering steppes.

Re: DYnamic content quests Possible?

Posted: Mon Mar 25, 2019 4:49 pm
by Ememjr
i found the quest, and looked through it, its the lua commands i couldnot find, but the script explains it all