Automatic description
Version: 2.0
Author: Lecode
Date: ? ?, 2009
Above all
Thank to Modern Algebra.Thanks to one of his script.
I do not speak English. I translated my script into English...I think.
If you want the French version, send me a message.
Especially if you see error on the script, tell me quickly please.
Version History
- <Version 1.0> - Item automatic description
- <Version 2.0> - Armor and weapon automatic description
- <Version 2.5> - English version
Description
This script Write automatically the help window of weapons, items, and armor.
It is completely editable.
Features
- Items,armors,and weapons automatic description
Instructions
-Simply place the code in the box description:
===========For Object============
\autohp
HP heal sentence
\automp
MP heal sentence
\autohp%
%HP heal sentence
\automp%
%MP heal sentence
\auto-
Damage sentence
\autohm
HP and MP heal sentence
\autohm%
HP% and MP% heal sentence
============For Equip=========
\autoatk
ATK add sentence
See the script for more code...
Script
#==============================================================================
# Automatic description
# Version 2.5
# By Lecode (or Thecode)
#Thank to Modern Algebra
#Rmrk#
# ============================================================
# Instructions:
=begin
Put the code in the description
--CODE-- --EFFECT--
######Object:
\autohp HP+
\automp MP+
\autohp% HP%+
\automp% MP%+
\auto- Damage sentence
\autohm HP and MP +
\autohm% HP% and MP% +
#####Weapon and armor
\autoatk ATK+
\autodef DEF+
\autospi SPI+
\autoagi AGI+
\autoa-1 ATK+ DEF-
\autoa-2 ATK SPI-
\autoa-3 ATK+ AGI-
\autod-1 DEF+ ATK-
\autod-2 DEF+ SPI-
\autod-3 DEF+ AGI-
\autos-1 SPI+ ATK-
\autos-2 SPI+ DEF-
\autos-3 SPI+ AGI-
\autoag-1 AGI+ ATK-
\autoag-2 AGI+ DEF-
\autoag-3 AGI+ SPI-
=end
#==============================================================================
# ** RPG::BaseItem
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# aliased method - description
#==============================================================================
class RPG::BaseItem
############MODIF############
###EQUIP
AUTO_VOCAB_ATK = "attack"
AUTO_VOCAB_DEF = "defense"
AUTO_VOCAB_SPI = "intel."
AUTO_VOCAB_AGI = "agility"
AUTO_VOCAB_AUGMENTE = "Increases"
AUTO_VOCAB_DIMINUE = "Decreases"
#WORD
AUTO_VOCAB_NEXT = " and"
AUTO_VOCAB_BY = "by"
AUTO_VOCAB_THE = "the"
AUTO_VOCAB_BUT= "but"
###FOR ITEM
AUTO_VOCAB_REG = "Heals"
AUTO_VOCAB_DEREG = "Deal"
############FIN MODIF########
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# * Description
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
alias lecode_desc_codes_description_extract_8fn3 description
def description
# #######
text = lecode_desc_codes_description_extract_8fn3.dup
# #######Modern Algebra code
text.gsub! (/\\n\[(\d+)\]/i) { $game_actors[$1.to_i].name } # Actor Name
text.gsub! (/\\c\[(\d+)\]/i) { $data_classes[$1.to_i].name } # Class Name
text.gsub! (/\\s\[(\d+)\]/i) { $data_states[$1.to_i].name } # State Name
text.gsub! (/\\v\[(\d+)\]/i) { $game_variables[$1.to_i].to_s } # Variable
text.gsub! (/\\e\[(\d+)\]/i) { $data_elements[$1.to_i].name } # Element
begin
text.gsub! (/\\vocab\[(\w+)\]/i) {eval ("Vocab.#{$1.to_s}")}# Vocabulary
rescue
end
###########################
#If Object
if self.is_a? (RPG::UsableItem)
#=>
text.gsub! (/\\autohp/i) {("#{AUTO_VOCAB_REG} #{self.hp_recovery} #{Vocab.hp}")}
text.gsub! (/\\automp/i) {("#{AUTO_VOCAB_REG} #{self.mp_recovery} #{Vocab.mp}")}
text.gsub! (/\\autohp%/i) {("#{AUTO_VOCAB_REG} #{self.hp_recovery_rate} #{Vocab.hp}")}
text.gsub! (/\\automp%/i) {("#{AUTO_VOCAB_REG} #{self.mp_recovery_rate} #{Vocab.mp}")}
text.gsub! (/\\auto-/i) {("#{AUTO_VOCAB_DEREG} #{self.base_damage} damage ")}
text.gsub! (/\\autohm/i) {("#{AUTO_VOCAB_REG} #{self.hp_recovery} #{Vocab.hp} #{AUTO_VOCAB_NEXT} #{self.mp_recovery} #{Vocab.mp}")}
text.gsub! (/\\autohm%/i) {("#{AUTO_VOCAB_REG} #{self.hp_recovery_rate} #{Vocab.hp} #{AUTO_VOCAB_NEXT} #{self.mp_recovery_rate} #{Vocab.mp}")}
end
#If Equip
if self.is_a? (RPG::Armor) || self.is_a? (RPG::Weapon)
#=>
text.gsub! (/\\autoatk/i) { ("#{AUTO_VOCAB_AUGMENTE} #{AUTO_VOCAB_ATK} #{AUTO_VOCAB_BY} #{self.atk} ") }
text.gsub! (/\\autodef/i) { ("#{AUTO_VOCAB_AUGMENTE} #{AUTO_VOCAB_DEF} #{AUTO_VOCAB_BY} #{self.def}") }
text.gsub! (/\\autospi/i) { ("#{AUTO_VOCAB_AUGMENTE} #{AUTO_VOCAB_SPI} #{AUTO_VOCAB_BY} #{self.spi}") }
text.gsub! (/\\autoagi/i) { ("#{AUTO_VOCAB_AUGMENTE} #{AUTO_VOCAB_AGI} #{AUTO_VOCAB_BY} #{self.agi}") }
text.gsub! (/\\autoatk-/i) { ("#{ AUTO_VOCAB_DIMINUE} #{AUTO_VOCAB_ATK} #{AUTO_VOCAB_BY} #{self.atk}") }
text.gsub! (/\\autodef-/i) { ("#{ AUTO_VOCAB_DIMINUE} #{AUTO_VOCAB_DEF} #{AUTO_VOCAB_BY} #{self.def}") }
text.gsub! (/\\autospi-/i) { ("#{ AUTO_VOCAB_DIMINUE} #{AUTO_VOCAB_SPI} #{AUTO_VOCAB_BY} #{self.spi}") }
text.gsub! (/\\autoagi-/i) { ("#{ AUTO_VOCAB_DIMINUE} #{AUTO_VOCAB_SPI} #{AUTO_VOCAB_BY} #{self.spi}") }
text.gsub! (/\\autoa-1/i) { ("#{AUTO_VOCAB_AUGMENTE} #{AUTO_VOCAB_ATK} #{AUTO_VOCAB_BY} #{self.atk} #{AUTO_VOCAB_BUT} #{ AUTO_VOCAB_DIMINUE}
#{AUTO_VOCAB_DEF} #{AUTO_VOCAB_BY} #{self.def}") }
text.gsub! (/\\autoa-2/i) { ("#{AUTO_VOCAB_AUGMENTE} #{AUTO_VOCAB_ATK} #{AUTO_VOCAB_BY} #{self.atk} #{AUTO_VOCAB_BUT}
#{ AUTO_VOCAB_DIMINUE} #{AUTO_VOCAB_SPI} #{AUTO_VOCAB_BY} #{self.spi}") }
text.gsub! (/\\autoa-3/i) { ("#{AUTO_VOCAB_AUGMENTE} #{AUTO_VOCAB_ATK} #{AUTO_VOCAB_BY} #{self.atk} #{AUTO_VOCAB_BUT}
#{ AUTO_VOCAB_DIMINUE} #{AUTO_VOCAB_AGI} #{AUTO_VOCAB_BY} #{self.agi}") }
text.gsub! (/\\autod-1/i) { ("#{AUTO_VOCAB_AUGMENTE} #{AUTO_VOCAB_DEF} #{AUTO_VOCAB_BY} #{self.def} #{AUTO_VOCAB_BUT}
#{ AUTO_VOCAB_DIMINUE} #{AUTO_VOCAB_ATK} #{AUTO_VOCAB_BY} #{self.atk}") }
text.gsub! (/\\autod-2/i) { ("#{AUTO_VOCAB_AUGMENTE} #{AUTO_VOCAB_DEF} #{AUTO_VOCAB_BY} #{self.def} #{AUTO_VOCAB_BUT}
#{ AUTO_VOCAB_DIMINUE} #{AUTO_VOCAB_SPI} #{AUTO_VOCAB_BY} #{self.spi}") }
text.gsub! (/\\autod-3/i) { ("#{AUTO_VOCAB_AUGMENTE} #{AUTO_VOCAB_DEF} #{AUTO_VOCAB_BY} #{self.def} #{AUTO_VOCAB_BUT}
#{ AUTO_VOCAB_DIMINUE} #{AUTO_VOCAB_AGI} #{AUTO_VOCAB_BY} #{self.agi}") }
text.gsub! (/\\autos-1/i) { ("#{AUTO_VOCAB_AUGMENTE} #{AUTO_VOCAB_SPI} #{AUTO_VOCAB_BY} #{self.spi} #{AUTO_VOCAB_BUT}
#{ AUTO_VOCAB_DIMINUE} #{AUTO_VOCAB_ATK} #{AUTO_VOCAB_BY} #{self.atk}") }
text.gsub! (/\\autos-2/i) { ("#{AUTO_VOCAB_AUGMENTE} #{AUTO_VOCAB_SPI} #{AUTO_VOCAB_BY} #{self.spi} #{AUTO_VOCAB_BUT}
#{ AUTO_VOCAB_DIMINUE} #{AUTO_VOCAB_DEF} #{AUTO_VOCAB_BY} #{self.def}")}
text.gsub! (/\\autos-3/i) { ("#{AUTO_VOCAB_AUGMENTE} #{AUTO_VOCAB_DEF} #{AUTO_VOCAB_BY} #{self.def} #{AUTO_VOCAB_BUT}
#{ AUTO_VOCAB_DIMINUE} #{AUTO_VOCAB_AGI} #{AUTO_VOCAB_BY} #{self.agi}") }
text.gsub! (/\\autoag-1/i) { ("#{AUTO_VOCAB_AUGMENTE} #{AUTO_VOCAB_AGI} #{AUTO_VOCAB_BY} #{self.agi} #{AUTO_VOCAB_BUT}
#{ AUTO_VOCAB_DIMINUE} #{AUTO_VOCAB_ATK} #{AUTO_VOCAB_BY} #{self.atk}") }
text.gsub! (/\\autoag-2/i) { ("#{AUTO_VOCAB_AUGMENTE} #{AUTO_VOCAB_AGI} #{AUTO_VOCAB_BY} #{self.agi} #{AUTO_VOCAB_BUT}
#{ AUTO_VOCAB_DIMINUE} #{AUTO_VOCAB_DEF} #{AUTO_VOCAB_BY} #{self.def}") }
text.gsub! (/\\autoag-1/i) { ("#{AUTO_VOCAB_AUGMENTE} #{AUTO_VOCAB_AGI} #{AUTO_VOCAB_BY} #{self.agi} #{AUTO_VOCAB_BUT}
#{ AUTO_VOCAB_DIMINUE} #{AUTO_VOCAB_SPI} #{AUTO_VOCAB_BY} #{self.spi}") }
end
return text
end
end
Credit
Thanks
Support
If you have a problem, post it here
Known Compatibility Issues
Normally, this script is completely compatible.
I think ...
Author's Notes
While searching you can do the same for skills.
I hope this script has helped you.
And,sorry for my language