Jump to content

Icon in reset zones


Recommended Posts

Hello everybody.

 

I need help with something and i don't know how to do it, there it goes.

 

How can i apply a buff (That does not hurt, you only see the icon at the bottom left) when you enter specific regions.

 

I am doing reset zones, in cities and towns and i would like an icon to appear at the bottom left when they enter those regions.

I have already configured the message of when you enter, it warns that you are in reset zones, but i would like put an icon or permanent buff while you are in those areas.

 

Thank you !

Link to comment
Share on other sites

I don't know how the messages can be edited so I put it as an answer and if I'm doing something wrong, please correct me.

I've been thinking and I think there may be a way to do it.

 

Just as when you enter an area with radiation, the radiation buff is applied to you, so you could paint in the radiation.png the areas where I want that buff to appear (not damage) to warn that we are in a pvp area and reset ??

 

If so, how and where should I put the command line? I'm sorry but I am a very novice programmer and I wouldn't know what command line to put in order for this to work.

Link to comment
Share on other sites

General method: Go to Data/Config in your installation directory, read and search the xml files for information how it is done at the moment. Usually the stuff has names reminding everyone for what they are used

 

In this case looking for the term "radiation" might bring up some relevant hits (don't forget to set your search so you ignore lower/upper case). Also I would think the files buffs.xml, Localization.txt and files in XUi could/should be relevant.

 

Change the information there to your liking, test, rinse, repeat

 

Edited by meganoth (see edit history)
Link to comment
Share on other sites

Hello meganoth and thank you for your reply.

 

I have managed to add the buffs when entering and leaving the PVP or PVE zone whit this script:

 

<ReY_BRuJo>
	
	<append xpath="/buffs/buff[@name='buffStatusCheck01']/effect_group">
		<triggered_effect trigger="onSelfBuffUpdate" action="AddBuff" buff="BuffPVP">
			<requirement name="NotHasBuff" buff="god"/>
			<requirement name="CVarCompare" cvar="_biomeradiation" operation="Equals" value="1"/>
		</triggered_effect>
	
	    <triggered_effect trigger="onSelfBuffUpdate" action="AddBuff" buff="BuffPVE">
			<requirement name="NotHasBuff" buff="god"/>
			<requirement name="CVarCompare" cvar="_biomeradiation" operation="Equals" value="0"/>
		</triggered_effect>
		
	</append>

	<append xpath="/buffs">
		<buff name="BuffPVP" name_key="buffNearDeathTraumaName" description_key="buffNearDeathTraumaDesc" icon="ui_game_symbol_near_death_trauma" icon_color="255,0,0" icon_blink="true" remove_on_death="false" hidden="false">
			<stack_type value="ignore"/>
			<duration value="10"/>
		    <update_rate value=".0001"/>
		    <effect_group>
			    <triggered_effect trigger="onSelfBuffRemove" action="RemoveBuff" buff="BuffPVE">
					<requirement name="CVarCompare" cvar="_biomeradiation" operation="Equals" value="0"/>
				</triggered_effect>
		    </effect_group>
		</buff>

	    <buff name="BuffPVE" name_key="buffNearDeathTraumaName" description_key="buffNearDeathTraumaDesc" icon="ui_game_symbol_near_death_trauma" icon_color="0,255,0" icon_blink="false" remove_on_death="false" hidden="false">
			<stack_type value="ignore"/>
			<duration value="10"/>
		    <update_rate value=".0001"/>
		    <effect_group>
			    <triggered_effect trigger="onSelfBuffRemove" action="RemoveBuff" buff="BuffPVE">
					<requirement name="CVarCompare" cvar="_biomeradiation" operation="Equals" value="1"/>
				</triggered_effect>			
		    </effect_group>
		</buff>
		
	</append>

</ReY_BRuJo>

 

It works fine but i have a problem and i don't know how to solve it.

In the line <duration value="10"/> i have set 10 seconds, but i have been testing and i have put 100, the question is that when i change the PVE zone to PVP and conversely, the buff icon does not disappear until that time passes, even after adding the following line: <requirement name="CVarCompare" cvar="_biomeradiation" operation="Equals" value="1"/>

 

Can you tell me where the problem is?

 

Thank you.

Link to comment
Share on other sites

1 hour ago, reybrujo said:

...

You'd need to add an onselfbuffupdate to remove the opposite buffs, when you add the other. in your first buff.

 


	    <triggered_effect trigger="onSelfBuffUpdate" action="AddBuff" buff="BuffPVE">
			<requirement name="NotHasBuff" buff="god"/>
			<requirement name="CVarCompare" cvar="_biomeradiation" operation="Equals" value="0"/>
		</triggered_effect>

 change that to:

 


	    <triggered_effect trigger="onSelfBuffUpdate" action="RemoveBuff" buff="BuffPVP">
			<requirement name="NotHasBuff" buff="god"/>
			<requirement name="CVarCompare" cvar="_biomeradiation" operation="Equals" value="0"/>
		</triggered_effect>


	    <triggered_effect trigger="onSelfBuffUpdate" action="AddBuff" buff="BuffPVE">
			<requirement name="NotHasBuff" buff="god"/>
			<requirement name="CVarCompare" cvar="_biomeradiation" operation="Equals" value="0"/>
		</triggered_effect>



and the same thing with the other part. Also of note an update rate of .0001 is extremely un needed and may cause fps issues if that buff is added to several people at once. every .0001 second it would be forced to check those variables. An update rate of .1 to .3 would be more then enough for this type of buff.. i'd even say a 1 sec update check would suffice. but just food for thought for ya.

Link to comment
Share on other sites

10 hours ago, Telric said:

and the same thing with the other part. Also of note an update rate of .0001 is extremely un needed and may cause fps issues if that buff is added to several people at once. every .0001 second it would be forced to check those variables. An update rate of .1 to .3 would be more then enough for this type of buff.. i'd even say a 1 sec update check would suffice. but just food for thought for ya.

 

Yeeees, it works perfectly!!!!!!!

 

I only needed those lines to leave it as i wanted.

 

I have also listened to you in your recommendation of 0001 to 1.

 

Thank you very much for your help!!!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...