[Ace] Global Skill Type

Sixth

Veteran
Veteran
Joined
Jul 4, 2014
Messages
2,162
Reaction score
822
First Language
Hungarian
Primarily Uses
RMVXA
Ahoy, great scripters!


So, I am in need of a global skill type.


What this means?


Well, I will explain this as clear as I can.


A global skill type is a skill type (a regular one, can be setup in the database just like any other skill type) which doesn't read any actor info.


The skills in it should not be bound to any actor.


The learn-able skills for this skill type will not come from actor leveling.


It must be able to read eval requirements for the skill learning process, like Yanfly's Learn Skill Engine.


Why not use that one instead?


It doesn't react to my eval condition, which is a method from another custom script.


And the second problem (the bigger one) is that I want all of my actors to be able to access all of the skills learned in this global skill type, regardless of when they joined the party (before or after the skill learning process).


I tried Dekita's Learn Skill Requirements script too, which seems to be working for simple eval requirements too, like actor ID restricts and similar, but that one won't recognize any eval requirements from other custom scripts either.


So, in short what I would like to see in this script:


- A global skill type which could be setup the same way as the default skill types. The script could contain a setup option which defines which skill types are global ones in the database.


- *All skills learned in this skill type are always accessible for the actors with this skill type, regardless of when they joined the party, before or after the skill is learned.


- Eval learning requirement functions working with custom methods from other not default scripts. This is optional, as I could event this with "trainer" NPCs anytime, but still, would be nice to see.


OR:


- A script call, which would basically insert any learned skill from a skill type to every actor with this skill type, regardless if the actor has been already initialized in the game or not.


*To explain this part a bit more clear, here is an example:


The party got 3 members, Actor A, Actor B and Actor C.


Actor A and B got this global skill type.


The party explores the world and learns some skills in this skill type.


After this, another member joins, Actor D, who got this global skill type too.


Actor D was not present when the rest of the party learned some skills in this skill type. So, I guess, by default, Actor D would not have any skills unlocked in this skill type, because the learning process is actor dependent. And because the learning of these skills aren't from simply leveling a character, but by exploring the world and finding secrets and other custom requirements, it is not possible to know if the player learned some skills in this skill type already or not in the game, so eventing this would be close to impossible, I guess.


In the end, this would mean that Actor A and B got some skills learned in this global skill type, but Actor D would not have any. Actor C is without this skill type, so he is irrelevant, just wanted to show, that not all of my actors will be capable of using this skill type.


So, in short, this would be what I would like to ask from you, great scripters. *-*


No idea how hard is to make this possible.


I hope I was clear enough with everything I want. If something is not understandable, feel free to ask and yell on me! :D


Or if anybody knows any way to make this possible without scripts or with another, already existing script, please do share the information about it!


Thanks for any kind of help in advance!
 

bgillisp

Global Moderators
Global Mod
Joined
Jul 2, 2014
Messages
13,522
Reaction score
14,255
First Language
English
Primarily Uses
RMVXA
There is a non-script way to do this. You just need to set up a skill type as Global (or whatever you wish to call it), and make sure all actors can use that skill type (set that up under features). Then, when the skills are learned, in the events, use the change skill events to have *every* single actor learn the skill.

Don't use entire party under the change skill events, that will only have those in the party at the moment learn it. You have to do it one by one by one for every actor in the party. Long, but it should work.
 

Sixth

Veteran
Veteran
Joined
Jul 4, 2014
Messages
2,162
Reaction score
822
First Language
Hungarian
Primarily Uses
RMVXA
Now I feel dumb, lol.


I always checked the "Initialize" option when I added my actors into the party, and by doing this, they did not have the skills learned.


But without that option, it works just like I want it to work.


I wonder if I can delete this topic to hide my stupidity... :D


Thanks for the help!
 
Last edited by a moderator:

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,564
Reaction score
3,846
First Language
English
There is a non-script way to do this. You just need to set up a skill type as Global (or whatever you wish to call it), and make sure all actors can use that skill type (set that up under features). Then, when the skills are learned, in the events, use the change skill events to have *every* single actor learn the skill.


Don't use entire party under the change skill events, that will only have those in the party at the moment learn it. You have to do it one by one by one for every actor in the party. Long, but it should work.
This technique works well.


Note that if you were to introduce dynamic actors that are created at run-time, you may need a more flexible solution.


But if you don't have those kind of things then it's fine.
 

bgillisp

Global Moderators
Global Mod
Joined
Jul 2, 2014
Messages
13,522
Reaction score
14,255
First Language
English
Primarily Uses
RMVXA
Don't feel too bad, besides, my method is kind of long. I'm sure a script could be useful for those who don't want to do this, either because it is long or because they have 150+ actors and don't want to add 150 add skills every time a skill is learned. So maybe there is a demand for a script for this too?
 

Sixth

Veteran
Veteran
Joined
Jul 4, 2014
Messages
2,162
Reaction score
822
First Language
Hungarian
Primarily Uses
RMVXA
I'm sure there is a script equivalent of the "Add Skill" command.

With that, we could simply make all of the actors in the database learn the skill with a little edit, or not? Something like:

$game_actors.each do |i|i.learn_skill[x] if i != nil # just an example, no idea how the skill learning looks likeendSo we could put this in a definition with 'x' as an argument in Game_Interpreter, and in theory, this would make all the actors learn the skill, right?I will try to find the learn skill script command and test this.

Thanks for the help again!

Edit:

So, yeah, adding this snippet to the script list made it work like a charm!

class Game_Interpreter #-------------------------------------------------------------------------- # new method: Global Learn Skill #-------------------------------------------------------------------------- def global_learn_skill(skill_id) $data_actors.each do |i| if i != nil $game_actors[i.id].learn_skill(skill_id) end end endendThis will make all of the actors from the database learn the skill without having to make dozens or hundreds of "Change Skill" commands in the editor.Just use the 'global_learn_skill(skill_id)' script call in the editor, replace 'skill_id' with the skill ID from the database and it will make all characters learn that skill.

Remember to disable the 'Initialize' option when you add actors to the party, or else it will clear all non-default learned skills!

Thanks for all the help guys!
 
Last edited by a moderator:

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