Protobound Day 11

Really late start today, slept 12 hours I guess I was really tired. I spent a chunk of the day so far configuring a server and updating my other servers. I should really set up a central control system to manage all of these when I get the time.

For today I plan to get the usable items working in combat and out of combat as well as running away. If I have time I will make a single heal skill and try and get the UI in for that as well.

Well, that's my servers all taken care of for now. Took a while as it is lunch. Had a little hiccup in an update... but it's fixed now. Wish I had good enough upstream to host these all locally on my r710 and Raspberry Pi systems. Anyway I am going to get some lunch and get started on the items.

I really need to migrate Armored Mask to my own servers. I forgot what I was using to host it before though. I just remember it was CI-based. Anyway, ate lunch, dog walked. Armored Mask almost migrated, I will point it over to the new server and wait for propagation while I work on the item usage. I'll be honest though, my energy is pretty low so I don't expect to be terribly productive today.

First things first I need to plan the flow. In battle it will be Turn(PartyMember) -> UseItem(Item, Target – Selected using the targetting panel but populated with friendlies instead of enemies). Outside of battle it will be handled from the Menu. Menu -> Panel Button on each party member -> UseItem(Item)

The UseItem will check the item type, if it is an HP or SP item and heal the user for it's HP healing value.

In battle I can have this panel have a texture button for each consumable item type currently in the inventory with a lable over it dictating how much of the item there is in the inventory and on hover display the item description. On click it will fire a signal with the name of the item. So I would need to create these buttons in GDScript with their own scripting(prefab scene) and have them be aware of what the item they represent is.

On the server front I did manage to get propogation for the subdomain and it's sub-subdomains to finish and all the requires SSL certs generated and installed so I can more easily and securely manage it and use it to host my normal old websites. I did have to do this configuration in Konquerer as Firefox was just like "I'm sorry, I can't let you do that." because it was using a self-signed cert during my setup process. I hate when my tech thinks it knows better than me and is protecting me. I know what I'm doing at least 10% of the time!

Back to the design of this UI...

Buttons will be responsible for creating themselves and passing the item information to the battle system in this case, which will go through the targetting menu.

Button.

There should be a cancel button in case of misclick. I hadn't really considered that with anything yet, though I did design all this while basically drunk off tiredness.

Anyway, the button code needs a setup function and a use function. It needs access to the inventory as well, which I guess can be obtained from the UseItem panel which itself does not yet have access so... better get on that, but first I want this setup function to be ready to go.

At the rate this is going I might have to forego the skill system, though it is not much different from the item system in design so if I do need to add it later on down the road I will be able to base it off this.

Welp. I click Item and the game locks up. It doesn't even emit the signal that the button was clicked. Time for some advanced debugging?

I have determined the problem to be somehow in the setup_panel() function of the UseItem panel. Let's see where I fucked it up!

It was a recursion error! Huzzah! Took the hammer to it.

Alright, now we got items populating based on inventory. Need to add the close menu button and then handle item usage as well as removing the test button.

Item box.

I'd show a screenshot of it in action but it's really just the HP changing. It's working.

It should work for SP items but there's no need for those until the skill system is added and that's going to be next week if at all during the prototype phase. I think that's probably a good place to spend a lot of time designing something interesting and different rather than some cookie-cutter nonsense anyway. I must not forget the point of this project is to get more comfortable with Godot and create some workflows around it while making decisions based on time and scope to make sure I accomplish what I set out to do from the day I wrote the milestones. At the same time I know how the skill system would work if I were to implement it now and it wasn't part of the initial idea anyway. It probably should have been, but I figured I would have my hands full as it was.

Next I will need to add the running away function which should just exit combat, go back to Explore state and allow the player to run away from the monster in the world. The monster can not re-engage combat until you have left combat range so this should work as it is. All I need to do is write a signal for the run away button that connects to the Battle system.

Also have a bug to fix in Target Selection. Clear the old data first so you don't see a random enemy to use items on. Whoops.

I could have run be a chance based thing and work off stats but I don't see the point of that in this scope. Let's just fuckin' leg it on command.

Crikey, It's the rozzers!
Leg it!

Tested it by running away from one enemy and getting into combat with another. Seems to be working as intended. Can't wait for it to break =|.

I guess that's that Issue closed. Took 3 days.

I have to add item use to the out of combat menu but that's going into the bug fix pile for now. I will add it if I manage to get save and load working without too much trouble. I feel like that'll be more complicated than it seems.

The whiteboard has been incredibly useful in making it so I don't have to hold everything in my head or burn through my notebooks. I was going through a notebook every couple weeks before I got this thing. Thanks to Don again for gifting it to me.

I keep the office blue when I am working, read somewhere that blue light makes your brain think "It's day, apply energy." seems to work but could be psychosomatic.

It's 4pm now. I wont get anything done as far as code for the save/load system but I can at least figure out the flow so I can get right to it tomorrow.

Saving and loading will be done to and from a JSON file, I could encrypt it or whatever but no point here. Just need to persist data.

From the menu, at the bottom I will have a save button. Loading will happen automatically for now as it will be less steps to test. When(if) I add a title scene I will add a load button there.

On save all I really need to do is grab the player object and serialize it to JSON and then on load deserialize it, pick the correct map and load that map. I could perhaps serialize the whole map and just load the whole damn thing in. Might save trouble down the line... or make more.

Saving will be fairly simple I think, with Inst2Dict. Loading in theory should work similarly with Dict2Inst though I suspect some caveats will show themselves once I have begun implementation. I also want to move the HP and SP values into the stats dicts for the party members. I'm not sure why I didn't in the first place... I was tired when I did it though so who can say?

I think I have a good idea of how this will work (maybe) all that's left is to attempt implementation and iterate until it works as intended. Tomorrow.

For the last 20 minutes of today I will be setting up a domain for a project. ... and there we go, all configured. Also got Armored Mask propagated correctly.

In the future I think if I do any scene prefab nodes for UI I will just have the top level (usually a panel) be a signal handler and run all the logic from it's children. Then have it emit signals of it's own where necessary. This will probably save me from over-complicating the flow in future.

With that I am out for the night. Gotta make some dinner and take care of my feeder cultures.

Cheers.