Script Call to change the scope of an attack (More than 4 random enemies)

Joined
Jan 23, 2014
Messages
161
Reaction score
19
First Language
English
Hello Everyone,

First, I hope this is the right place to put this, as I am not sure where this would go.

Secondly, I am looking for a script call or a pointer that would change the scope of an attack

For example.

I have a custom script that gives skills levels.

I have a skill Thunderstorm, that at level 1 attacks 1 random enemy, but at level 10 (the max level) attacks 10 random enemies.

I was wondering what the right direction would be to find the scope part and change it in a new script..

Also if it isn't possible let me know too.
 

Iavra

Veteran
Veteran
Joined
Apr 9, 2015
Messages
1,797
Reaction score
863
First Language
German
Primarily Uses
Have 2 skills in your database and switch them out once the weaker one hits lvl 10.
 
Joined
Jan 23, 2014
Messages
161
Reaction score
19
First Language
English
Thank you for your reply. However that isn't going to work for what I am trying to do.

I don't like the clutterness of skills with the same name and having "different" effects. (Did that once before with an old project, had over 1000 skills. o.o)

Also this is for my own learning as well, since if I know where things are, I can change it, hence why I asked the lovely people at the forums to help point me in the right direction.

I appreciate your input though. :)

EDIT: Also as a side note, I have a script that does everything I want to do for having one skill change damage output for its level, I am just curious on how scope works and where I can find the code for it. It would make it an interesting experience.

Just an example (as you probably already figured out) I want one skill that holds an initial scope of 1 random enemy and grow with it's skill level. If I knew where scope was located and/or how it works (I can figure out that part) it would make my life a lot easier, because I'm trying to create my own battle system with scripts. And like I stated before, I don't want 1000 skills to do that. :)

~Learning how to script; is a lot of fun~

EDIT2: Also the random enemies would be grown with this said skill, so it would increase by one (or a variable amount) until it reached 10 random enemies, which is not possible in the editor. Wondering how I would go about that.
 
Last edited by a moderator:

Iavra

Veteran
Veteran
Joined
Apr 9, 2015
Messages
1,797
Reaction score
863
First Language
German
Primarily Uses
Go to your helpfile (F1) and take a look at RPG::UsableItem. You can access the instances of it via $game_skills (RPG::Skill is a subclass of RPG::UsableItem).
 
Last edited by a moderator:
Joined
Jan 23, 2014
Messages
161
Reaction score
19
First Language
English
Go to your helpfile (F1) and take a look at RPG::UsableItem. You can access the instances of it via $game_skills (RPG::Skill is a subclass of RPG::UsableItem).
Thanks for pointing me in the right direction, I guess my next question is I would like to increase the random enemies by more than just 4. Where would that be located? I would probably need to find where the scope is being changed. I'll take a look at scope managers I came across as well.

Thanks, I'll come back here if I have any more questions.
 

Iavra

Veteran
Veteran
Joined
Apr 9, 2015
Messages
1,797
Reaction score
863
First Language
German
Primarily Uses
The method number_of_targets is likely what you need. By default it can return a maximum of 4, but if you extends UsableItem or Skill, you can change it however you want. You could introduce a notetag like <num targets x>, that gets parsed and return x, for example.
 
Joined
Jan 23, 2014
Messages
161
Reaction score
19
First Language
English
I am going to give that a shot. Thanks for the tips!

I'll come back either way and let you know if it works.

EDIT:

 

The method number_of_targets is likely what you need. By default it can return a maximum of 4, but if you extends UsableItem or Skill, you can change it however you want. You could introduce a notetag like <num targets x>, that gets parsed and return x, for example.
Hmm... I tried implementing what you said. It works for the most part however I would like it to be a variable amount.

Like if I tag a skill with <num targets: x> x being the number of targets it works great, but the problem is the skill at level 1 will have x number of targets as well, if possible I want x to be like the variable amount it grows

If I could, I could have that x be the num of a variable (that holds the correct skill level of the skill) I set before the skill happens with YEA - Lunatic Objects.

Doesn't work actually, because of the num_of_targets being called before the skill. O:

Hmm....

The method I describe works great for percentage chance activation of Follow Up Skills. (those methods being in game_battler)

however.

Any ideas?

EDIT3: I actually think I got it to work, the only problem with the method I use at turn 0 start up. It only allows for one variable instead of a group of people.

So for example, if I have one mage, great it will work fine for that mage, but as soon as I have a team of mages it gets wonky. 
 
Last edited by a moderator:

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

Latest Threads

Latest Profile Posts

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'??
Yay, now back in action Happy Christmas time, coming back!






Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c
So I was playing with filters and this looked interesting...

Versus the normal look...

Kind of gives a very different feel. :LZSexcite:

Forum statistics

Threads
105,854
Messages
1,017,004
Members
137,562
Latest member
tamedeathman
Top