Multiplayer Team Quest
Posted: Mon Aug 13, 2018 7:13 am
Hi,
This should be the last major integration that I need to do. I'm currently working on it but got some dilemma here n there.
So players can have team (using Photon Teams). Currently if there's a late joining player, and they just chose a team, they'll get a sync of all the quest marked "Team Quest" from the older player.
Now there's a "Team Quest" field in the Quest element. Setting 1 of them to TeamQuest is easy (SetTableField).
But is there a DialogueLua like "Quest[] GetAllElementFromTable(tableName)" so I can use the result to sync every Quest that's marked Team Quest? Or at least "GetAllKeyFromTable" so I can check each Key if it exist then check the value.
If not I'll have to keep track of all quest marked TeamQuest in my own class.
And then about the syncing team quest itself. This is more of a "asking if I'm on the right track" kinda question.
Say A and B are in the same team. The TeamQuest they got is "kill 5 orc". Everytime an orc is killed by either, they'll +1 "OrcKilled" in local and sync the variable to other players with the same team.
Then the next part depends on how the "SetQuestState = success" is triggered.
If after 5 Orc killed then you gotta talk to the NPC, and the conditioned dialogue is the one to set State = success AND give the reward, then I should only sync the variable and let each player collect reward and "success" up the quest themselves in local.
If the success triggered is checked from each orcs killed, then I should also set state = success each time the variable value is received by the other players. The problem with this is I'm only sending variable update, I don't know which quest that variable is directed to. Again, if there's a way to GetAllQuestFromTable and check each if any of them has Orc Killed, then I can trigger the state = success on the corresponding quest.
And before you can guide me on this one, of course, let me know if I'm doing this correctly.
I'm not making an MMO, the quest assigning and updating doesn't have to be authoritative. In fact, later each player will have their own set of quest on top of some Team Quest, so it's a multiplayer but the quest part is more "single player" style.
Cheers
This should be the last major integration that I need to do. I'm currently working on it but got some dilemma here n there.
So players can have team (using Photon Teams). Currently if there's a late joining player, and they just chose a team, they'll get a sync of all the quest marked "Team Quest" from the older player.
Now there's a "Team Quest" field in the Quest element. Setting 1 of them to TeamQuest is easy (SetTableField).
But is there a DialogueLua like "Quest[] GetAllElementFromTable(tableName)" so I can use the result to sync every Quest that's marked Team Quest? Or at least "GetAllKeyFromTable" so I can check each Key if it exist then check the value.
If not I'll have to keep track of all quest marked TeamQuest in my own class.
And then about the syncing team quest itself. This is more of a "asking if I'm on the right track" kinda question.
Say A and B are in the same team. The TeamQuest they got is "kill 5 orc". Everytime an orc is killed by either, they'll +1 "OrcKilled" in local and sync the variable to other players with the same team.
Then the next part depends on how the "SetQuestState = success" is triggered.
If after 5 Orc killed then you gotta talk to the NPC, and the conditioned dialogue is the one to set State = success AND give the reward, then I should only sync the variable and let each player collect reward and "success" up the quest themselves in local.
If the success triggered is checked from each orcs killed, then I should also set state = success each time the variable value is received by the other players. The problem with this is I'm only sending variable update, I don't know which quest that variable is directed to. Again, if there's a way to GetAllQuestFromTable and check each if any of them has Orc Killed, then I can trigger the state = success on the corresponding quest.
And before you can guide me on this one, of course, let me know if I'm doing this correctly.
I'm not making an MMO, the quest assigning and updating doesn't have to be authoritative. In fact, later each player will have their own set of quest on top of some Team Quest, so it's a multiplayer but the quest part is more "single player" style.
Cheers