How to apply stats in an rpg game

So i want to know how to apply stats in a top down rpg game, attack and defense that are invisible stats

If they will go between levels, I use global variables. Create one called “attack,” and one called “defense.” Then have actions interact with these variables.

you dont fight in overworld in my game

The method is still the same. Create global variables for your characters and add or subtract to them.

I really liked this tutorial for RPG game. It goes over over world movement, dialog, and also combat. In the combat section they suggest using some of the custom behaviors that already implement health and damage. Those behaviors have attributes that you can use to control how much damage, armor, etc. that your characters have in combat.