WittleWolfie / WW-Blueprint-Core

A library to simplify modifying Pathfinder: Wrath of the Righteous.
MIT License
14 stars 5 forks source link

EncyclopediaTool #32

Closed Aegonek closed 2 years ago

Aegonek commented 2 years ago

Added EncyclopediaTool for tagging and untagging encyclopedia entries in text, heavily based on Vek TTT code.

Notes:

  1. I moved entries data to encyclopedia.json file. I'm not sure how will it behave when published to NuGet. I think it should include the file as well, but it could be nice to test this via publishing pre-release version.

    This is mostly my personal preference to hold data in files instead of code; but knowing how to include resources in NuGet package may be helpful in the future.

  2. I adjusted and added some encyclopedia entries.

  3. I changed some rules of matching based on tests - it appears vanilla game only tags first occurence of encyclopedia entry in text, and I changed the code to work like that. I also refactored it a little to make it IMO easier to understand.

Linked to issue Add tools for working with Encyclopedia tags. - to close after merging.

WittleWolfie commented 2 years ago

Overall looks good and I appreciate the contribution!

Please update the instructions & documentation:

  1. Additional steps needed, if any, to include the tagging JSON file in a mod release
  2. Add example usage
  3. Class / method comments on anything a mod dev would access
WittleWolfie commented 2 years ago

I'm still getting back into the swing of this and dreading a little finishing the refactoring in progress :P Unfortunately the way I initially did code templating for the generator makes large scale improvements really painful so it needs to be done.

I'll take a more thorough look at this later this week, if everything is resolved by the weekend I'll likely push a new release with this.

Aegonek commented 2 years ago

Oh yeah, I forgot to clean the imports :smile: Your way to test NuGet package is way better than mine. I'm gonna clean this up tomorrow.

Aegonek commented 2 years ago

Actually I'm gonna do that later this week - I'm having a rather intense week right now 😆

Aegonek commented 2 years ago

I've addressed all of your remarks. I'm not really satisfied with documentation, but I don't think adding long text sample to doc comments is such a good idea. A better way would probably be to add detailed example to doc website. I think it can go in next pull request though 😄 I need to figure out how the docs work. They are generated using DocFX and hosted on GitHub pages, right? I've never used neither of those before.

Please see my comment about testing NuGet changes. If you have no objections to that, you can merge the pull request.