Jump to content
  • 0

Needs help debugging custom status icon indicating vip status [0 errors when compiled but nothing shows on client]


popochun

Question


  • Group:  Members
  • Topic Count:  3
  • Topics Per Day:  0.00
  • Content Count:  5
  • Reputation:   0
  • Joined:  06/30/20
  • Last Seen:  

I have browsed around the forum and found the following threads.

[Release+Guide] Common Ailment Status Icon [Unofficial] Extra Status Icons

I followed the instruction detailed in those threads and found partial success ( server compiled and executed without any errors ). However the status icon still did not show up and I'm not sure what I missed. I'm hoping that someone might be able to point me to the right direction.

Here's what I did

Server-side:

Status.hpp:

add EFST_VIPSTATE before EFST_MAX

/// @APIHOOK_END
/// Do not modify code above this, since it will be automatically generated by the API again
	EFST_VIPSTATE = 1500,
	EFST_MAX,
};

add SC_VIPSTATE before SC_MAX

	SC_VIPSTATE,
	SC_MAX, //Automatically updated max, used in for's to check we are within bounds.
};

Status.cpp

add the following line into initChangeTables function

	StatusIconChangeTable[SC_VIPSTATE] = EFST_VIPSTATE;

 map/script_constants.hpp

export script efst_vipstate constant 

export_constant(EFST_VIPSTATE);

 

Client Side:

Create "custom.grf" and set itas the first index in DATA.INI

add required files into data\luafiles\lua files\stateicon (efstids.lub, stateiconimginfop.lub, stateiconinfo.lub, stateiconinfo_f.lub)

add vip status icon called  "VIP1.TGA" to data\texture\effect

data\luafiles514\lua files\stateicon\efstids.lub:

add EFST_VIPSTATE to the bottom like so:

	EFST_REF_T_POTION = 1169,
	EFST_ADD_ATK_DAMAGE = 1170,
	EFST_ADD_MATK_DAMAGE = 1171,
	EFST_VIPSTATE = 1500,
	__newindex = function()
	error("unknown state")
end
}

data\luafiles514\lua files\stateicon\stateiconimginfo.lub:

point EFST_VIPSTATE to the .tga file (in PRIORITY_WHITE section)

		[EFST_IDs.EFST_AURABLADE] = "icon04.tga",
		[EFST_IDs.EFST_HELLS_PLANT_ARMOR] = "hells_plant_armor.tga",
		[EFST_IDs.EFST_VIPSTATE] = "VIP1.TGA"
	}

data\luafiles514\lua files\stateicon\stateiconinfo.lub:

add description to the end of file

StateIconList[EFST_IDs.EFST_VIPSTATE] = {
    descript = {
        {"VIP STATUS"}
    }
}

 

Testing

To trigger vip: I use a usable item with the following script

vip_time 60;

To see vip status: I used the following script with on PC login event to display status in the chatbox and add effect/status effect to activate status icon.

OnPcloginEvent:
	bonus_script_clear EFST_VIPSTATE;
	if(vip_status(1)) {
		bonus_script "{}",99999999,0,0,EFST_VIPSTATE;
		
		dispbottom "TEST EFST_VIPSTATE" + EFST_VIPSTATE;
		dispbottom "TEST EFST_MAX" + EFST_MAX;
		//not quite needed yet
		sc_start SC_VIPSTATE,-1,0;
		set .@timer, vip_status(2);

		dispbottom "--- VIP ----";
		dispbottom "==========================";
		dispbottom "VIP Player";
		dispbottom Remaining VIP duration :"+callfunc("Time2Str",.@timer);
		dispbottom "==========================";
			end;
		}
}

 

Result:

- after using vip activation item and re-login nothing shows up

- server was compiled/built/executed without any errors/warnings

- VIP status icon did not show up on the sidebar at all (other buffs showed up fine)

 

Any help would be appreciated!

 

 

vip_didnot_show.PNG

vip_icon.PNG

Edited by popochun
reduce image size, added vip icon, typo in path
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:  1
  • Reputation:   0
  • Joined:  03/02/23
  • Last Seen:  

You are doing very right. Keep trying.

trap the cat

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...