Mona 🛠️ Visual Scripting
ETHGlobal·Mon, Oct 9, 2023, 12:00 AM
A glimpse into visual scripting on Mona Hack with some of the most skilled web3 developers, designers and product builders from all around the globe for a weekend-long adventure to advance the Ethereum ecosystem, ETHGlobal New York 2023. ----------------- Follow us: https://twitter.com/ETHGlobal​ Check us out: https://ethglobal.co​m Email us at: hello@ethglobal.com
Transcript
foreign [Music] I'm a unique developer here at Mona mono we don't know is is a metaverse platform I will create a digital spaces and experiences people come people can join you can share them you can create games you can create galleries you can create whatever you can imagine really inside of mono we have this feature called visual scripting and that's what the session is going to be about um so I've got this like self-sample project sir that we'll go through and I also have some links that I will share um so here's this space that I prepared for uh the session uh controller link here uh vanilla wants to jump in um they can totally do so and uh explore in the runtime of during the session whatever you feel like um so essentially um visual scripting is a way in mono to create interactive functionality so what I've created here is this um like NPC dialogue system where you can walk up to this like hologram guy and you can have a chat with him it's very similar to a lot of RPG games and such like if you played any of those in the past um it has like text and like this menu you can select different options there's some dialogue which I generated this call AI tool called suno shout out to those guys uh I'll also drop a link to them in the chat uh right now almost curious um I see people saying they're in there I'm in a private session so it doesn't uh so I'm not going to see you guys running around but uh fun in there um but yeah you can like use the Q and E buttons to like select different options and he'll he'll reply to you and give you information um and this is all done with visual scripting and this is just one of the sort of many things you can do with visual scripting you can create dialogue systems like this you could create puzzles or like Escape rooms like you want to be crazy try and re-neck like Call of Duty or something or like rocket League whatever whatever tickles your fancy I guess um well yeah I'm gonna be here to solve through the ropes um I won't be going super basic um because I'm going to assume people um might be familiar with scripting and stuff like that I said to hackathon I'm sure you can pick up the basics on your own as we go um so here we are inside of unity inside of the mono SDK we have our own um SDK project it's built inside of uni that you need to use to build spaces um it's more information about that in our docs and we should buy it on the mono website um so here we are this is this space life through together really quickly in Weber uh it's not super free but it's okay so um with the dialogue system um obviously you'll start speaking to this character here um so we have this like hologram character on this character we have an anime um anime has two states it's super basic he has like a Talking Stick and then I will stick so when he's talking he switches to the Talking Stick and vice versa these are just some like animations I got from miximo uh if you want animations it's a great resource um but yeah so essentially um outside of visual scripting uh this is the animation system but it's controlled by the visual script so um when you first walk up the stairs there is this collider here um and this collider interacts with the visual script that's on it it's called reactivate and essentially what happens is when a player walks into this it's gonna enable this conversation game object and this is the the manager that manages the whole conversation um do I press play um I actually have a few notes um up here which sort of allow it to work inside of the editor um but you can see um what will happen is the conversation that this activator will start this conversation game object no so I've got everything rolling um it's just super easy to do in Virtual scripting we have this concept of event modes event nodes um I should think they get triggered when you press a hotkey or when the game starts or there's various event notes um excited the visual scripting graph that you can access um sorry I wonder if you could just zoom in ever so slightly into to those little bottom um this is back and you see where I got four screen unfortunately I I actually can't zoom in on this this is like a fixed size okay no problem I mean you're doing a great job of explaining so um that's fine but yeah no problem this is this is the activator it's very basic um essentially when you walk into this collider that will trigger this event this on trigger enter event and it will then try and get the tag of the object which triggered it in our case we want the type player because we only want to activate this when a player walks into the tag and that will that will that will enable this other object which has its own visual script as you can see spiritual script is is much larger this is the one that does the bulk of the logic for the dialog system um but essentially what is happening is inside of our game objects in this conversation we have a UI system um and um there's several objects for responses and several for inputs um you can see these are all individual objects and the label one for free um or one through two depending which which it is because of the different number of options but um you could expand this type of system and have like a really expansive conversation system if you wanted obviously this is just a demo so it's just some like script that chat gbt wrote for me but uh um if you wanted to have a full story or a tier guide or I don't know a helper you could do all that sort of stuff of this type of system which is very cool um but yeah so let's dive into this graph a bit so it solves split into several categories um some of these uh like custom events that I've sell and some of them um uh uh unique events so it all starts with this unenairable bin so the other script when it enables this object um it it goes to this enable event and um it says to play this response and I'm triggering a custom event down here um so this is the response event so what this does is you give it a value and depending which value you give it it disables all events and then it enables the one you want um so this correlates with the the numbers of the responses in here so you can see zero one two three on the hierarchy maybe you can't see because they're already small but hopefully you can get the idea um but yeah you give it the number and it plays the event and when it does this it does a few other things as well um it sets the animates there of the NPC to to the the talking state so he starts like webbing his hands around and explaining and then it also there's a voice line um you probably can't hear it on when I showed you on screen share but if you're going to space yourself there's voice lines so we get the length of the voice line and we we wait until it's finished and then we we go back to the selection state um the selections there is managed by these other events here these three um so there's a navigation event there's a highlight event and there's a select event uh this navigation event on highlight event they're closely relayed um essentially when you um are in the experience and you're you're pressing cycle um you might be able to see down here right zoom in it's going to trigger these events you can already see tonight yeah this this um what triggered this this navigation a bit uh say she were looping through um the elements in this like input list there's three inputs so let's just hit the value of three and then it open floor so if you go to four it goes back to zero uh and so on um but essentially it this keeps track of which uh option you have selected and then the um the Highlight event is what is changing the colors if you look when you're trending um changes in the colors and stuff of the UI element this is what manages that this is called from this uh it's kind of just like a visual thing and then the select event is the one that triggers when you're actually like select an options so like I expect whoa what are you it's gonna be coming out it's the hologram right it's going to do that whole business and this is triggered by this uh this is very basic essentially it just takes the the selected currently selected object from the Highlight uh from the the navigation event uh it's stored in a variable on the side here um and then it there's a switch statement that triggers the the corrective response um but yeah as you can see like there's not that many notes it does seem a bit scary um at first but um once you dive into it it's it's not that complicated uh this this sort of sample project will be available after the project for people to like rip into and try and reverse engineer um I see a question is we're just scripting similar to scripting in second live I've never actually used scripting in Second Life but um it's very similar to like unreal blueprints if you if you have an experience with that um a lot of these visual scripting systems are very similar in design and that they all have like nodes obviously and then you have like variables and events so if you've used something like Second Life um I'm sure you could probably dive into something like this and pick it up very quickly um a bit of uni knowledge would definitely be helpful with certain events uh life cycle events which which trigger certain times in uni such as like when the game starts or once every frame and stuff like that um so if you had some Unity knowledge you would have some background knowledge on those already if not there's not that many of them they're very easy to learn and but yeah um this is kind of an overview of how this works and we do have some other visual scripting samples already in we have this model Library um with some Assets in it here um give it a minute to load um this this has some assets as well we have this recently launched mono capture which has its own sales visual Scripts um it's slightly more complicated than this but that's also a good project to dive into if you're wanting to so I'll get into um yeah I'm kind of happy to take some questions if anyone has any uh try best to answer them uh let me scroll through see if there is any going over it of course yeah uh everybody do feel free to drop your questions in the chat um Tom I mean I'd love to start off myself I see crazy is following up but yeah I don't know if perhaps you could um share some highlights of some projects which have been built obviously you mentioned that the opportunities are a nearly kind of endless as to what people may build but I just wondered if you add any particular highlights yourself um yep so so this space that I linked actually a polls to two other spaces with a bunch of interactive um features um so if you uh if you're in here like these two things balls if you uh look at them on that clip you can like jump into some other spaces uh that previously been created um it's like really cool um system-led it's okay um you want to know more about it you can ask the NPC guy he'll tell you all about it uh yeah um what do you mean by that like can you move objects around you can totally move objects around uh you could potentially create like a visual script that generate the speed when the level starts and have like a randomized world every time like that as well um I mean yeah crazy feel free to um expand on that if that's something quite what you meant uh there's also another question Tom which says how easy would it be to make these vs events available on my owner library is drag and drop templates for that individual builds and use cases yep so for this specific like uh NPC soap summer project I'll probably clean it up a little bit and then um we'll put that on the water library in terms of these events themselves I think they're specific to graphs I don't know if you can reference a scripts between graphs and that might be something for us to look into but but we can totally like um upload like individual uh graphs it's like assets and you could download them that way uh we could distribute those through the model library or Discord or um however we decide we want to do that amazing crazy game yep you can totally create a game um Scott the imagination is the limit it's a it's a full like it's almost a full Unity API is accessible for visual scripting um you could create like I don't know a basketball game I know there is there is a basketball game somewhere um about someone create uh every search on the model discard perhaps you'll find it another was another guy he built this like spaceship but you left to like fly around like a racing game um that was very cool uh but yeah you can totally create games um we're also looking at adding a bunch of like custom nodes that will allow you to do things like access external apis and stuff like that um so once that opens like people better do the master uh I see a link to the basketball game everybody wants to check that out it's in the Trap my key cut that's amazing are there any um libraries or a general link where people can go to potentially look at the full catalog of games I don't know if we could possibly get a link to that sometime if you want to to explain that a little bit further yeah the best place to uh five spaces is just go to monabest.com Marketplace um yeah that's there's a link to that here this is all about our minute spaces uh a lot of a lot of spaces are not minute those ones will not necessarily be here so there might be um but yeah you want to check out spaces definitely check this out there's a lot of awesome stuff going on um I I highly recommend a lot of them while the dragon has a lot of co-interactivity with like cut scenes and stuff like that um oh yeah that's like it's like hundreds and hundred spaces to go through um not all of them have been directed The some of them do something about but yeah um out of a great place to find spaces is the one of us Discord um a lot of people of course like work in progress things that they're building uh there I can drop a link to that as well um amazing and uh yeah Tom I I don't know if um you've got anything else planned please do tell me if if I'm jumping in but perhaps for people who are looking to use Mona um I'm not sure if you could share any insights as to where where they could get started and in terms of building their projects yeah absolutely so like I mentioned that start and we have our own SDK um you can find this on a web page or on GitHub itself let me pull it up here is here it is um and you can download our soap star project or on GitHub um you can load that into Unity um let's do this for like tutorial on how you're not done um in the readme um you can go and start employing objects from your favorite 3D tools whether you're a blender guy or um anything if you don't have any 3D experience you can still take part in Mana you can we have this library of assets you can use like drag and drop style you can find like free assets online and like spaces that way um you don't have to be a 3D artist to take part in Mana yeah I see somebody's just commented in the chat saying there are tons of helpful docs yeah to all of the participants uh currently here please do make use of all the links being dropped in the chat and of course to anybody watching the recording of this session and all of these links will be shared in the description of the video as well so yeah lots of links being shared so please do feel free to browse through those um Tom I've just noticed a question in the question panel which says how easy would it be to make these vs events available um oh sorry that was just a replication from from the previous chat so yeah um but yeah um these types that for example with this dialogue system we could extend this like I mentioned you could add more dialogue um it doesn't have to be a hologram he could be like an NPC that like walked around the map you could talk to or you can make them a quest Giver make your own Quest system or something if you wanted um you could like hook it up to an embroidery system or like skills and stuff you can kind of do almost everything you can do in uni within the virtual scripting system and then bring that into a space in mana and create some like radical interactive experiences um the concept of this is not like just take this it's to try and like learn from these sort of things and and then come up with your own ideas um so hopefully uh we'll be spite some people can have a play around a bit um my recommendation for anyone trying to learn this stuff is just play around a bit um if you get stuck there's lots and lots of tutorials and stuff online um or you can ask your favorite uh API chat but I'm sure he'll have an opinion but yeah um yeah no one has any more questions yeah we wrap up some uh perhaps one more um just in terms of the bounties and uh people who are looking to build their projects obviously you've shared um the people can kind of use this and build whatever they like and uh yeah just if if you could confirm in terms of the bounties and the hackathon and the types of projects people might want to build or whether you're happy to just see any kind of open-ended um things being built on the platform yeah I believe there is some like specific bounties for certain types of things I actually don't know what they are uh I'm actually part of the development team might be so here uh if you want more information on that um there's probably some links to the period chat or you can uh join them on a bus discard or check out the socials I'm sure they'll have some big information on that yep there we go thank you very much yeah so there's there's something there to the website apologies um and so just to clarify the first Bounty yes Tom loading them up perfect so if you scroll down you should see Moana yeah there we go here we go so there's like some specific uh brownies um best website or app that uses modern specials and advertise and interesting words um we have this whole like Avatar system we use the the brm Avatar system which is this like interoperable system that you can use on many platforms um yeah so you can definitely interact with avatars and visual scripting if you go big creative um you've already questions regarding any of that stuff um definitely helping the model bus Discord and as well as lots of other people as well um and then we have the best interactive components using video scripting um this will be stuff um like what we've built here um some things that come to mind would be I don't know maybe you want to create a mini map for your space so you have a really big space you keep getting lost like a map or something um maybe you want a jet pack I don't know I'm Gonna Be Ready like football and you want to play some football or soccer or American friends yeah amazing I think um I'm really interested to see for this uh particular Bounty what what people come up with um you see inside uh people's imaginations could get carried away um but I'm sure yeah some really cool projects will be built so uh unless there are any more questions for now just while we wrap up um as as I've mentioned all of the links are being shared in the chat you have uh the Discord Zone on the encode server where you can ask any questions to Lamona team and as Tom mentioned as well um I believe there's a Mona Discord Channel as well so just whilst we see some background images of a really cool Rocket game yeah I'd just love to thank the monity one last time um Tom for a really cool session thank you very much for taking us through that and also to the rest of the team for the sharing all of all of the docs and resources in the chat so yeah thank you very much to the team once again thank you to all of our participants for attending all of the workshops it's been really great to see you here and we do hope you have enjoyed them but also gained some insights and to help you build your project so we'll be in touch very shortly um a message will go out tomorrow to get steps for you all but if you do have any questions or problems with building your projects you can reach out to me for general questions and you can also reach out to all of our sponsors in the sponsor zones for any technical um issues or problems that you're encountering so yeah or do keep in touch we're really excited to see what you all build and for one final time I'd just like to thank Tom and the team once again for a really incredible session so thank you all very much and we'll keep in touch and see you soon
Automatic transcript — names and jargon may be misspelled.