Sign in to follow this  
Followers 0
Tsukihime

feature
Param Max/Min

23 posts in this topic

Feature: Param Max/Min

-Tsukihime

 

feature_max_param.jpg

 

This script allows you to set a custom max and min limits on parameters on your database objects, which will determine the max and min parameters for your actors/enemies in-game.

 

Download

 

Script: Download here

Required: Feature Manager

 

Usage

 

Tag your database objects with

 

<ft: param_max param_type value>
<ft: param_min param_type value>
where param_type is one of

mhp, mmp, atk, def, mat, mdf, agi, luk

 

And value is some integer.

 

If you have multiple param_max features, then the largest of all features is taken for that parameter.

Similarly, if you have multiple param_min features, then the smallest of all is taken.

Edited by Tsukihime

Share this post


Link to post
Share on other sites

This works for the most part; there aren't any bugs (at least as far as I can tell). However, this part was left out:

 

Obviously, equipment and buffs would bypass an actor's stat cap; an example would be Timmy the Priest has a "natural" Attack cap of 500, but he can still equip a weapon that gives +200 Attack so the stat becomes 700, and you can still use a spell on him that doubles Attack to raise it to 1000 (or 1400, with the aforementioned weapon).

 

Equipment and buffs do not ignore the stat cap placed by the actor's class' note box. The only workaround atm I can think of with my limited scripting knowledge is to use a tag on a weapon or state to let the person equipping it or with said state break the cap placed by the tag in their class' box, but that would allow the actor to use (permanent) parameter-boosting items to go above the intended cap. If that makes any sense. Can you add this (poorly-worded) feature to this feature?

Share this post


Link to post
Share on other sites

Updated script, use

 

<ft: param_base_max param_type value>

 

To specify base limits (before equips, features, buffs bonuses)

 

While

 

<ft: param_max param_type value>

 

Is used to go beyond the existing limits.

Share this post


Link to post
Share on other sites

This script works to set a limit on parameters, for example, you shouldn't be able to have more than 300 atk at lvl 99, is this correct? or am I missing something? Because when I use the param max feature, even if my character is lvl 1, it gets max stats.

Share this post


Link to post
Share on other sites

The default limits for most stats are 999.

 

This script simply changes the limit on how high the stats can be (regardless of level, however you can use conditional features to impose such a limits)

 

I should have fixed the bug where you are getting max stats though. Are you tagging it with something like

 

<ft: param_max atk 300>

 

?

Share this post


Link to post
Share on other sites

No, i tagged it with this

<ft: param_base_max mhp 9999>

Now it's working. I would have a request. Is it possible to replicate the apeiron system in Final Fantasy X? What it basically did, was allowing you to break the normal stat limit for HP and MP, which was 9.999 and 999, allowing you to get to 99.999 and 9.999 when you had that weapon equipped.

Edited by pinka

Share this post


Link to post
Share on other sites

if in actor we set the max hp to 999

and in class we set max hp to 9999

in weapon we set max hp to 99999

in armor we set max hp to 999999

and having actor with that class equipping that armor and weapon. do it takes the highest cap?

Share this post


Link to post
Share on other sites

There seems to be a problem with <ft: param_base_max param_type value>

 

Here's what I have put in one class' note box:

 

 

<ft: param_base_max mhp 999>

<ft: param_base_max mmp 300>

<ft: param_base_max atk 900>

<ft: param_base_max def 440>

<ft: param_base_max mat 120>

<ft: param_base_max mdf 99>

<ft: param_base_max agi 496>

<ft: param_base_max luk 257>

 

 

 

Going by the spoiler'd information, one might expect that the character's max possible stats would be 999 HP, 300 MP, 900 Attack, 440 Defense, 120 Magic Attack, 99 Magic Defense, 496 Agility, and 257 Luck, and that they wouldn't affect the class' stats as they level (unless you set their stat growth to exceed these limits). However, what actually happens is that a character with this class ends up having the above stats at all times, regardless of what their stats SHOULD be at that level - equipment and buffs seem to work as requested, though.

 

Did I enter the tags wrong, or is there something messed up in the script?

Edited by Rigor Mortex

Share this post


Link to post
Share on other sites

Alright, I THOUGHT I had found the problem, using my incredibly limited scripting knowledge.

 

One of the scripts I'm using is Yanfly Engine Ace - Adjust Limits v1.00. "YEA Adjust Limits" also uses " def param_max(param_id)", so I figured that was the issue. However, after removing said script, and doing another playtest where I increased a character's Attack, they STILL ignored the base limits I had set - the only difference was that their Attack wouldn't go over 999, since Yanfly's script was how I had bypassed the program's limit.

Share this post


Link to post
Share on other sites

Test it on a new project. When my character levels, it can't go past the base param limits.

 

I've done it, and leveling up works perfectly fine, as you claimed it would. OOC, I decided to try leveling up on the original project with Yanfly's script active, and level-ups still functioned properly. The only things that remain are items that permanently boost parameters (like the Power Up item in the program by default), or events that boost parameters - I had been both to get closer to the limits I'd placed with your tags in a shorter timeframe, but when I ONLY leveled up, even if the database's parameter was set to 999, the tags would prevent them from exceeding the tag's limits. So it seems that items and events that permanently boost parameters (not just equipment) ignore the param limits your script's note tags place.

Share this post


Link to post
Share on other sites

I really hate bugging you, but is it posible to make it so consumable items that permanently boost parameters won't let you exceed the limit you use in param_base_max? At current, consumables sort of undermine the whole thing by letting you ignore param_base_max. One way I imagine it can be done is using a tag to identify parameter boosting items from other items, like ones that grant buffs (assuming of course this is even required and there's not a simpler method to get my desired effect).

Edited by Rigor Mortex

Share this post


Link to post
Share on other sites

How are you actually adding the stat bonuses from consumable items?

 

The default script tosses everything into something called param_plus, which includes stat bonuses and equip bonuses and buff bonuses. It may be simpler to just change where those stat boosts are going.

Edited by Tsukihime

Share this post


Link to post
Share on other sites

I'm adding them with the "Grow" effect under the Other tab. An example item would be Power Up, which permanently increases Attack by 2 of whatever actor you use it on.

Share this post


Link to post
Share on other sites

I have thought about a good way to solve this problem, but so far have not come up with anything. Currently I'm looking for a way to separate equip bonuses from stat-growth bonuses, etc.

 

The easiest way is to just hardcode a solution for you, but then that hardcoded solution may not work in general (which means there may be script conflicts)

Edited by Tsukihime

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0

  • Recently Browsing   0 members

    No registered users viewing this page.