Changing the cost of a skill mid game

Status
Not open for further replies.

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,299
Reaction score
11,712
First Language
English
Primarily Uses
RMVXA
Some of my magic skills increase in strength by using the actor's level as part of the damage formula.  This is to avoid having a weak spell, then later having a med damage spell and finally a high damage spell i.e. the old Fire 1, 2, 3 route.  However, I have not been able to resolve a particular problem that comes with that approach.


 


The problem is skill cost.  At the beginning it can't be too high or else the player won't be able to use it.  However, just leave it at that, and it soon becomes ridiculously cheap.  I have not been able to find a way to increase the MP cost of a skill over time, other than making lots and lots of duplicate/triplicate skills, using parallel processes on all maps to determine the level of every single actor and then substitute a duplicate skill with a higher cost for the original.  That strikes me as a lot of work and wide open to error, plus I'm not keen on having a lot of parallel processes going all the time.


 


Does anyone have any ideas about an alternative approach?  I've looked at various scripts e.g. Yanfly's skill costs, and none of them have the facility to change things mid game as they all use note tags.


 


Thanks.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,365
Reaction score
7,675
First Language
German
Primarily Uses
RMMV
I haven't checked this, but if I remember correctly then yanfly has a script that will allow you to use an RGSS-formula for skill cost via his "lunatic" options on skills.


If that is really available, then you should be able to either use a game variable or the level itself as part of the cost of that formula.
 

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,299
Reaction score
11,712
First Language
English
Primarily Uses
RMVXA
I've searched through the list of scripts on Yanfly's site and can't see one which addresses skill costs, though I may have missed something.


All of the Lunatic scripts emphasize that they are for advanced users.  I'm barely above the idiot level myself. I can configure and do very minor tweaks but there is no way that I'm an advanced user.
 

M.I.A.

Goofball Extraordinaire
Veteran
Joined
Jul 13, 2012
Messages
910
Reaction score
771
First Language
English
Primarily Uses
There are other scripts too that can replace the skill altogether and you could increase MP in the database. I know you said you didn't want to create a ton of skills, but that is an easier option than parallel processes running at all times..


also, I may be mistaken, but in Yanfly'a set ups, can't you have Skill Cost set as a percentile of MaxMP? If that's true, then you can handle it as setting the skill cost as 33% MaxMP, for example, and then increase MaxMP each level as a sort of work around.. 


hope this helps. ?


-Mia
 

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,299
Reaction score
11,712
First Language
English
Primarily Uses
RMVXA
It looks as if I might have to move this to Script Requests if there's no non scripting solution.


@Miacuro You mention other scripts.  Could you suggest any?  You may well be right about Yanfly's setups in his various Lunatic scripts, but my scripting abilities probably aren't equal to them.  As I said, I'm no advanced user.
 

ladubois

Villager
Member
Joined
Sep 16, 2016
Messages
25
Reaction score
3
First Language
English
Primarily Uses
The Skill Core has features to control skill cost. It seems to only allow either a flat cost or cost a percentage of max MP/HP/TP so you couldn't use it to have the cost use some complex formula (though I'm sure some modification could be done to allow that, if you know JavaScript - perhaps cross-reference the other formula scripts to see if there are any parts that could be taken straight from them, after modifying relevant variables and references, of course). Still, a simple percentage cost should suit your needs well enough. Plenty of other games use that.


I've actually been messing around with these scripts, along with the Base Parameter Control one to see if I could manage costs along the lines of Warcraft's mana costs - namely, that the mana cost for a spell is generally X% of base mana, which is solely determined by your level and class. However, your Intellect, as well as certain equipment, buffs, and enchants can increase your actual maximum amount of mana without changing your mana cost. Whether or not this is possible with Yanfly's scripts depends on whether the <MP Cost: x%> cost draws from the base stat in the database, or if it derives from the final calculation of your MP from the Base Parameter Control settings. However, even if it does draw from the latter, it should be a simple enough thing to change in the script, even if you're a beginner scripter (just look for the variable that that notetag uses in Skill Core and change it to the appropriate variable you want to use from your Base Parameter Control formula).
 
Last edited by a moderator:

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,299
Reaction score
11,712
First Language
English
Primarily Uses
RMVXA
@ladubois Sadly the plugins you reference appear to be for MV (which uses JavaScript) and this is in the VXAce forum (which uses Ruby) so they are not compatible.
 

ladubois

Villager
Member
Joined
Sep 16, 2016
Messages
25
Reaction score
3
First Language
English
Primarily Uses
OH SHOOT! I am so sorry, I wasn't paying attention! Hang on... I'll see if I can find anything for you... It's been a while since I used VXAce, but I do seem to remember coming across something along these lines. The other alternative, of course, is to have a static amount of mana, regardless of level, say 100. That essentially creates a pseudo-percentage-based cost, so if you want your Fire spell to cost, say 10% of your characters mana, it would simply cost 10. The one downside to this is that you can't have any spells whose costs don't "scale" - which can be problematic for spells whose effects simply can't scale, like curing a status ailment. That said, there are games that do this, and it can make sense. If Poison deals damage equal to a percentage of your max HP as opposed to a flat rate, for example, then removing it does effectively scale. And effects like Paralysis, Stone, or Death also effectively scale as your characters level up, since you'll be losing out on a lot more with a paralyzed/petrified/dead character at higher levels than you would at lower ones.
 
Last edited by a moderator:

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,299
Reaction score
11,712
First Language
English
Primarily Uses
RMVXA
That's an interesting suggestion.  However, a further complication is that I have a system whereby the player can allocate additional stat points at each level up, so having one static stat would not make much sense and would probably do horrible things to the balancing.  


Given the ability of the player to add MP to the MMP, anything which is based on a straight percentage of MMP is likely to create havoc with the skill costs, probably ending up with some skills having far too high a cost.  This is why I had thought of something vaguely along the lines of:


At level 8 the fire skill costs 10MP


At level 15 it costs 18MP


At level 25 it costs 23MP etc.


and doing this in jumps, rather than trying to do it for each level up.


Creating the duplicate/triplicate skills isn't difficult, but as we both agree, it's having all those parallel processes running that is potentially a seriously bad thing.
 

ladubois

Villager
Member
Joined
Sep 16, 2016
Messages
25
Reaction score
3
First Language
English
Primarily Uses
If you don't mind my asking, why do you only want them to increase at spaced out increments? Presumably, you're also having the effects like damage increasing only at these increments, but that only delays the question rather than answers it. A simple solution is going to require a formula, and a formula would have to be incredibly complex to not increase the values at every level. To do something like what you're suggesting, separate entries is indeed the only answer I can come up with. What is it that you're trying to achieve that requires the skills to only increase at these increments? I mean it seems to me that this way you're basically just making those exact same Fire 1, 2, 3 spells you said you were trying to avoid, but simply hiding the other levels.


On the other hand, if you are having the damage steadily increase, why should the MP remain at 10 when the player is casting it at level 14, at which point it's much closer in power to the 18 MP version than the 10 MP one. Why do you not want it to cost 16 MP at that point? Seems to me that having the spell's effect scale smoothly while the cost scales periodically would create weird thresholds in gameplay. A player with two characters who can both cast Fire, one at level 14 and one at level 15 would be getting a much better deal by only using the level 14 character to cast Fire, since the level 14 character is able to deal about 93% of the damage (give or take about 5%, depending on the exact nature of your damage formula) at 55% of the cost. I can see some potential for interesting mechanics here, but considering the difficulty in implementing this sort of cost system, as well as its counter-intuitive nature, I question whether or not it's worth it compared to a steady curve if you haven't got some specific mechanics in mind that exploit this.
 
Last edited by a moderator:

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,299
Reaction score
11,712
First Language
English
Primarily Uses
RMVXA
I was thinking of doing it in stages because that way I would only have to make 2 or 3 versions of the skill, each one with a higher cost.  Obviously I would prefer to have a way which increased it smoothly, but unless that can be done, I do not intend to make a new version of several skills for every potential level that the actor may increase by.


That smooth curve, however, is something that I do not have, and do not know how to achieve.
 

M.I.A.

Goofball Extraordinaire
Veteran
Joined
Jul 13, 2012
Messages
910
Reaction score
771
First Language
English
Primarily Uses
Oh crap! I'm sorry too.. I thought this was an MV thread.. 


i havent VX/ACE'd in a long, long time. 


You could probably create one parallel process with all the eventing details at the opening of your game, but that's a lot of eventing + multiple skills. 


If if I were still in VX/ACE mode, I'd probably be able to help you more.. ?


My skills with Lunatic are minimal at best.. sorry.
 

ladubois

Villager
Member
Joined
Sep 16, 2016
Messages
25
Reaction score
3
First Language
English
Primarily Uses
I was thinking of doing it in stages because that way I would only have to make 2 or 3 versions of the skill, each one with a higher cost.  Obviously I would prefer to have a way which increased it smoothly, but unless that can be done, I do not intend to make a new version of several skills for every potential level that the actor may increase by.


That smooth curve, however, is something that I do not have, and do not know how to achieve.


Well, I think that a short script that allows assigning formulas to your skills' MP costs would by far be the easiest solution, even if you have to learn how to script from scratch. I can't seem to find any scripts for this myself, as it seems a lot of my old VX/Ace sources have dried up and even disappeared since I last checked in on them. :( But as far as these things are concerned, it should be a fairly simple script. If nothing else, perhaps try back-porting one of Yanfly's MV scripts? They say that the hardest thing about writing code is just solving the problem. I never got around to learning Ruby, or else I'd probably go ahead and try it myself. In the meantime, I'll keep an eye out and let you know if I find something.


Incidentally, consider your MP cost having a much shallower growth curve than your damage or other scaling effects. One of the lessons that can be drawn from early WoW is that just because the spell deals more damage doesn't automatically make it worth that much more mana - a lot of raiding groups in the game's early years actually stuck to using the mid-level versions of their spells rather than the highest-level versions because it allowed for far superior sustained throughput, as you don't end up running out of mana a tenth of the way into the fight and having to twiddle your thumbs for a few crucial seconds before being able to deal meaningful damage again. And that's in a game where MP growth is automatic and guaranteed. This becomes doubly true if players have to expend points to increase their MP that could be spent on other parameters. Even if it ultimately deals a little less damage, Strength could be a better investment simply because you can swing a sword as many times as you want without worrying about running out of uses. Especially if there's no way to halt the growth of your spells and their cost, make sure that investing in MP is actually worth it in your game, or else most players will probably just go for Strength builds and mage characters will be strictly relegated to skill runs.
 
Last edited by a moderator:

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,299
Reaction score
11,712
First Language
English
Primarily Uses
RMVXA
That is a nice suggestion, but I am not a scripter, and it is not so simple to learn from scratch.  As for porting back from MV, I don't understand Javascript either, so couldn't port if my life depended on it.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
How are your skills learned - via level-up?  Do your characters have the ability to change classes and forget/learn skills when that happens?  Random battles or all evented?


If there's no class-changing, which would relearn the old skills, you could have multiple skills with different costs, a parallel process common event triggered by a switch, and I can port my MV Battle Result Switches plugin to Ace, so the common event would only run after a battle and then you could turn it off.


Otherwise I can probably give you a script that will let you put the skill cost formula into the skill's note box and just use that instead of the listed skill cost.
 
Last edited by a moderator:

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,299
Reaction score
11,712
First Language
English
Primarily Uses
RMVXA
@Shaz Skills learned via level up.  The characters who have these particular skills do not change classes.  I've given the player the choice to have visible or invisible, i.e. random, enemies, so no, not all evented.


If I have understood your suggestion correctly, the common event at the end of the battle would check if the character had levelled up and would do the forget/learn process?  Seems straightforward enough for me to implement.


If you could do this I would be so grateful.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
no worries.  I'll get it done for you as soon as I reclaim my desk from my cat :)
 

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,299
Reaction score
11,712
First Language
English
Primarily Uses
RMVXA
@Shaz You are a star.  But don't fight your cat on my behalf.  Differing time zones mean that I'm just about to go to bed.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
Okay.  I'll get it done sometime today then.  He's looking pretty comfortable :D
 
Status
Not open for further replies.

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

Latest Threads

Latest Posts

Latest Profile Posts

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.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,862
Messages
1,017,050
Members
137,571
Latest member
grr
Top