NEW UPDATES -> GitHub
Upgrade System
Tibia has flat, dull, boring and not fun items system, time to change it. Expand your server with a lot of possibilities to make grinding more satisfying. No more useless items laying around and being ignored by others, now every item can be powerful. Using special crystals, items can be upgraded with new stats and powerful attributes. New property - Item Level - which determines how powerful given item is. A lot of crystals to upgrade items even further.
New items
Name | Description | How to obtain |
---|
Upgrade Crystal | Can be used on a piece of equipment for a chance to upgrade it. | Crystal Fossil |
Enchantment Crystal | Can be used on a piece of equipment to add random attribute. | Crystal Fossil |
Alteration Crystal | Can be used on a piece of equipment to remove last attribute. | Crystal Fossil |
Cleansing Crystal | Can be used on a piece of equipment to remove all attributes. | Crystal Fossil |
Fortune Crystal | Can be used on a piece of equipment to change value of last attribute. | Crystal Fossil |
Faith Crystal | Can be used on a piece of equipment to change values of all attributes. | Crystal Fossil |
Mind Crystal | Used to extract all attributes and values and store in that crystal. Can be used again to place these attributes to a new item. Lower item rarity will remove exceeded attributes. | Custom - NPC, Quests etc. |
Limitless Crystal | Used to remove Item Level requirement to equip given item. | Custom - NPC, Quests etc. |
Mirrored Crystal | Used to make a copy of any item. Copies can't be modified and mirrored again. | Custom - NPC, Quests etc. |
Void Crystal | Used to transform item into random Unique type. | Custom - NPC, Quests etc. |
Upgrade Catalyst | Prevents item destroy on upgrade. Consumed on item upgrade. | Custom - NPC, Quests etc. |
Crystal Fossil | There is unknown crystal inside, try to use crystal extractor. | Randomly drops from monsters |
Crystal Extractor | Used to extract rare crystals from crystal fossil. | Custom - NPC, Quests etc. |
Scroll of Identification | Can be used on unidentified item to reveal hidden attributes. | Custom - NPC, Quests etc. |
Attributes
- Max HP
- Max MP
- Magic Level
- Melee Skills (all in one)
- Fist Fighting
- Sword Fighting
- Axe Fighting
- Club Fighting
- Distance Fighting
- Shielding
- Mana Shield
- Life Steal
- Experience
- Physical Damage
- Physical Protection
- Energy Damage
- Energy Protection
- Earth Damage
- Earth Protection
- Fire Damage
- Fire Protection
- Ice Damage
- Ice Protection
- Holy Damage
- Holy Protection
- Death Damage
- Death Protection
- Elemental Damage (every element in one except physical)
- Elemental Protection (every element in one except physical)
- Cast Flame Strike on Attack
- Cast Flame Strike on Hit
- Cast Ice Strike on Attack
- Cast Ice Strike on Hit
- Cast Terra Strike on Attack
- Cast Terra Strike on Hit
- Cast Death Strike on Attack
- Cast Death Strike on Hit
- Cast Energy Strike on Attack
- Cast Energy Strike on Hit
- Cast Divine Missile on Attack
- Cast Divine Missile on Hit
- Explosion on Kill
- Regenerate Health on Kill
- Regenerate Mana on Kill
- Mana Steal
- Chance to regenerate full HP on Kill
- Chance to regenerate full MP on Kill
- Chance to cast Mass Healing on Attack
- Increased healing from all sources
- Additional gold from monsters loot
- Chance to deal double damage
- Chance to be revived with 100% HP and MP upon death
- Chance to get Bonus Damage buff on Kill
- Chance to get Bonus Max HP buff on Kill
- Chance to get Bonus Max MP buff on Kill
Item Level
Item Level (iLvl) is set for every wearable item (excluding Stackable [spears, assassins stars, ammunition etc.] and Transformable [special rings or boots]) when dropped by a monster.
Default iLvl is calculated using special algorithm that determines monster level/power based on its Max HP and Experience.
Then additional iLvl value is given based on base item stats (Atk, Def, Armor, Hit Chance). After all of that, additional stats are calculated based on item iLvl.
Upgrading item level increases iLvl in addition to bonus stats and values for bonus attributes are based on iLvl of the item.
Given all of that I have made every item different. If you drop a Giant Sword from a Behemoth and a Giant Sword from a Ferumbras they will be different in stats.
You may ask "What if someone loots Sword from high level monster and a new player gets it? That's unbalanced." but don't be afraid.
If player level is lower than iLvl of given items, they can't equip them!
Unique Items
Items with predefined attributes that can't be altered, only their values can be changed. Unidentified items can become Unique.
Installation
- Open
data/global.lua
.
- Add somewhere on top
Lua:
dofile('data/upgrade_system_core.lua')
- Open
data/events/events.xml
.
- Make sure you have enabled
XML:
<event class="Creature" method="onTargetCombat" enabled="1" />
<event class="Player" method="onLook" enabled="1" />
<event class="Player" method="onMoveItem" enabled="1" />
<event class="Player" method="onItemMoved" enabled="1" />
<event class="Player" method="onGainExperience" enabled="1" />
- Open
data/events/scripts/player.lua
.
- Find
Player:onLook
.
- Add after
local description = "You see " .. thing:getDescription(distance)
Lua:
description = onItemUpgradeLook(self, thing, position, distance, description)
- Find
Player:onMoveItem
.
- Change
return true
from last line to
Lua:
return us_onMoveItem(self, item, fromPosition, toPosition)
- Find
Player:onItemMoved
.
- Add inside
Lua:
onUpgradeMoved(self, item, count, fromPosition, toPosition, fromCylinder, toCylinder)
- Find
Player:onGainExperience
.
- Add at the end before
return exp
Lua:
exp = us_onGainExperience(self, source, exp, rawExp)
- Open
data/events/scripts/creature.lua
.
- Find
Creature:onTargetCombat
.
- Add somewhere (the best place is after all events, before any event that calculates damage, like DPS Counter)
Lua:
target:registerEvent("UpgradeSystemHealth")
target:registerEvent("UpgradeSystemDeath")
- Open
data/actions/actions.xml
.
- This is important part, you have to specify items ID for crystals, scroll of identification and crystal extractor. I have created custom items for myself and IDs are one after another so I'm using
fromid
and toid
. I hope you can handle it.
XML:
<action fromid="26383" toid="26389" script="upgrade_system_actions.lua" /> <!-- Crystals and Scroll -->
<action fromid="26393" toid="26396" script="upgrade_system_actions.lua" /> <!-- Crystals -->
<action itemid="26391" script="upgrade_system_tool.lua" /> <!-- Crystal Extractor -->
- Open
data/creaturescripts/creaturescripts.xml
.
- Add
XML:
<event type="login" name="UpgradeSystemLogin" script="upgrade_system_cs.lua" />
<event type="death" name="UpgradeSystemDeath" script="upgrade_system_cs.lua" />
<event type="kill" name="UpgradeSystemKill" script="upgrade_system_cs.lua" />
<event type="healthchange" name="UpgradeSystemHealth" script="upgrade_system_cs.lua" />
<event type="manachange" name="UpgradeSystemMana" script="upgrade_system_cs.lua" />
<event type="preparedeath" name="UpgradeSystemPD" script="upgrade_system_cs.lua" />
- Download
upgrade_system.rar
from attachment at the bottom of this post.
- Extract and copy
data
into your data
.
Configuration
Every configuration is inside
data/upgrade_system_const.lua
.
I have added some comments that should explain each property. There are however few special properties for attributes.
VALUES_PER_LEVEL
- this indicates max value that can be rolled for given attribute, based on item level. For example if set to
3 then every Item Level adds +3 value, at Item Level 100, max value for this attribute can be 300 (still rolled from 1 to max value).
minLevel
- this indicates what Item Level is required for this attribute to be rolled. Use it to balance some early and late game attributes.
chance
- chance in % that this attribute will be rolled. If you want 100% then remove that property or just set to 100.
Changelog
[2.0.0] - 2019-06-02
- Reworked refreshing attributes when changing items
- Reworked Item Level functionality
- Monsters Level is now calculated using special algorithm
- Item Level for dropped items from monsters is assigned based on Monster Level (min 1, random from monsterLevel - 5 to monsterLevel)
- Item Level is now increased for every upgrade level
- Item Level is now increased for every base stat of an item
- Item Level now increases base stats for an item
- Equipping items require player level to be equal or higher than Item Level
- Equipping unidentified items is not possible anymore
- Added Items Rarity - Common, max 1 slot; Rare, max 2 slots; Epic, max 3 slots; Legendary, max 4 slots
- Rewritten onLook function. Cleaner description for items, additionally showing Total Item Level for a player that we look at.
- Added Mind Crystal - extracts attributes from selected item and stores them in the crystal, can be then used on a different item to apply these attributes, very rare, not possible to obtain through loot
- Added Limitless Crystal - adds special attribute (doesn't take attribute slot) "Removed Item Level Requirement" allowing item to be equipped by player with less level than Item Level, very rare, not possible to obtain through loot
- Added Mirrored Crystal - after using on a item, makes a copy of that item with every value being the same, mirrored items can't be modified, extremely rare, not possible to obtain through loot
- Added Void Crystal - transforms item into random Unique type, very rare, not possible to obtain through loot
- Added new attributes:
- Mana Steal
- More gold from loot
- Chance to gain full HP / MP on kill
- Chance to deal double damage
- Chance to cast Mass Healing on Attack
- Chance to be revived on death
- Chance to get buff (more damage, hp, mp) on kill for 8 seconds
- Increased healing from all sources
- Reworked some attributes to be more dynamic rather than fixed (Cast on Attack/Hit)
- Added % chance (optional) property to attributes, making them harder to roll
- Removed attributes limit for Unique items
- New config values
- Big thanks to @Aeronx for cool ideas and help with testing
[1.1.2] - 2019-05-26
- Rewritten attributes refreshing when removing items
- Removed
onMoveItem
event usage
[1.1.1] - 2019-05-25
[1.1.0] - 2019-05-24
- Added Unique type items, predefined attributes that can't be altered, only their values can be changed. Unidentified items can become Unique.
- Corrected onLook for plural names
[1.0.0] - 2019-05-24