Hey guys,
I'm working on a project that translates item scripts into item descriptions. The source is available at github.
The idea is simple. For example, the item script from item id 1310 (Glorious Cleaver)
{ bonus2 bAddRace,RC_DemiHuman,75; bonus2 bAddRace,RC_Player,75; bonus2 bIgnoreDefRaceRate,RC_DemiHuman,20; bonus2 bIgnoreDefRaceRate,RC_Player,20; bonus bUnbreakableWeapon; .@r = getrefine(); if(.@r>5) { bonus2 bAddRace,RC_DemiHuman,pow(min(14,.@r)-4,2); bonus2 bAddRace,RC_Player,pow(min(14,.@r)-4,2); bonus2 bIgnoreDefRaceRate,RC_DemiHuman,5; bonus2 bIgnoreDefRaceRate,RC_Player,5; bonus bAspdRate,5; } if(.@r>8) { bonus bAspdRate,5; bonus3 bAutoSpell,"NPC_CRITICALWOUND",1,50; bonus4 bAutoSpellOnSkill,"MC_MAMMONITE","NPC_CRITICALWOUND",2,200; } }
is converted into
Increase physical damage by 75% against demihuman enemies.
Increase physical damage by 75% against player enemies.
Pierce physical defense by 20% of demihuman enemies.
Pierce physical defense by 20% of player enemies.
Weapon is indestructible.
[Refine Count is 6 - 15]
Increase physical damage by 6% ~ 15% (Refine Count) against demihuman enemies.
Increase physical damage by 6% ~ 15% (Refine Count) against player enemies.
Pierce physical defense by 5% of demihuman enemies.
Pierce physical defense by 5% of player enemies.
Attack Speed +5%
[Refine Count is 9 - 15]
Attack Speed +5%
Add a 5% chance to cast Critical Wounds of level 1 on each normal attack.
Add a 20% chance to cast Critical Wounds of level 2 when using Mammonite.
Another example, the item script from item id 1311 (Vecer Axe)
{ if(readparam(bLuk)>=90) { bonus bBaseAtk,20; } if(readparam(bDex)>=90) { bonus bCritical,5; } if(readparam(bDex)>=90&&readparam(bLuk)>=90) { bonus2 bSkillAtk,"MC_MAMMONITE",15; } }
is converted into
[LUK is 90 - 150]
Base ATK +20
[DEX is 90 - 150]
Critical +5
[DEX is 90 - 150 and LUK is 90 - 150]
Increase damage of Mammonite by 15%.
The tool has a few limitations regarding non-trivial code structures and unsupported statements, functions, and etc.
However, the tool's one major advantage is that there is no mismatch between the server's item scripts and client's item descriptions.
If this sounds familiar, then you may remember me from this thread.
Unlike the previous project, you can translate the json data files into another language, which is used to generate item descriptions.
Project
Language: C
License: Public Domain
Platform: Windows, Linux, Mac OS X
Dependency: jansson (MIT License)
Build: Visual Studio 2017, makefile
Support: rAthena (renewal)
To Do
lua format
flavour text [optional]
I Need Help
I need multiple sources for flavor text in English. If you have any links or files, then feel free to send them to
[email protected].
For example, the item id 1186 (Death Guidance) has the flavor text (from RMS).
All present for the destruction of weapons that exist cursed.
The sword is the curse of his master, and is the owner and make someone unhappy.