Protobound Day 10
Running on low energy today, woke up to a power outage early this morning and the adrenaline of trying to get the bugs and geckos sorted for heat meant there was no going back to sleep.
Today I will get the turns working with attacks coming from both sides and handle combat end with exp and level up.
I can now damage an enemy.
Also my screenshot software got a cameo. I do need to line up the panels, but that's really not terribly important right now. Getting functionality in is priority. Next I need to handle the death of the enemy. Currently it just gets removed from the turn order so it can't take a turn. I need to do something to it's UI.
Like blacking out the sprite. I could hide it too or play an animation but... these things sound more like something for week 4 when I will be adding as many "out of scope" things as I can and polishing up a bit.
Now I have to make it so the corpses can't be targeted.
Inching closer, had to test with multiple enemy party members. Not sure why I hadn't been. Seems to be working.
There is a part of me that wants to use the beating of dead enemies a mechanic but I know I don't have time for it.
I've hit an interesting bug where the version of enemies being passed to the target UI is not the actual enemies. It's a dict which I assume is passed by reference so I can't figure out how this is happening.
I print out the enemies dict before it is sent to the panel and it's correct. The same variable. I've looked at the panel code over and over and I don't see what it's seeing. I've also tried getting the information by calling get_parent().enemies to fetch the data with the same result. I think will now smash my head on the function until it works.
Ah.
You know when you haven't slept much and you make stupid mistakes? Stupid mistakes like enemy rather than enemy_party[enemy]?
That's got it.
Now I can handle combat end. After lunch.
End of combat handled.
If anyone levels up, it would display they have leveled up. Enemies wont drop items, just money (for now).
When you click "Ok" the menu will hide and the enemy in the overworld will queue_free() I could have the enemies respawn after a time but I think that it would be better to have that happen on map change. I always like knowing when I have fully cleared an area but I also like to be able to come back and clear it again for the griiiiind.
I could make the enemies themselves buttons that can be clicked instead of having the target menu pop up but I went with having a target menu to save time. I am more concerned with logic and flow than UX at the moment. I could easily change it later if I wanted, though this is true of most things in this project. Kinda why I am doing it the way I am, if I keep myself focused and in-scope with clear goals and limits I wont overengineer the hell out of it and get confused by it next time I want to add features and I could use it as a base project in multiple other projects. That mixed with these posts should make it easy for me to do so if I should feel the need to in the future. I could also release it as an open source project for other devs to use but I would have to strip out the graphics as I do not have rights to be releasing those(aside from what I make myself)
Anyway, now that I have that loop in I have to add the enemy attacks and then usable items, of course. I also have to add HP, SP, Level, Exp and Money to the menu.
The enemy turn should be simple, pick a target randomly from the party, hit them. No need to make this complex as of now. I can add as many layers to the choices as I want to later on down the road if I want, like I said before. So I need to select a random party member and apply damage.
Almost forgot to subtract defense modifiers from damage. Then forgot to clamp it to a min of 0 so defense could overpower attack and cause a heal when getting hit. Actually kinda funny and would be an interesting mechanic if I were looking to add strange mechanics.
Clamped damage between 0 and the classic 9999. That'll... theoretically stop the player from overhealing into godhood.
There are likely hundreds I have not thought of though, so, yeah... get on that.
I also have to make damage persist on the party after combat... There.
Enemies now attack and the damage persists.
I will add the HP, SP, Level and Exp to the menu now, then get on the healing Items.
That took a little more thinking than expected. Might be the lack of sleep really taking hold, but I got it done.
That's the ticket.
Next I need to handle party defeat. For now I will just straight up quit the game, once I got save/load I will have it go to the Load Game scene. After that is the usable healing items and their UI.
Starting to feel the lack of sleep pretty bad now. Powering through, got a schedule to keep. If I finish early this week I get another long weekend I can sleep in on, not like I am capable of taking naps anyway and the idea that I could be doing this would bother me too much if I knocked off early just because I was tired. So close to done, anyway.
Handled party defeat, now to start healing items which I know I wont get done today.
I have functions to handle healing and item useage, just no UI to consume the item.
A grid of texture buttons.
Yeah, I think I hit the wall for today. My brain is just not able to go any more. Usable items will come tomorrow. I will only make a huge mess of it right now and then have more work tomorrow anyway. It's 4:22pm anyway and I've been here since 7am today so I guess I have done my 9-5 and then some.
I am gonna clock out for today and come at the usable items with a fresh mind.
Cheers.