#Game Data API

1 messages ยท Page 1 of 1 (latest)

pure blaze
#

Heyo!

So I've been working for some time on a side project about the game's cooking system, it's coming along nicely but seeing how much data the community has managed to gather from the game in raw format gave me the idea to put it all together on a REST API for the developer community to have available for fan-made projects. I sure would love to have it for my cooking-recipes project ๐Ÿ˜›

Anyways I've been slowly getting some of the food data from the wikis aswell as @lucid magnet's full cookbook list.

@orchid anchor has been working on a raw format version of their already posted item stats per level spreadsheet

I'll try to keep an update on progress as we go along ๐Ÿ™‚

If you have more resources to colaborate to the data pool it'll be greatly appreciated!

Cheers and happy coding โค๏ธ

lucid magnet
#

I would love to collect some more data for this project, just let me know what.

pure blaze
#

Atm I'm finishing the schemas for the food so I can wrap up the cooking app, but I can easily migrate all this to the API project

lucid magnet
#

This open source on github rn?

pure blaze
#

I haven't started the API repo yet but the cooking app is

lucid magnet
#

I will contribute some updated resources when it does go live.

pure blaze
#

Awesome! I'll keep you posted then ๐Ÿ˜„

pure blaze
#

Some progress today ๐Ÿ™‚

#

Added the buff type to the query

pure blaze
#

Current endpoints:
GET /buff
GET /buff-type
GET /rarity
GET /food

#

Some details to sort:

  • Values might be off since most of them are based off of the "Regular" variant of the recipe.
  • Queries for buff & buff-type are incomplete (i.e. they don't include the respecting related table to use the data properly)
  • Rarity values are placeholders until I either figure out a way to plug them programatically or bite the bullet and do it manually KEKWait
tropic mulch
#

theres probably a way to scan through the games entity prefabs

#

still have to be changed between sections due to different components, but a lot less tedius

#

keep in mind, when running a world, every prefab i iterate through and list, easily could be turned into a scanner with the authoring loaded thing...

pure blaze
tropic mulch
#

web scraping? from what site(s)?

pure blaze
#

I'm extremely unexperienced with C# and modding in general so I really don't know what any of what you said means sallyGiggle

pure blaze
tropic mulch
#

ah yeah no thats possibly not accurate

#

since theyre slow to update

#

(plus some could be wrong)

#

@pure blaze this is an interface function in IMod that runs upon world load. Edit: not interface, its event listener

#

you can easily use this objects, get components through the entityManager, and as long as you format it right, everything will be automatic no errors and everything you want you can get in one single run of the game

pure blaze
#

That looks very cool. Would you be able to give me a more in-depth rundown on how to get this working? As I said I have no clue when it comes both with C# and the Unity environment. I tried playing around with the SDK they have up but I have absolutely no idea what I'm doing

tropic mulch
pure blaze
#

Also do you know if there's a way to output from that script to another file? I.e it would be very useful if we can pipe that data into a JSON or CSV or anything I can iterate over with Javascript to submit to the DB

tropic mulch
#

likely through an API, but ofc youre gonna have to read on documentation

#

worst case youll have to manually copy paste

#

nvm. It definitely does exist

#

since games map data becomes json

pure blaze
tropic mulch
#

Ok so, you basically only need to know about 5 buttons, and 4 of those are pug buttons in unity, for your purposes.
So use git clone to create a local repo and clone to somewhere with a bunch of space availible. This is where your unity project will reside.
Then open unity hub (youll have to download that one if you dont have it) and make sure to open the project on version "2021.3.14f1"

Navigate to the folder you cloned to inside the "open" menu. Select ok once youre there, wait a bit (unitys quite chunky lmao)
Theres some EULA stuff, just read and agree.

#

(while unity takes forever to load, ill explain ecs)
so ECS is "Entity Component System"
an Entity is essentially a "thing" that holds components, which are the data
for this case, you dont have to worry about system, but systems use the components to create behavior for the entity

Since you want the data, you will grab the entities and look into its components.

#

You see "pugmod", click on it and click "open mod sdk window". Everything you need there is explained well, create a new mod through it and create a function with EXACTLY these parameters (name dosent matter)
then (hopefully you have jetbrains rider because you can just rightclick the red squiggle and everything will generate, if not, just make sure instead of : Monobehavior at the top its : IMod (after the class name)

then make an override of of init simply by doing

public void  Init()
{
  API.Authoring.OnObjectTypeAdded += //(your custom function without the "()")
}```
Once youre all done with what youd like, then build it, through the mod sdk window, and then open ck, get into a new world, and it should build your text/json correctly into its file if needed (just know there may be security system issues if you do it. If so youll have to modify some stuff)
#

@pure blaze this good?

pure blaze
tropic mulch
#

aight. glhf