{"id":511,"date":"2024-03-02T19:45:40","date_gmt":"2024-03-02T19:45:40","guid":{"rendered":"http:\/\/lloydmills.nuacomputerscience.co.uk\/blog\/?p=511"},"modified":"2024-03-04T17:10:50","modified_gmt":"2024-03-04T17:10:50","slug":"personal-work-potionman","status":"publish","type":"post","link":"https:\/\/lloydmills.nuacomputerscience.co.uk\/blog\/2024\/03\/02\/personal-work-potionman\/","title":{"rendered":"Personal work &#8211; PotionMan"},"content":{"rendered":"\n<h2 class=\"wp-block-heading has-text-align-center\">2nd March 2024 &#8211; Initial work<\/h2>\n\n\n\n<p>I want to keep practicing blueprints since they&#8217;re still an incredibly important aspect of game design for prototyping mechanics as well as simply just using them in tandem with C++. That and I need a break from playing Helldivers 2 (love that game but I&#8217;m addicted).<\/p>\n\n\n\n<p>Unfortunately I decided to blog about my work after the fact rather than before and during.<\/p>\n\n\n\n<p>I like to credit the potions used in this test were made by Ergoni, sourced from their sketchfab page here https:\/\/sketchfab.com\/3d-models\/potions-90e0258b906d442c876075fc46ca5f18<\/p>\n\n\n\n<p>I started off wanting to just make a diegetic inventory of potions since I really liked talking about it in my diegesis essay.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"790\" height=\"494\" src=\"https:\/\/lloydmills.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2024\/03\/image-1.png\" alt=\"\" class=\"wp-image-512\" srcset=\"https:\/\/lloydmills.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2024\/03\/image-1.png 790w, https:\/\/lloydmills.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2024\/03\/image-1-300x188.png 300w, https:\/\/lloydmills.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2024\/03\/image-1-768x480.png 768w\" sizes=\"auto, (max-width: 790px) 100vw, 790px\" \/><\/figure>\n\n\n\n<p>I blew a lot of time making functions with pass-by references to handle all the display potions, but overall we have 4 potions displayed on the back: Health, Mana, Yellow and Purple. I had in mind making the first 3 self-use items and the purple one as a throwable and with that, I made multiple of them appear on the players back to track how many they had available to throw while the others have a number to track which both disappear when at 0.<\/p>\n\n\n\n<p>These were setup by making static meshes on the player blueprint attached to spine_05, excluding the first purple potion which is attached to the hand. Text renders are created as child components to the respective potions they track.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"854\" height=\"835\" src=\"https:\/\/lloydmills.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2024\/03\/image-2.png\" alt=\"\" class=\"wp-image-513\" srcset=\"https:\/\/lloydmills.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2024\/03\/image-2.png 854w, https:\/\/lloydmills.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2024\/03\/image-2-300x293.png 300w, https:\/\/lloydmills.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2024\/03\/image-2-768x751.png 768w\" sizes=\"auto, (max-width: 854px) 100vw, 854px\" \/><\/figure>\n\n\n\n<p>I set up some test inputs to modify the value of each of these, I feel particularly clever using a shift keybind to change whether it&#8217;ll increase or decrease, it&#8217;s a lot nicer than setting up 2 different keybind to increase\/decrease each variable. Also the fact you dont need to mess around with enhanced inputs it&#8217;s nice since input functions are all already set up.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"896\" height=\"761\" src=\"https:\/\/lloydmills.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2024\/03\/image-3.png\" alt=\"\" class=\"wp-image-514\" srcset=\"https:\/\/lloydmills.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2024\/03\/image-3.png 896w, https:\/\/lloydmills.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2024\/03\/image-3-300x255.png 300w, https:\/\/lloydmills.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2024\/03\/image-3-768x652.png 768w\" sizes=\"auto, (max-width: 896px) 100vw, 896px\" \/><\/figure>\n\n\n\n<p>Increment potion takes these values to update whatever it wanted to update, and calls the holster update function after so they the diegetic inventory matches the new values.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"353\" src=\"https:\/\/lloydmills.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2024\/03\/image-5-1024x353.png\" alt=\"\" class=\"wp-image-516\" srcset=\"https:\/\/lloydmills.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2024\/03\/image-5-1024x353.png 1024w, https:\/\/lloydmills.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2024\/03\/image-5-300x104.png 300w, https:\/\/lloydmills.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2024\/03\/image-5-768x265.png 768w, https:\/\/lloydmills.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2024\/03\/image-5.png 1127w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Due to have 2 different methods of tracking potions (text counter versus multiple potions), I added a branch to split the logic between the two versions. <br>The multiple potions took a bit of extra work to figure out but it seemed like the right solution (anything other than nesting IF statements).<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"389\" src=\"https:\/\/lloydmills.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2024\/03\/image-6-1024x389.png\" alt=\"\" class=\"wp-image-517\" srcset=\"https:\/\/lloydmills.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2024\/03\/image-6-1024x389.png 1024w, https:\/\/lloydmills.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2024\/03\/image-6-300x114.png 300w, https:\/\/lloydmills.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2024\/03\/image-6-768x292.png 768w, https:\/\/lloydmills.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2024\/03\/image-6.png 1220w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>last thing I&#8217;ve done today is added the ability to throw these potions.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"374\" src=\"https:\/\/lloydmills.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2024\/03\/image-7-1024x374.png\" alt=\"\" class=\"wp-image-518\" srcset=\"https:\/\/lloydmills.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2024\/03\/image-7-1024x374.png 1024w, https:\/\/lloydmills.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2024\/03\/image-7-300x110.png 300w, https:\/\/lloydmills.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2024\/03\/image-7-768x280.png 768w, https:\/\/lloydmills.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2024\/03\/image-7.png 1197w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>I really like doing these little personal works to make niche mechanics\/systems, they&#8217;re a touch of love that I&#8217;m passionate about adding in my usual games.<\/p>\n\n\n\n<!--nextpage-->\n\n\n\n<h2 class=\"wp-block-heading has-text-align-center\">4th March 2024 &#8211; Mechanics<\/h2>\n\n\n\n<p>I want to add utilities to these potions.<\/p>\n\n\n\n<p>Health, mana, sprite and boom names were all just default choices with sprite being made up. These should have been named potion 1,2, 3 and 4, which I will start off doing.<br>Renaming with health as 1, mana as 2, sprite as 3 and boom as 4.<\/p>\n\n\n\n<p>A throwing animation would be good to have too.<\/p>\n\n\n\n<p>I want to add an ability to change these potions around too.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Change potions from name system to number system<\/li>\n\n\n\n<li>Add throwing animation<\/li>\n\n\n\n<li>Potion uses<\/li>\n<\/ul>\n\n\n\n<p>I had a shot at using mixamo.com to set up an animation but there were a few hurdles to cross. I tried importing an animation from the site without using my own model which of course didn&#8217;t work due to the skeletons not working. The animation now imported in unreal doesn&#8217;t work so I&#8217;m putting a pin on this and coming back to it later.<\/p>\n\n\n\n<p>Before going to potion uses, I&#8217;d like to add a way to enable\/disable and change the types of potions used. I could switch to using an enumerator for the potions to track their type and count, I might need to add a bool onto that to track if the slot is enabled\/disabled.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>2nd March 2024 &#8211; Initial work I want to keep practicing blueprints since they&#8217;re still an incredibly important aspect of game design for prototyping mechanics as well as simply just using them in tandem with C++. That and I need a break from playing Helldivers 2 (love that game but I&#8217;m addicted). Unfortunately I decided&hellip; <a class=\"more-link\" href=\"https:\/\/lloydmills.nuacomputerscience.co.uk\/blog\/2024\/03\/02\/personal-work-potionman\/\">Continue reading <span class=\"screen-reader-text\">Personal work &#8211; PotionMan<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-511","post","type-post","status-publish","format-standard","hentry","category-uncategorised","entry"],"_links":{"self":[{"href":"https:\/\/lloydmills.nuacomputerscience.co.uk\/blog\/wp-json\/wp\/v2\/posts\/511","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lloydmills.nuacomputerscience.co.uk\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lloydmills.nuacomputerscience.co.uk\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lloydmills.nuacomputerscience.co.uk\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lloydmills.nuacomputerscience.co.uk\/blog\/wp-json\/wp\/v2\/comments?post=511"}],"version-history":[{"count":5,"href":"https:\/\/lloydmills.nuacomputerscience.co.uk\/blog\/wp-json\/wp\/v2\/posts\/511\/revisions"}],"predecessor-version":[{"id":523,"href":"https:\/\/lloydmills.nuacomputerscience.co.uk\/blog\/wp-json\/wp\/v2\/posts\/511\/revisions\/523"}],"wp:attachment":[{"href":"https:\/\/lloydmills.nuacomputerscience.co.uk\/blog\/wp-json\/wp\/v2\/media?parent=511"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lloydmills.nuacomputerscience.co.uk\/blog\/wp-json\/wp\/v2\/categories?post=511"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lloydmills.nuacomputerscience.co.uk\/blog\/wp-json\/wp\/v2\/tags?post=511"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}