Advertisement
existence_dev92

[Guide] Custom Icon Status

Mar 11th, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.11 KB | None | 0 0
  1. http://herc.ws/board/topic/7526-guide-adding-new-status-icons/
  2.  
  3. Here's a Guide to Add a New Custom Status Icons(the one displayed on the right)
  4.  
  5. What you Need?
  6.  
  7. - Knowledge of Editing and Compiling Server(and ofcourse custom icons)
  8.  
  9. Step by Step:
  10.  
  11. 1. Server Side Edits
  12. - open: src/map/status.h
  13.  
  14. Find: SC_MAX
  15. Add Before: SC_MYCUSTOMBUTTON,
  16.  
  17. Find: SI_MAX,
  18. Add Before: SI_MYCUSTOMBUTTON = ID_OF_BUTTON,
  19.  
  20. P.S: (ID of Button can be any, but I suggest to have them > 2000, so not to avoid any updates with kRO(which is at 900) now),
  21. Remember that ID_OF_BUTTON, we gonna need them later.
  22.  
  23. - open: src/map/status.c
  24. Find: status->IconChangeTable[SC_DECORATION_OF_MUSIC] = SI_DECORATION_OF_MUSIC;
  25. Add Below: status->IconChangeTable[SC_MYCUSTOMBUTTON] = SI_MYCUSTOMBUTTON;
  26.  
  27. - Recompile
  28.  
  29. 2) Client Side Edits
  30. - Get a CleanCopy of statusicon folder (https://github.com/ROClientSide/Translation/tree/master/Data/luafiles514/lua%20files/stateicon)
  31. - Open: efstids.lub
  32. Find: __newindex = function()error("unknown state")
  33. Before it Add: EFST_MYCUSTOMBUTTON = ID_OF_BUTTON,
  34.  
  35. P.S: ID_OF_BUTTON should match the one on source(status.h)
  36.  
  37. - Open: stateiconinfo.lub
  38. Find: StateIconList[EFST_IDs.EFST_JUMPINGCLAN] = {
  39. Add Before: StateIconList[EFST_IDs.EFST_MYCUSTOMBUTTON] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { { "My Custom Button Heading", COLOR_TITLE_BUFF }, {"%s", COLOR_TIME}, --do not edit this, this shows time remaining { "Description 1" }, { "Description 2" }, { "Description 3" } }}
  40.  
  41. - Open: stateiconimginfo.lua
  42. Find: [PRIORITY_GOLD] = { OR
  43.  
  44. [PRIORITY_RED] = { OR
  45.  
  46. [PRIORITY_BLUE] = { OR
  47.  
  48. [PRIORITY_GREEN] = { OR
  49.  
  50. [PRIORITY_WHITE] = {
  51.  
  52. (Depending on what background your Custom Button is)
  53.  
  54. Add below it: [EFST_IDs.EFST_MYCUSTOMBUTTON] = "MYCUSTOMBUTTONFILE.TGA",
  55. P.S: Your Button File must be in .TGA form only.
  56. tga file must go to data/texture/effect/ Folder
  57.  
  58.  
  59.  
  60. -- And Its DONE!!! NOTE: Replace MYCUSTOMBUTTON with your own Icon/Effect Name
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement