Overview
Players open the Fashion window with the Fashion button in the Inventory panel (next to the Artifact button). The window has tabs by currency type; players preview the 3D model, view the requirements and bonus stats, then buy, equip or remove. Rules:
- Each character can wear only 1 fashion at a time; equipping another one removes the stats of the previous one.
- When equipped, the character's appearance changes in the game world (other players in view can see it too). Bonus stats are shown in the character panel.
- Fashions are either permanent or rented for a period of time. Buying a fashion that is currently rented (and still configured as rental) will extend it:
Durationis added to the old expiry time. When it expires, it is deleted and can be rented again, and the player receives a notification. - Buying, equipping and loading the list all check the character class, total level, reset and VIP.
- The client only receives the list of fashions that match its own character class.
Requirements
- The
Fashionplugin purchased and[Plugin] Fashion = 1inData\Plugin\Plugin.ini, andEnable="1"inFashion.xml. - The
chr_fashiontable in the game database. GameServer creates it automatically on startup; if it cannot be created, Fashion is disabled and an error is written to the log (in that case, run the Fashion SQL script included with the Update). - Client: new version of
Main.dll;Data\Interface\GFx\InventoryFrame.ozgwith thebtnFashionbutton; theFashion.ozgwindow; the fileData\Custom\local\fashion.bmd(table mapping FashionID to the .bmd mesh file and texture folder); the corresponding fashion model files; a customizedtext.bmd(IDs 96 to 110 are used for the window text; currency name = ID 101 + PriceType).
[NEEDS CHECKING: the Model attribute in Fashion.xml is sent by GameServer to the client (used for the preview frame), but the client code reads the mesh by FashionID in fashion.bmd; the site owner should confirm the actual role of Model when creating a new fashion. fashion.bmd record: IAUM format, each record is 260 bytes (FashionID, model folder, model file, texture folder), XOR-encrypted; use EDITOR to create it instead of editing by hand.]
Configuration Data\Plugin\Fashion\Fashion.xml
Structure: <Fashion Enable> contains <Group> tags (each Group = 1 currency tab); a Group contains <Item> tags; an Item contains <Require> (up to 4) and <Option> (up to 8).
ID of a fashion that players already own, because the ID is stored in the database.<Fashion> tag
| Key | Value | Default | Meaning |
|---|---|---|---|
Enable |
0 / 1 | 0 (when the attribute is missing) | 1 = enable the system, 0 = disable. When disabled, the message "The Fashion system is currently disabled." is shown. |
<Group> tag
| Key | Value | Default | Meaning |
|---|---|---|---|
PriceType |
0 to 5 | none (missing / out of range: the whole Group is skipped and an error is logged) | Currency type of the whole Group: 0 = Free, 1 = Zen, 2 = WCoin, 3 = GCoin (Goblin Point), 4 = Ruud, 5 = Exchange (items only, see Require). For 0 and 5 the Price value is ignored (treated as 0). |
Name |
text | - | Just a note for you; it is not read. |
<Item> tag
| Key | Value | Default | Meaning |
|---|---|---|---|
ID |
1 to 65535 | 0 (invalid) | Fashion code, unique across the whole file. Wrong or duplicate ID: the item is skipped and an error is logged. |
Name |
UTF-8 text | empty | Name shown in the window. |
NameColor |
hex RRGGBB | FFFFFF |
Name color. |
Model |
number | 0 | Model code sent to the client for the 3D preview (see the NEEDS CHECKING note above). |
Price |
non-negative integer | 0 | Price in the Group's currency type (ignored for Free and Exchange). |
Duration |
-1 or number of seconds | -1 | -1 = permanent. Greater than 0 = rental, seconds counted from the time of purchase (86400 = 1 day, 604800 = 7 days, 2592000 = 30 days). A value of 0 or less than -1 is also treated as permanent. |
DW, DK, ELF, MG, DL, SU, RF, GL, RW, SLA, GC, LW, LM, IK, AC, CRU |
0 / 1 | 0 | Class flags (class codes 0 to 15 in order: Dark Wizard, Dark Knight, Fairy Elf, Magic Gladiator, Dark Lord, Summoner, Rage Fighter, Grow Lancer, Rune Wizard, Slayer, Gun Crusher, Light Wizard, Lemuria Mage, Illusion Knight, Alchemist, Crusader). 1 = that class may buy / equip it (all evolution stages of a class share the same flag). Missing or 0 = not allowed. An item for all classes must have all 16 flags set to 1. Buying with an invalid class: "This fashion is not available for your class.". |
PlayerMinLevel |
number or MAX |
0 | Minimum total level (normal level + Master / Majestic; the latter two only count once the normal level is at maximum). A value of MAX or empty = no limit. |
PlayerMaxLevel |
number or MAX |
MAX (no limit) |
Maximum total level. |
PlayerMinReset |
number or MAX |
0 | Minimum reset count. |
PlayerMaxReset |
number or MAX |
MAX (no limit) |
Maximum reset count. |
VIP |
-1 or number | -1 | -1 = no VIP needed. 0 or higher = the character must have a VIP (VIPSystem.xml) with an ID equal to or greater than this value. |
BuffIndex |
buff ID | 0 | Optional. Buff ID whose icon is shown on the character while the fashion is worn (a permanent buff while equipped). A buff ID only works once: if it duplicates the ID of an inventory item in UseInventoryItem.xml, the fashion takes priority; if the character already has that buff from another source (for example a timed buff), the fashion gives no buff and no stats until that buff ends. |
<Require> tag (up to 4 per Item)
Items the player must hand in from the inventory to buy or extend. Mandatory in a PriceType 5 Group (without a valid Require the item is skipped and an error is logged); it can also be used in a currency Group (pay currency and hand in items at the same time).
| Key | Value | Default | Meaning |
|---|---|---|---|
Item |
Type,Index from ItemList.xml |
required | Example 14,13 = Jewel of Bless. Not in ItemList: the line is skipped and an error is logged. |
Level |
-1 or number | -1 | -1 = any level; 0 or higher = minimum item level. |
Count |
integer >= 1 | 1 | Quantity (stackable items are counted by quantity). |
Scale |
0.1 to 5.0 | 1.0 | Icon size in the client's "Required Item" slot. |
Items in use (a pet / mount being ridden, equipped items) are never taken. If there are not enough items: "You do not have the required items." Items and currency are deducted only when all requirements are met.
<Option> tag (up to 8 per Item)
| Key | Value | Default | Meaning |
|---|---|---|---|
Type |
number 1 to 23 | 0 (invalid: the line is skipped and an error is logged) | Stat type (table below). Number 24 is reserved, do not use. |
Value |
integer | 0 | Bonus value, effective only while equipped. |
Name |
text | - | Just a note; it is not read. |
| Type | Name | Effect |
|---|---|---|
| 1 | HP | Max HP +Value |
| 2 | MP | Max MP +Value |
| 3 | SD | Max SD +Value |
| 4 | AG | Max AG +Value |
| 5 | STR | Strength +Value |
| 6 | AGI | Agility +Value |
| 7 | VIT | Vitality +Value |
| 8 | ENE | Energy +Value |
| 9 | CMD | Command +Value |
| 10 | Damage | Physical damage (min + max) +Value |
| 11 | MagicDamage | Wizardry and curse damage +Value |
| 12 | Defense | Defense +Value |
| 13 | AttackSpeed | Attack speed + magic speed +Value |
| 14 | CriticalRate | Critical damage rate +Value % |
| 15 | ExcellentRate | Excellent damage rate +Value % |
| 16 | DoubleDamageRate | Double damage rate +Value % |
| 17 | IgnoreDefenseRate | Ignore defense rate +Value % |
| 18 | DamageReduction | Damage reduction +Value % |
| 19 | ElementalDamage | Elemental damage (min + max) +Value |
| 20 | ElementalDefense | Elemental defense +Value |
| 21 | SkillDamage | Skill damage +Value |
| 22 | CriticalDamage | Critical damage +Value |
| 23 | ExcellentDamage | Excellent damage +Value |
Rates are capped by the server's global maximum. The text of each stat line in the client comes from Lang (group <Fashion>).
Example (abridged)
<Fashion Enable="1">
<Group PriceType="1" Name="Zen">
<Item ID="3" Name="Fashion 3" NameColor="FFD700" Model="1468" Price="500000" Duration="-1" DW="1" DK="1" ELF="1" MG="1" DL="1" SU="1" RF="1" GL="1" RW="1" SLA="1" GC="1" LW="1" LM="1" IK="1" AC="1" CRU="1" PlayerMinLevel="1" PlayerMaxLevel="MAX" PlayerMinReset="0" PlayerMaxReset="MAX" VIP="-1">
<Option Type="5" Name="STR" Value="100" />
<Option Type="18" Name="DamageReduction" Value="3" />
</Item>
</Group>
<Group PriceType="5" Name="Exchange">
<Item ID="9" Name="Fashion 9" NameColor="FFD700" Model="1468" Duration="-1" DW="1" PlayerMinLevel="1" PlayerMaxLevel="MAX" VIP="-1">
<Require Item="14,13" Level="-1" Count="5" Scale="2.0" />
<Option Type="1" Name="HP" Value="5000" />
</Item>
</Group>
</Fashion>
Database
Table chr_fashion: char_guid, fashion_id, active (1 = equipped), expire_at (unix time, 0 = permanent), bought_at (unix time). Primary key (char_guid, fashion_id); deleting a character also deletes its data. Every purchase / extension is written to the player log.
Messages (Lang)
The <Fashion> group in Data\Lang\*.xml (<Msg ID=... Text=.../> tags):
| ID | Content (English.xml) |
|---|---|
| 1 to 7 | Requirement lines: "Level %d~%d", "Level %d+", "Level up to %d", "Reset %d~%d", "Reset %d+", "Reset up to %d", "VIP %d+" |
| 8 to 16 | Duration: "%d day(s)", "%d hour(s)", "%d minute(s)", "No requirements", "Required: %s", "Duration: %s", "Remaining: %s", "%d day(s) %d hour(s)", "%d hour(s) %d minute(s)" |
| 20 to 42 | Stat lines by Option Type (for example ID 20 = "Max HP +%d", ID 37 = "Damage Reduction +%d%%"): ID = 19 + Type |
| 60 | Not enough currency to buy this fashion. |
| 61 | Your level is not in the range required for this fashion. |
| 62 | This fashion is not available for your class. |
| 63 | You already own this fashion. |
| 64 | You do not own this fashion. |
| 65 | Fashion purchased. |
| 66 | Fashion equipped. |
| 67 | Fashion removed. |
| 68 | Your fashion has expired. |
| 69 | This fashion is not available. |
| 70 | The Fashion system is currently disabled. |
| 72 | Your reset count is not in the range required for this fashion. |
| 73 | You need a higher VIP level for this fashion. |
| 74 | Fashion rental extended. |
| 75 | You do not have the required items. |
Reloading the configuration
Edit Fashion.xml or enable / disable [Plugin] Fashion, then click Reload plugin on the GameServer control panel; no restart is needed. Fashions whose configuration has changed (class removed, no longer valid) are re-checked for players who are online.
[NEEDS CHECKING: the exact behavior for online players after Reload plugin when an Item is removed from Fashion.xml (the code has a Revalidate function that checks the class / existence of the equipped item, but the time it is called has not been verified).]