Jump to content
Sign in to follow this  
Jolt Android

Dual Wield Seperate Attacks: features (elemental, status, etc.)

Recommended Posts

https://www.dropbox.com/s/2m8ux25wl75qx3f/Fate%20Besieged%202_11_2016%208_35_07%20PM.mp4?dl=0

 

Here's a video. This is with the script.

The damage dealt seems like it's like this: WEAPON1 + WEAPON2, WEAPON1 + WEAPON2 (the big damage is from the lightning claw which the vampire is weak to)

 

This is with the very old script. The damage is only from the first, non-lightning weapon in WEAPON1.

 

https://www.dropbox.com/s/ksx509t31v8knwk/Fate%20Besieged%202_11_2016%208_39_59%20PM.mp4?dl=0

 

EDIT: This is without any script. Seems like it's getting the lightning damage twice.

 

https://www.dropbox.com/s/56pbyhaa7cp9muv/Fate%20Besieged%202_11_2016%208_46_05%20PM.mp4?dl=0

Edited by Jolt Android

Share this post


Link to post
Share on other sites

Ok I think I got it this time so first remove the previous scripts I gave then look for this part of dhoom script 
 

 #--- Target Actions ---
    actions_list = item.target_actions_list
    actions_list = weapon.target_actions_list if w_action && weapon.valid_actions?(:target)
    if attack && @subject.dual_attack?
      actions_list2 = item.target_actions_list2
      perform_actions_list(actions_list, [targets[0]])
      perform_actions_list(actions_list2, [targets[1]])
    else
      targets.each { |target| 
        next if target.dead?
        perform_actions_list(actions_list, [target])
      }
    end

and replace the part between if and else by this : 

if attack && @subject.dual_attack?
	
		
	
		actions_list1 = actions_list
		actions_list2 = item.target_actions_list2
		
		weapon_list = @subject.weapons
		
		weapon_list.each_with_index { |weapon,i| #for every weapon
			
			#Remove weapons not being used to attack        
			weapon_list.each_index{ |j|
				@subject.change_equip(j, nil) if i != j
			}
			#Perform attack	(original method end)
			str = sprintf("actions_list%d",i+1)
			perform_actions_list(eval(str), [targets[i]])
			
			#Replace weapons not being used to attack
			weapon_list.each_index{ |j|
				@subject.change_equip(j, weapon_list[j]) if i != j
			}
		}  
				
    else

 You can put the dhoom part into comment if you want a backup

Edited by Shiggy

Share this post


Link to post
Share on other sites

yes this 

else
      targets.each { |target| 
        next if target.dead?
        perform_actions_list(actions_list, [target])
      }
    end
# Follow Actions -----------

but you don't need to change that

Edited by Shiggy

Share this post


Link to post
Share on other sites

Ah okay, just because you said to comment that part out after else. I'll keep it then and try it out.

Share this post


Link to post
Share on other sites

It looks good, but there's a problem with the damage dealt. Here's a video:

 

The poison claw should do 600-750 damage but seems to do double (as though it has the lightning attribute which the vamp is weak to), it doesn't poison, however these enemies are immune to it. Maybe I should try again on an enemy that can be poisoned.

 

https://www.dropbox.com/s/140lav0sbryt07g/Fate%20Besieged%202_11_2016%209_35_45%20PM.mp4?dl=0

 

edit: it seems the features are combined. So in this example, weapon 1 = lightning claw, weapon 2 = poison claw, now is weapon 1: lightning/poison claw, weapon 2 lightning/poisson claw

Edited by Jolt Android

Share this post


Link to post
Share on other sites

You should run a battle test with precise values  like one claw has 0 atk , the other 100 atk and you put just atk * 1 in damage formula with 0 variance,certain hit and no critical

 

I use that kind of setup to test my script

Edited by Shiggy

Share this post


Link to post
Share on other sites

Okay, did so. first 1 claw had 0 attack power, the second claw had 500 attack power. I was doing 675 with each hand.

Share this post


Link to post
Share on other sites

so basically the script doesn't work....

Could you send a demo ? I could test more stuff but there are more blind guesses than actual ideas

Share this post


Link to post
Share on other sites

I think the issue might be the Hime Skill Links script, which overwrites some methods...

If I place your script below it there's issues though.

 

I can send you a demo. It's kind of big but I'll try to shrink it down.

Lucky you, you get the unencrypted version ^_^

 

https://www.dropbox.com/s/090z3sn9wgmfbf7/Project%20Zero%21.7z?dl=0

Edited by Jolt Android

Share this post


Link to post
Share on other sites

I did no changes and I have almost no animation and only one hit when I attack
I'm running battle tests , but did I need to do something special ?

 

Also I may have found why my script that disable smooth targeting didn't work

Edited by Shiggy

Share this post


Link to post
Share on other sites

Yeah, I think I broke something by editing some things and moving stuff around. I will send you the last known good copy of my scripts that I'm using in my project right now.

 

https://www.dropbox.com/s/dw2o5f32obiut7p/Scripts.rvdata2?dl=0

 

this script doesn't have the changes you made to Dhoom's Dual Wield Fix though, and you will have to disable the Lytanathan dual wield script.

Edited by Jolt Android

Share this post


Link to post
Share on other sites

I got it , my code was good but it was overwritten by another stuff ,it seems to work . I will explain you the stuff tomorrow,I'm too tired

Share this post


Link to post
Share on other sites

No problem, I'm going to bed now too... really late over here

 

Thanks again for all your help.. I know my project is a mess in terms of scripts T-T

Share this post


Link to post
Share on other sites

Ok so first I commented out Tsukihime parameter tables, attack wasn't updating properly with it and i wasn't able to test if weapon damage was working

 

Then the change you did inside dhoom script,you must do it inside Hime skill links instead.

 

I also get  rid of Lytanathan script 

 

For the smooth targeting , there is an incompatibility with the last method in the various fixes script so remove it and use this instead ( i included the random enemy self targeting in it )

 

 

 

=begin
#===============================================================================
Title: Smooth Targeting
Author: Shiggy
Date: Jan 22, 2016
Thanks to CookieNinja for the idea
--------------------------------------------------------------------------------
** Change log
-Feb 11, 2016
Fixed an issue when targeting ally in the wrong life state
Feb 10, 2016
-Added option to choose which skill has smooth targeting disabled
Jan 22, 2016
- Initial release of the header to the script
--------------------------------------------------------------------------------
** Terms of Use
* Free to use in non-commercial projects
* Commercial uses
  * Ask permission
  * This is a small script so I won't charge for it
  * I may ask a free copy of your game 
  * I may ask for other stuff like the right to use some assets
* Will do bug fixes
* Compatibility patches may be requested but no guarantees 
* Please report any compatibility issues anyway
* Features may be requested but no guarantees, especially if it is non-trivial
* Credits to Shiggy in your project
* Preserve this header
* Be nice to other people ( I don't want mean people to use my scripts)

--------------------------------------------------------------------------------
** Description

Smooth targeting is what prevent the player to attack a dead enemy
or heal a dead target.
This script let you disable it , this will only work for party members 
and not for enemies so it doesn't mess with enemy AI. 

--------------------------------------------------------------------------------
** Usage

If you put Enemy = false attacks towerds enemies won't be redirected if the enemy die
If you put Ally = false you will be able to freely target dead and alive party members

Put <disable_smooth_targeting> in the notebox of a skill if you don't want this skill to use smooth targeting

--------------------------------------------------------------------------------
** Installation

Place this script below Materials and above Main

#===============================================================================
=end



module SmoothTargeting
  
  Enemy = true #when set to false if an enemy is killed before an attack reach him,the attack won't be redirected
  Ally = true   #when set to false skills/items can target noth alive and dead members
  
end


class RPG::UsableItem
	def smooth_skill
		a = note.scan(/<\s*(disable[ -_]smooth[ -_]targeting)\s*>/)
		if a != []
			smooth = false
		else
			smooth = true
		end
		return smooth
	end

end


class Game_Action

  #--------------------------------------------------------------------------
  # * Targets for Opponents
  #--------------------------------------------------------------------------
  def targets_for_opponents
    
    player_subject = subject.actor? ? true : false
    smooth = !player_subject || (SmoothTargeting::Enemy && item.smooth_skill)
    
    
    if item.for_random?
      Array.new(item.number_of_targets) { opponents_unit.random_target }
    elsif item.for_one?
      num = 1 + (attack? ? subject.atk_times_add.to_i : 0)
      if @target_index < 0
        [opponents_unit.random_target] * num
      else
        [opponents_unit.smooth_target(@target_index,smooth)] * num
      end
    else
      opponents_unit.alive_members
    end
    
  end

  #--------------------------------------------------------------------------
  # * Targets for Allies
  #--------------------------------------------------------------------------
  def targets_for_friends
    
    player_subject = subject.actor? ? true : false
    smooth = !player_subject || (SmoothTargeting::Ally && item.smooth_skill)
    
    if item.for_user?
      [subject]
    elsif item.for_dead_friend?
      if item.for_one?
        [friends_unit.smooth_dead_target(@target_index,smooth)] 
      else
        friends_unit.dead_members
      end
    elsif item.for_friend?
      if item.for_one?
         if @target_index < 0
		  [friends_unit.random_target]
         else
             [friends_unit.smooth_target(@target_index,smooth)] 
         end
      else
        friends_unit.alive_members
      end
    end
    
  end
  
end

class Game_Unit 

  #--------------------------------------------------------------------------
  # * Smooth Selection of Target
  #--------------------------------------------------------------------------
  def smooth_target(index,enabled = true )
    member = members[index]
    if member
      if !enabled || member.alive?
        return member
      end
    end
    return alive_members[0]
  end
  #--------------------------------------------------------------------------
  # * Smooth Selection of Target (K.O.)
  #--------------------------------------------------------------------------
  def smooth_dead_target(index, enabled = true)
    member = members[index]
    if member
      if !enabled || member.dead?
        return member
      end
    end
    return dead_members[0]
  end
end

class Game_Battler < Game_BattlerBase
def item_test(user, item)
	
	if (SmoothTargeting::Ally && item.smooth_skill && item.for_one?)
		return false if item.for_dead_friend? != dead?
	end
    return true if $game_party.in_battle
    return true if item.for_opponent?
    return true if item.damage.recover? && item.damage.to_hp? && hp < mhp
    return true if item.damage.recover? && item.damage.to_mp? && mp < mmp
    return true if item_has_any_valid_effects?(user, item)
    return false
  end
 end

 

 

Share this post


Link to post
Share on other sites

Alright that sounds great. I will need to find a way to keep the part of the parameter table script that reads data from .csv files for the character stats though since that's absolutely crucial to my project. Hopefully I can make that work smoothly... You are so awesome Shiggy!

 

EDIT: I just moved the parameters table script above this one, and it works!! I also commented out more stuff from the script that I don't use, maybe that also helped. Yay!! Enfin.

Thanks so much Shiggy, I think we can close this thread.

Edited by Jolt Android

Share this post


Link to post
Share on other sites
Look for 
 when "WEAPON2"
      symbol = :weapon2
      attachment = :hand1
 
 
in dualweild fix and change
 symbol = :weapon2
into
 symbol = :weapon1

Share this post


Link to post
Share on other sites

This is great for regular attacks, but now anytime I have symphony tags that call upon weapon2, it will show weapon 1 :(

Share this post


Link to post
Share on other sites

But what about your fix (replacing actions_list2 with actions_list1 ), does it not work?

Edited by Shiggy

Share this post


Link to post
Share on other sites

This plus the the extra fix I made does work for regular attacks, but the special attack that uses symphony tags seems to rely on the meaning of weapon1 and weapon2, if I redefine weapon2 to be weapon1 it does it everywhere. This is great for the regular attack that automatically switches out the weapons, but for special attacks that I have to manually specify which weapon icon is shown, it now only shows weapon1 (since weapon2 is now also weapon1). I hope you understand what I mean xD

Edited by Jolt Android

Share this post


Link to post
Share on other sites

Have you tried to keep your fix and revert mine ,it should work fine

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
Top ArrowTop Arrow Highlighted