Magic with levels

CWells

Storyteller/Artist
Veteran
Joined
Apr 22, 2013
Messages
731
Reaction score
40
First Language
English
Primarily Uses
Hello lovely people. I'm just looking for alternative ways to work with the magic in my game before I decide on something truly final. I've already put so much work into refining lots of the mechanics of my skills etc. But I always seem to find another method of creating what I want, perhaps even better methods than what I am working with, but I'm trying to keep things neat and not overloaded with skills.

Right now, I'm trying to come up with a way to increase certain magic skills based on a character level up, but not have it effect all MAT based skills. In my game there are six elements. While these characters can with the right equipment use spells form other classes, the main class should be the only one in which a player can with time and effort excel in that particular element both in terms of power and what is done. But there is no direct level up system in regards to the magic itself.

I was wondering if there was anything out there I could try out so that a dark mage that uses only 4 dark magic spells, can find these spells getting stronger with use. through the magic itself being leveled by frequent use.

So if I use shadow swipe 50 times, shadow swipe doesn't do the usual * 2.5 damage to a target, it does * 3.8 damage or something.

Are there ways to set this up so that I don't have to make uh...60 variables for all the elemental magic in my game?
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,367
Reaction score
7,676
First Language
German
Primarily Uses
RMMV
there are several scripts that implement skill levels on the master script list, but I don't know how those skill levels are earned.


Most probably something could be modified for you, just look for those scripts on the master list.
 

DuncanS

Veteran
Veteran
Joined
Sep 18, 2013
Messages
160
Reaction score
96
First Language
English
Primarily Uses
I'm working on a script right now that allows the user to level up specific skills and increase their damage by a set multiplier each level - I can modify it to fit your needs if you'd like ^^?
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,003
First Language
Tagalog
Primarily Uses
RMVXA
Last edited by a moderator:

CWells

Storyteller/Artist
Veteran
Joined
Apr 22, 2013
Messages
731
Reaction score
40
First Language
English
Primarily Uses
I'm working on a script right now that allows the user to level up specific skills and increase their damage by a set multiplier each level - I can modify it to fit your needs if you'd like ^^?
Hmm, that'd be cool. I'm going to look through the master script list to see all the stuff available. But I was thinking of something like this:

A character specializing in a class of magic has free range to level up that magic through repeated use. But I'm concerned that this might override the usual a.MAT * n - b.MDF * n. I wonder how one could balance the two.

I would like to be able to set the max level for skill increase as well as set the growth rate? Like, if you could level magic skills in my game, then level 6 is the max level and each level raises the strength of the magic by 25%. So at max level, the skill is doing 150% of the original damage. Just an example of the kind of script set up I'm looking for. I'm gonna go hunting on the list...

And I will be looking at your script Shana.
 
Last edited by a moderator:

DuncanS

Veteran
Veteran
Joined
Sep 18, 2013
Messages
160
Reaction score
96
First Language
English
Primarily Uses
That's almost exactly what my script does right now XD. I'll customize it a bit and send you a demo copy ^^.
 

CWells

Storyteller/Artist
Veteran
Joined
Apr 22, 2013
Messages
731
Reaction score
40
First Language
English
Primarily Uses
That's almost exactly what my script does right now XD. I'll customize it a bit and send you a demo copy ^^.
Cool, alright then. If there is one thing I may ask, would you make it a feature that would allow one to specify an actors preference for one set of skills over another with leveling up? Like, I have 6 different schools of magic and I don't want them all equally learning different elements with an equal amount of use. If you are dark, you level up dark magic with 50 uses but you need 80 uses for all other magics.

If you are earth you level up earth in 50 uses but need 80 for all other. Like that...
 

DuncanS

Veteran
Veteran
Joined
Sep 18, 2013
Messages
160
Reaction score
96
First Language
English
Primarily Uses
Sure, that's pretty straight-forward XD. Are the magic schools all defined in the Elements categories?
 

CWells

Storyteller/Artist
Veteran
Joined
Apr 22, 2013
Messages
731
Reaction score
40
First Language
English
Primarily Uses
Sure, that's pretty straight-forward XD. Are the magic schools all defined in the Elements categories?
Sort of. I mean, they are all under one class(conjurers are the ones using magic in this mage based game) but all actors focus on different kinds of magic. I didn't want to bother with subclasses as I just don't see them as completely necessary for this, since players can equip magic gloves that allow them secondary magic skills. So water mages can have shock gloves, allowing for some combo effects.

They are all pretty much defined in the elements along with physical attacks and I think absorb too.
 
Last edited by a moderator:

DuncanS

Veteran
Veteran
Joined
Sep 18, 2013
Messages
160
Reaction score
96
First Language
English
Primarily Uses
Okay, cool. Should the equippable items allow you to level up the magic school they represent, or are the characters only able to level up their own school of magic?
 

CWells

Storyteller/Artist
Veteran
Joined
Apr 22, 2013
Messages
731
Reaction score
40
First Language
English
Primarily Uses
Okay, cool. Should the equippable items allow you to level up the magic school they represent, or are the characters only able to level up their own school of magic?
Characters only. For this game, the emphasis is on personal character growth and not something that is extremely dependent on gear. Gear definitely matters but there is no levels for gear and it should have no effect on leveling skills. However, I might have a staff or two come with certain spells so...equippable items only allow the use of a skill. But they shouldn't affect level up. I would prefer that characters have the ability to use all magic from any gear they use but they can only level up their own school of magic.
 

DuncanS

Veteran
Veteran
Joined
Sep 18, 2013
Messages
160
Reaction score
96
First Language
English
Primarily Uses
Here's a test copy: Magic Levels.zip

It should work fine - try altering the AP_PER_CAST to 175 and use thunder twice on the slimes XD. This version levels up individual skills rather than the entire school but I can change it to affect the entire school if you'd like. All of the values for gaining AP and so on (AP being a working name as well) are fairly arbitrary, so feel free to experiment with them and let me know if you have different base values or a different formula in mind.

Keep in mind that this is still just a test version of the script ^^.
 

Attachments

CWells

Storyteller/Artist
Veteran
Joined
Apr 22, 2013
Messages
731
Reaction score
40
First Language
English
Primarily Uses
It's all looking good from what I'm getting. The best part is how user friendly it seems to be, I mean, I'm not really a scripter though I can pick up on things pretty fast if I need to do some of my own troubleshooting. I find this to look really simple and neat so far. Nice work there.

I wonder, will you add a uh...magic level stat somewhere/somehow?

Just so that a player can see where they are ranking from the use of their magic.

This version levels up individual skills rather than the entire school
This makes more sense. Only the skill being used should level up, not the whole class of magic. I mean, you don't go into a math class and master basic algebra and suddenly know advanced calculus or geometry :p .

I can already see where you might want to add something for a player to design their own note tag for magic specialization.

In actor I can see something like:

<Element id: AP formula growth type> right?
 
Last edited by a moderator:

DuncanS

Veteran
Veteran
Joined
Sep 18, 2013
Messages
160
Reaction score
96
First Language
English
Primarily Uses
XD true! Yeah, I'm planning to add a view for the current level in the Skills menu, hopefully by later today ^^.

EDIT: Here's the new version - you can now see progress bars for skills in the actor's skill menu (with editable colours XD!): Magic Levels.zip
 

Attachments

Last edited by a moderator:

CWells

Storyteller/Artist
Veteran
Joined
Apr 22, 2013
Messages
731
Reaction score
40
First Language
English
Primarily Uses
EDIT:

I found what I was doing wrong. It seems the growth wasn't reading level one after the level up. It was scaling along. I'm probably not typing it out right because I'm not fully awake yet, and starving. Anyway, what I mean is it does this:

Level 1 = 100 so 100 * .15 = 115

Level 2 = 115 so 115 * .15 = 132.25

Level 3 = 132 so 132 * .15

This explains why I got to 404. It's alright. There is nothing actually wrong with this but it does mean that growths will be stacking per each increase. Hmm.

No. It's fine. I don't mind it this way.

---------------------------------------------------------------------

I have one tiny question about a part of the script. It is about the formula for growth:

(BASE * LEVEL) + (CURVE * ((LEVEL - 1) ** 2))

Does this AP formula only affect the level of the magic or does the **2 part actually mean extra damage is added? Maybe I'm missing something when I was playing with numbers earlier but I did a test in demo with thunder having a fixed damage of 100 and set the damage variance to 0 against an enemy with no defenses. I put the max level for my magic increase to 11. So each time in level one the damage would be a clean 100 every time. I changed the damage multiplier per level to 1.15, just so I can see how it would gradually increase over levels. On level two I got 114. Looked good.

I noticed that as I kept going, the 100 would grow to 300, then 404 damage. I stopped there so I'm not sure if it was the max level as I just mashed thunder on the slime dummies.

Then I looked at the formula and started wondering about it. When I put this into my calculator:

Max level * rate of increase(11 * 0.15), I get 165%, which looks right. But if this were the case, the max damage on the slime should be 265. Since this would be 165% increase. Yet I managed to get up to 400.

I'm probably missing something because I can't tell why for the first few levels the numbers appear spot on but suddenly they just keep going up to what looked like a 390% increase.
 
Last edited by a moderator:

DuncanS

Veteran
Veteran
Joined
Sep 18, 2013
Messages
160
Reaction score
96
First Language
English
Primarily Uses
Ah, sorry, I should have elaborated on the growth formula more ^^ - the **2 means ^2 or to the power of 2. That's the formula for experience growth though - the damage is actually much more simplistic and just applies a multiplier based on the SKILL_BOOST variable (the application of this can be found in the make_damage_value function).

The value with no variance should be represented by BASE * (SKILL_BOOST ^ LEVEL - 1).

You're absolutely right, with a 15% increase it compounds - each 15% is also applied to the previous 15% increases. (Compound interest is terrifying XD)

As I said above, a lot of the math was placeholder, so let me know if there's a different growth formula you'd like to implement and I can write it in (or even a range you'd like to see; with only 6 levels I can write a formula to adapt to a minimum and maximum bound based on a base value XD)

EDIT: In response to your question above, right now the actor notetags allow you to alter the base value for the AP growth formula. I can also add tags to increase the curve (or change up the formula) if you'd like ^^.
 
Last edited by a moderator:

CWells

Storyteller/Artist
Veteran
Joined
Apr 22, 2013
Messages
731
Reaction score
40
First Language
English
Primarily Uses
Ah, sorry, I should have elaborated on the growth formula more ^^ - the **2 means ^2 or to the power of 2. That's the formula for experience growth though - the damage is actually much more simplistic and just applies a multiplier based on the SKILL_BOOST variable (the application of this can be found in the make_damage_value function).

The value with no variance should be represented by BASE * (SKILL_BOOST ^ LEVEL - 1).

You're absolutely right, with a 15% increase it compounds - each 15% is also applied to the previous 15% increases. (Compound interest is terrifying XD)

As I said above, a lot of the math was placeholder, so let me know if there's a different growth formula you'd like to implement and I can write it in (or even a range you'd like to see; with only 6 levels I can write a formula to adapt to a minimum and maximum bound based on a base value XD)

EDIT: In response to your question above, right now the actor notetags allow you to alter the base value for the AP growth formula. I can also add tags to increase the curve (or change up the formula) if you'd like ^^.
No, I don't think there is much that I can complain about. I caught my errors and find it all pretty much perfect. If I may, this kind of script would do amazingly well for games with gear that can be upgraded with use. I mean, the idea would sort of be the same. I'm loving it so far.

The actor notetags allowing me to alter the base value for AP growth is excellent. I don't care much for the curve. I'd rather keep it low and flat across all levels.

I was just playing with my own idea although I'm not a scripter in the slightest, of how armor might improve, based on how you are doing the skills. This would go great for games where a certain character wears a living suit of sorts.
 

DuncanS

Veteran
Veteran
Joined
Sep 18, 2013
Messages
160
Reaction score
96
First Language
English
Primarily Uses
Gear levels is a cool idea ^^! I'll have to take a look at that at some point.

Here's the current script version: Magic Levels.zip

It properly calculates the offset, and allows for changes to individual curves (just in case :p ). I also modified the way the data is loaded so that it better reflects database changes in previously saved games, and added the school as an accessor to each skill for easier access.

Let me know if there are additional features you want or if you run into any bugs/inconsistencies ^^.
 

Attachments

CWells

Storyteller/Artist
Veteran
Joined
Apr 22, 2013
Messages
731
Reaction score
40
First Language
English
Primarily Uses
(I hope you're having fun playing with this kind of script, I'm enjoying digging in and seeing what comes out of it)

Hmm. I must be reading this wrong. I inserted questions in bold Brown ink.:

 #-----------------------------------------------------------------------
    # Experience formulas and values
    #-----------------------------------------------------------------------
    module EXP
      
      #-----------------------------------------------------------------------
      # Define the schools of magic (keep lower case)
      #  as well as the additional exp needed for each level
      #  for that particular school. (Can be negative)
      #
      # Skills will level based on the AP (Ability Points) formula below
      #  (feel free to modify)
      #
      # Example:
      #   :fire => 10
      # means that a skill of the fire school would now need 60 AP
      #  to reach level 2, 115 AP to reach level 3, and so on.
     

Why so much AP for fire => 10? If in the AP formula it says:

1 AP gain per use and needs Base AP of 5 to level up, why does => 10 come out to an additional 60 AP?

      # Note that each character will have a dynamic version of this
      #  array as well, this is just a base.
      #
      # Skills with these elements will level as they're used,
      #  so long as the user has the school defined in their notetags.
      #-----------------------------------------------------------------------
      
      SCHOOLS = {
        # School name => element id
        :fire    => 0,
        :ice     => 0,
        :thunder => 0,
        :water   => 0,
        :wind    => 0,
        :earth   => 0,
        :holy    => 0,
        :dark    => 0
      } # Don't remove this

Looking at this I figured that I would have to change the 0 to the ID from the system slot yes?



Those things right?

I did my thunder test. Here is how I started and what happened:

When I read offset of thunder to 10, I lowered it to 3. In the editor, I have AP gain per use to 1, but Base AP to level up at 3.

I decided to turn the AP offset to 3, thinking that it means I would need only 3 AP more than the 3 base to level up. But instead of 6 uses for thunder, it took 12.
 

DuncanS

Veteran
Veteran
Joined
Sep 18, 2013
Messages
160
Reaction score
96
First Language
English
Primarily Uses
Woops! That comment is from when I had the base set at 50 ><; fixed that now XD

The SCHOOLS Hash is actually a base offset; the ID values in Elements are automatically accounted for (since they're stored in an Array I can just check if they're included, the important part is that the names are the same). I'll rename it to BASE_OFFSET so it's easier to understand ><", my bad! Not sure why it would set it to 12 though... I'll do some tests. :S

Here's a pastebin link (probably easier than downloading a new project every time haha :S): Magic Levels
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

People3_5 and People3_8 added!

so hopefully tomorrow i get to go home from the hospital i've been here for 5 days already and it's driving me mad. I miss my family like crazy but at least I get to use my own toiletries and my own clothes. My mom is coming to visit soon i can't wait to see her cause i miss her the most. :kaojoy:
Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.

Forum statistics

Threads
105,868
Messages
1,017,083
Members
137,583
Latest member
write2dgray
Top