RGDReader
JsonSubTypes
Our great sponsors
RGDReader | JsonSubTypes | |
---|---|---|
3 | 4 | |
4 | 389 | |
- | - | |
5.9 | 3.4 | |
over 2 years ago | 22 days ago | |
C# | C# | |
MIT License | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
RGDReader
-
Ingame Icons and images as files ?
Toraxxx will surely work on it, it seems he works really fast and the RGDviewer works already! So keep an eye on his tool page: https://github.com/RobinKa/RGDReader/releases
-
Ranked mode information
I managed to convert AOE4's texture files (.rrtex) today (open source here), and stumbled upon the icons used for ranked mode. Looks like the ranks are Bronze->Silver->Gold->Platinum->Diamond->Conquerer (as /u/-MugenNoSora- already figured out earlier here) and there will be 5 placement matches.
-
AoE4 Modding Discord
AOE4 does not have official modding support yet but we already have some tools to read some of the files. The archives can be opened with https://github.com/Janne252/essence-archive-viewer and RGD files which contains the game data such as unit statistics can be viewed with https://github.com/RobinKa/RGDReader/ which I created today (see https://www.reddit.com/r/aoe4/comments/q144mt/game_files_does_anyone_know_how_to_convertread/ for some more conversation).
JsonSubTypes
- .Net 6 - Rest Api is deserializing property of "object" type to JsonElement type (System.Text.Json)
-
An API receives different message types
If messages are arriving as Json you can use JsonSubTypes to deserialize to different DTOs based on the UUIDs (https://github.com/manuc66/JsonSubTypes) and then use the visitor pattern to dispatch the DTOs to the correct method.
-
What is your preferred way of creating application specific files for a local application?
Personally I've had good success with JsonSubTypes for deserializing discriminated unions from JSON. It'll serialize stuff into the right type, and then you just need a switch statement to typecast it afterwards.
-
How to create a data-driven software product that indicates pre-coded functionality?
There is a small use case that I consider valid for this. It would be for determining a set of pre-defined behaviors to make available to definitions of entities in a game. And the json data would not be coming from external sources, it would be tightly controlled by me as the developer. The response you made to the other comment on my post shared a link that said the practice shouldn't be done with untrusted data, and there would be no untrusted data since there'd be no external data. The article also mentions to restrict the types that can be deserialized, and that is definitely possible. The architecture pattern for this is ECS (Entity Component System) and the data-drive portion might have been a mis-naming of my post, it's more of a lot of the design of entities and components is stored in data files, and there are a few cases where I will want to associate certain functionality in the code with these data entity definitions. No operating system level functionality would be exposed. I've even been referred to a library available via nuget that will allow for what I'm attempting to do: https://github.com/manuc66/JsonSubTypes
What are some alternatives?
essence-archive-viewer - Patched version of Company of Heroes 2 Archive Viewer (official tool provided by Relic Entertainment) to work with Company of Heroes 3 and Age of Empires IV SGAs.
Json.NET - Json.NET is a popular high-performance JSON framework for .NET
XtoX - Convert any data type from x to x with ease!
MessagePack for C# (.NET, .NET Core, Unity, Xamarin) - Extremely Fast MessagePack Serializer for C#(.NET, .NET Core, Unity, Xamarin). / msgpack.org[C#]
WarThunder_PresetRandomizer - A vehicle preset randomisation and data presentation tool for War Thunder. It is built around Klensy's WT Tools.
JsonKnownTypes - Simple way to serialize and deserialize polymorphic types for Json.NET
GDShrapt - GDShrapt is object-oriented one-pass parser of GDScript programming language.
Utf8Json - Definitely Fastest and Zero Allocation JSON Serializer for C#(NET, .NET Core, Unity, Xamarin).
AOEMods.Essence - C# library and tools for working with Age of Empire 4's Essence engine (.sga, .rrtex, .rrgeom, .rgd currently)
Wire - Binary serializer for POCO objects
Cinchoo ETL - ETL framework for .NET (Parser / Writer for CSV, Flat, Xml, JSON, Key-Value, Parquet, Yaml, Avro formatted files)
Protobuf - Protocol Buffers - Google's data interchange format