Jump to content


Photo

Auto Removal


  • Please log in to reply
11 replies to this topic

#1 Tsukihime

Tsukihime

    Advanced Member

  • Ace Member
  • 7,120 posts
  • LocationToronto
  • RM Skill - Coder

Awards Bar:

Users Awards

Posted 10 November 2012 - 12:49 AM

Auto Removal
Tsukihime

This script extends the "auto remove timing" for database objects.
The default remove types are

1: end of action: when the battler has finished its turn
2: end of turn: when all battlers have finished their turns

I define additional remove types

3: end of skill: immediately after first skill is used

Supports weapons, armors, and states.

Download

Script: Download here
Demo: Demo

Usage

To specify a remove type, tag it with

<remove_type: x>
Where x is one of the remove type ID's above

To specify the remove time, tag it with

<remove_time: x y>
Where x and y are integers indicating the min and max removal times

Edited by Tsukihime, 03 August 2016 - 09:56 AM.

All of my work can be found on my website:

banner200x40.png

You can follow me on any of these platforms:

logo_facebook40x40.pnglogo_twitter40x40.pnglogo_youtube40x40.pnglogo_patreon40x40.pnglogo_instagram40x40.png

Go here for Bugs and Requests.
 
Want to become a beta tester for my plugins before they are released to the public?

#2 Ashern

Ashern

    Advanced Member

  • Ace Member
  • 73 posts
  • RM Skill - Jack of All Trades

Posted 10 November 2012 - 12:27 PM

I appreciate this greatly! Thanks for taking the time to do this (for me and whoever else that needs it xD).

Hmm, the states aren't being removed. If I have it right, am I supposed to put <remove_type: 3> into my state's note box if I want it to end directly after the next skill*? If so, it's not changing the state. It stays applied. Should I change the auto-removal timing in the database to turn/action end or something?

Edited by Ashern, 10 November 2012 - 12:58 PM.


#3 Tsukihime

Tsukihime

    Advanced Member

  • Ace Member
  • 7,120 posts
  • LocationToronto
  • RM Skill - Coder

Awards Bar:

Users Awards

Posted 10 November 2012 - 12:58 PM

You need to specify the amount of turns to pass before it can be auto-removed.
Just set the duration in turns. editor remove type doesn't matter since I will replace it if you specify a custom one.

If you want it removed immediately after you use a skill just set it to 1~1.

Edited by Tsukihime, 10 November 2012 - 12:59 PM.

All of my work can be found on my website:

banner200x40.png

You can follow me on any of these platforms:

logo_facebook40x40.pnglogo_twitter40x40.pnglogo_youtube40x40.pnglogo_patreon40x40.pnglogo_instagram40x40.png

Go here for Bugs and Requests.
 
Want to become a beta tester for my plugins before they are released to the public?

#4 Ashern

Ashern

    Advanced Member

  • Ace Member
  • 73 posts
  • RM Skill - Jack of All Trades

Posted 10 November 2012 - 01:15 PM

Well I put the

<remove_type: 3>
<remove_time: 1 1> (I also tried <remove_time: 1~1>)

tags in the state's note box, and it still didn't affect the state. Let me see if I got this correct: I use a skill that applies to state to the caster, and then have it so that the next skill I use will remove the state. So I would put the tags into the same state, right?

#5 Tsukihime

Tsukihime

    Advanced Member

  • Ace Member
  • 7,120 posts
  • LocationToronto
  • RM Skill - Coder

Awards Bar:

Users Awards

Posted 10 November 2012 - 01:22 PM

nvm just download a new script the remove_time should work for states now.

Edited by Tsukihime, 10 November 2012 - 01:33 PM.

All of my work can be found on my website:

banner200x40.png

You can follow me on any of these platforms:

logo_facebook40x40.pnglogo_twitter40x40.pnglogo_youtube40x40.pnglogo_patreon40x40.pnglogo_instagram40x40.png

Go here for Bugs and Requests.
 
Want to become a beta tester for my plugins before they are released to the public?

#6 Ashern

Ashern

    Advanced Member

  • Ace Member
  • 73 posts
  • RM Skill - Jack of All Trades

Posted 10 November 2012 - 01:42 PM

I'm still having trouble understanding how I'm supposed to set it up :D. See, let me post a picture of how my state looks right now:

Spoiler


Those <element strengthen> tags are part of the element increase script I'm using. If you could look over that scene and tell me what settings I'd need to change in order to get it working properly... As you must already know, I'm trying to get it to end right after the actor uses a skill. Should I turn the Auto-Removal Timing to Action and set it to 1 ~ 1? Because I tried that and it ended up removing the state before the damage effect was applied, like normally.

#7 Tsukihime

Tsukihime

    Advanced Member

  • Ace Member
  • 7,120 posts
  • LocationToronto
  • RM Skill - Coder

Awards Bar:

Users Awards

Posted 10 November 2012 - 01:44 PM

I don't know what the issue might be then because the <remove_type> should have automatically made it so that it will only be removed after skill use, not before skill use.
All of my work can be found on my website:

banner200x40.png

You can follow me on any of these platforms:

logo_facebook40x40.pnglogo_twitter40x40.pnglogo_youtube40x40.pnglogo_patreon40x40.pnglogo_instagram40x40.png

Go here for Bugs and Requests.
 
Want to become a beta tester for my plugins before they are released to the public?

#8 Ashern

Ashern

    Advanced Member

  • Ace Member
  • 73 posts
  • RM Skill - Jack of All Trades

Posted 10 November 2012 - 01:58 PM

Well I have the database editor's removal timing set to None, I tried it with Turn/Action as well, but the note tags still didn't affect it. I also tried it in a new project, with it being the only script, and it behaved the same way...hmm

Does it work with you? Maybe I could try to copy your set up and see if it's just something I'm doing wrong.

Edited by Ashern, 10 November 2012 - 01:59 PM.


#9 Tsukihime

Tsukihime

    Advanced Member

  • Ace Member
  • 7,120 posts
  • LocationToronto
  • RM Skill - Coder

Awards Bar:

Users Awards

Posted 10 November 2012 - 02:23 PM

Here's a demo see if it works for you.
http://db.tt/Ae1WxrhM

It is interesting that it doesn't work in a new project.

Edited by Tsukihime, 10 November 2012 - 02:24 PM.

All of my work can be found on my website:

banner200x40.png

You can follow me on any of these platforms:

logo_facebook40x40.pnglogo_twitter40x40.pnglogo_youtube40x40.pnglogo_patreon40x40.pnglogo_instagram40x40.png

Go here for Bugs and Requests.
 
Want to become a beta tester for my plugins before they are released to the public?

#10 Ashern

Ashern

    Advanced Member

  • Ace Member
  • 73 posts
  • RM Skill - Jack of All Trades

Posted 10 November 2012 - 02:58 PM

This is very, very odd. First off, I'll say -- I tried the demo, and it worked in there. I copied God Mode and the state to my project, used it, and the effect was removed right after the action. I also made a new project and copied the new script (the one in the demo was different from the first script I put in) and made a buff, and it was removed as expected. Now...with the one skill I'm trying to have this removal apply to, it doesn't work. I copied the skill from my project to a new project, and it didn't remove.

So, your script works just fine -- it's something with my one skill...I'll try deleting it and remaking it, maybe that'll work. But regardless, thanks for the script -- it does work :D.

(EDIT:)

Alright, I deleted my original skill and state, and then just remade it. For some reason, it now works. I have literally no idea what the problem was, or how it could be glitched in such a way...

Edited by Ashern, 10 November 2012 - 03:10 PM.


#11 Yukitou

Yukitou

    just a n00b

  • Ace Member
  • 1 posts
  • RM Skill - Artist

Posted 19 November 2012 - 10:57 AM

Hey Tsuki, I got this error when trying to remove or clearing the equipment
Spoiler



Already tested it in a new blank project and the error still occur, maybe you can fix that. :)

#12 Tsukihime

Tsukihime

    Advanced Member

  • Ace Member
  • 7,120 posts
  • LocationToronto
  • RM Skill - Coder

Awards Bar:

Users Awards

Posted 19 November 2012 - 11:23 AM

This should work. I didn't check whether it was nil (again..)

  def set_equip_removal_timing(slot_id, item)
    return unless item
    variance = [item.remove_max_turns - item.remove_min_turns, 0].max    
    @equip_timing[slot_id] = item.remove_min_turns + rand(variance).to_i
  end

I will update the script when I have access to it and can test it.

Edited by Tsukihime, 19 November 2012 - 11:23 AM.

All of my work can be found on my website:

banner200x40.png

You can follow me on any of these platforms:

logo_facebook40x40.pnglogo_twitter40x40.pnglogo_youtube40x40.pnglogo_patreon40x40.pnglogo_instagram40x40.png

Go here for Bugs and Requests.
 
Want to become a beta tester for my plugins before they are released to the public?




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users