Arcweave Plugin for Godot 4 | E01: Installing & Exploring the Plugin

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hi there this is jannis from arave and this is a tutorial series on the arweave plug-in for the gdau game engine in this short series we'll learn how to get our story data from our AR weave project into our good do game moreover we'll see how AR que's web API allows us to fetch story updates and refresh during runtime from within our exported game in this first episode we'll install and enable our plugin and explore its folder structure and important classes the first thing we need to point out is that the arweave plug-in requires we use theet version of gdau also known as the mono version which allows scripting in C the reason for this is that to parse Arc script on run time our plugin uses antler which requires its scripts to be in C if you are not familiar with theet version of gdau there's no reason to be alarmed our example games are written in good old GD script and you can still write your game in GD script all you need to know is that the plug-in itself is written in C and therefore requires us to download and run the net version of gdau so we need to go to gau's website and do just that so you go for good engine.net once you've installed the game engine we can start a new project [Music] uh the renderer is not important this is going to be just for testing okay so this is an empty gdau project let's now inst install the arweave plugin and explore it in a bit um there are two ways we can do this one is to go to the assets library and look for arweave the other option is to go to Ares GitHub and search for arque goo plugin there you go you can find the link in this video's description as well as on the arave documentation page so now we found it and we can download as zip extracting this ZIP file uh gives us the uh add-ons folder which is the folder where all the gdau plugins are placed and inside it we can find the folder for the arave plugin so all this we can simply um drag and drop inside our gdau project let's get rid of this so here we go add-ons arcave the necessary steps to start using the plugin are thoroughly described in it's GitHub repo right here so let's just follow the instructions once we have our add-ons folder in place we must now build our C solution file so if we go to project tools C create C solution this creates two new files in our root we cannot see them here but if we go to our um our folders here they are tutorial arave docs Pro and tutorial arave the sln file we must now open our CS Pro files with an editor and add some lines of code that will include the antler Library so our plugin can parse AR script on the Fly again this is all um described on the GitHub uh read me on the uh repo on the uh this is all described in the AR Wego plug-in read me on uh its repository so here we go open the Cs project file and after the property group part add the following line so let's copy this line or just CL just click here duh and then we go to this part here after the property group closing tag we just paste the item group and we save now we need to [Music] build and then and just in case reload our current project now if we go to Project settings plugins we can enable the AR weave plugin and that's it we can now explore the plugin a little bit let's see how it works uh in a nutshell so first of all from the C classes included in the uh in the plugin the one will be directly accessing all the time is the story class so the story class is responsible for following the story flow it keeps track of what the current element is of the number of visits of every element as well as the uh um any variable assignments taking place in the current element some useful methods of the story class uh here's its script story CS so one of the useful methods is uh get current element which turns the current element as a gdau object then we have uh generate current options which Returns the current elements valid options that is the options that we the player can actually see in AR weaves play mode at the given game State and another one another useful method is get current runtime content which Returns the current elements content as a string after evaluating any potential Arc script code it may contain I advise you to thoroughly study uh the demo games that come with the plugin to see in practice how the story class is used now the arave plug-in has one fundamental object called arive asset this is actually a resource so we can create one by by going since we've enabled the plugin we can create a resource folder resources and inside that folder we can create a new resource and look for arque there you go if you just search for it arave asset and we can call this um story story [Music] TR and here it is now now let's open this but okay here here is our ariv AET but what does it do well this is the resource that stores our ariv data everything about our AR project now in the inspector of our arive asset we can first of all see it has a receive method and this can either be file or web API so these are are the two methods we can use to transfer data from arave uh into the gdau engine One is using adjacent file and the other one is using the web API if we have a team account and then we have the file settings if we use the file method we can um add the path here to find the Json file or the API settings we need to have an API token and a project hash and of course there is a button that initializes the AR asset of course now we're going to get an error we don't have a file in this path and we don't have uh yeah we don't have a hash so we get nothing in return to test how uh this resource works we can export our Castle Project as a Json file and fetch it into the arave asset simp so let's open the castle and if we go to export we need to go to the engine Tab and Export for good 4 so the castle zip if I exp extract that it says project 5 um Jason I can just drag this into good do 4 just to find it easy I don't have to drag it uh to any specific folder it certainly doesn't have to be included in the project folder because when we access it from this path here so uh if I go to my good for folder uh what was the name project 5 sorry I have to look for it here project five there you go so when I access it from this folder um I once I initialize and all the data comes in and into the AR AET I don't really need the Json file anymore so now we set this to file uh we have our path so we can initialize the ariv asset and it says successfully refreshed from file now we can see that the project is um actually a dictionary of 14 size 14 which means let's click this and it contains uh everything our Json file contains that is all the items of our arweave project all the boards notes elements jumpers connections branches Etc the cover of the project the name of the project and the starting element and we can access any of these here as well so we we want to see an element we open this dictionary every element here is again it's a dictionary so the key is the element ID let me drag this a little more here the element ID and the value is another dictionary which contains um for example the color of the element the title of the element the content etc etc so how can we use this now there are actually two ways we can introduce the ariv asset to our game the first one is to preload it in the beginning of our game script as we often do with resources in Gau uh this means that we also have to um access our story class if you're interested how this is done if we go to our um GitHub repo just go to create your own node and then there is an example script here that does not use the second solution which is an arave node so if you're interested in that just click here you'll find um an example that can answer all your questions but we actually now are going to go for the second solution a simpler way to introduce our ariv vaset to our game and that is by using an arave node so at the moment we don't have a scene tree so let's create one it can be anything really we're just making a quick example so I'm just making a control saving it as main main TSN of course you can not in resources I can just create a scenes folder and save my main then we add a child to our scene to our rot if we go to all the nodes and type arave here it is it's called arave node the arave node has a c script that takes care of initializing the story object and handling story updates now remember that uh the arque plugin allows story updates and data fetching during game runtime and the arque node handles any requests we make to AR's web API if we doubleclick to this arive node in the inspector we see that it is actually waiting uh for an arive asset well we're in luck because we've already created that it's our story T so can just drag it and drop it in here and if I click it we can see uh the ariv assets properties here as well that was it for this first episode in the next one we'll see how the plug-in works by opening our first game example a simplistic implementation of Ares play mode in gdau if you find these tutorials helpful please subscribe to Ares official YouTube channel you can find us the arweave team hanging out on our Discord server and of course you can follow arweave on Twitter and Linkedin I'm Janis from arave thank you for watching and let the games [Music] begin
Info
Channel: Arcweave
Views: 575
Rating: undefined out of 5
Keywords:
Id: SGrg3DAHiRA
Channel Id: undefined
Length: 16min 21sec (981 seconds)
Published: Sat Mar 16 2024
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.