The per-item option jewel system: the player drags a jewel onto an item in the inventory to add or upgrade one option on that very item (for example: freeze enemies, increase double damage, increase EXP...). Each jewel corresponds to ONE option; each use of a jewel is one attempt to raise the option to the next level, with its own success rate and a penalty type on failure. The jewel is always consumed once attempted. The item tooltip shows these extra option lines.
Requirements
PluginPlushas been purchased andData\Plugin\Plugin.inihasPluginPlus = 1(see PluginPlus).Enable="1"inData\Plugin\ExtendedOptionSystem.xml. Turning the system off does not remove options already on items; it only stops applying them.- Every jewel in
<JewelMapping>must first be added toData\Item\ItemList.xmland the client's item list (the sample file uses jewels of type 19, indexes 230 to 286). - The game database must have the table
item_ext_option: run the SQL file shipped with the update once. Options are stored by item serial (columnsSerialServer,Serial,OptionIndex,OptionId,Level). Items without a serial cannot receive options. Stackable items cannot receive them either. - The client needs a new
Main.dllto show the option lines on the tooltip (the server sends them through packet82 B3). Option names on the tooltip come from theItemOptionSystemsection inData\Lang\*.xml.
How it works
- The player drags a jewel onto an item in the inventory.
- The server checks whether the item can receive an option (system-wide deny rules, jewel-specific deny rules, items with a serial...). If it cannot: Lang message 0, and the jewel is kept.
- The server takes the item's current option level (none = no level yet), picks the next
<Option>row and rolls 1-100: less than or equal toSuccessRateis a success. Already at the highest level: Lang message 0, and the jewel is kept. The item already has the maximum number of options and the jewel would add a new option: Lang message 1, and the jewel is kept. - Success: the option rises to the new level (Lang message 2 with the level). Failure: the
FailTypeof that row is applied; the jewel is always lost.
The <Option> rows of a jewel are sorted by Value ascending when loaded; the Level label is only for reference. Each jewel reads at most 10 <Option> rows (10 levels); the 11th row onward is dropped.
Configuration
File: Data\Plugin\ExtendedOptionSystem.xml. Do not write comments inside tags. Lists (DenyKindA...) are separated by the ; character.
ExtendedOptionSystem tag
| Key | Value | Default | Meaning |
|---|---|---|---|
Enable | 0 / 1 | 0 | Turn the system off / on. |
ReduceEffectDuration | seconds, ≥ 1 | 5 | Effect duration of options 0 and 1 (reduce the opponent's max HP / attack speed). Also applies to options 0 and 1 granted by ItemOptionSystem_Exc.xml while this system is on. |
ReduceEffectMaxRate | 0-99 (%) | 50 | Highest % that options 0 and 1 can reach when stacked from all items. |
GlobalRestrictions tag
Applied once for the whole system, with higher priority than the deny rules of each individual jewel. Leave empty = nothing denied.
| Key | Value | Default | Meaning |
|---|---|---|---|
DenyKindA | list of numbers | empty | The KindA values of items that are forbidden from receiving any option. |
DenyKindB | list of numbers | empty | The KindB values of items that are forbidden from receiving any option. |
MaxOptionCount | 1-10 | 10 | Maximum number of options on one item (general fallback value). |
OptionCountLimit / Item tag
A list of optional rules that override MaxOptionCount for specific item groups.
| Key | Value | Default | Meaning |
|---|---|---|---|
KindA | number, or -1 | -1 | The item's KindA that must match; -1 = all items. |
KindB | number, or -1 | -1 | The item's KindB that must match; -1 = all items. |
Type | number, or -1 | -1 | The type (Cat in ItemList.xml) that must match; -1 = all types. |
MaxOptionCount | 1-10 | the MaxOptionCount value of GlobalRestrictions | The limit when the rule matches. |
When several rules match, the most specific rule (the one with the most fields other than -1) wins; on a tie, the earlier rule wins. A rule whose three fields are all -1 is never considered a match. If no rule matches, the MaxOptionCount of GlobalRestrictions is used.
JewelMapping / Jewel tag
| Key | Value | Default | Meaning |
|---|---|---|---|
Cat, Index | number | 0, 0 | Type + index of the jewel (in ItemList.xml). |
OptionId | number 0-56 | 0 | The option number that the jewel grants / upgrades (see the list table below). A value out of range: the jewel is skipped and the log reports an error. One OptionId should be granted by only one jewel; if duplicated, the saved option uses the first jewel. |
Enable | 0 / 1 | 1 | Turn this jewel off / on individually. |
BuffIndex | number | 0 | Buff ID that the option applies; 0 = no buff. |
BuffEffectType | number | 0 | Effect type of the buff; 0 = none. |
A jewel with no <Option> row is skipped and the log reports an error.
Restrictions tag (child of Jewel, optional)
Decides which items may receive options from this jewel.
| Key | Value | Default | Meaning |
|---|---|---|---|
AllowExcellent | 0 / 1 | 1 | Allow use on Excellent items. |
AllowSocket | 0 / 1 | 1 | Allow use on socket items. |
AllowAncient | 0 / 1 | 1 | Allow use on set (Ancient) items. |
AllowMastery | 0 / 1 | 1 | Allow use on Mastery items. |
AllowLegendary | 0 / 1 | 1 | Allow use on Legendary items. |
DenyKindA | list of numbers | empty | The KindA values of items that are forbidden from receiving options from this jewel. |
DenyKindB | list of numbers | empty | The KindB values of items that are forbidden from receiving options from this jewel. |
Option tag (each row is one level)
| Key | Value | Default | Meaning |
|---|---|---|---|
Level | number | 0 | Only a label; the level order follows Value ascending. |
Value | real number | 0 | The option value at this level. It must be strictly INCREASING between rows, otherwise duplicate / lower rows can never be reached. The highest value is the cap. |
SuccessRate | 0-100 | 0 | Rate (%) of reaching this level. |
FailType | 0-3 | 0 | On failure: 0 = the jewel is lost, the item is unchanged; 1 = the option is removed from the item; 2 = the item is destroyed (the option in the DB is also removed); 3 = drops to the previous level (at the first level the option is removed). If the item does not yet have this option (trying level 1), then 1 and 3 only lose the jewel. |
OptionProbability | real number | 0 | % chance that the option triggers, shown on the tooltip as "(Chance %d%%)"; 0 = only show the value. |
BuffValue | number | 0 | Buff value at this level; 0 = off. |
BuffProbability | number | 0 | Buff rate at this level; 0 = off. |
BuffDuration | number | 0 | Buff duration at this level; 0 = off. |
Option number list (OptionId)
Shares the list and effects with Data\Plugin\ItemOptionSystem_Exc.xml (see Fixed options (ItemOptionSystem_Exc)).
| OptionId | Effect |
|---|---|
| 0 | Reduce the target's max HP by Value % for ReduceEffectDuration seconds |
| 1 | Reduce the target's attack speed by Value % for ReduceEffectDuration seconds |
| 2 | Freeze the enemy for 5 seconds |
| 3 | Stun the enemy for 3 seconds |
| 4 | Auto Combo (Value is the % chance) |
| 5 | Double damage |
| 6 | Increase attack power |
| 7 | Increase total HP |
| 8 | Increase defense |
| 9 | Reduce damage taken |
| 10 | Increase AG |
| 11 | Kill a monster in one hit |
| 12 | Kill a player in one hit (PvP) |
| 13 | Damage reflection |
| 14 | Effect for 5 seconds, negates poison reflection |
| 15 | When hit, fully restore HP |
| 16 | When hit (PvP), become invisible for 3 seconds |
| 17 | When hit, the attacker dies instantly (PvP) |
| 18 | When hit, the target loses 10% of current HP (PvP) |
| 19 | When hit, a chance to reflect the total damage (PvP) |
| 20 | Excellent damage resistance |
| 21 | Critical damage resistance |
| 22 | Double damage resistance |
| 23 | Increase the chance of resisting true damage (True Damage) |
| 24 | Increase Combo damage |
| 25 | Absorb PvP damage |
| 26 | Increase the chance of Excellent damage |
| 27 | Increase the chance of Critical damage |
| 28 | Increase the chance of true damage (True Damage) |
| 29 | Increase the chance of dealing triple damage |
| 30 | Increase the chance of resisting triple damage |
| 31 | Invincible for Value seconds when hit by a player or monster, no re-roll while in effect |
| 32 | Blind the enemy |
| 33 | Increase all stats |
| 34 | Ignore SD |
| 35 | Increase skill damage |
| 36 | Paralyze the enemy for Value seconds (OptionProbability is the % chance, 0 uses the character class's paralysis rate) |
| 37 | Increase hit rate by Value points (PvM and PvP) |
| 38 | Increase SD resistance (1-100) |
| 39 | Stun resistance (1-100) |
| 40 | Reduce Combo damage |
| 41 | Increase Triple Damage |
| 42 | Increase elemental damage |
| 43 | Increase elemental defense |
| 46 | Stun (4th skill tree) |
| 48 | Complete invincibility |
| 49 | Increase Chaos mix rate +Value |
| 50 | Increase EXP +Value |
| 51 | Increase item drop rate +Value |
| 52 | Hunt Point bonus +Value |
| 53 | Max SD bonus |
| 54 | Attack speed bonus |
| 55 | Elemental critical rate bonus |
| 56 | PvE damage bonus |
Numbers 44, 45, 47 have no effect in the file's list. Numbers 36, 44, 45, 47 have no jewel in the sample file. [TO VERIFY: the effect description of each number is taken from the comments in the XML file; it needs to be cross-checked against the code in ItemOptionSystem.cpp if you want to describe each value precisely (unit: % or points)]
Configuration example
<ExtendedOptionSystem Enable="1" ReduceEffectDuration="5" ReduceEffectMaxRate="50">
<GlobalRestrictions DenyKindA="0;9;12;" DenyKindB="56;" MaxOptionCount="10" />
<OptionCountLimit>
<Item KindA="5" KindB="-1" Type="-1" MaxOptionCount="5" />
</OptionCountLimit>
<JewelMapping>
<Jewel Cat="19" Index="232" OptionId="2" BuffIndex="0" BuffEffectType="0" Enable="1">
<Restrictions AllowExcellent="1" AllowSocket="1" AllowAncient="1" AllowMastery="1" AllowLegendary="1" DenyKindA="" DenyKindB="" />
<Option Level="1" Value="1" SuccessRate="90" FailType="3" OptionProbability="5" BuffValue="0" BuffProbability="0" BuffDuration="0" />
<Option Level="2" Value="2" SuccessRate="70" FailType="3" OptionProbability="10" BuffValue="0" BuffProbability="0" BuffDuration="0" />
<Option Level="3" Value="3" SuccessRate="50" FailType="3" OptionProbability="15" BuffValue="0" BuffProbability="0" BuffDuration="0" />
</Jewel>
</JewelMapping>
</ExtendedOptionSystem>
Jewel 19,232 grants option 2 (freeze): level 1 succeeds 90%, level 2 is 70%, level 3 is 50%; on failure the option drops one level.
Included sample file
The sample file declares 53 jewels: type 19, indexes 230 to 286 (except 266, 274, 275, 277), index = 230 + OptionId, each jewel with 1 to 5 levels (about 267 <Option> rows). Among them, the option 0 jewel has a buff (BuffIndex="1"). The sample configuration forbids KindA 0, 9, 12 and KindB 56 from receiving options, limits each item to at most 10 options, and items with KindA="5" to only 5 options. Adjust SuccessRate and Value to suit your server.
Messages (Lang)
The ExtendedOption section in Data\Lang\*.xml:
| ID | Content (English) | When |
|---|---|---|
| 0 | This jewel cannot be used on this item. | The item cannot receive the option, or the option is already at the highest level |
| 1 | This item cannot receive more options. | The item already has the maximum number of options |
| 2 | Option upgrade succeeded. Option level: %d. | Success (%d = new level, the first row is 1) |
| 3 | Option upgrade failed. The jewel was lost. | Failure, FailType 0 |
| 4 | Option upgrade failed. The option was removed from the item. | Failure, the option is removed |
| 5 | Option upgrade failed. The item was destroyed. | Failure, FailType 2 |
| 6 | Option upgrade failed. Option level dropped to %d. | Failure, level lowered |
Notes
- Jewels 19,230 - 19,240 also fall within the range of Item upgrade jewels (JewelUpgradeSystem). The server evaluates item upgrade jewels first; only jewels not declared there are handled by this system. Do not declare the same jewel in both files.
- When an item is moved to the warehouse, traded or moved to another slot, the server resends the option list so the tooltip is always correct. The options of items in the warehouse are loaded when the warehouse is opened.
Reloading the configuration
Press Reload plugin in the GameServer control panel: the file is reloaded and the server resends the item options to everyone online, and also recalculates character stats.