Sideview Battle System Tankentai XP - Version 2.2xp

Atoa wrote:
No idea.
My first priority now is the ACBS.
So only after i relase the ACBS full (or at last ACBS RC1 xD) i will work on the Tankentai again.



thank you for your reply Atao.
Well i must worth even less than a brainless monkey then, i guess, but i have been unable to extract only
the 2 hands - dual weapon add-on from the AAS and use it alone in a new script.

i will wait for your work, thank you.
mageone wrote:
thank you for your reply Atao.
Well i must worth even less than a brainless monkey then, i guess, but i have been unable to extract only
the 2 hands - dual weapon add-on from the AAS and use it alone in a new script.

i will wait for your work, thank you.

lol, the signature has nothing with what you said...
Hello Atoa,
I am using your script. It nice script.
but when I used your script with multiattack script
(KGC's Script), my game was error.
Image

This is KGC script:
  1. #_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
  2. #_/    ◆ 多段攻撃 - KGC_MultiAttack ◆
  3. #_/    ◇ Last update : 2007/12/19 ◇
  4. #_/----------------------------------------------------------------------------
  5. #_/  複数回効果を適用する行動を作成します。
  6. #_/============================================================================
  7. #_/  ≪ダメージ数値改造[DamageAlter]≫より下
  8. #_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
  9.  
  10. #==============================================================================
  11. # ★ カスタマイズ項目 ★
  12. #==============================================================================
  13.  
  14. module KGC
  15.   # ◆攻撃判定用SEファイル名
  16.   #  (大文字・小文字は問わない。拡張子不要)
  17.   MATK_HIT_SE = "_multi_attack"
  18.   # ◆多段攻撃時、1Hitごとにステータスウィンドウを再描画
  19.   #  (無駄に重いので、高速化ACB以外では使用しない方が無難)
  20.   MATK_HIT_REFRESH = false
  21.   # ◆ダメージ表示が終わるまで待つ
  22.   #  true にすると、ダメージ表示が終わるまで次のバトラーが行動しない。
  23.   MATK_WAIT_DAMAGE_EFFECT = false
  24.  
  25.   # ◆合計ダメージ表示
  26.   #  合計ダメージを逐次表示。
  27.   MATK_SHOW_TOTAL_DMG = true
  28.   # ◆前のダメージ表示を消去
  29.   #  前回のダメージを消去してから次のダメージ表示を出す。
  30.   MATK_DELETE_PREV_DMG = false
  31.  
  32.   # ◆ダメージ表示をずらす
  33.   #  前回のダメージ表示から少しずれた位置に次のダメージ表示を出す。
  34.   MATK_SHIFT_DMG_POS = true
  35.   # ◆ダメージ表示のずれの大きさ
  36.   #  正にすると下方向、負にすると上方向にずれる。
  37.   MATK_SHIFT_DMG_POS_AMT = -4
  38.  
  39.   # ◆ヒット数表示
  40.   MATK_SHOW_HIT_COUNT = true
  41.   # ◆ヒット数の表示位置 [x, y]
  42.   #  ダメージ表示の位置からの相対座標。
  43.   MATK_HIT_COUNT_POS = [0, -48]
  44.   # ◆ヒット数の書式
  45.   #  【{n}…ヒット数】
  46.   MATK_HIT_COUNT_FORMAT = "{n} Hits"
  47.   # ◆ヒット数の文字色
  48.   MATK_HIT_COUNT_COLOR = Color.new(0, 200, 255)
  49.   # ◆ヒット数のフォント
  50.   MATK_HIT_COUNT_FONT_NAME   = ["EucrosiaUPC"]  # フォント名
  51.   MATK_HIT_COUNT_FONT_SIZE   = 40    # サイズ
  52.   MATK_HIT_COUNT_FONT_BOLD   = true  # 太字
  53.   MATK_HIT_COUNT_FONT_ITALIC = false  # 斜体
  54. end
  55.  
  56. #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★
  57.  
  58. $imported = {} if $imported == nil
  59. $imported["MultiAttack"] = true
  60.  
  61. #==============================================================================
  62. # ■ Game_Battler (分割定義 1)
  63. #==============================================================================
  64.  
  65. class Game_Battler
  66.   attr_accessor :prev_hp, :prev_sp
  67.   #--------------------------------------------------------------------------
  68.   # ● オブジェクト初期化
  69.   #--------------------------------------------------------------------------
  70.   alias initialize_KGC_MultiAttack initialize
  71.   def initialize
  72.     initialize_KGC_MultiAttack
  73.  
  74.     @prev_hp = nil
  75.     @prev_sp = nil
  76.   end
  77. end
  78.  
  79. #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★
  80.  
  81. #==============================================================================
  82. # ■ Sprite_Battler
  83. #==============================================================================
  84.  
  85. class Sprite_Battler < RPG::Sprite
  86.   #--------------------------------------------------------------------------
  87.   # ● オブジェクト初期化
  88.   #--------------------------------------------------------------------------
  89.   alias initialize_KGC_MultiAttack initialize
  90.   def initialize(viewport, battler = nil)
  91.     initialize_KGC_MultiAttack(viewport, battler)
  92.  
  93.     @_damage_sprite_array = []
  94.     @_damage_duration_array = []
  95.     @_damage_direct_type_array = []
  96.     @_latest_damage_sprite = nil
  97.     @_hit_count_sprite = RPG::Sprite.new
  98.     @_hit_count_sprite.bitmap =
  99.       Bitmap.new(160, KGC::MATK_HIT_COUNT_FONT_SIZE * 3 / 2)
  100.     reset_hit_count
  101.   end
  102.   #--------------------------------------------------------------------------
  103.   # ● 解放
  104.   #--------------------------------------------------------------------------
  105.   alias dispose_KGC_MultiAttack dispose
  106.   def dispose
  107.     @_damage_sprite_array.each_index { |i| dispose_damage(i) }
  108.     @_hit_count_sprite.bitmap.dispose
  109.     @_hit_count_sprite.dispose
  110.  
  111.     dispose_KGC_MultiAttack
  112.   end
  113.   #--------------------------------------------------------------------------
  114.   # ● 多段ヒット判定
  115.   #--------------------------------------------------------------------------
  116.   def multi_attack?
  117.     if @_multi_attack
  118.       @_multi_attack = false
  119.       return true
  120.     end
  121.     return false
  122.   end
  123.   #--------------------------------------------------------------------------
  124.   # ● ヒットカウント加算
  125.   #--------------------------------------------------------------------------
  126.   def add_hit_count
  127.     @_hit_count += 1
  128.     if KGC::MATK_SHOW_HIT_COUNT
  129.       refresh_hit_count_sprite
  130.     end
  131.   end
  132.   #--------------------------------------------------------------------------
  133.   # ● ヒットカウント初期化
  134.   #--------------------------------------------------------------------------
  135.   def reset_hit_count
  136.     @_hit_count = 0
  137.     if KGC::MATK_SHOW_HIT_COUNT
  138.       refresh_hit_count_sprite
  139.     end
  140.   end
  141.   #------------------------------------------------------------------------
  142.   # ● ダメージスプライト作成
  143.   #------------------------------------------------------------------------
  144.   def damage(value, critical)
  145.     @_damage_sprite_array.compact!
  146.     @_damage_duration_array.compact!
  147.     @_damage_direct_type_array.compact!
  148.     super
  149.     sprite = RPG::Sprite.new
  150.     sprite.bitmap = @_damage_sprite.bitmap.dup
  151.     sprite.ox = @_damage_sprite.ox
  152.     sprite.oy = @_damage_sprite.oy
  153.     sprite.x = @_damage_sprite.x
  154.     sprite.y = @_damage_sprite.y
  155.     if KGC::MATK_SHIFT_DMG_POS
  156.       sprite.y += @_damage_sprite_array.size * KGC::MATK_SHIFT_DMG_POS_AMT
  157.     end
  158.     sprite.z = @_damage_sprite.z
  159.     @_damage_sprite_array.unshift(sprite)
  160.     @_damage_duration_array.unshift(40)
  161.     @_damage_direct_type_array.unshift(@_damage_direct_type)
  162.     @_latest_damage_sprite = sprite
  163.     dispose_damage
  164.   end
  165.   #--------------------------------------------------------------------------
  166.   # ● ダメージスプライト破棄
  167.   #--------------------------------------------------------------------------
  168.   def dispose_damage(index = -1)
  169.     if index >= 0 && @_damage_sprite_array[index] != nil
  170.       if @_latest_damage_sprite == @_damage_sprite_array[index]
  171.         @_latest_damage_sprite = nil
  172.       end
  173.       @_damage_sprite_array[index].bitmap.dispose
  174.       @_damage_sprite_array[index].dispose
  175.       @_damage_sprite_array[index] = nil
  176.       @_damage_duration_array[index] = nil
  177.       @_damage_direct_type_array[index] = nil
  178.     else
  179.       super()
  180.     end
  181.   end
  182.   #--------------------------------------------------------------------------
  183.   # ● ダメージスプライトクリア
  184.   #--------------------------------------------------------------------------
  185.   def clear_damage
  186.     @_damage_sprite_array.each_index { |i|
  187.       dispose_damage(i)
  188.     }
  189.     @_damage_sprite_array.compact!
  190.     @_damage_duration_array.compact!
  191.     @_damage_direct_type_array.compact!
  192.   end
  193.   #------------------------------------------------------------------------
  194.   # ● ヒットカウントスプライト再描画
  195.   #------------------------------------------------------------------------
  196.   def refresh_hit_count_sprite
  197.     img = @_hit_count_sprite.bitmap
  198.     img.clear
  199.     if @_hit_count > 1
  200.       img.font.name = KGC::MATK_HIT_COUNT_FONT_NAME
  201.       img.font.size = KGC::MATK_HIT_COUNT_FONT_SIZE
  202.       img.font.bold = KGC::MATK_HIT_COUNT_FONT_BOLD
  203.       img.font.italic = KGC::MATK_HIT_COUNT_FONT_ITALIC
  204.       img.font.color = KGC::MATK_HIT_COUNT_COLOR
  205.       format = KGC::MATK_HIT_COUNT_FORMAT.gsub(/{n}/i) {"#{@_hit_count}"}
  206.       img.draw_frame_text(0, 0, img.width, img.height, format, 1)
  207.     end
  208.   end
  209.   #--------------------------------------------------------------------------
  210.   # ● アニメーション実行タイミング
  211.   #--------------------------------------------------------------------------
  212.   def animation_process_timing(timing, hit)
  213.     if (timing.condition == 0) || (timing.condition == 1 && hit) ||
  214.        (timing.condition == 2 && !hit)
  215.       if timing.se.name != ""
  216.         @_multi_attack |= (timing.se.name.upcase == KGC::MATK_HIT_SE.upcase)
  217.       end
  218.     end
  219.     super
  220.   end
  221.   #--------------------------------------------------------------------------
  222.   # ● エフェクト中判定
  223.   #--------------------------------------------------------------------------
  224.   if KGC::MATK_WAIT_DAMAGE_EFFECT
  225.   unless defined?(INITIALIZED_MULTI_ATTACK)
  226.     alias effect_KGC_MultiAttack? effect?
  227.   end
  228.   INITIALIZED_MULTI_ATTACK = true
  229.   def effect?
  230.     result = false
  231.     @_damage_duration_array.each { |duration|
  232.       result |= (duration > 0)
  233.     }
  234.     return result || effect_KGC_MultiAttack?
  235.   end
  236.   end
  237.   #--------------------------------------------------------------------------
  238.   # ● フレーム更新
  239.   #--------------------------------------------------------------------------
  240.   alias update_KGC_MultiAttack update
  241.   def update
  242.     @_multi_attack = false if Graphics.frame_count % 2 == 0
  243.  
  244.     update_KGC_MultiAttack
  245.  
  246.     if @_damage_sprite_array.size > 0
  247.       @_damage_sprite_array.each_with_index { |sp, i|
  248.         if sp == nil
  249.           next
  250.         end
  251.         if @_damage_duration_array[i] == 0
  252.           dispose_damage(i)
  253.           next
  254.         end
  255.         @_damage_duration_array[i] -= 1
  256.         sp.x = self.x
  257.         if $imported["DamageAlter"]
  258.           @_damage_direct_type = @_damage_direct_type_array[i]
  259.           damage_direct(sp, @_damage_duration_array[i])
  260.         else
  261.           case @_damage_duration_array[i]
  262.           when 38..39
  263.             sp.y -= 4
  264.           when 36..37
  265.             sp.y -= 2
  266.           when 34..35
  267.             sp.y += 2
  268.           when 28..33
  269.             sp.y += 4
  270.           end
  271.           sp.opacity = 256 - (12 - @_damage_duration_array[i]) * 32
  272.         end
  273.       }
  274.       if KGC::MATK_SHOW_HIT_COUNT && @_latest_damage_sprite != nil
  275.         update_hit_count_sprite
  276.       end
  277.     end
  278.     @_damage_sprite_array.compact!
  279.     @_damage_duration_array.compact!
  280.   end
  281.   #------------------------------------------------------------------------
  282.   # ● ヒットカウントスプライト更新
  283.   #------------------------------------------------------------------------
  284.   def update_hit_count_sprite
  285.     sp = @_latest_damage_sprite
  286.     sp2 = @_hit_count_sprite
  287.     sp2.ox = sp.ox
  288.     sp2.oy = sp.oy
  289.     sp2.x = sp.x + KGC::MATK_HIT_COUNT_POS[0]
  290.     sp2.y = sp.y + KGC::MATK_HIT_COUNT_POS[1]
  291.     sp2.z = sp.z + 1
  292.     sp2.opacity = sp.opacity
  293.   end
  294. end
  295.  
  296. #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★
  297.  
  298. #==============================================================================
  299. # ■ Spriteset_Battle
  300. #==============================================================================
  301.  
  302. class Spriteset_Battle
  303.   #--------------------------------------------------------------------------
  304.   # ● スプライト取得
  305.   #--------------------------------------------------------------------------
  306.   def sprites
  307.     return (@enemy_sprites + @actor_sprites).compact
  308.   end
  309. end
  310.  
  311. #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★
  312.  
  313. #==============================================================================
  314. # ■ Scene_Battle (分割定義 1)
  315. #==============================================================================
  316.  
  317. class Scene_Battle
  318.   #--------------------------------------------------------------------------
  319.   # ● フレーム更新
  320.   #--------------------------------------------------------------------------
  321.   alias update_KGC_MultiAttack update
  322.   def update
  323.     update_multi_attack_effect
  324.  
  325.     update_KGC_MultiAttack
  326.   end
  327.   #--------------------------------------------------------------------------
  328.   # ● 多段攻撃更新
  329.   #--------------------------------------------------------------------------
  330.   def update_multi_attack_effect
  331.     attacker = ($imported["ActiveCountBattle"] ?
  332.       @action_battler : @active_battler)
  333.     if @phase4_step == 5 && @target_battlers != [] && attacker != nil
  334.       # ステータスウィンドウ再描画
  335.       if KGC::MATK_HIT_REFRESH
  336.         @status_window.refresh
  337.       end
  338.       @spriteset.sprites.each { |sp|
  339.         # 多段ヒット判定
  340.         unless sp.multi_attack? && @target_battlers.include?(sp.battler)
  341.           next
  342.         end
  343.         if KGC::MATK_DELETE_PREV_DMG
  344.           sp.clear_damage
  345.         end
  346.  
  347.         # 合計ダメージ更新
  348.         if @_matk_total_damage[sp.battler] == nil
  349.           @_matk_total_damage[sp.battler] = 0
  350.         end
  351.         if sp.battler.damage.is_a?(Numeric)
  352.           @_matk_total_damage[sp.battler] += sp.battler.damage
  353.         end
  354.  
  355.         if KGC::MATK_SHOW_TOTAL_DMG
  356.           # 合計を表示
  357.           sp.damage(@_matk_total_damage[sp.battler], sp.battler.critical)
  358.         else
  359.           # 逐次表示
  360.           sp.damage(sp.battler.damage, sp.battler.critical)
  361.         end
  362.  
  363.         # ヒット数更新
  364.         if KGC::MATK_SHOW_HIT_COUNT && sp.battler.damage.is_a?(Numeric)
  365.           sp.add_hit_count
  366.         end
  367.         # 効果を追加
  368.         case attacker.current_action.kind
  369.         when 0
  370.           if attacker.current_action.basic == 0
  371.             sp.battler.attack_effect(attacker)
  372.           end
  373.         when 1
  374.           skill = $data_skills[attacker.current_action.skill_id]
  375.           sp.battler.skill_effect(attacker, skill)
  376.         when 2
  377.           item = $data_skills[attacker.current_action.item_id]
  378.           sp.battler.item_effect(item)
  379.         end
  380.         # 元のHP/SPを更新
  381.         sp.battler.prev_hp = sp.battler.hp
  382.         sp.battler.prev_sp = sp.battler.sp
  383.       }
  384.     end
  385.   end
  386. end
  387.  
  388. #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★
  389.  
  390. #==============================================================================
  391. # ■ Scene_Battle (分割定義 4)
  392. #==============================================================================
  393.  
  394. class Scene_Battle
  395.   #--------------------------------------------------------------------------
  396.   # ● フレーム更新 (メインフェーズ ステップ 4 : 対象側アニメーション)
  397.   #--------------------------------------------------------------------------
  398.   alias update_phase4_step4_KGC_MultiAttack update_phase4_step4
  399.   def update_phase4_step4
  400.     @_matk_total_damage = {}
  401.     if KGC::MATK_SHOW_HIT_COUNT
  402.       @spriteset.sprites.each { |sp| sp.reset_hit_count }
  403.     end
  404.  
  405.     update_phase4_step4_KGC_MultiAttack
  406.   end
  407.   #--------------------------------------------------------------------------
  408.   # ● フレーム更新 (メインフェーズ ステップ 5 : ダメージ表示)
  409.   #--------------------------------------------------------------------------
  410.   alias update_phase4_step5_KGC_MultiAttack update_phase4_step5
  411.   def update_phase4_step5
  412.     # 多段ダメージ更新処理
  413.     @spriteset.sprites.each { |sp|
  414.       if @target_battlers.include?(sp.battler) &&
  415.           @_matk_total_damage[sp.battler] != nil &&
  416.           sp.battler.damage.is_a?(Numeric)
  417.         if KGC::MATK_SHOW_TOTAL_DMG
  418.           sp.battler.damage = @_matk_total_damage[sp.battler] + sp.battler.damage
  419.         end
  420.         if KGC::MATK_SHOW_HIT_COUNT
  421.           sp.add_hit_count
  422.         end
  423.       end
  424.     }
  425.  
  426.     update_phase4_step5_KGC_MultiAttack
  427.   end
  428. end
Expand to see the code.

Thank you very much :)
@the guy above: this script already has a way to make multiple attacks, without another script.
@ninemaruay
Sadly this script has one of the worst compatibility with other battle scripts.

But it have many features that replaces other scripts.
If an script don't work with the Tankentai, and you don't know about scripting, forget.

I suppose there's no one willing to fix these incompatibilities.
Atoa, how do you get rid of the CTB when your go into the Item menu. Image
In fact, there's no option for that by default.

Since in the default code the item/skill window stay below, and not on the center, i forget do add an option to hide the ctb window. .-.

My bad ;D

This will be fixed on the (i don't know when) update.

But, this can be relased before the Tankentai overall update, because i'm revising te code of all ACBS add-ons to make them compatible with ACBS, Tankentai and default system without needing any canges.
Okay, cool, I can wait then.
another question

Rajaat99(2) wrote:
Ok, first off, I'm must be stupid.
That being said, whenever I set a skill animation as 001:Special Move, it shows 002:Cast Magic animation instead.
I've looked through the code and I know I must be missing it. Can anyone help me, please?


Is there tutorial somewhere or something on this because I'm really confused about this part. I mean where do you change it in the script where certain moves won't use Cast Magic but something else that you set.
@bigace
The skill animation are set on the action sequence.

So you would need to make different Ations Sequence and assign them to the skills, what is quite advanced.
hi atoa,i have 2 question about your script
1. about the atb meter
2. about the error "uninitialized constant Scene_Battle" line 902
thank you before ^_^
Image
Image
@Mizuki
1. about the atb meter
It's you that must set the postion of the atb meter.
The bar is not automatically set to the same position as actor status display.

You should check *all* options of an add-on before ask, because there's one to set the position of the bar.

2. about the error "uninitialized constant Scene_Battle" line 902
Are you using Individual Battle Commands? If so you should put it above the ATB Script
okay i got it now, thanks..
@Mizuki
the error o line 902 stoped?
if not, send the ATB and IBC settings.
.
Hey i have an issue. Im trying to use the advanced stats script but everytime open the game, i get a syntax error on line 205. Help?

Heres the code line;

Image
@XaineC
You forget to close one of the Keys....

In your code it is:
Extra_Equips_ID = {6 => []

The correct is:
Extra_Equips_ID = {6 => []}

Also adding tow differents "Extra_Equips_ID" lines don't have any effect.

Isntead you must add all setings on one key, separated by coma.

Wrong:
Extra_Equips_ID = {5 => []}
Extra_Equips_ID = {6 => []}

Right:
Extra_Equips_ID = {5 => [], 6 => []}
haha. XP thank you.
Okay, new problem. After I open the Status screen, i get this error in my CMS:
Image

Here is the line in queston:
Image

From What i've figured, it's a problem involving theAdv. Stat System.

Edit: BTW here is the script you are seeing < http://rmrk.net/index.php/topic,34699.0.html >
The problem is incompatibility withi thecustom menu.

So it's up to you to fix that.

The only tip i can give to you is to try to put the menu above SBS tankentai, if that don't solve the issue you will need to find an way to fix that by yourself, or ask someone else.
.

This is what we refer to as a spam post: devoid of any worthwhile content. This is not acceptable. ~Perihelion
@Logan110
Who are you?
Why do you make these post without messages? ¬¬
I'm reporting you to moderation, if you don't have anything to say, please don't post.
Hello!
I love this battle system, but I have some problems with it.

I used to have in my game Rye's CBS, but it has several bugs so I decided to change it (my game is and advanced project right now), and I found this Atoa's CBS.

My problems are:
-It doesn't show characters' weapons!
-Damage is hardly ever displayed
-Hit animations show where they want!
-The most important... After the enemies end their turn, it freezes! I mean, allies' turn doesn't begin.

As I said, I love this Battle System, I've been testing it with the demo, and it works properly. But I have moved some scripts to my game and those problems appear.

Maybe some kind of incompatibility? I use 5 characters script by Raice (I've already adjusted that in SBS Config) FF Battle Result by David Schooley, and some scripts made by the project team, as a face window (yeah, already configurated too).

It would be nice to get some help! :thumb:
Thanks.


Edit:
Ok, that's it, I moved 5-Actor Party by Raice below Main, and it works as in the demo. The four problems are solved this way, but I need 5-Actor Party. I will look for another script and try it.
2nd edit: Blizzard Large Party works perfectly with this script :lol:

Who wants to make a compatibility script list for this CBS? I would help =D

Bye!
An compatibility list would help, this script has too many compatibilities.

If I were the original author of this script, i would do many things in an different way.
Hello Atoa^^

any news about updates ?
thanks !
@mageone
Like i said before to you, my prority is the ACBS, so until i'm done with the ACBS, there's no use asking for that.
Is there anyway to change the icon used in the throwing system?
@XaineC
Yes there is.
How do it? What about take a good look on the Actions Settings?
I'm sorry. I can't find any kind of hint to it. Some of the script script lines, I have no idea as to their meaning.


Image
Another question
Image
>_>
i think it has a relation with the battle back, because when i remove it, the battleback goes blank and when i use it, it's error..

Original thread: https://www.hbgames.org/forums/viewtopic.php?t=60521