Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Quests get completed on activation #11

Merged
merged 2 commits into from
May 2, 2020
Merged

Conversation

godfather2
Copy link
Contributor

Contains

Possible follow up to Terasology/Tasks#12.
The tasks don't run at all. Turns out the format of the values in the "class" attribute in the prefab was incorrect. The "doesSubclassMatch" method(https:/MovingBlocks/Terasology/blob/develop/engine/src/main/java/org/terasology/persistence/typeHandling/reflection/ModuleEnvironmentSandbox.java#L77) wasn't accepting this format. Here's the log regarding this: https://pastebin.com/eTqRt2r1.
This pr fixes that.

Outstanding before merging

After fixing this, I encountered another error. All the subclasses of the "Task" class(https:/Terasology/Tasks/blob/master/src/main/java/org/terasology/tasks/Task.java) are causing a "ClassNotFoundException". This error too springs up at https:/Terasology/Tasks/blob/master/src/main/java/org/terasology/tasks/persistence/TaskGraphTypeHandler.java#L96. Here's the log: https://pastebin.com/mihXHHdZ. This error, unlike the previous one, causes the game to shut down.

@eviltak
Copy link
Member

eviltak commented Apr 29, 2020

Thanks for the fix @godfather2! The newly created engine PR MovingBlocks/Terasology#3916 should solve the permissions problem that you were encountering with your fix.

Even after your changes, the quest prefabs only partially follow the new format as described by Terasology/Tasks#12. Specifically,

  • The "data" field must be removed and its contents must directly be placed under the task.
  • The amount and beaconId fields for CollectBlocksTask and GoToBeaconTask respectively must be renamed to targetAmount and targetBeaconId.
  • The dependsOn field for all tasks must be an array (this is not the case of the returnHome task in BookQuest.prefab, for example, where dependsOn is a single element and not an array).

Since you are already modifying the prefabs, could you please add these minor fixes to your PR as well, if possible? Many thanks for your effort!

@eviltak
Copy link
Member

eviltak commented Apr 29, 2020

Terasology/Tasks#15 adds a small change where each task does not necessarily have to define the dependsOn field if it has no dependencies, which was previously causing a problem during deserialization of the collectDirtInTime task (and thus skipping the task deserialization entirely, messing up the task dependency graph) in BookQuest.prefab.

@Cervator
Copy link
Member

Cervator commented May 2, 2020

Tested locally and merging - thanks @godfather2 ! :-)

I did see some quirks, but I'm not sure if those are preexisting or even a problem in my workspace. Will submit a separate issue. Would appreciate it if you could check it out and see if you can confirm the issue or if it all works perfectly for you, in which case it is probably my workspace somehow.

@Cervator Cervator merged commit 1e5c7b3 into Terasology:master May 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants