Friday Devlog #17

January 22nd, 2021 19:55
Written by: Mycophilia

We don't really have anything new to talk about since our last devlog in December, but since it has been a month since the previous devlog, I figured it was about time for some sort of progress report.

 

Skills (Myco)

What I've been trying to do for this past month is making it possible to select a skill from the skill window, drag it to the action bar and then have that skill be activated by pressing the slot keybind. So far only the first two parts actually works, albeit janky as fuck. 

As for activating the skills, there was a few things I had to understand before I could make it work: how the targeting system works, which functions were responsible for activating skills and how to access them from the UI system I created.

Targeting: This one was hard because whoever wrote this shit really sucks at naming stuff that's in any way understandable to anyone who didn't create it. But to get a bit technical, here's how it works: When an entity is created they get assigned a "color" value by a color allocator that finds a color value that hasn't been assigned yet. This color value is rendered as a cube at the entity's location on a separate invisible surface, and the client figures out what your mouse is hovering over by referencing this surface and finding the entity by it's color value.

Skill functions: This is where I've spent the most amount of time. I basically went down a rabbit hole trying to understand this, and what I finally realized after almost a week was that the code I thought was responsible for using skills, was actually the code responsible for changing the character animations after the skill had been used. So yeah.. A giant waste of time.

Accessing the functions: After finding the actual functions I needed, I tried calling them when pressing an actionbar keybind, and it worked! Kinda.. Turns out I have to rewrite parts of it because the client is hardcoded to only look at what skill you currently have assigned to your left/right mouse buttons and just activate those depending on which button you pressed. There's no way to pass along which skill I want to activate. Oh and I had to stop the character from automatically attacking as soon as you click on a monster.

 

And there you have it! It feels like there's been a lot of one step forwards, two steps back this past month. But were still chugging along!