Go Back   EQEmulator Home > EQEmulator Forums > Quests > Quests::Q&A

Quests::Q&A This is the quest support section

Reply
 
Thread Tools Display Modes
  #1  
Old 02-14-2013, 06:18 PM
SavageDeath
Fire Beetle
 
Join Date: Jan 2013
Location: In the USA
Posts: 15
Default

@Zaela_S, thanks for your ideas. That would be one way to do it yeah.
But I was looking for a way to modify it so they would just accept bigger values without having to do a major over haul on the current working system.
One would think modifying it to accept values over 2.14 billion wouldn't be all that hard seeing as its already set up to accept values to 2.14 billion with int32.
I know 2.14 billion is the cap of int32 which is why one would think changing all the places that HP is pulled and set from to int64 instead of int32 would work. Again I don't know much about C++, if I'm mistaken someone please correct me.
Reply With Quote
  #2  
Old 02-14-2013, 06:58 PM
Zaela_S
Hill Giant
 
Join Date: Jun 2012
Posts: 216
Default

If you want a significant change, you'll have to be ready to do a little work, I think. If you don't want to put in too much effort, you'll probably just have to accept mobs having multiple HP bars or multiple phases. Honestly the system I described probably wouldn't be that difficult; it could be knocked out in a day with a little patience, I think.

Upon further thought making the HP system I described extremely flexible wouldn't be too complicated even: you'd only need 3 tracking values and 2 starting NPC data values.

The first value would be a uint32 that is directly decreased by damage. The second value would be a uint32 that defines how many times the first value is in 1% of the total. The third value would be an int8 to track the NPC's current HP %.

When damage would put the first value below 0, the second value will decrement, the first value will reset to its starting value, and any excess damage will bleed over. Whenever the second value hits 0, the third value will decrement, the second value will reset, and the players will rejoice at a sign of progress. At that point it would basically just be a matter of making Death occur when the third value hits 0 or -1.

At that point the HP cap would be around... (4.29b^2)*100... so high you'd need to use scientific notation to describe how much HP something has. What more could you ask for.
Reply With Quote
  #3  
Old 02-14-2013, 08:09 PM
orionsun
Banned
 
Join Date: May 2009
Location: USA
Posts: 22
Default

Don't worry Zeela, most of the people here don't actually want to do any work, they just keep asking the same question until somebody else does it for them.

ghanja doesnt even realize the reason you didn't post a diff is because you did your version of this in Lua.
Reply With Quote
  #4  
Old 02-14-2013, 10:27 PM
ghanja's Avatar
ghanja
Dragon
 
Join Date: Aug 2012
Location: Hershey, PA
Posts: 499
Default

Quote:
Originally Posted by orionsun View Post
Don't worry Zeela, most of the people here don't actually want to do any work, they just keep asking the same question until somebody else does it for them.

ghanja doesnt even realize the reason you didn't post a diff is because you did your version of this in Lua.
Oh, you did know you were replying to me. However, let me quote you here just one last time (you are obviously trolling) in case you decide to edit.

Let me just say, this response of yours is, well, shows your ass. Good day sir.
Reply With Quote
  #5  
Old 02-14-2013, 08:41 PM
lerxst2112
Demi-God
 
Join Date: Aug 2010
Posts: 1,742
Default

Quote:
Originally Posted by SavageDeath View Post
@Zaela_S, thanks for your ideas. That would be one way to do it yeah.
But I was looking for a way to modify it so they would just accept bigger values without having to do a major over haul on the current working system.
One would think modifying it to accept values over 2.14 billion wouldn't be all that hard seeing as its already set up to accept values to 2.14 billion with int32.
I know 2.14 billion is the cap of int32 which is why one would think changing all the places that HP is pulled and set from to int64 instead of int32 would work. Again I don't know much about C++, if I'm mistaken someone please correct me.
Hit Points are used all over the place, so thinking it wouldn't be a major overhaul is just silly. One might think it wouldn't be all that hard, and really it isn't, but as you've said you don't know a bunch about C++ and although it isn't a difficult change it does require that all places in the code that manipulate the value in any way be changed to allow a larger data type.

Since you didn't explain why you need to change this I'd assume it's because you want to see really big numbers for damage. Well, that introduces another set of problems as all of the damage calculations are subject to overflow at some point too, so you'd be back saying "hey guys, why is my damage negative" before long.

If it is super important to you, good luck, you'll need it. If not, just scale your damage so it works within the existing confines and be happy.
Reply With Quote
  #6  
Old 02-14-2013, 08:56 PM
SavageDeath
Fire Beetle
 
Join Date: Jan 2013
Location: In the USA
Posts: 15
Default

Quote:
Originally Posted by lerxst2112 View Post
Hit Points are used all over the place, so thinking it wouldn't be a major overhaul is just silly. One might think it wouldn't be all that hard, and really it isn't, but as you've said you don't know a bunch about C++ and although it isn't a difficult change it does require that all places in the code that manipulate the value in any way be changed to allow a larger data type.

Since you didn't explain why you need to change this I'd assume it's because you want to see really big numbers for damage. Well, that introduces another set of problems as all of the damage calculations are subject to overflow at some point too, so you'd be back saying "hey guys, why is my damage negative" before long.

If it is super important to you, good luck, you'll need it. If not, just scale your damage so it works within the existing confines and be happy.
Thanks man, and you are correct about the damage, I have actually already modified that to support the bigger damage =D works great doesn't ever go into negative numbers and my gm hits for over 20mil (a regular players max hit is around 900k) which is why I wanted to change the cap on HP but yeah I'll just need to go through the source again with a fine tooth comb and give it a long hard look. Thanks for the support.

@orionsun you could of been directing that statement at more than one person. And seeing as I started the thread I would assume the replies that follow would be directed at me.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 04:43 AM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3