top of page

DEV BLOG 08

CRAFTING SYSTEM FUNCTIONALITY

& INTRO LEVEL

now i have the layout of my crafting system all sorted i started to add the functionality to it.

this is by far the most challenging bit of scripting i have done to date. it wasn't as easy as being able to just research how its done and then implement that to how i need it. I pretty much got this working with no external help which i am extremely pleased i managed to achieve.

I do however, believe that i could have gone about it differently because the scripting behind it was pretty insane. As you can see in the image below.

and below is the same script zoomed in to the start section.

but i have it in and working so i am more than happy that i have been able to achieve that. i can maybe in the future learn from it and see where i could condense my scripting down.

I managed to get it working so that when you click an item in the list, that button becomes disabled to show that is the one you are looking at as it is highlighted blue. it then updates the recipes icon, name and ingredients needed to craft the item.

the recipe consists of an amount needed/the name of the item/a needed amount (for multiple crafts) and a have amount which displays what is currently in the inventory.

if you do not posses the needed amount of a certain ingredient then the have amount will change to a red coloured font and the craft button will become disabled (making you unable to craft the item).

once you have acquired more than or equal the needed amount, the have amount will then change to a white coloured font to show that you have enough of that item to craft the new item and also when all ingredients are white the craft button will become enabled to let you perform the craft.

Example of craft buttons

Turns red when the item is uncraftable (need more ingredients) and green when you posses all the ingredients needed to make the item. the craft button selects the item to craft based on the item icon. I.E. if the icon = hatchet and the craft button is enabled it will craft a hatchet.

I also added functionality at the bottom of the recipe section that shows how many of each item will be created per craft, how long each craft will take as well as a plus and minus button that adds or subtracts to the number displayed at the bottom, in turn this will multiply the needed amount so that you can craft multiple items and it will update in real time.

When the craft button is pressed, it will add the amount of items you asked for to the inventory.

here is a video of it all in action below.

This system took a long time to implement due to the sheer amount of unique recipes i added. here is an example below that shows an example recipe (hatchet) and below it are all the other items that all have their own unique recipe like the hatchet one.

as you can see that is quite a lot of work just to give them all default values, NAMING CONVENTIONS and sorting them properly. like i mentioned earlier i am sure there is a more efficient way of doing this but as i got it in and working by myself i welcome the extra work as it keeps me learning new things.

There are still parts that need fixing, for example I currently have all the recipes to update when i change something, like add an item or add an amount to craft. Because of the way i have set my system up i need to make it so that it only updates the current item i have selected otherwise it will update the amount needed and amount have to an amount not necessarily related to the current item. Once that is fixed the crafting menu will hopefully be completed.

Game Intro

I have an idea for an intro to my game. This involves the player being in their home and all of a suddEN EVERYTHING MAN MAD DISAPPEARS.

THE PLAYER (WHO HAPPENS TO BE UPSTAIRS AT THE TIME) FALLS TO THE GROUND AND IS RENDERED UNCONSCIOUS. tHE SCREEN THEN FADES TO BLACK AND THE OPENING GAME CREDITS PLAY. WHEN THE CREDITS FINISH THE MAIN LEVEL LOADS AND BECAUSE I HAVE SET THAT TO START WITH A BLACK SCREEN IT'S SEEMLESS FROM THE INTRO LEVEL TO THE MAIN LEVEL.

i HAVE PURCHASED ASSETS FROM THE UE4 MARKETPLACE FOR THE HOUSE AS I DIDNT WANT TO SPEND ALL MY TIME MAKING MODELS. i STILL NEED TO ADD ANIMATIONS FOR THE PLAYER FALLING AND MAKE THE HOUSE DISAPPEAR BUT THIS VIDEO SHOULD GIVE U AN EXAMPLE OF WHAT I AM GOING FOR.

I HAD THE IDEA OF MAYBE MAKING THIS A TUTORIAL LEVEL IF I HAVE ENOUGH TIME SO THAT THE PLAYER CAN LEARN HOW THE MECHANICS OF THE GAME WORK. iF NOT THEN IT WILL BE FINE AS IT IS ONCE THE ANIMATIONS ARE ADDED.


Featured Posts
Recent Posts
Archive
Follow Us
  • Facebook Basic Square
  • Twitter Basic Square
  • Google+ Basic Square
bottom of page