View Single Post
  #1  
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