Jump to content
Rpg²S Forum

Elemental Merger


Holy87
 Share

Recommended Posts

Autore:

Craze

Descrizione:

Questo script permette di unire i bonus elementali. Nel normale combattimento, se un eroe ha come status Attacco Fuoco e colpisce un nemico debole a questo elemento con un attacco di lancia, viene fatta la media tra elemento Fuoco e attributo Lancia. Con questo script, il danno sarà in base all'elemento più forte, e nel caso ci siano due elementi di cui il nemico è debole, il danno sarà raddoppiato.

 

Istruzioni:

Installare lo script nella sezione Add-On dell'RGSS3.

 

 

#==============================================================================
#
# ▼ Craze's Script Asylum - Elemental Merger v1.00
# -- Last Updated: 2012.01.05
# -- Level: Normal, Hard
# -- Requires: n/a
#
#==============================================================================

$imported = {} if $imported.nil?
$imported["CRZ-ElementalMerger"] = true

#==============================================================================
# ▼ Updates
# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# 2012.01.05 - Finished Script
# 2012.01.04 - Started Script
#
#==============================================================================
# ▼ Introduction
# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# The RM* series has always had a particularly awful method of determining
# damage done when multiple elements are applied - all it does is take the best
# rate and apply it, even if the other elements are nullified!
#
# With this script, elemental damage will be merged proportionally, so that
# using a Soldier's hypothetical attack skills will also use that Soldier's
# inherent elements (from, say, his Fire Spear or an Infuse Ice status effect)
# and apply them ALL against a foe. If a foe is weak to both Piercing and Fire,
# they'll take even more damage than by default - but they'll take blended damage
# if they take double Piercing and half Fire damage.
#
# If you don't get it, know this: just plugging this script in will make
# your elemental equipment much more useful.
#
#==============================================================================
# ▼ Instructions
# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# To install this script, open up your script editor and copy/paste this script
# to an open slot below ▼ Materials/素材 but above ▼ Main. Remember to save.
#
# Edit the settings in the module below as you see fit.
#
#==============================================================================
# ▼ Compatibility
# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# This script is made strictly for RPG Maker VX Ace. It is highly unlikely that
# it will run with RPG Maker VX without adjusting.
#
# This script works with YEA Battle Engine Add-On: Elemental Popups without
# any adjustment on either end. The most damaging element's color will be used.
# There are also no issues with YEA Element Absorb.
#
# Overwritten methods:
#   Game_Battler
#	  item_element_rate
#
#==============================================================================

# default IS different based on your ele_merge settings
# odd relations with Yanfly Engine Ace - Battle Engine Add-On: Elemental Popups
# goes above Elemental Equipment

module CRZ
 module ELE_MERGE

#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
# - Weapon Element Settings -
#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
# Use these settings to dictate how the elements made inherent by actors,
# classes, weapons, equipment, states blends with your skills. Anything
# set to "true" below will add any inherent elements to that type of
# action (determined by "Hit Type" according to Esrever's translation)
#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
# Any action tagged as "Physical" will include user's attack elements
PHYS_ATK_ELEMENTS = true
# Any action tagged as "Magical" will include user's attack elements
MAGIC_ATK_ELEMENTS = false
# Any action tagged as "Guaranteed Hit" will include user's attack elements.
# This is normally used for buffs and healing, but can be used for any
# skill you want to completely penetrate all defenses.
CERT_ATK_ELEMENTS = true

# For some games, you might have elemental healing, or attack elements
# might be inherited simply due to CERT_ATK_ELEMENTS being true.
# If you do not want any healing ability to inherit elements, set to true.
IGNORE_RECOVERY = true


#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
# - Elemental Merging [Hard Mode] -
#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
# Pick the type of elemental merging or blending you wish for your game
# to use. This will take all potential elements and, instead of using the
# default mechanic of picking only the best rate, will merge the rates.
# Ignore this section if you want this happen, but don't dare touch
# the math.
#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
# 0: Default RMAce. Will find the best rate out of all potential elements
# 1: Addititive. If results are 100%, 150%, and 80%, the total will be 130%
#	  Ex.  100 + (100 - 100) + (150 - 100) + (80 - 100) = 130%
#	  Ex.  100 + (0 - 100) + (150 - 100) = 50%
# 2: Multiplicative. If results are 100%, 150%, and 80%,
#	  the total will be 120%
#	  Ex.  100 * (100 / 100) * (150 / 100) * (80 / 100) = 120%
#	  Ex.  100 * (0 / 100) * (150 / 100) = 0%
# 3: Multiplicative Psuedo-Null. If results are 100%, 150%, and 80%,
#	  the total will be 120%. Nulled (fully resisted) elements are
#	  used to divide overall damage done by 10 (RECOMMENDED)
#	  Ex.  100 * (100 / 100) * (150 / 100) * (80 / 100) = 120%
#	  Ex.  100 * ([0 + 10] / 100) * (150 / 100) = 15% (Default)
MERGE_TYPE = 3

# If you use MERGE_TYPE 3, nulled elements will divide overall damage done
# by this amount. Default is 10, but examples for other amounts are given
# below. Note that attacks with a single element, which is nulled, will
# deal 0 damage.
#	  Ex.  150% / [10] = 15% (Default)
#	  Ex.  150% / [20] = 7.5%
#	  Ex.  150% / [5] = 30%
#	  Ex.  150% / [3] = 50%
PSUEDO_NULL_AMT = 10

# This applies to all elemental merge types. When the final rate of damage
# is determined, it is checked against this percentage. If below this
# constant, the damage becomes 0. A value from 10-20 is recommended.
#	  Ex.  100% *  10% = [10% is <= 10%] = 0% (Default)
# If you do not wish to use this feature, set this constant to 0.
AUTO_NULL_PER = 10

 end # ELE_MERGE
end # CRZ

#==============================================================================
# ▼ Editting anything past this point may potentially result in causing
# computer damage, incontinence, explosion of user's head, coma, death, and/or
# halitosis so edit at your own risk.
#==============================================================================


#==============================================================================
# ■ Game_Battler
#==============================================================================

class Game_Battler

 #--------------------------------------------------------------------------
 # overwrite method: item_element_rate
 #--------------------------------------------------------------------------
 def item_element_rate(user, item)
return 1.0 if item.damage.recover? and CRZ::ELE_MERGE::IGNORE_RECOVERY
array = []
if !user.atk_elements.empty?
  array += user.atk_elements if item.physical? and CRZ::ELE_MERGE::PHYS_ATK_ELEMENTS
  array += user.atk_elements if item.magical? and CRZ::ELE_MERGE::MAGIC_ATK_ELEMENTS
  array += user.atk_elements if item.certain? and CRZ::ELE_MERGE::CERT_ATK_ELEMENTS
end
  
if item.damage.element_id >= 0
  array.push(item.damage.element_id)
end

return 1.0 if array.empty?

case CRZ::ELE_MERGE::MERGE_TYPE
when 1 # Additive
  rate = 1.0
  for i in array
	rate += element_rate(i) - 1.0
  end
when 2 # Multiplicative
  rate = 1.0
  for i in array
	rate *= element_rate(i)
  end
when 3 # Multiplicative Psuedo-Null
  rate = 1.0
  for i in array
	rate *= [element_rate(i),(CRZ::ELE_MERGE::PSUEDO_NULL_AMT / 100.0)].max
  end
else # Default (0)
  rate = elements_max_rate(user.array)
end
rate = 0 if rate <= (CRZ::ELE_MERGE::AUTO_NULL_PER / 100.0)
rate
 end

end # Game_Battler

#==============================================================================
#
# ▼ End of File
#
#==============================================================================

 

"Io non volevo solo partecipare alle discussioni. Volevo avere il potere di farle fallire" [cit.]

http://holyres.altervista.org/UserBoard/BannerOverdrive35.png
http://holyres.altervista.org/UserBoard/Cap3.png

http://www.indiexpo.net/signature/578.png

Miei script per RPG Maker VX Ace:


*NB Tutti i miei script sono protetti da licenza CC - BY http://i.creativecommons.org/l/by/3.0/88x31.png

Questa licenza permette a terzi di distribuire, modificare, ottimizzare ed utilizzare la tua opera come base, anche commercialmente, fino a che ti diano il credito per la creazione originale. Questa è la più accomodante delle licenze offerte. É raccomandata per la diffusione e l'uso massimo di materiali coperti da licenza.

 

 



I miei tutorial:


Come distribuire il gioco - e anche come creare un'installazione professionale!
RGSS in pillole - Guida completa e facile all'RGSS2 e RGSS3 per novizi ed esperti
Come mappare con VX (e VX Ace) - guida base all'uso degli strumenti del mapping
Loop delle musiche - come tagliarle in modo da far venire musiche continue senza interruzioni finali
Creare backup dei progetti - per evitare di uccidervi dopo un errore che ha fatto perdere tutto!

Link to comment
Share on other sites

Abbastanza tecnico come script! Uno ci deve proprio pensare a 'sta cosa! XD Comunque magari passa vede che è cosa buona ed inserisce :D

Iniziamo con gli scriptini :3

^ ^

(\_/)
(^ ^) <----coniglietto rosso, me!
(> <)


Il mio Tumblr dove seguire i miei progetti, i progetti della Reverie : : Project ^ ^

http://i.imgur.com/KdUDtQt.png disponibile su Google Play, qui i dettagli! ^ ^

http://i.imgur.com/FwnGMI3.png completo! Giocabile online, qui i dettagli! ^ ^

REVERIE : : RENDEZVOUS (In allenamento per apprendere le buone arti prima di cominciarlo per bene ^ ^) Trovate i dettagli qui insieme alla mia intervista (non utilizzerò più rpgmaker) ^ ^

 

SUWOnzB.jpg 🖤
http://www.rpg2s.net/dax_games/r2s_regali2s.png E:3 http://www.rpg2s.net/dax_games/xmas/gifnatale123.gif
http://i.imgur.com/FfvHCGG.png by Testament (notare dettaglio in basso a destra)! E:3
http://i.imgur.com/MpaUphY.jpg by Idriu E:3

Membro Onorario, Ambasciatore dei Coniglietti (Membro n.44)

http://i.imgur.com/PgUqHPm.png
Ufficiale
"Ad opera della sua onestà e del suo completo appoggio alla causa dei Panda, Guardian Of Irael viene ufficialmente considerato un Membro portante del Partito, e Ambasciatore del suo Popolo presso di noi"


http://i.imgur.com/TbRr4iS.png<- Grazie Testament E:3
Ricorda...se rivolgi il tuo sguardo ^ ^ a Guardian anche Guardian volge il suo sguardo ^ ^ a te ^ ^
http://i.imgur.com/u8UJ4Vm.gifby Flame ^ ^
http://i.imgur.com/VbggEKS.gifhttp://i.imgur.com/2tJmjFJ.gifhttp://projectste.altervista.org/Our_Hero_adotta/ado2.png
Grazie Testament XD Fan n°1 ufficiale di PQ! :D

Viva
il Rhaxen! <- Folletto te lo avevo detto (fa pure rima) che non
avevo programmi di grafica per fare un banner su questo pc XD (ora ho di
nuovo il mio PC veramente :D)

Rosso Guardiano della
http://i.imgur.com/Os5rvhx.png

Rpg2s RPG BY FORUM:

Nome: Darth Reveal

 

PV totali 2
PA totali 16

Descrizione: ragazzo dai lunghi capelli rossi ed occhi dello stesso colore. Indossa una elegante giacca rossa sopra ad una maglietta nera. Porta pantaloni rossi larghi, una cintura nera e degli stivali dello stesso colore. E' solito trasportare lo spadone dietro la schiena in un fodero apposito. Ha un pendente al collo e tiene ben legato un pezzo di stoffa (che gli sta particolarmente a cuore) intorno al braccio sinistro sotto la giacca, copre una cicatrice.
Bozze vesti non definitive qui.

Equipaggiamento:
Indossa:
60$ e 59$ divisi in due tasche interne
Levaitan

Spada a due mani elsa lunga

Guanti del Defender (2PA)
Anello del linguaggio animale (diventato del Richiamo)

Scrinieri da lanciere (2 PA)

Elmo del Leone (5 PA)

Corazza del Leone in Ferro Corrazzato (7 PA)

ZAINO (20) contenente:
Portamonete in pelle di cinghiale contenente: 100$
Scatola Sanitaria Sigillata (può contenere e tenere al sicuro fino a 4 oggetti curativi) (contiene Benda di pronto soccorso x3, Pozione di cura)
Corda
Bottiglia di idromele
Forma di formaggio
Torcia (serve ad illuminare, dura tre settori)

Fiasca di ceramica con Giglio Amaro (Dona +1PN e Velocità all'utilizzatore)
Ampolla Bianca

Semi di Balissa

 

CAVALLO NORMALE + SELLA (30 +2 armi) contentente:
66$
Benda di pronto soccorso x3
Spada a due mani

Fagotto per Adara (fazzoletto ricamato)


 

Link to comment
Share on other sites

Gli script "tecnici" sono i migliori o/

 

Uno ci deve proprio pensare a 'sta cosa!

Beh, se ci pensi, quante persone sanno qual'è la formula degli elementi?

Io manco lo sapevo che era una media prima di vedere alcuni script.

Flattery makes friends and truth makes enemies.

Link to comment
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
 Share

×
×
  • Create New...