- Joined
- Mar 16, 2012
- Messages
- 863
- Reaction score
- 81
- First Language
- French
- Primarily Uses
Traits Namer
Version: 1.02
Author: Kread-EX
Introduction
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.
At the new version 1.0, you can now generate names for usable items effects, as well as generate help descriptions.
Features
Provide a customizable template to name traits and now to describe them too.
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 rate12 => '%s debuff rate: %d%' , # Debuff rate13 => '%s resist: %d%' , # State rate14 => 'Immunity: %s' , # State immunity21 => '%s: %d%' , # Parameter rate22 => '%s: %d%' , # Additional parameter rate23 => '%s: %d%' , # Special parameter rate31 => 'Attack %s' , # Physical attack attribute32 => 'Attack %s %d%' , # Physical attack state33 => 'Attack speed %d' , # Attack speed correction34 => 'Attack x%d' , # Additional attacks41 => 'Command: %s' , # Add skill type42 => 'Seal: %s' , # Seal skill type43 => 'Skill: %s' , # Add skill44 => 'Skill Seal: %s' , # Seal skill51 => 'Can equip: %s' , # Add equip type (weapon)52 => 'Can equip: %s' , # Add equip type (armor)53 => 'Fix equip: %s' , # Fix equip slot54 => 'Seal equip: %s' , # Seal equip slot55 => 'Dual Wielding' , # Dual Wield61 => 'Bonus Actions: +%d%' , # Bonus actions62 => '%s' , # Special flag63 => '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.
Script
Direct Download!
Blog page
Terms of use
You are free to adapt this work to suit your needs.
You can use this work for commercial purposes if you like it.
Credit is appreciated.
Version: 1.02
Author: Kread-EX
Introduction
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.
At the new version 1.0, you can now generate names for usable items effects, as well as generate help descriptions.
Features
Provide a customizable template to name traits and now to describe them too.
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 rate12 => '%s debuff rate: %d%' , # Debuff rate13 => '%s resist: %d%' , # State rate14 => 'Immunity: %s' , # State immunity21 => '%s: %d%' , # Parameter rate22 => '%s: %d%' , # Additional parameter rate23 => '%s: %d%' , # Special parameter rate31 => 'Attack %s' , # Physical attack attribute32 => 'Attack %s %d%' , # Physical attack state33 => 'Attack speed %d' , # Attack speed correction34 => 'Attack x%d' , # Additional attacks41 => 'Command: %s' , # Add skill type42 => 'Seal: %s' , # Seal skill type43 => 'Skill: %s' , # Add skill44 => 'Skill Seal: %s' , # Seal skill51 => 'Can equip: %s' , # Add equip type (weapon)52 => 'Can equip: %s' , # Add equip type (armor)53 => 'Fix equip: %s' , # Fix equip slot54 => 'Seal equip: %s' , # Seal equip slot55 => 'Dual Wielding' , # Dual Wield61 => 'Bonus Actions: +%d%' , # Bonus actions62 => '%s' , # Special flag63 => '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.
Script
Direct Download!
Blog page
Terms of use
You are free to adapt this work to suit your needs.
You can use this work for commercial purposes if you like it.
Credit is appreciated.
Last edited by a moderator: