Need a script call to invoke the enemy scan in Venka's Bestiary Logbook

I'd like to use Venka's wonderful Bestiary Logbook script for my game. Here's the link:




I'm also using Yami's Battle Symphony, and I'm running into a slight issue with the two. (Don't worry, I'm not asking for a compatibility fix here)


The problem is that when I invoke a skill or item to scan the enemy, it happens immediately. I'd like to defer the scan until the actor steps forward and the scan animation plays. To do that, I need to be able to invoke the scan with a script call instead of the <scan> note tag, so I can insert the script call into the right place in the Yami Battle Symphony tags.


Venka's script doesn't look like it provides a script call to invoke a scan. Can someone write a script call for me?


From the symphony tags, I'd like to make a call like:


scan_enemy(target)


Where target is a Game_Enemy type.
I've moved this thread to RGSSx Script Support. Please be sure to post your threads in the correct forum next time. Thank you.


You don't really need a script written - you just need a one-liner to insert at the appropriate place.  Do you know the appropriate place to insert the line, or do you also need someone to figure that out and let you know?
If you're referring to my battle symphony tags, I know exactly where to insert the script call, once I have it. If you're asking whether I know where to insert it in Venka's script, I wouldn't have a clue.
Nevermind. I figured it out. Guess I just needed to take a break. Been staring at that script too long...


For the record, I added this function to the Scene_Battle class in Venka's script:

Code:
  def scan_enemy?(target)
    if target.is_a?(Game_Enemy)
      enemy = $data_enemies[target.enemy_id]
      $game_party.reveal_resist(enemy.id, false)
      $game_party.bestiary.each do |entry|
        entry.scanned = true if entry.enemy_id == enemy.shown_id
      end
      show_enemy_info(target.enemy_id)
    end
    return true
  end



Then I can call it from my Battle Symphony tags, like so:

Code:
<setup action>
stance: user, forward
move user: forward, 30, wait
</setup action>

<target action>
stance: user, item
wait: 30
animation 50: target, wait
wait: 10
if scan_enemy?(target) == true
wait: 1
end
</target action>

<finish action>
wait: 15
stance: user, retreat
move user: origin, wait
stance: user, idle
</finish action>

Note: if I remember right, you can only invoke script calls from the Battle Symphony tags if they're part of an if statement, so that's why I coded the script call the way I did. At any rate, it works.


Sorry if I wasted anyone's time who may have been looking at this besides me...


Edit: yikes, just realized I double-posted. I was going to cut my text and paste it into my post above, then delete the second post, but I don't see a way to delete a post, though. Guess it's time to call it a night. Sorry...
GolfHacker, please avoid double posting, as it is against the forum rules. You can review our forum rules here. Thank you.


Just edit your last post and add the extra info.


Glad you sorted it out 🙂

Original thread: https://forums.rpgmakerweb.com/threads/need-a-script-call-to-invoke-the-enemy-scan-in-venkas-bestiary-logbook.57592/