Random Options

Note

This will only explain the client side, please visit the original topic for more information about the server-side of it, if it's explained.

Disclaimer

I don't take any credit for the copied guide.


Original by Easycore

Introduction

In this guide I will introduce you how to implement custom Random Options.
I will use as an example the bonus "bAddEff".

Guide

To display our custom options must be added to data\luafiles514\lua files\datainfo\enumvar.lub and data\luafiles514\lua files\datainfo\addrandomoptionnametable.lub

enumvar.lub

Find:

	VAR_CRITICAL_RATE = { 254, 10 },
And add:
	WEAPON_FREEZE = {255, 0 },

Info

The first number must be same that added in db\re\item_randomopt_db.yml

addrandomoptionnametable.lub

Find:

	[EnumVAR.MDAMAGE_SIZE_LARGE_USER[1]] = "Magical resistance Large size monster +%d%%",
And add:
	[EnumVAR.WEAPON_FREEZE[1]] = "Freeze an enemy when attacking +%d%%",

Info

%d% is equal to ROA_VALUE.*

After completing all of the above your Random Option is ready to use.
Remember that there is documentation of how to add random options to items and a sample npc.