Friday, September 15, 2023

Specifying by Type on Godot.

For people like me, it can be very confusing to have a variable not be specified by type.
Gladly, Godot contains ways of specifying scripts and variables by type, and I will show you how.

Assigning Type to Variables

Variables generally are written with var preceding the name of the variable, like bellow:
var Name

That is still vague about what kind of variable that is, beside Name implies that a string
will be there, which might not be the case.

Beside, can be set a string value to it.

var Name = ""

Hm, yeah, there's a string there, but still not enough to specify what kind of variable that is.
I mean, you can place a number there or something, and it will still be okay for Name variable.
That's why you can add specification right after the variable name, to tell which kind of
value it will take.

var Name : String = ""

There, now that variable is bound to receive only String type variables. It's not necessary to assign a default value, by the way.

Specifying variable type on method arguments.

Methods also make use of variables with unspecified types, but at least in this case, might be 
troublesome depending on use of the method, and even more troublesome if it's related to specific object types.
For methods like the one bellow, it's not much of a problem.

func Sum(a, b):
    print_debug(str(a + b))
    pass
 
Normally, you assign them like this.
You can specify a type, by placing a double dot, with the type right next to variable name.

func Sum(a: int, b: int):
    print_debug(str(a + b))
    pass

The specification can be used for types and also object types.

The method above doesn't seems very functional, though. The method does the sum, but 
instead of returning a value, it prints a message on the log with the result of the sum.

Lets add a return type to it.

func Sum(a: int, b: int) -> int:
    return a + b

There, now the method will return a integer variable, which will be the sum of a and b.

Do notice that pass is not the same as return, by the way. I discovered that after many bugs.

Assigning Classes to Script

Assigning classes to a script is very useful if you want to reference an object by type.
Normally, a method will not know what type of the value its arguments is calling, 
much less if you're using as argument a method.
 
Beside you can still type in the code to methods and variables of that object from the 
argument, which will still run the game normally if you typed correctly, the spell 
checking of Godot will not help you find those methods.

That's where turning a script into a class enters into. That will recognize that script 
type, and allow you to assign them as variable types and method arguments/return 
values.
 
To turn a script into a class, it's as simple as specifying it on the top of the script.
class_name NameOfClass

That's about it, and you can name the class anything you want, but probably
there's some rules regarding that, though.

Now you can find out if an object is of that class type...

if (value is NameOfClass):

...Or specify if that value is of a certain class type...

var MyNameOfClass = value as NameOfClass

...Or even specifying variable types...

var MyNameOfClass : NameOfClass

...Or simply setting argument of methods, or even return values of their type.

func NameOfClassClub(newMember: NameOfClass) -> NameOfClass:

Finishing

There it goes. Here I show how to specify types on Godot, and also how to assign a 
Class Name to objects.

I hope this tutorial was helpful for you.

Friday, July 21, 2023

About Guild Management Game Project news.

Hey guys, so... It's really annoying to post news of updates from the game project on many places, so I'll be posting future news about the game updates on its Itch IO page.

Recently the game got an update, so if you want to download it, and also check it out, go the game page there:

https://nakano15.itch.io/guild-management-game-project

Maybe I can end up posting more news here about the game project, if something interesting comes up, unless I launch spoilers on either Twitter or the Discord Server.

If you want the Discord server, check out the Itch IO page of the game. Beside, I need to remember to add a link to it on the game client.

 Thanks for reading :)

Wednesday, May 24, 2023

[v0.3.1] Bug Fixes and changes to Active Guild Members management

 


Due to the number of somewhat bothersome issues found on previous patch, I decided to lainch a update with bugfixes, a new Loadscreen, and also a change on active guild members management on guild hall.

Changes to Group Management


The group management is now a fixed list of active members on the group you'll take to the exploration.
That change, will make so if you remove, for example, the second member of your active group from the group, the second slot will be free, and you can pick another character to take that slot.

With that, swapping guild members from active group should actually be better, easier, and less bothersome.

Change Log

Added missing headgear frame position to Samson.
You can no longer see Wolfgang's campfire in the map before you use the skill.
You will no longer be able to find Samson in the place he shows up after you already recruited him.
Wolfgang can no longer walk over sewage.
Samson's Combat Technique is now correctly named "Fist Fight".
Treatment and Medicate buff skills will now correctly remove at least 1 stack of debuff.
Changed how the weather is handled by the game, regarding rain.
The regions of the game now have different weather settings.
 => Also introducing clear weather, and snowy weather.
Added campfires to Gavea Southeast Field and City of Gavea.
Discord will now let people know on your status when you're fishing, if you have rich presence on.
Campfires now produces light.
Ending fishing skill while Wolfgang is showing you the catch will no longer make his recent catch his extra accessory.
Takedown skill will no longer knockout monsters larger than your character.
 => But will instead inflict Confused debuff.
Changed how guild members can be managed from the Guild Hall.
 => One of the side effects of that, is that now you can remove and add guild members to your group, without having to remove other members to readjust their position in the group.
The quest "For Lavanda!" will no longer flood your group list with characters.
Changed how the individual and group selection buttons are displayed.
Fixed a few dialogues which had "disponible" instead of "available", in their texts.

You can get the download link of the update on the page linked bellow:

https://nakanondev.blogspot.com/p/guild-management-game-project.html

Enjoy :)

Friday, May 19, 2023

[v0.3] New Guild Members and Various Tweaks

 


Hello again everyone, today I bring a new patch to the game. Sadly, this patch doesn't bring new zones, because I'm still working on them, but it implements new content and also fixes some issues, alongside tweaking other things.

Sounds too cryptic? Then let me break down what is coming this update.

Skills Rebalance

A number of skills got rebalance tweaks, including some that had target size requirement for skill to affect them entirelly.
One of them is Skunk Spray, which no longer causes fear on monsters bigger than the caster, beside the Stench debuff still can cause.

Skills like Meteor and Rock Throw now can interrupt foes it hit, and also buffed Heal skill, making it heal more, and reduced its cooldown to 15 seconds (Yes, you no longer need to regret spending points on it).

Tweaks

The Corrosion debuff was too overkill on previous update, so I nerfed its damage.
The debuff itself is still dangerous, but is no longer a death sentence if you didn't got a healer or potions with you.

The Restoring Sound skill from Asphalion's combat technique, will now adjust distance of effect based on attacked monster size, so bigger monsters no longer means that your melee combatants will not be healed.

Buff Time and Description Implemented


You've been waiting for long for this, right?
Over the character status bar on the bottom of the screen will now show icons of buffs and debuffs your guild members have.
Those buffs will have their description shown when you pass the mouse over, and they will begin to disappear once they have less than 5 seconds left of effect.

At least now you will know what the buffs and debuffs do.

New Guild Member: Wolfgang


Wolfgang himself is a fisherman, and he will let your guild do what he does best: fish.
He also brings skills to allow you to place a bonfire, so you can cook the fishs he caught, and provide you with food that gives buffs to guild members that eat it.

Do notice that food will only have one effect of the type active at once, so don't go spamming food on your characters thinking that they will stack, because they will not. Also, better not waste inventory space.

Other than fishing, Wolfgang has quite a skill with Daggers, and will be willing to use his in the name of the guild that bothers him on his fishing.

New Guild Member: Samson


Before you ask, he's not related to twitter, and neither the Doge Coin.

I saw on YouTube a user with a bizarre avatar of a Buff Doge punching the screen, and that gave me the idea of adding it as a guild member.

As you can imagine, this guild member is buff, and I REALLY mean buff.
He's probably the toughest guy in the Gavea Kingdom, and is currently looking for someone to challenge him.

Will you find him and offer him the challenge he wants?

No More Movement when Dropping and Item or Removing Skill Icon

Exactly as I said above. Clicking to drop an item on the ground or to remove a skill you're quickslotting will no longer make your characters move or interact/attack something.

That's such a QoL change that is really something, and probably improves gameplay experience by 1000%. You guys can tell me that.

Changelog

Reduced the navigation lag present in Lavanda Settlement.
Skunk Spray skill will no longer inflict Fear debuff on monsters bigger than the caster.
Magara's Warrior and Defensive Shot combat techniques got Block skill.
 => Block makes so the Block Rate increases while decreating a bit Movement Speed, and drastically Attack Speed for 5 seconds.
Added missing explosion effect to Meteor skill.
Fixed a bug where default skill distance were based on target attack range...
 => Now it should use the correct attack distance should a skill be useable only on attack range.
Skill distance will now disregard vertical distance.
Fixed odd distortions on Equipment Interface slot icons.
Added a new monster to Travellers Path.
Added a new monster to Gavea Sewers B2.
Fixed an issue where some skills weren't correctly affecting the right targets based on their sizes.
Blocking will now work correctly if attacked by a smaller or equal sized target.
Meteor Skill can now interrupt bigger enemies when it hits, but wont launch them away, or cause increased knockback.
Rock Throw can now interrupt targets hit by it.
Buffed Heal skill power, and reduced the cooldown from 20 seconds to 15 seconds.
Nerfed the damage inflicted by Corrosion debuff.
Changing maps while a scene from a dialogue is happening will no longer make every character invisible.
Creatures will now less likely to lose their aggro when using skills.
Changed how Bareknuckles Skill works, to be more like having a weapon on the character hands.
Restoring Sound effect will now extend based on attacked target size, making so melee characters attacking bigger monsters can still be healed.
Samson is now a recruitable guild member.
You can now check the description and time left of debuffs over your character information bars.
 => The tooltips will need rework, so they're obnoxiously huge for now.
You will no longer make your group move or interact with anything, when trying to drop a item, or remove a held skill icon.
Wolfgang is now a recruitable guild member.
 => Wolfgang allows you to do fishing on places with water, and also comes with skills to place a Bonfire, so you can cook the fish.
 =>  => Cooked food grants benefitial status boost to the guild member that eats it, but only one food buff can be active at once.
 => If you want to make some extra gold, he can also turn the fish into Fish Fillet, whose current use is only for selling.
 => Currently, the region of the Kingdom of Lavanda and Travellers Path doesn't have fishing spots.
Lop's Slingshot Combat Technique now has impact sound.

You're asking about the new monsters? Go find them yourself.

They currently have no quest, and their items will not be useable for anything right now, but in the future it will.

At least you can face them.

You can download the update from any download link on this page:

https://nakanondev.blogspot.com/p/guild-management-game-project.html

Enjoy :)

Tuesday, April 25, 2023

[v0.2] Huge Patch arrives to Guild Management Game Project.

 


Hey everybody, this update I've been working on for weeks, and should actually have released earlier before Easter event ended. I have to say, by the way:
Due to not releasing it in time for the event, I made the event run for 7 more days. That's only valid in this year, so make good use of the extra time to get your Easter loot while you can.

Lavanda Settlement reviewed


Lavanda Settlement had three issues:
One, it didn't had lampposts, like the other regions of Lavanda had.
I took the liberty of adding some lampposts, beside seems like will need more of them.

I blocked the east exit, because it could end up meaning there would be another way of entering Lavanda, which is not intended.
Not only the east wall was blocked, but the blocking fences also got removed from the east, and the guards to the east were either moved/removed.
A few frenzied zombies might still be on the east of the map. Feel free to kill them if you find them.

The third issue, was that Weather wasn't working as intended. Now you can try noticing weather affecting Lavanda Settlement, if the dense fog allows.

New Headless Horseman loot

I added a rare pistol loot to the Headless Horseman.
You probably already know where to find him. If you don't, then get into looking for him.

Sadly, he's not a recruitable guild member yet. I still need to work on him before I continue making his quest line.

New Guild Member: Lop


A kid seeks to join a guild and explore the world. Beside not having combat skills, he knows well how to use his Slingshot.
He's a starter guild member, so you'll be able to recruit him right away by going on your guild applications.

Currently, there's no weapon upgrades for him. I will add them in the future.

Easter Event Tweaks and Extended Temporarily

I hope you guys enjoyed the Easter event, even more since I forgot to add cooldown to the Chocolate Eggs. Now the spree is over, because I added the missing cooldown to it, so you can no longer incite diabetes on your characters just to survive a battle.
Don't worry, by the way, since it's the same cooldown of potions: 5 seconds.

Since I launched this update late, I extended the event duration by 7 days for this year.
Next years, the event will run through the normal 28 days as intended.

Leatherworker in Gavea


I tried adding more craftable equipments you can get for your guild members.
Not only all the ingredients are farmable, but also don't have abusive item requirements, like 120 rabbit leathers.

Like any other equipment, they give unique status boost to characters wearing it, so it is a good idea to find out what the equipments have to offer to your guild members.

Also, the Shopkeeper in Lavanda got new crafting recipes too, so you might be interested in checking it out.

More craftable equipments might be added in the future.

Asphalion's Combat Technique Buffed

Asphalion got his Healing Song and Recovery Sound skills cooldown reduced by 10 seconds.
That might make it better to have him along with your team, and also increase survivability with him, as intended.

New Passive Skills to Some Characters

Some characters gained some new skills to make them more interesting.
  • Collin gained the Bully skill, which makes him cause more damage to smaller foes.
  • Melissa gained Beast Slayer and Bird Slayer skills, whose will increase damage against foes of the respective race types.
  • Magara gained Tanker skill on Warrior and Defensive Shot Combat Techniques, which increases her resistence to damage against bigger monsters.
That might make those characters more interesting to play with, but I fear might make some of them, like Melissa, more situational. Beside, Melissa is a hunter, so yeah... Makes sense she causing more damage to birds and beasts.

Queen Adriana is no longer over generous

Well, I found out that if any guild went to speak with her, she would give the reward for defeating Gelking 5 times to just anyone.
She will no longer do that. She will now only give you the reward if you've actually defeated Gelking 5 times.

If you got the reward early, don't feel bad for getting or adding the new guild members to your guild.
Feel free to keep them.

One new quest to the game

I added a quest to the game which I tried to not make it like a generic "go kill x something" or "go collect x something".
I wont tell you where to find the quest, but if you do find it, do let me know what you think.
The quest itself wont have a quest log, so pay attention to what the npc is talking about.

Changelog

The Headless Horseman now can drop a Rare pistol.
Easter Eggs now have a chance of dropping Bunny Ears.
Tweaked Lavanda Camp shopkeeper craft recipes.
Added a Leatherworker to City of Gavea.
He's located south of the Gavea Market, close to the Blacksmith.
He will use some materials you get from monsters to make equipments.
New materials can also be found from monsters too.
Added missing use cooldown to Chocolate Eggs.
I hope you guys enjoyed it while it lasted.
Added the missing lamp posts to Lavanda Settlement.
Mane Demons now drop Fang, instead of Decayed Tooth, as one of its loot.
Added new crafting recipes to Lavanda Settlement Shopkeeper.
Added a tag to sell item shops, which will show "QUEST" tag if the item is currently used by any active quest.
Bear Paw Glove now gives 4 Power status, instead of 4 Physical Damage.
Fixed a bug where skills interrupted were being interpreted by some npcs AI as casted successfully.
Added blood spilling effect to a number of monster attacks.
Buffed Restoring Sound skill healing effect.
Reduced the cooldown of Healing Song from 45 seconds to 35 seconds.
Reduced the cooldown of Recovery Sound skill from 50 seconds to 40 seconds.
Buffed debuff damages.
Bunny Slimes, Acid Doggies and Lapins now change their target based on aggro.
Nerfed Toxic Sludge Poisoned debuff power.
Lop has been added as a new starter guild member.
You should find him on your Guild Applications.
Made the Bunny Ears less rarer.
Replaced the Armor Vendor npc for another.
Fixed issue where weather wasn't correctly functioning in Lavanda Settlement.
Debuffs will no longer bypass the maximum damage a monster that only receives 1 of damage can receive.
Due to a change on how skills and quick slots are saved, all your character skills and quickslots got resetted.
Just enter the game with your character and set them back again, no big deal.
Collin gained Bully skill on both his Combat Techniques.
Damage from Collin is increased if the attacked target is smaller than him.
Melissa gained Beast Slayer and Bird Slayer skills on both her Combat Techniques.
Beast Slayer increases damage caused against Beast type creatures.
Bird Slayer increases damage caused against Bird type creatures.
Magara gained Tanker skill on Warrior and Defensive Shot Combat Techniques..
Tanker reduces damage received from attackers bigger than Magara.
Added a mountain wall to the east of Lavanda Settlement, and removed the path leading East.
That would mean there would be a connection between Lavanda Settlement and Gavea Southern field, which not only invalidates Lavanda Wall, but also would lose part of the sense.
Some zombies might have managed to "breach" through the east with the surging of the mountain. Be kind and kill those zombies.
Reduced the Weight Bonus given by Heavy Load skill, from 160 + 20 per level, to 60 + 10 per level.
Queen Adriana will no longer freely give Gavea Guards to anyone.
She will now correctly only give you those guild members if you've beaten Gelking at least 5 times.
Earthquake's Earth crack effect now can interrupt bigger monsters.
Meteor skill is no longer interruptible.
Extended Easter event by 7 days.
That's only valid in 2023.
Stench debuff will no longer inflict Fear debuff on monsters bigger than the inflicter of the debuff.
Added signs to Gavea, to better help with direction.
Added a new quest to the game.
Let me know what you think of this type of quest.

You can download the update from here:

https://nakanondev.blogspot.com/p/guild-management-game-project.html

If you haven't already, feel free to join the game discord server.

Have fun :)