PlaneShift

  • Status Closed
  • Percent Complete
    100%
  • Task Type Feature Request
  • Category
  • Assigned To
    weltall
  • Operating System
  • Severity Low
  • Priority
  • Reported Version
  • Due in Version Undecided
  • Due Date Undecided
  • Votes
  • Private
Attached to Project: PlaneShift
Opened by Rizin - 13.04.2008
Last edited by weltall - 17.07.2009

FS#1423 - Disable flag for Quests

We would like to propose the addition of a “Disable” flag to the Quest Database. If this flag is set, it prevents the server from loading the quest. Also, would it be possible to modify the code such that rather than having a quest-load error stop the loading of the server, have it mark the quest as disabled, and still continue.

The task blocks this from closing
ID Project Summary Priority Severity Assigned To Progress
1985 PlaneShift FS#1985 - List of all GM feature requests [or dev lvl requests] Low Aresilek Besolez
0%
Closed by  weltall
17.07.2009 16:57
Reason for closing:  
Additional comments about closing:  

It was decided to not allow the server to start in case a quest fails to parse. So what could be implemented is done and this PS# has done it's scope :)

Project Manager
Lanarel commented on 16.04.2008 22:32

Added prospect and few testers so they can view this private bug.

Caarrie commented on 23.05.2008 14:30

Adding a few more people to the assignee list to see if we can get this done, seems the prospect it was assigned to has not been around for a while

Caarrie commented on 17.06.2008 16:53

adding peeg so he can view this report

Caarrie commented on 26.10.2008 19:57

adding a few more people here so this may someday get fixed.

Project Manager
Lanarel commented on 26.10.2008 22:56

Weltall, in addition to you disabling the loading of the quest (which will of course disable it for everyone even in the middle of a quest), if you want make it such that it can be set without restarting the server, you might add a test in
dictionary.cpp, around line 1052 in function
bool NpcTrigger::HaveAvailableResponses(Client * client, gemNPC * npc, NPCDialogDict * dict, csArray<int> *availableResponseList)

Add an if like this

                    if (!(resp->quest->flags & PSQUEST_DISABLED_QUEST))
                    {
                        haveAvail = true;
                        if (availableResponseList)
                            availableResponseList->Push(resp->id);
                    }

This will work both for getting a quest assigned and for steps withing a quest. Actually, this check could be added to the long list in the if that is already there. You could even combine it with the if above (the resp→quest && !resp→quest→Active() one), as the only thing that does is a bug ( bug 2408 ) :).
Some remarks:
- I do not know if this flag will be used when it is set ‘ingame’ - quest→flags is protected, so a function should be added to do this (quest→IsDisabled() or something)
- it is not easy to add a system message here to say the quest is disabled, as at this place a response is only added to a list of available responses from which one is randomly chosen later. This check just prevents the response from being added.

Of course besides this you need to be able to set the flag in game :) or console

Project Manager
Lanarel commented on 26.10.2008 23:32

Actually, if you just make the if in that function

              if ((!resp->quest || resp->quest->Active()) &&
                  (!resp->prerequisite || client->GetCharacterData()->CheckResponsePrerequisite(resp)) &&
                  (!resp->quest || client->GetCharacterData()->CheckQuestAvailable(resp->quest,npc->GetPID())))
              {

it will work if you set the quest in active wherever you want, and it will fix  bug 2048  :)

Caarrie commented on 27.10.2008 01:08

Weltall is this ready to test now? or still in progress?

weltall commented on 27.10.2008 05:55

in progress we are missing the second part of the request, additionally this should be added to wc and/or game console

Project Manager
Lanarel commented on 27.10.2008 07:27

Also, when this is ready to test, I suggest not only to test the functionality that was added, but also do the quest test cases. And some extra quest testing (do some more tests at the same time etc, disable one of those before finishing the quests). Quest code is tricky :)

weltall commented on 27.10.2008 13:23

now if the quest is a child quest it will check if it’s parent is enabled too. This allows to go up all steps till the root quest and so disable also subsequent steps if the root quest is disabled (for players with the quest already active)
committed this to r2280

weltall commented on 27.10.2008 15:33

added flag support, supporting only disable as it’s the only flag, to webconsole-trunk (also merged back to webconsole). It will show the active flags in the quest list and allows to enabled and disable the flags from quest script edit page

committed to webconsole-trunk r2281 , merged to webconsole in r2282

weltall commented on 28.10.2008 12:20

committed a /disablequest command to r2296 which allows to toggle the active status of the quests and if save is defined to save it to database too. (it’s security level 25 aka gm5 for temporary active status changes and security level 30 aka dev for the save flag (save to database))

Project Manager
Lanarel commented on 19.11.2008 20:54

Making public (no clue why it wasn’t) and reduced assignee list to weltall :)

Loading...

Available keyboard shortcuts

Tasklist

Task Details

Task Editing