vbGore Free Online RPG Engine

Revolutionizing Visual Basic ORPG Development
It is currently Sat Oct 25, 2014 3:30 pm

All times are UTC - 8 hours




Post new topic Reply to topic  [ 15 posts ] 
Author Message
 Post subject: Name Colors depending on HP Percent
PostPosted: Fri Jul 18, 2008 10:24 am 
Aleron Coder

Joined: Fri Jan 05, 2007 5:36 am
Posts: 2964
Location: Germany
Something rather simple and quick.
I did this for my game and it was so little, it was 0 extra work to copy paste it for others.

As some new people don't check the Wiki or could miss this,
and this is maybe something some people would like to have,
I'm writing about it here aswell.

Here's the Link to the Quick Tutorial. :P

http://www.vbgore.com/Name_Healthdisplay

best used together with this:

http://www.vbgore.com/Name_Border

I'm really not good with Wiki Syntax, so if someone can fix that up, please do so XD


Top
 Profile  
 
 Post subject: Re: Name Colors depending on HP Percent
PostPosted: Thu Jul 31, 2008 5:19 am 
Source Code Swashbuckler

Joined: Mon Jul 28, 2008 9:25 am
Posts: 29
This is very nice!
thanks for this tutorial, its a nice feature.


Last edited by Odys on Mon Oct 27, 2008 1:30 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: Name Colors depending on HP Percent
PostPosted: Thu Jul 31, 2008 7:07 am 
Aleron Coder

Joined: Fri Jan 05, 2007 5:36 am
Posts: 2964
Location: Germany
simply check where you render the characters (its a little above this in the code)
there it renders the character.
wherever you want to have it render something different,
take the example of that code for the condition checking.
And tell it what body Grh to render.


Top
 Profile  
 
 Post subject: Re: Name Colors depending on HP Percent
PostPosted: Thu Jul 31, 2008 8:04 am 
=^.^= Kitty =^.^=

Joined: Wed Mar 21, 2007 6:50 am
Posts: 1002
Location: Belgium
Yep we got this in SVO for a while already.

1-25% = Red colored HP
26-45% = Yellow colored HP
46-100% = White


Top
 Profile  
 
 Post subject: Re: Name Colors depending on HP Percent
PostPosted: Thu Jul 31, 2008 8:07 am 
Aleron Coder

Joined: Fri Jan 05, 2007 5:36 am
Posts: 2964
Location: Germany
since what version? :D


Top
 Profile  
 
 Post subject: Re: Name Colors depending on HP Percent
PostPosted: Thu Jul 31, 2008 8:07 am 
Bytewise Operator

Joined: Thu Jul 24, 2008 12:44 pm
Posts: 132
They were discussing about the sprites, good Idea though, you could make a sprite with damaged clothes or something when he is hurt.


Last edited by Tharsten on Mon Oct 27, 2008 1:29 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: Name Colors depending on HP Percent
PostPosted: Thu Jul 31, 2008 8:11 am 
Aleron Coder

Joined: Fri Jan 05, 2007 5:36 am
Posts: 2964
Location: Germany
Tharsten wrote:
Odys wrote:
This is very nice!
But is it possible to make youre sprite change ( or just add a different Grh on top of your sprite ) when you have 10% health less? that would be very nice!
but anyway thanks for this tutorial, its a nice feature.


They were discussing about the sprites, good Idea though, you could make a sprite with damaged clothes or something when he is hurt.

my reply is about the sprites and anything paperdoll related,
though I'm not going to write a tut for it (at least not soon)


Top
 Profile  
 
 Post subject: Re: Name Colors depending on HP Percent
PostPosted: Thu Jul 31, 2008 8:13 am 
Bytewise Operator

Joined: Thu Jul 24, 2008 12:44 pm
Posts: 132
uh ok, I wasn't asking for that either if you thought so, Ill try it myself before I ask for help


Top
 Profile  
 
 Post subject: Re: Name Colors depending on HP Percent
PostPosted: Thu Jul 31, 2008 8:19 am 
Aleron Coder

Joined: Fri Jan 05, 2007 5:36 am
Posts: 2964
Location: Germany
Tharsten wrote:
uh ok, I wasn't asking for that either if you thought so, Ill try it myself before I ask for help

I'm sure you can do it with little-no help ;)


Top
 Profile  
 
 Post subject: Re: Name Colors depending on HP Percent
PostPosted: Thu Jul 31, 2008 9:39 am 
Bytewise Operator

Joined: Thu Jul 24, 2008 12:44 pm
Posts: 132
Thanks

Lol, my first try was no succes, I managed to mess up all the graphics and ended with only a shadow shown as sprite, so on to plan B I guess


Top
 Profile  
 
 Post subject: Re: Name Colors depending on HP Percent
PostPosted: Thu Jul 31, 2008 12:01 pm 
Source Code Swashbuckler

Joined: Mon Jul 28, 2008 9:25 am
Posts: 29
I tried some things too, I've been busy with it all day, but i dont get it working.
Can you explain a little bit how i can do it Zanval?

Thanks


Top
 Profile  
 
 Post subject: Re: Name Colors depending on HP Percent
PostPosted: Thu Jul 31, 2008 1:14 pm 
=^.^= Kitty =^.^=

Joined: Wed Mar 21, 2007 6:50 am
Posts: 1002
Location: Belgium
Zanval wrote:
since what version? :D


Since some time ago >_> Don't know the version ^^


Top
 Profile  
 
 Post subject: Re: Name Colors depending on HP Percent
PostPosted: Fri Aug 01, 2008 8:30 am 
Slave to the BB

Joined: Tue Jul 31, 2007 8:45 am
Posts: 3273
Location: United Kingdom
What, no we don't skye. XD

In SVO, the name colour changes according to whether it's an friendly npc (green), an attackable npc (red), or a player (white).
However, in the healthwindow we have, the colour of the numbers change according to the players hp. :)


Top
 Profile  
 
 Post subject: Re: Name Colors depending on HP Percent
PostPosted: Fri Aug 01, 2008 9:01 am 
=^.^= Kitty =^.^=

Joined: Wed Mar 21, 2007 6:50 am
Posts: 1002
Location: Belgium
Yeah I meant the coloring of the HP numbers :P


Top
 Profile  
 
 Post subject: Re: Name Colors depending on HP Percent
PostPosted: Fri Aug 01, 2008 8:22 pm 
Aleron Coder

Joined: Fri Jan 05, 2007 5:36 am
Posts: 2964
Location: Germany
:P

BTW this can easily be modified to what many modern MMORPGs have.
Throw in a "Level" field for the NPCs, and displaythe name colors according to level difference.

Player lvl 10 sees NPCS:
Friendly (lvl 0) - white
Monster (lvl 3) - green
Monster (lvl 7) - Blue
Monster (lvl 9) - Yellow
Monster (lvl 13) - Orange
Monster (lvl 25) - Red

you compare the players ELV to the "useless" NPCs ELV

Of course only useless if you dont include it in damage/hit calc like in shaiya


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 15 posts ] 

All times are UTC - 8 hours


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group