Jump to content
  • 0

How to have custom option name for item_randomopt_db


ahakiko

Question


  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  2
  • Reputation:   1
  • Joined:  04/10/23
  • Last Seen:  

I would like to have custom option for my server. Is it possible to have custom name and id without adding custom one to the source ? Or can I use const.yml to define my custom option name

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  227
  • Reputation:   96
  • Joined:  06/02/12
  • Last Seen:  

Hi. Yes, it it possible to have custom name and id without adding custom one to the source.
No, you can't use const.yml.

Add the custom random options in \db\import\item_randomopt_db.yml. (The Id and Option values are unique and need to be the same in all 3 files.)
Example:

Body:
  - Id: 255
    Option: VAR_SUPERAHAKIKO
    Script: |
      bonus bMaxHP,getrandomoptinfo(ROA_VALUE);
  - Id: 256
    Option: VAR_HYPERCUSTOMEFFECT
    Script: |
      bonus bMaxSP,getrandomoptinfo(ROA_VALUE);

 

Then save the file and use @reloaditemdb or restart the server. You have custom random options!

Now to add names, inside the client folder/grf: open \data\LuaFiles514\Lua Files\Datainfo\enumvar.lub and add your custom options following the example:

	VAR_HEAL_PLUS = { 253, 254 },
	VAR_CRITICAL_RATE = { 254, 253 },
	VAR_SUPERAHAKIKO = { 255, 255 },
	VAR_HYPERCUSTOMEFFECT = { 256, 256 },
	EnumVAR_LAST = { 257, 0 }

Then open \data\LuaFiles514\Lua Files\Datainfo\addrandomoptionnametable.lub and follow the example to add the ingame names.

	[EnumVAR.VAR_HEAL_PLUS[1]] = "H.PLUS + %d",
	[EnumVAR.VAR_CRITICAL_RATE[1]] = "C.RATE + %d",
	[EnumVAR.VAR_SUPERAHAKIKO[1]] = "All stats + %d",
	[EnumVAR.VAR_HYPERCUSTOMEFFECT[1]] = "All traits + %d",
	[EnumVAR.EnumVAR_LAST[1]] = "END"

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...