Easy way to make "sealed skills" lists?

Shiro-chan

Friendly Neighbourhood Neppy Maid
Veteran
Joined
Aug 7, 2018
Messages
151
Reaction score
42
First Language
German
Primarily Uses
RMVXA
Hello,
I have a rather specific problem regarding sealing skills. I know that it is possible to seal a skill if an actor/enemy is affected by an equip, a status, or similar. As well, it's possible to seal an entire skill group.

But what would I do if I changed the skill groups (which are, by default, sorted by MP/TP consumption) into things like offence/support, and still want only skills that consume one of the two sources to be sealed?

Say I have two magics and two TP skills, one MP attack/support and one TP attack/support. Attack skills and support skills are sorted together, respectively, but I want MP skills to be sealed. Is there a script to handle this easily? Like it goes "enter state numbers here, enter sealed skills here" and done?

Edit: I messed a bit around and got this so far (which naturally doesn't work because wrong code words).

Code:
class Game_BattlerBase
  def skill_conditions_met?(skill)
    usable_item_conditions_met?(skill) &&
    skill_wtype_ok?(skill) &&
    skill_cost_payable?(skill) &&
    !skill_sealed?(skill.id) &&
    !skill_type_sealed?(skill.stype_id) &&
    !(actor.state[2]==true &&skill.cost.mp > 0) &&
    !(actor.state[3]==true &&skill.cost.tp > 0) &&
    !actor.equipweapon[10]==true &&
    !actor.equiparmor[4]==true
  end
end
Something like this should work, right?
 
Last edited:

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,299
Reaction score
11,712
First Language
English
Primarily Uses
RMVXA
[move]RGSS3 Script Requests[/move]
Have you looked at Shaz's Dynamic Features script? This would enable you to seal/unseal skill types whenever you wanted.

I'm not sure that I have completely understood your requirements, but it does occur to me that you would find this easier if you had more skill types in your database (Terms tab - increase the maximum number if necessary). That way you could e.g. have your Offence MP using skills as one type and your Offence TP using as a different type, making it easier to target the precise skill type you want to seal/unseal.
 

Shiro-chan

Friendly Neighbourhood Neppy Maid
Veteran
Joined
Aug 7, 2018
Messages
151
Reaction score
42
First Language
German
Primarily Uses
RMVXA
I'm not sure that I have completely understood your requirements, but it does occur to me that you would find this easier if you had more skill types in your database (Terms tab - increase the maximum number if necessary). That way you could e.g. have your Offence MP using skills as one type and your Offence TP using as a different type, making it easier to target the precise skill type you want to seal/unseal.
I am aware of that, but that wouldn't work the way we intend this to work. It has to exactly as I outlined :/
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,365
Reaction score
7,676
First Language
German
Primarily Uses
RMMV
I am aware of that, but that wouldn't work the way we intend this to work. It has to exactly as I outlined :/
The problem is that your "outline" is rather convoluted and doesn't help at all, because you're mixing up scripting with eventing/databasing in a wrong way.

Anything can be done one way or the other, but you need to be more precise in your description.

"Seal" is a database feature or property, it is used to handle the option of temporarily removing skills or skill types in the engine. And that is the only thing it can do - you can remove skills, or you can remove skill types. If you want to use this specific feature then you need to organise your skills in a way that they fit that - exactly like Kes said.
But that has nothing to do with scripting, and is extremely limited to what you can do as you learned yourself.

On the other hand you can use a script to add conditions to skill usability. These conditions have absolutely nothing to do with database features like "seal", and if you try to force a database limitation on script functions you only end up with a difficult and convoluted code.

Instead of checking by script if a "seal" is applied, you need to check the conditions for what you want to limit and what not directly. And that is where your description goes wrong.
You don't want to prevent using a skill with MP-cost - because that condition alone would make them permanently unusable if you place it in scripts, and you'll never be able to use any MP-cost-skill.

What you most probably want is to prevent the use of an MP-cost-skill only under specific other conditions - and you never state those other conditions anywhere. That is why your pseudo-script will not work - it needs to incorporate that other condition as well.

So give us a better description of your system and when exactly you want what skills to be unusable, and we can sort it out how to do that for you. But we need more than your incomplete description to point you into the correct direction.
 

Shiro-chan

Friendly Neighbourhood Neppy Maid
Veteran
Joined
Aug 7, 2018
Messages
151
Reaction score
42
First Language
German
Primarily Uses
RMVXA
I want certain states, equipments, weapons and such things to disable skills, when applied to a particular actor or enemy, based on whether these skills use MP or TP as fuel.

My code was supposed to illustrate that:
>actor is afflicted by state 2, and a given skill consumes MP -> the skills on this actor using MP can't be used

Same for state 3 + TP consumption, or whatever it is for equipping certain weapons or armours.

It would be too tedious to define every single skill, hence this solution.



I hope that's clearer.
 
Last edited:

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,365
Reaction score
7,676
First Language
German
Primarily Uses
RMMV
yes, it is clearer.
I can't give you the exact code needed because it's been too long since I checked RGSS3, but with that info someone should be able to give you the full condition.

Your main problem here is that the code for
skill_conditions_met?(skill)
is basically a single line of AND conditions, and it is difficult to add a non-general condition into that line.
you would have to add new lines before the existing lines with a conditional return, like
"if state x is applied AND skill cost is greater then return false"
each if/return would have to be its own line to abort the true that would otherwise follow from the existing checks, and each such line would have to be its own condition, with one line for each combination of the options.
Because of that you might want to think if you can reduce the list of your conditions a bit.

Additionally, if you don't care about what the display on the computer says, you might want to use the SP-Parameter MCR, the MP consumption rate. This could be used to increase the MP-cost of skills to values that are higher than the MP available, effectively preventing the skill from being used.
 

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

Latest Threads

Latest Profile Posts

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

Forum statistics

Threads
105,868
Messages
1,017,074
Members
137,578
Latest member
JamesLightning
Top