- Status Closed
- Percent Complete
- Task Type Feature Request
- Category
-
Assigned To
weltall - Operating System
- Severity Low
- Priority
- Reported Version
- Due in Version Undecided
-
Due Date
Undecided
- Votes
- Private
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.
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 |
Closed by weltall
17.07.2009 16:57
Reason for closing:
Additional comments about closing:
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 :)
Added prospect and few testers so they can view this private bug.
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
adding peeg so he can view this report
adding a few more people here so this may someday get fixed.
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
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
Actually, if you just make the if in that function
it will work if you set the quest in active wherever you want, and it will fix
bug 2048:)Weltall is this ready to test now? or still in progress?
in progress we are missing the second part of the request, additionally this should be added to wc and/or game console
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 :)
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
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
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))
Making public (no clue why it wasn’t) and reduced assignee list to weltall :)