Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

a bit of help with cogwheel rtab

well i am using the rtab of cogwheel minkoff and DerVVulfman but is a bit hard to do some thigs an i dont know if i am going the right way or i took a wrong turn

i want if somebody could explain me
Code:
def def make_skill_action_result(battler, plus_id)
    # Acquiring skill
    @skill = $data_skills[battler.current_action.skill_id + plus_id]
    # Verification whether or not it is cooperation skill
    speller = synthe?(battler)
    # Applying the effect of skill
    for target in battler.target
      if speller != nil
        damage = 0
        effective = false
        state_p = []
        state_m = []
        d_result = false
        for spell in speller
          if spell.current_action.spell_id != 0
            @skill = $data_skills[spell.current_action.spell_id + plus_id]
          end
          effective |= target.skill_effect(spell, @skill)
          if target.damage[spell].class != String
            d_result = true
            damage += target.damage[spell]
          elsif effective
            effect = target.damage[spell]
          end
          state_p += target.state_p[spell]
          state_m += target.state_m[spell]
          target.damage.delete(spell)
          target.state_p.delete(spell)
          target.state_m.delete(spell)
        end
        if d_result
          target.damage[battler] = damage
        elsif effective
          target.damage[battler] = effect
        end
        target.state_p[battler] = state_p
        target.state_m[battler] = state_m
      else
      end
    end
  end

what is speller
what is spell
what is state_p[battler]
what is state_m[battler]
what is target.damage[spell]

also in other note is there any special way to show animations in battle in the middle of the rtab? i mean show an animation to an especially made script for the rtab
 
You'd know I'd show up, eh?

The spell/speller material is in the base RTAB system, though it was implemented so the 'Cooperative Skills' system could be used. It allows two or more attackers to combine their attacks to form a more powerful (or weaker?) attack.

Speller are the actual battlers using a combined skill. When the speller = synthe?(battler) routine is called, it checks to see if there are any battlers whos skills are combined to make a good 'combined skill attack', otherwise it returns 'nil' and doesn't perform the action. So if Aluxes and Basil cast spells that turn out to form a 'combined' attack, their stats are used.

Spell is the value of the actual 'individual' battlers involved in making a combined skill attack. So if Aluxes and Basil make a combined attack, then this reads their battler data.

State_p and state_m relate to the Plus State effect (status effects like 'Stun', 'venom', etc) and how they affect the target... applied/removed and whether the target can guard against harmful effects.

Target.damage is the damage sustained by the target.

Based on the Interpreter class, Cogwheel used battler rather than @active_battler to isolate each individual battler's stats while the system allows overlapping actions... thus preventing actor data to switch accidentally.

Likewise, using for target in battler.target rather than for target in @target_battlers isolates each 'hit' to each target based on each attacker... complex.

* - * - * - * - *

Sure... I guess.
 
i knew you probably appear here, i really like how it looks this rtab even if is hard to mesh some scripts thank you for the explanation probably i wont advance my new script but is nice to see how it works the rtab
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top