Advanced Skill Targeting (yanfly compatible) script without untargetable enemies in the choice windo

dii

Villager
Member
Joined
Jul 14, 2014
Messages
18
Reaction score
4
First Language
Polish
Primarily Uses
Hello,

I have posted question in this topic:

http://forums.rpgmakerweb.com/index.php?/topic/17950-advanced-skill-targeting-plus-multiple-forced-actions-now-yanflys-compatible/#entry176248

but maybe it is appropriate to ask in script request category as well. I just copy/paste my question.

Great script but there is one little thing that bothers me in Yanfly compatible ver. I have tried to change some things in script code but my knowledge is not sufficient :) Is it possible to tweak script such that enemies that are untargetable ( that have certain state or sth ) do not appear in selection bar (choice window)  ?

https://dl.dropboxusercontent.com/u/65029315/yanflysbattle.jpg

In original version of the script selection bar displays every battle member.

Example:

There is 4 enemis, 2 are untargetable ( have untargetable state from Hime script or are untargetable with method used by advanced targeting). Now all 4 are visible in selection bar (in the choice window) , 2 have red "X" over portrait in target box, 2 are normal.

I wish that this two target boxes with red "X" was not visible in choice window. Game troop and party mebers displayed should consist only of targetable enemies (targets enemies and party members if skill can target ally) not whole alive troop and party members. I want to skip in choice window ( using left and right) only between enemies (targets enemies and party members if skill can target ally) that are targetable.

I was able to merge yanlfy not compatible ver of Advance Targeting and Untargetable State ( Author: Hime ) and as a result I was able to target only enemies without untargetable state ( but on yanlfy not compatible ver, skills that use AT script commands do not work anyway so that was pointless ;) ) I will try to merge Hime script with Advance Targeting yanfly ver but maybe someone has sufficient knowledge and can tweak it without problem ;)
 

Another Fen

Veteran
Veteran
Joined
Jan 23, 2013
Messages
564
Reaction score
275
First Language
German
Primarily Uses
Mmm, I can't guarantee it will work (I couldn't test it yet), but you could try to add this script:

class Window_BattleActor  alias_method:)create_unit_ILC_onlyTargetables, :create_unit)  def create_unit    create_unit_ILC_onlyTargetables    @entries.select! { |entry| entry[1] != -10 }  if defined?(@entries)  endend
It should remove untargetable battlers from the selection when it is created.
 
Last edited by a moderator:

dii

Villager
Member
Joined
Jul 14, 2014
Messages
18
Reaction score
4
First Language
Polish
Primarily Uses
Thank you Another Fen for such quick answer, it is precisely what I wanted :D

I still use Hime script (Untargetable state) and was able to get it to work with Advance targeting by adding on troop page:

( or you can use map, battle,event script call as it is mentioned in post http://forums.rpgmakerweb.com/index.php?/topic/17950-advanced-skill-targeting-plus-multiple-forced-actions-now-yanflys-compatible/) 

code= "b.state?(47)"
reason = ''
add_target_rule(code,"never")

# state 47 is untargetable state defined in Hime untargetable state script

# set conditions to page as turn 0 and battle obviously

# add_target_rule is a global rule so thereis no need to add to every single skill ASTremove:rule

# certain enemies have auto state 47 (another script), good solution if you use large troops or adding troops reinforcement

I will be testing it further and write if sth goes wrong with proposed solution. Thank you.

( I have added Another Fen script below Advance targeting script - for future e-wanderers ;) )
 

geri_khan

Veteran
Veteran
Joined
Aug 16, 2013
Messages
32
Reaction score
6
First Language
English
Primarily Uses
In case you're not looking at the other thread anymore, I've implemented this in the script now (hopefully bug free, I wish...)

Another Fen's code was very useful but there were a ton of problems that could arise from having a zero length target list, so I've hopefully squashed all of them.

Anyway, it's all back in the other thread.
 

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

Latest Threads

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,858
Messages
1,017,023
Members
137,565
Latest member
Callmelogann
Top