Try this for convert damage effects:
Make an affix like this (for example):
105 => { :name => "Vampire's ", :color => Color.new(220,55,55), :convert_damage => [[:hp_physical,0.3],[:mp_physical,0.1]], :anticonvert => [:hp_magical,:mp_physical]}, 106 => { :name => " of the Leech", :color => Color.new(55,55,220), :convert_damage => [[:mp_magical,0.3]]},Now, go and find this line in the randomizer script:
Just above this line, paste this little piece of code:
Code:
if !affix[:convert_damage].nil? && !item.is_a?(RPG::Item) for conv_dmg in affix[:convert_damage] item.convert_dmg[conv_dmg[0]] = conv_dmg[1] end end if !affix[:anticonvert].nil? && !item.is_a?(RPG::Item) for anti_conv in affix[:anticonvert] item.anticonvert.push(anti_conv) end end
With this, the above affix setup with ID 105 would give 30% hp-drain effect, 10% mp-drain on physical attacks, and anti-convert effects for magical hp-drain effects and for physical mp-drain effects, and the affix with ID 106 would give 30% mp-drain effect on magical attacks.You can use :hp_physical, :mp_physical, :hp_magical and :mp_magical to determine the type of the drain effect.
The number in the affix setup is a float value, meaning 1 = 100%, 0.5 = 50%, 0.01 = 1% and so on.
I tested this on a few items and it works, so I guess it will work for you too.
I will try to add the anti-convert effects too withing a few minutes.
Edit: Added setup for anticonvert effects.
@Psycho
Never put in a lot of scripts at once into your project, that will make debugging an awfully painful job to do. Do it one by one, test the script properly, and if it did not return any errors, incompatibilities or non-functionalism, move on to the next one.
"Stack level too deep" means there is a script inserted multiple times in your project, or there are some methods aliased with the same name.
This is why you should put the scripts one by one instead of putting in many at the same time.