Page 12 of 26

Re: ORK integration

Posted: Tue Jul 14, 2020 3:44 am
by dlevel
Perfect, but doesn't the ORKExpRewardSystem class needs modular selection as well for the auto-generated quests? Or am I missing something ? :)


An issue I have now is I get 1 reward per entity, instead of 1 per quest (wasn't the case before right?). Also, I see the EXP reward twice after the latest update :)

https://ibb.co/pyy4VYw


edit:

Unrelated question, how can I refresh the quests of the quest giver in runtime by scripting? I use the SetQuestState to change a quest to WaitingToStart again but I need a way that the quest giver makes it available in the UI again :) (This is for QuestGiverForORK and not the AutoGenerated quests)

Re: ORK integration

Posted: Tue Jul 14, 2020 10:15 am
by Tony Li
Hi,

Oops, I forgot to include that file in the patch. This package has both:

QM_ORKSupport_2020-07-14.unitypackage

p.s. - You can set EntityTypes' Plural Display Names. So your quest could change from "Kill a Dark Wolf" to "Kill 13 Dark Wolves".

Re: ORK integration

Posted: Tue Jul 14, 2020 10:24 am
by dlevel
Ok got it thanks!

Don't know if you checked my last 2 questions:

1) Is there a way to get 1 EXP instead of 13 EXP (1 per entity killed), in a 13/13 quest? (So to only get 1 EXP for the whole quest) This is for auto generated quests. Also as I posted in this photo: https://ibb.co/pyy4VYw it now gives 2 EXP rewards (13 EXP and 13 EXP)

2) Unrelated question, how can I refresh the quests of the quest giver in runtime by scripting? I use the SetQuestState to change a quest to WaitingToStart again but I need a way that the quest giver makes it available in the UI again :) (This is for QuestGiverForORK and not the AutoGenerated quests)

Re: ORK integration

Posted: Tue Jul 14, 2020 10:40 am
by Tony Li
dlevel wrote: Tue Jul 14, 2020 10:24 am1) Is there a way to get 1 EXP instead of 13 EXP (1 per entity killed), in a 13/13 quest? (So to only get 1 EXP for the whole quest) This is for auto generated quests.
Here are two ways you could do it:

1. Edit ORKExpRewardSystem. Change this line:

Code: Select all

var amount = points;
to:

Code: Select all

var amount = 1;
This will always give 1 EXP for generated quests.

2. Edit ORKExpRewardSystem. Change that line same to:

Code: Select all

if (entityType == 0) return points;
var amount = Mathf.Max(1, (int)(points * entityType.GetRewardMultiplier(RewardMultiplier.XP)));
Inspect the Dark Wolf entity type. Expand Reward Multipliers, and set the XP multiplier to 0.077 (i.e., 1/13). This will divide the points by 13. So if the quest to kill Dark Wolves generates 13 points (1 for each wolf), then it will divide it by 13 to result in 1 EXP. But if the quest is to kill 26 Dark Wolves, it will grant 2 EXP. It will always grant a minimum of 1 EXP.
dlevel wrote: Tue Jul 14, 2020 10:24 amAlso as I posted in this photo: https://ibb.co/pyy4VYw it now gives 2 EXP rewards (13 EXP and 13 EXP)
With the updated ORKExpRewardSystem script, you can specify the status value name. Assuming you have 2 ORKExpRewardSystem scripts on the NPC, set one to "EXP" and the other to "DP".
dlevel wrote: Tue Jul 14, 2020 10:24 am2) Unrelated question, how can I refresh the quests of the quest giver in runtime by scripting? I use the SetQuestState to change a quest to WaitingToStart again but I need a way that the quest giver makes it available in the UI again :) (This is for QuestGiverForORK and not the AutoGenerated quests)
It should automatically recognize that the quest is available. When you set the quest back to WaitingToStart, inspect it in the Quest Editor. Make sure the main quest state is WaitingToStart and the Start state is Inactive.

Is the quest dialogue UI already open when you set the quest back to WaitingToStart? If so, you'll need to tell it to refresh. I can describe how to do that if that's the case.

Re: ORK integration

Posted: Wed Jul 15, 2020 6:49 am
by dlevel
Max Count in Action and reward multipliers not being inherited by the parent is intentional ?

Re: ORK integration

Posted: Wed Jul 15, 2020 8:10 am
by Tony Li
Hi,

Yes, that's intentional because those are generally very entity-dependent. For example, for a tiny rat monster, you might set the XP reward multiplier to 0.5. But for a giant dragon, you might set the XP reward multiplier to 10x.

Re: ORK integration

Posted: Thu Jul 16, 2020 7:31 am
by dlevel
Hello again Tony,

So I'm close to my full implementation, right now I have an issue with Journal for ORK, and more specifically about saves. I use ORK for my save games but along with the developer of ORK, we have implemented a server-side solution for save games, which just uses the same method as the ORK, it just saves it in an XML string and transfers it to the server.

I would need some clarifications of how Quest Journal for ORK saves the game so I can go to the ORK dev and we implement it as well in the save games.

edit: In normal save games it works fine.

Thank you

Re: ORK integration

Posted: Thu Jul 16, 2020 9:53 am
by Tony Li
Hi,

QuestJournalForORK implements ORK's IComponentSaveData interface.

So long as your server-side system works with that interface, there shouldn't be any issue.

Re: ORK integration

Posted: Thu Jul 23, 2020 11:20 am
by dlevel
So we made this one work with the server saves, but the issue now is that even though everything is saved fine, when player dies and reloads the game, he has the quests but without the counters. Anything different happens on the counters that you might think can cause this?

Re: ORK integration

Posted: Thu Jul 23, 2020 1:09 pm
by Tony Li
No. Quest states and counter values are all saved in the same bundle of data. Could something else be resetting the counter values? For example, if they're set to change value by Data Sync instead of Messages, something else could be syncing a zero value to them.