firesinging / server

Server code based on SuperSocket for Age of Empires Online
GNU General Public License v3.0
12 stars 4 forks source link

[Database] Add quest instances #14

Closed FireSinger2000 closed 6 years ago

FireSinger2000 commented 6 years ago

Add default quest instance to DictionaryQuests in database while deserialize from file:

Modal: libraries/database/models/Questinstance.cs

Objective: libraries/database/models/questinstance/Objective.cs

  1. Create new ModelQuestinstance and assign quest id (and other vars?)
  2. Pharse and set main objective
  3. Pharse and set secondary objectives

Also see libraries/database/models/quest/objectives/Criteria.cs

FireSinger2000 commented 6 years ago

QuestInstance.zip

FireSinger2000 commented 6 years ago

instances.zip

musictopia commented 6 years ago

I would like to help with this. I looked at the source code. If I can get an example of one already finished, I can do this since I am very good at xml parsing.

Xen0byte commented 6 years ago

Hi, I'm writing a conversion tool in C# and was planning to finish writing the parser class sometime next week as it's basically the last bit of code that needs writing. Feel free to have a look at the repo and, since you're good at XML parsing, maybe suggest what you think the best way to tackle the task would be. I'm also somebody that wants to see this project kick off so it's nice to see other people are actively volunteering to help.

EDIT: Just realized I didn't actually answer your question. I've attached two *quest files (as XML files, for convenience). I've only done the objectives, as it was a trial conversion, but you should get the idea; I was in an email conversation with FireSinger and he said the format looks good.

A01_VillageCenter.zip

Xen0byte commented 6 years ago

I found some time today to write some code and I'm glad to announce that the bulk of the work is done. I expect the conversion tool to be fully functional in a few days. When that's done, the actual conversion will be a trivial job.

FireSinger2000 commented 6 years ago

Good. We have done some testing with player profile this weekend. Several open things to consider so if people are interested in helping we will add a few more tasks. (Basic) knowledge of C# required.

Xen0byte commented 6 years ago

Sure thing, more than happy to help. I'm not a developer but I know a bit of C#, and Stack Overflow is a wondrous place.

Xen0byte commented 6 years ago

Oh man, the amount of checks I need to run to make sure the parsing is consistent across all files is unreal. I'm progressing slowly but surely... but slowly.

https://github.com/Xen0byte/AOEOQuestParser

FireSinger2000 commented 6 years ago

@Xen0byte You could use the xml serialization as done in the database pharsing. Let me see if I can do a quicky tomorrow for you to help you on your way.

@musictopia maybe you could take a look at #13

FireSinger2000 commented 6 years ago

Added an example at https://github.com/firesinging/snippets/tree/master/AOEOQuestParser

Shows how the models relate to xml serialization. Added reading and an example writing back. For the quest instance it still is needed to add correct syntax for objectives and figure out the other model settings.

Xen0byte commented 6 years ago

Just to provide an update on the progress of the task, I've passed the halfway point writing the parser last night. I've tested the tool quite a bit and the code may not be super pretty but it's super robust with no loose ends and it works exactly as intended so I don't expect any inconsistencies in the output files. Once the parser is done, I'll put together a conversion schema for review to flush out any potential output formatting issues as I have a feeling there will be a few of those; making these adjustments though should be a fairly simple job.

Xen0byte commented 6 years ago

Hi, this took a little longer than I expected but the parser is done and I've added an initial set of converted quest files to the repo. There are some minor improvements that I'd like to do, such as get rid of 'values' elements, but apart from that please have a look and let me know what doesn't look right; making any adjustments to the output files should be a piece of cake.

Xen0byte commented 6 years ago

Alright, I got rid of the 'values' elements which I believe to be useless and the parsed quest files look much prettier/readable now. Please have a look so we can deal with the final finishing touches.

FireSinger2000 commented 6 years ago

Ok. One of us will try to look at it the next few days

FireSinger2000 commented 6 years ago

Thanks! We should now be able to add them to a next update. The info on the individual tags is what we needed