Jump to content
estriole

EST - RING SYSTEM (I'm back :D)

Recommended Posts

FIRST OF ALL... I'M BACK :D

after long time my absence from this forum because of work...

i slowly coming back and write scripts.

 

EST - RING SYSTEM

Author  : Estriole
Version : 1.2

 

  this script written based (also take some code) from:

 

   Boneless R.I.B.S. [Ring Only] VX
   Author  : OriginalWij
   Version : 1.0

 

   Draw Line VX                                                          

   Author  : modern algebra                                              
   Version : 1.0                                                         
     
 â–  Changelog        â•’â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•›
 v1.0 2014.06.12     >     Initial Release

 v1.1 2014.06.12     >     fix the logic for [good_count, crit_count] setting.
                                       compatibility patch to THEO battle system

 v1.2 2014.06.13        MAJOR UPDATE
                     >     change how the ring drawn so you can use the transparent
                           color for wedge without seeing behind the ring.
                     >     add configuration for ring z value
                     >     dispose the ring image correctly instead hiding it only
                     >     Bugfix enemy cannot damage the actor
                     >     change setting symbol :barspeed to :bar_speed so it match :add_wedge,etc
                     >     compatibility with Theo SBS
                           split the "ring setting grab" and "ring call". then save it
                           so we can use it in the middle of attack (if using Theo SBS)
                     >     remove the <anim_first> notetags for now. (might add it later)
                     >     add ring setting replace and ring setting mod feature
                           actor / class / equipment / states can affect ring settings
                           replace can only used once (priority: states > equip > class > actor)
                           while mod stacks.
                     >     add $imported["EST - RING SYSTEM"] variable for other scripter to
                           make compatibility patch.
                     >     change the Graphic.update and Input.update to update_basic.
                           so the scene not freeze. more compatible with victor animated battle
                           and Theo SBS now.
 

 â–  License        â•’â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•›
 Free to use in all project (except the one containing pornography)
 as long as i credited (ESTRIOLE).
 
 This script written based (also take some code) from Boneless RIBS (Ring Only) VX
 script written by OriginalWij (which have some draw line code from modern algebra)
 so you need to credit both (OriginalWij and modern algebra) too if you want to use
 this script
 
 â–  Introduction     â•’â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•›
    This script create ring system where you need to hit the ring in the right
 spot to achieve certain result you configured. you can use this system for
 eventing OR for battle.
 
 This script written by request of Lionheart_84 from www.rpgmakervxace.net

 

 â–  Feature     â•’â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•›
> Ring system for eventing

> Ring system in battle that affect skills/items repeat, miss, crit, target evade, formula.

> Multiple wedge (as long as it fits the ring)

 

 â–  Compatibility     â•’â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•›
 battle system that i already tested:

 > Default battle system

 > Yanfly Ace Battle engine
 > MOGHUNTER battle system
 > Victor Animated battle system

 > Theo Sideview Battle System (ring repeats feature not working BUT you can customize the sequence instead)

 

 recommended battle system:

 newbie: Default battle system / yanfly ace batle engine

 expert : Theo Sideview Battle System (Basically you can transform your skill based on ring result)

 
 tell me if there's other battle system compatible or not so i can add it to
 this list. :D.

 someone please test symphony for me please :D.

 

Screenshot

ring_event.jpg

 

ring_battle.jpg

How to use

you can look at script header or:

 

 

  â–  How to Use     â•’â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•›   
 ================================================================================
  Event Script Commands:
 ================================================================================
  Place any of the following script commands in an event 'script' box:
  [Event Commands : Page 3 : Bottom-Right-Most Button]
 ================================================================================
 1)  To call the ring on the map:

       do_ring(x, y, wedge, degrees, times)
       
    x : X coordinate of the Ring (upper left corner)
    y : Y coordinate of the Ring (upper left corner)
    wedge : wedge-set (wedge size & placement array) [start1, stop1, start2, stop2, ...]
    degrees : degrees to start the ring bar at (default = 0)
    times : how many rotation before the ring end (default = 3)

  NOTE: The only real limit on the number of start/stop pairings in the wedge
       is how many you can fit in 360°. [practical limit = 10]

  THE RESULT WILL BE SAVED IN VARIABLES YOU DEFINE IN THE MODULE BELOW !!!!!
  so you can use that for eventing in conditional branch easily.

  RING_HIT_COUNT_VAR => variable you set here will save any hit (good or crit)
  GOOD_COUNT_VAR => variable you set here will save the GOOD hit
  CRIT_COUNT_VAR => variable you set here will save the CRIT hit
  SCORE_COUNT_VAR => variable you set here will save the score (good hit = 1, crit hit = 2)
       
  NOTE2: GOOD hit mean you hit it in normal zone. CRIT hit mean you hit it in
         stike zone.
         
  THE RESULT ALSO SAVED IN $game_system
  (for example if you want to use it in Theo SBS :if sequence)
  $game_system.ring_hit_count   => store value of any hit (good or crit)
  $game_system.good_count       => store value of good hit
  $game_system.crit_count       => store value of crit hit
  $game_system.score_count      => store the score (good hit = 1, crit hit = 2)
         
 2)  To change the bar speed:
       $game_system.bar_speed = new_bar_speed
       
 3)  To disable strike zones (for next ring call only) (as used in Shops)
       $game_system.no_strike = true
       
 4)  To modify the size of strike size
       $game_system.strike_size = value
     the strike size here mean percentage from the wedge size that count as crit/strike
       
 ================================================================================
  SKILL / ITEM Notetags:
 ================================================================================

 1)  To make skill / item use ring system add this notetags:

    <use_ring>

 2)  You can customize each skill/item RING by adding this notetags:
    <ring_setting>
    :x => a,
    :y => b,
    :wedge => c,
    :bar_speed => d,
    :strike=> e,
    :no_strike => f,
    </ring_setting>
    
    a: coordinate x of the ring (number)
    b: coordinate y of the ring (number)
    c: array that will determine the wedge. format:
       [start1, stop1, start2, stop2, ...]
       for example: [10,50,70,120]
       first wedge will be between 10 - 50 degree
       second wedge will be between 70 - 120 degree
    d: rotation speed of the bar
    e: percentage of the strike zone based on wedge zone (1-99) (number)
    f: true -> the ring will have no strike zone
       false -> the ring will have strike zone (default: false)
    
    [everything optional]
       
    example notetags:
    <ring_setting>
    :x=> 10,
    :y=> 10,
    :wedge=>[10,80, 120,170],
    :bar_speed=>4,
    :strike=> 10,
    </ring_setting>
    
    will put the ring at coordinate x:10 y:10. also have two wedge [10,80] and [120,170]
    and have the rotation speed of 4. also the strike zone will be 10% of wedge zone.

  WARNING : DO NOT FORGET THE COMA AFTER EACH SETTING ENTRY!!!
 
 3)  You can have the skill MISS when the number of good/crit hit below certain value:
    IGNORE skill setting in database that make you ALWAYS HIT
    
    <ring_miss: x>
    
    x: number of hits MINIMUM so the skill WON'T miss
    
    example notetags:
    <ring_miss: 1>   => you have to hit at least 1 good OR crit hit.

 4)  You can have the skill 100% CRIT when the number of CRIT hit the
    same or above certain value
    
    <ring_crit: x>
    
    x: number of CRIT hits REQUIRED so the skill 100% CRITICAL.
    
    example notetags:
    <ring_crit: 2>   => you have to hit at least 2 CRIT hit to 100% critical.
    
 5)  You can have the skill/item NULLIFY TARGET EVADE (mean the skill will ignore evade)
    when the number of good OR crit hit same or above certain value
    NOTE: you can still miss if your hit rate suck. but the enemy cannot evade.
    if you want certain hit just set the skill to always hit in database.
    don't worry. ring_miss notetags ignore that. so you can still miss.
    
    <ring_null_evade: x>
    
    x: number of good OR crit hit required to NULLIFY TARGET EVADE
    
    example notetags:
    <ring_null_evade: 3> => you have to hit at least 3 (either good/crit) times

 6)  You can have the skill/item NULLIFY TARGET EVADE (mean the skill will ignore evade)
    when the number of CRIT hit (ONLY) same or above certain value
    NOTE: you can still miss if your hit rate suck. but the enemy cannot evade.
    if you want certain hit just set the skill to always hit in database.
    don't worry. ring_miss notetags ignore that. so you can still miss.
    
    <ring_crit_null_evade: x>
    
    x: number of good OR crit hit required to NULLIFY TARGET EVADE
    
    example notetags:
    <ring_crit_null_evade: 1> => you have to hit at least 1 CRIT

 7)  You can modify how many times the skill REPEATS (like in database repeat times).
    when you met certain requirement:
      
    <ring_repeats>
    key => value,
    </ring_repeats>

    key => you have two format that you can use:
           array system -> [good_hit, crit_hit] ex: [1,1]
           score system -> good hit = 1, crit hit = 2 ex: 3
           
           array system setting have HIGHER priority than score system.
           so if the both condition met it will use array system setting.
           
    value => number of hits
    
    example notetags:
    <ring_repeats>
    [1,0] => 2,
    [1,1] => 3,
    [0,2] => 10,
    3 => 20,
    </ring_repeats>
    
    means:
    1 good hit only => 2 hits
    1 good hit + 1 crit hit => 3 hits
    2 crit hits => 10 hits
    3 score => 20 hits
    
    (assuming you have 3 set of wedge)
    as you can see... there's many way of achieving 3 score.
    example: 1 good + 1 crit OR 3 good  
    so in case above. you will only get 20 repeats ONLY if you get 3 good.
    since you have another setting for 1 good + 1 crit using array system.
    it will prioritize it.
 
  WARNING : DO NOT FORGET THE COMA AFTER EACH SETTING ENTRY!!!
  NOTE : putting 0 or negative value will make the skill weird.
  just use ring_miss feature instead.
  NOTE2 : this can BYPASS the database limit of 9 hits
 
 8) You can modify the damage formula for the skills based on the ring result.

 > first add this inside the DAMAGE FORMULA of the SKILL / ITEM:
  (the capital word means you need to replace it with your own)
  (the other text stay at it is. don't change it at all)
 
  a.ring(a,b,DEFAULT_FORMULA)

  DEFAULT_FORMULA => formula that will be use by the enemy or when there's
                     no setting for the ring result.
                     
  example: a.ring(a,b,a.atk * 4 - b.def * 2)
                     
 > then add this notetags in the skill/item notes
    <ring_result>
    key => formulainstring,
    </ring_result>
    key => you have two format that you can use:
           array system -> [good_hit, crit_hit] ex: [1,1]
           score system -> good hit = 1, crit hit = 2 ex: 3
           
           array system setting have HIGHER priority than score system.
           so if the both condition met it will use array system setting.
           
    formulainstring => your formula as string (inside "")
    there's shortcut letter that you can use for the formula:
    a = skill/item user
    b = skill/item target
    v = $game_variables
    s = $game_switches
    pt = $game_party
    l = $game_party.leader   
    f = default formula you enter inside DAMAGE FORMULA as explained above
    id = current_action.item.id
    sk = current skill/item (RPG::Skill or RPG::Item object)

    example notetags:
    <ring_result>
    [0,0] => "f/2",
    [1,0] => "f",
    [0,1] => "f + 1000",
    [1,1] => "f*2 + 1000",
    3 => "1000000",
    </ring_result>    
    
    means:
    when miss entirely => default formula / 2
    1 good hit only => default formula
    1 crit hit only => default formula + 1000 damage
    1 good hit + 1 crit hit => default formula x 2 + 1000 damage
    3 score => 1000000 damage
    
    (assuming you have 3 set of wedge)
    as you can see... there's many way of achieving 3 score.
    example: 1 good + 1 crit OR 3 good  
    so in case above. you will only get 1000000 damage ONLY if you get 3 good.
    since you have another setting for 1 good + 1 crit using array system.
    it will prioritize it.
 
  WARNING : DO NOT FORGET THE COMA AFTER EACH SETTING ENTRY!!!
    
 ================================================================================
    v 1.2 MAJOR UPDATE
    
    Ring Setting Replace and Ring Setting Mod feature
    
 ===============================================================================   
    WARNING: this feature is a harder to use. need a little bit scripting
    understanding like knowledge about HASH format.
    this feature also consume quite space on the NOTETAGS. :D. sorry.
 ===============================================================================
 
    you can add notetags in: actor, class, equipment, state and it can affect
    the ring.
    
  1) Ring replace feature. this will REPLACE the ring setting in the skill notetags.
  ONLY one change can be done (unfortunately). if multiple changes done. it will use this concept:
 
  state > equipment > class > actor
 
  the latest state would take more priority than the earlier state
  the lower equipment would take more priority than the upper equipment
 
  put this notetags:
 
  <ring_setting_replace>
  key => hash,
  </ring_setting_replace>
   
  key: [:skill]  -> means this affect ALL skills
       [:item]   -> means this affect ALL items
       [:skill,id] -> change id to any number and it only affect skill with that id
       [:item,id] -> change id to any number and it only affect skill with that id
  hash: this hash format like the ring_setting notetags above:
        {
        :x => a,
        :y => b,
        :wedge => c,
        :bar_speed => d,
        :strike=> e,
        :no_strike => f,
        },
    a: coordinate x of the ring (number)
    b: coordinate y of the ring (number)
    c: array that will determine the wedge. format:
       [start1, stop1, start2, stop2, ...]
       for example: [10,50,70,120]
       first wedge will be between 10 - 50 degree
       second wedge will be between 70 - 120 degree
    d: rotation speed of the bar
    e: percentage of the strike zone based on wedge zone (1-99) (number)
    f: true -> the ring will have no strike zone
       false -> the ring will have strike zone (default: false)
   
  example usage:    
  <ring_setting_replace>
  [:skill] => {
  :x => 10,
  :y => 10,
  :wedge => [10,50,70,120,150,200],
  :bar_speed => 4,
  },
  </ring_setting_replace>
  will replace ALL skill ring setting to this settings:
  x = 10, y = 10, wedge = [10,50,70,120,150,200] and bar speed of 4
 
  another example:
  <ring_setting_replace>
  [:skill,1] => {
  :x => 10,
  :y => 10,
  :wedge => [10,50,70,120,150,200],
  :bar_speed => 4,
  },
  [:skill,2] => {
  :x => 10,
  :y => 10,
  :wedge => [10,50,70,120,150,200],
  :bar_speed => 4,
  },
  </ring_setting_replace>
  the same as above but it will ONLY change ring setting for SKILL 1 and SKILL 2
  (you can have different changes for the skill 1 and 2 if you want)
 
  WARNING: DO NOT FORGET THE COMA. you need to understand how hash works !!
 
  IDEA OF IMPLEMENTATION:
  > you can put the ring setting replace notetags for each actor.
  and each actor will have DIFFERENT RINGS.
  > put it in class... it's the same as above actually... not new idea...
  > put it in equipment -> equip this and your skill will become
                           super large wedges style ring.
 
  2) Ring Setting Mod feature. we can have equipment that alter the way
  the ring setting works. THIS FEATURE STACKS. so you can have multiple mods
  and it added up together (except no_strike setting. it will take the latest entry).
 
  RING SETTING MOD takes effect AFTER RING SETTING REPLACE.
  so you can combine BOTH feature !!!!!
 
  to use this feature... add this note to actor / class / equip / state notetags:
  <ring_setting_mod>
  key => hash,
  </ring_setting_mod>

  key: [:skill]  -> means this affect ALL skills
       [:item]   -> means this affect ALL items
       [:skill,id] -> change id to any number and it only affect skill with that id
       [:item,id] -> change id to any number and it only affect skill with that id
  hash: this hash format like the ring_setting notetags above:
        {
        :x => a,
        :y => b,
        :add_wedge => c,
        :add_wedge => d,
        :bar_speed => e,
        :strike=> f,
        :no_strike => g,
        },
    a: coordinate x OFFSET can be plus or minus number
    b: coordinate y OFFSET can be plus or minus number
    c: wedge set that to be add to the array (must be array of two. ex: [100, 130]
       the first member must be smaller than second member. also you cannot
       have one member already included in wedge set while the other not.
       it can break the wedge. (wedge set must be set of two)
    d: wedge set that to be removed to the array (any number here will remove from wedge set array)
       be careful! it can break the wedge entirely. if used incorrectly.
    e: rotation speed of the bar OFFSET. can be plus or minus number
    f: percentage of the strike zone OFFSET. can be plus or minus number
    g: true -> the ring will have no strike zone
       false -> the ring will have strike zone (default: false)
 
  example usage:
  since this mod the ring (not replacing it). you can only have 1 or 2 entry.
  not like the replace feature above that require you to complete the setting.
 
  <ring_setting_mod>
  [:skill] =>{
  :bar_speed => -100,
  },
  </ring_setting_mod>
  it will slow all skills bar speed by 100 points.
 
  another example:
  <ring_setting_mod>
  [:skill,1] =>{
  :bar_speed => -100,
  :x => 15,
  :y => -15,
  :add_wedge => [10,30],
  },
  </ring_setting_mod>
  it will modify skill 1 only. reducing bar speed by 100 point
  mod the x coordinate +15 point. mod the y coordinate -15 point.
  add a new wedge set [10,30]  
 
  IDEA FOR IMPLEMENTATION:
  you can create accessory that slow down the bar speed.
  you can create cursed equipment that make bar speed faster and make the wedge smaller.
 
  WARNING: DO NOT FORGET THE COMA. you need to understand how hash works !!  
 
  WARNING: this two feature can be confusing to configure. you need to really
  keep track record on how each character rings look like.
 

 

 

 

Script

http://pastebin.com/ATq1VyBx

 

Demo

Latest Demo

https://www.dropbox.com/s/o58roebenhvjpan/EST_RING_SYSTEM.rar

 

Demo example usage in Theo Sideview Battle System

https://www.dropbox.com/s/0rmb1vm6pke80or/Theo_SBS_RING_usage.rar

 

HOW TO TEST the ring work or not in Theo SBS.

1) open the project above.

2) if you want fast test. just playtest using btest monster.

3) choose Stella as the actor

4) choose attack command. the ring will show up.

5) crit twice to see Stella use different animation sequences.

6) see what happen to ring when Stella equipping Sigil of Wyvern

7) see what happen to ring when Stella equipping Cloudwing Boots

 

you can use:

$game_system.crit_count

$game_system.good_count

$game_system.hit_count

$game_system.score_count

in THEO's [:if] sequence. to modify the skills sequence greatly.

 

Credit and Thanks
- Estriole

- OriginalWij for his RIBS Boneless VX script

- modern algebra for his draw line VX script
- Lionheart for requesting this script

 

Author's Notes

Please give feedback... since it's a long time. maybe i'm rusty and miss some bugs.

suggestion to improve this script also welcomed

Edited by estriole

Share this post


Link to post
Share on other sites

Welcome back bro! Now, at least I'm not alone here now ~ xD

If I understand correctly, the skill / item(?) will do a critical hit or anything if you press button in a right time, isn't it?

Btw, I'm very sure it won't be compatible with mine since my BS overwrite def use_item in Scene_Battle. Maybe we could make them compatible each other in future :D

Share this post


Link to post
Share on other sites

thx bro. :D.

 

the concept is pressing the button at right time like you said

there's some things that can be modified by ring result

1) miss   => if the ring 'hit' below certain value the skill will 100% miss

2) crit     => if the ring CRIT (mean hit in smaller size wedge) above or equal certain value the skill will 100% crit

3) target evade => depending on the setting. we can have the skill ignore target evade when certain hit/crit hit achieved.

                             you can still miss if your hit sucks though

4) repeats => ring result will affect skill repeats (as in database skill repeats)

5) formula => ring result will affect skill formula

 

i'll try your BS bro. since i mainly aliasing everything. as long as you don't make major changes. it should be compatible.

 

edit: yeah... not 100% compatible. >.<.

the ring show and other. but the effect is not all implemented.

i try making simple patch to make it compatible but not yet fix it.

since your battle system manage the repeats directly in the sequences. i'm still cannot find where to put the code to modify it :D.

 

edit2:

currently:

this feature is compatible:

-> miss, crit, formula, target evade

 

this feature is not compatible

-> repeat

 

edit3:

after quick look... you can define the repeats inside the sequence if you use :if sequence.

  [:if,"[$game_variables[GOOD_COUNT_VAR],$game_variables[CRIT_COUNT_VAR]]" == [0,2]],

means two critical hits...

 

so i can say it's compatible enough. adding it to the compatible battle system (with note).

 

btw... it's could result better than just repeats. we can use the ring result to change the whole animation sequences.

maybe your battle system is the best (although the hardest) one to use with this script.

Edited by estriole

Share this post


Link to post
Share on other sites

Yeah, I'm aware of that.

I do have plan to make sequence addon, such as

[:ring, "KeyRIng"],

 

Basically, "KeyRing" is a hash key which the value is contains array from your array configurations.

By adding [:if,] in my battle system script, it could be repeated. Yeah, I didn't use default repeat function xD

 

Btw, ...

I just tested out your demo. It seems your gauge doesn't support transparency.

I changed the configuration

BAR_COLOR = Color.new(0, 120, 255, 128)

And also for someothers. And here is the result

 

est.jpg

 

It's appear that you replaced the pixels, don't you?

Since personally, I don't really like solid color, so I did this xD

Maybe my suggestion is to add pseudo sprite/bitmap right over the ring. So, the pixels won't be replaced

Edited by TheoAllen

Share this post


Link to post
Share on other sites

updated the script to v.1.1

 

i got a little logic error on how the [good_count, crit_count] handled. fixed it.

also test it and work with your sbs :D.

 

i even upload a demo with your project with how to use ring.

 

the color look good :D.

the ring drawing is taken from OriginalWij script (only modify a little). and i'm a bit lazy to change it a lot. but i guess i'll try modify it :D.

 

i also notice two other things when i try using your project with rings.

1) the ring below the hand cursor -> so z level configuration needed i guess

2) the ring not disposed properly (i see the mithran report) -> will dispose it properly. :D.

Edited by estriole

Share this post


Link to post
Share on other sites

Cool! You managed to make it works! :o

You said you made a compatibility to my SBS, yet, I couldn't notice where did you make a change of your code.

def use_item in Scene_Battle looks same as before.

 

Btw, quick question. Where do you put wait for input for ring?

I guess I could try to call it in middle of attack sequence. It would be cool I guess

 

Edit :

Got it. On def do_ring in Scene_Base

Though, still don't understand how it works lol ~

Edited by TheoAllen

Share this post


Link to post
Share on other sites

Cool! You managed to make it works! :o

You said you made a compatibility to my SBS, yet, I couldn't notice where did you make a change of your code.

def use_item in Scene_Battle looks same as before.

 

Btw, quick question. Where do you put wait for input for ring?

I guess I could try to call it in middle of attack sequence. It would be cool I guess

 

Edit :

Got it. On def do_ring in Scene_Base

Though, still don't understand how it works lol ~

 

@theo:

I FORGOT to tell people HOW TO TEST IT WORK OR NOT :D.

open Theo SBS project. if you want it fast just playtest from database. then pick Stella as the actor.

choose normal attack, it will use ring. try CRITing two times and you'll notice it will use different animation (shoot more)

 

the compatibility is really 'simple' compatibility. :D.

i store the result of the ring to $game_system in do ring method.

so with your sbs... using :if sequence. we can use that result as condition.

it would be better if your sbs have :case sequence. but i think that would be hard to make :D.

example:

 

 

[:case, "[$game_system.good_count,$game_system.crit_count]"],

[:when, [0,1]],

[:animation and movement here]

[:when, [0,2]],

[:animation and movement here]

[:else]

[:animation and movement here]

[:end]

 

 

edit: of course it can be done using if too. but there some case that's not suit if well.

example: 1 => do animation a, 2=> do animation b, 3=> do animation c, 4=> do animation d, 5=> do animation e,

ALL OTHER result do animation f.

it would be:

 

 

[:if,"$game_system.score_count == 1"],

[animation here]

[:end]

[:if,"$game_system.score_count == 2"],

[animation here]

[:end]

[:if,"$game_system.score_count == 3"],

[animation here]

[:end]

[:if,"$game_system.score_count == 4"],

[animation here]

[:end]

[:if,"$game_system.score_count == 5"],

[animation here]

[:end]

[:if,"$game_system.score_count != 1 && $game_system.score_count != 2 && $game_system.score_count != 3 && $game_system.score_count != 4 && $game_system.score_count != 5"],

[animation here]

[:end]

# let's assume negative value also exist :D. or we can just use > 5 as condition.

# but we can still use >5 and < 1 as condition.

# BUT if we want to use other beside number such as string / array. it would be not as easy as that.

 

 

 

btw. i already edit the ring so it support transparency. i create another sprite and put the ring bitmap on it.

currently working on equip / states can modify ring feature (it's quite complicated >.<). so i'll update it later after the feature finished.

 

for how the do ring method works. i'm not 100% understand it too. but here's the main layout of it.

basically it create two windows (1 ring window, 1 bar window). animate the bar using loop and waiting for key press. and inside the loop it increase a counter by the barspeed value. and when reach 360 it reset to 0 (360 is the magic number because it's circle. and circle have 360 degrees). when key pressed it will Check for the pixel color of the wedge where the bar positioned. and based on the  color. it will add the count variable (either good / bonus hit). the color get by looking at the wedge setting. comparing it with the current counter. if it's between a wedge start and stop. it will check again for strike (by calculating percentage). then based on the compare result it will know the color.

 

after certain rotation (this feature i added myself. original version only rotate once. so if you miss it then you don't have second chance). it will break the loop and return the result as it is.

 

it's OriginalWij Magic. my salute to him :D.

sorry if i'm not explaining it clearly. i understand the concept... but it's hard to explain. :D.

 

if you want to call the ring between sequence. maybe you can create :ring sequence that call:

SceneManager.scene.do_ring(ring setting here)

 

@dementika: do you want transparent wedge too? i already done that. but waiting until the equip/state change ring feature

finished first.

Edited by estriole

Share this post


Link to post
Share on other sites

I'm not able to use it right now (on mobile), but is it possible to run a common event if the wheels lands on a certain segment?

Share this post


Link to post
Share on other sites

Fortunatelly, I code my battle system in neat structures. So, I could make almost everything possible (self-proclaimed though ahaha...). It's not that hard. I figure out how to make nested if or even 'case' sequence soon in newest version. But the usage would be a bit different.

Also, I have a plan to make 'switch case' sequence is mainly because of your scripts :P

 

Here is the example sequence

10441309_10202265275941500_6176496887475

By using your script, you could make many branched sequences depends on the ring result :P

But yeah, the latest version isn't release yet lol.

 

Btw, I see that you only used Graphics.update and Input.update inside ring loop is mainly because you want to freeze the screen, don't you?

 

If you don't mind, may I change the code a bit? So actor idle animation still being played while ring is being evaluated. So, while character is casting magic, the wedge (what is the mean of 'wedge' in our language anyway?) also rotating. Of course it just an option you could disable anytime. If you look at my battle system in implementation section, there is a SEQUENCE_WHILE which wasn't made yet. But. I actually managed to make it works. So, it could be combined with this script I think :D

 

Great script!

 

Edit :
If you're curious about the latest version, I could send it by PM

Share this post


Link to post
Share on other sites

@ajnr:

if the ring called via event on map. you can just use conditional branch and check the variable result. you can assign variable that store the

ring result in the configuration. then based on that call the common event.

 

if the ring called via skill/item on battle. there's a turnarround way.

1) attach dummy common event to the skill/item that check the ring result variable. then call the real common event from there based on the result.

so the answer... yes it could be done.

 

@theo: that would be nice. :D. and by linking it to different sequence will make it cleaner too. (the example i made is rough and unclean :D).

 

for the Graphic.update and Input.update. it's needed for the ring to rotate and detect input. if you remove it the ring won't work.

but you can try modifying it. :D. it would be nice if the ring rotate while still casting.

 

edit: just notice your edit :D. i'll be glad too :D.

 

btw wedge means : "Irisan" in our language. remember math at school ? :D.

 

 

EDIT 2: wait theo, don't edit my scripts yet. i decide to change some portion of it (major changes). but it would be easier to blend with your battle system later.

 

now => grab setting from skill , call ring , store result all in same sequence

later => grab setting from skill, replace it if equip item/have states, mod if if equip item/have states, STORE it in a $game_system variables. before checking the item have <use_ring> notetags. then if have <use_ring> it will call the ring. else it doesn't call the ring. BUT the setting still saved. so... you can call ring later and use the parameter saved earlier between sequences.

 

tomorrow i'll update the script. please wait until then :D.

Edited by estriole

Share this post


Link to post
Share on other sites

Take your time. I also have to prepare the project to send it to you. Since there're so much messy include the code itself, maps, and the database. And I just got a 'little quest' to be done this night.

Share this post


Link to post
Share on other sites

updated the script to v 1.2 :D.

this is quite major update:

 

 

>     change how the ring drawn so you can use the transparent
       color for wedge without seeing behind the ring.
>     add configuration for ring z value
>     dispose the ring image correctly instead hiding it only
>     Bugfix enemy cannot damage the actor
>     change setting symbol :barspeed to :bar_speed so it match :add_wedge,etc
>     compatibility with Theo SBS
       split the "ring setting grab" and "ring call". then save it
       so we can use it in the middle of attack (if using Theo  SBS)

>     remove the <anim_first> notetags for now. (might add it later)
>     add ring setting replace and ring setting mod feature
       actor / class / equipment / states can affect ring settings
       replace can only used once (priority: states > equip > class > actor)
       while mod stacks.
>     add $imported["EST - RING SYSTEM"] variable for other scripter to make compatibility patch.
>     change the Graphic.update and Input.update to update_basic.
       so the scene not freeze. more compatible with victor animated battle and Theo SBS now.

 

 

warning! i change the :barspeed to :bar_speed. to match the other notetags setting format such as :no_strike, :add_wedge, etc.

 

@theo: now the idle animation shown when the ring show. it's just by replacing Graphic.update with update_basic.

before it's even more noticeable when using Victor animated battle. since victor handled the order differently. it got ugly. hero a step forward. show ring. execute damage. hero a return. in the middle of hero a return. hero b ring show and hero a freeze until the ring finished. then continue to return. now it's better. the movement still executed while the ring show.

 

second thing. now i saved all the ring setting inside $game_system.ring_setting at the start of def use_item

(means it can be use between sequences)

and i create a Scene_Base method

do_ring_auto that will load the ring based on the saved settings.

evaluate_ring_auto that will evaluate the ring miss, null evade, crit based on the result.

 

i separate the process in case in future there's a use for that.

 

so you can create sequence that call:

SceneManager.scene.do_ring_auto
SceneManager.scene.evaluate_ring_auto

then do something like this: (maybe)

ex: move forward. call ring A. it affect that sequence hits only. move back, call ring B. it affect the next sequence only.

 

edit: that remind me... above cannot be done yet... i guess i need to create method to reset the miss/null evade/crit variables only.

since there's a possibility that the variable not changed. thus will use the last setting. i'll add it in next version. maybe later in afternoon.

Edited by estriole

Share this post


Link to post
Share on other sites

Lol, you got me. I also have a plan to change it to update_basic. But you have done it

 

The pastebin isn't updated yet. But I guess, the demo is it.

Well, am I suppose to download the demo once again? :/

 

Also, is there any way to check whether the ring is active or not?

I want to make something like this in battle system

[:while, "$game_system.ring_active?", "CastPose"],

Share this post


Link to post
Share on other sites

gommenasai... i forgot updating the pastebin :D.

anyway i'm updating all to 1.3 instead.

update content 1.3:

 v1.3 2014.06.14     >     add $game_system.ring_active to check the ring currently running or not.
                                >     add method to reset ring miss/crit/null evade.
 
you can use $game_system.ring_active
(without ? :D). it will return true when the ring active. else will return false
 
pastebin already updated too :D. sorry for trouble.
Edited by estriole

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×
Top ArrowTop Arrow Highlighted