Traits Namer
This is a core script. By itself, it doesn’t do anything but it is used by Runic Enchantment and soon by Alchemic Synthesis. The purpose of this script is to provide an automated way to name traits: the script retrieve the traits data and generates a name based on a customizable template.
As for version 1.0, you can now generate names for usable items effects, as well as generate help descriptions.
Instructions
Traits Namer provides you with a template to name traits. Most of it is rather self-explanatory, but pay attention to the CODENAMES hash:
CODENAMES = { 11 => '%s resist: %d%' , # Element rate 12 => '%s debuff rate: %d%' , # Debuff rate 13 => '%s resist: %d%' , # State rate 14 => 'Immunity: %s' , # State immunity 21 => '%s: %d%' , # Parameter rate 22 => '%s: %d%' , # Additional parameter rate 23 => '%s: %d%' , # Special parameter rate 31 => 'Attack %s' , # Physical attack attribute 32 => 'Attack %s %d%' , # Physical attack state 33 => 'Attack speed %d' , # Attack speed correction 34 => 'Attack x%d' , # Additional attacks 41 => 'Command: %s' , # Add skill type 42 => 'Seal: %s' , # Seal skill type 43 => 'Skill: %s' , # Add skill 44 => 'Skill Seal: %s' , # Seal skill 51 => 'Can equip: %s' , # Add equip type (weapon) 52 => 'Can equip: %s' , # Add equip type (armor) 53 => 'Fix equip: %s' , # Fix equip slot 54 => 'Seal equip: %s' , # Seal equip slot 55 => 'Dual Wielding' , # Dual Wield 61 => 'Bonus Actions: +%d%' , # Bonus actions 62 => '%s' , # Special flag 63 => 'Collapse type' , # Collapse type (will never be used, I think) 64 => '%s' , # Party ability }
The “%s” and “%d” are substitution fields. For instance, “%s resist: %d%” for the element rate will be displayed as “Element name” + “resist” + “value” + “%”.
The same applies to the help window description (CODEHELP), the usable items effects names (EFFECTS_CODENAME) and their description (EFFECTS_CODEHELP).
New feature: custom names. They’re here to allow you to chose completely different names (or descriptions) based on completely arbitrary values: for instance naming the trait. For instance, check the following examples:
CUSTOM_TRAITS = { [0, 32, 2, 50] => ['Poisonous', nil], [0, 32, 2, 100] => ['Venomous', nil], }
Here, the trait giving 50% chance to add Poison to a normal attack will be called ‘Poisonous’ and the one with 100% chance ‘Venomous’. The nil value is where you put the custom description if you want one.
v1.00 – New functions.
Can you help me Kread-EX? Using your traits namer and alchemic synthesis scripts, can’t figure out how to use the traits. I can synthesize items, but I can not select traits. Where and how do I choose potential traits?
v1.01 – Required version for use with Alchemic Synthesis.
I’m new with putting scripts in. How to install? :l
You copy the script and paste it in a new section under Materials in the Script Editor.
Tried that before with a different script, didn’t work, but apparently your script worked. Weird.
I can’t get the traits namer to name traits. I’ve been testing it with a weapon trait that adds poison to attack state 100%, but the name doesn’t change to venomous. I’m using it with your synthesis script and I haven’t changed anything in either one.
i realize this is 2 years old but
final_value = case code
when 11, 13
100 – (value * 100)
when 33, 34
value
else
value * 100
end
you want to counter the math done here so for the 32 you change ‘100’ to ‘100/100’, this will solve the problem
You lost me sir 🙂
What are we talking about specifically?
# value1: what you typed in the first field where you can write numbers.
# For equipment this is the only one.
#
# value2: usable items only. What you typed in the second field.
I dont know, how to install the script… i copied it under “Materials” and it doenst work? Can anyone help me?
A error has occurred:
“SystemStackError occured. stack level too deep”
what is this?
Generally, it means you have installed the same script twice.
Having an armor rune which gives mana regeneration from Runic Enchantment on a piece of equipment gives an error which sends me to Traits Namer line 337, saying to few arguments.
Fixed. Please download the script again.
Thank you soooo much.
I was wondering, when you do the traits for parameter changes, what are the corresponding number for each parameter?
Hi, is there a possibility of functionality with Victor’s Element Strengthen? (This and Runic Enchantment). I’d like to be able to enchant equipment with that trait. http://victorscripts.wordpress.com/rpg-maker-vx-ace/gameplay-scripts/element-strenghten/
I thought it would be nice.
I found a bug in this script that refers to the increase of the parameters
I have placed the traits namer script but when i playtest my game it says “You need the traits namer in order to use Alchemic Synthesis. Loaing aborted.
How do you assign the traits to the weapons?
anyone else know how to fix the custom trait names… i cant seem to figure out how to make it work.
well i got the poison trait stuff to work but i also figured out that heal by % doesnt have the right description… this is a very poor script
The issue is
#————————————————————————–
# ● Converts the real value to the one entered in the editor
#————————————————————————–
def self.convert_value(code, value, feature = true)
if feature && [33, 34].include?(code)
return value.to_i
elsif feature && [21].include?(code)
return (value.to_f / 100)
elsif [11, 12].include?(code) && value <= 1
return (value.to_i * 100).to_i
else
value.to_i
end
end
It's missing code notes and the wrong calculations are being made with floats and integers.
I’ve been playing around with this and the synthesis script. This really is genius. Excellent work all around.
There is one hiccup, one which I can work around if need be, but I thought I’d mention it. The custom trait names just do not work at all for me. I have made a bunch of custom trait names with the proper number code designations but the default codenames and codehelps appear instead. Is there a way to turn off the default names/descriptions and turn the custom ones on?
Other than that, it’s all working perfectly. Thanks again.
Well… the link is dead.
Would it be possible to have a mirror?
all your dropbox link are death
For people who are looking for it, I’m uploading the latest version I could find here, since the dropbox links are dead.
https://pastebin.com/pVCjCPXx