Miharukun Posted October 31, 2015 Author Share Posted October 31, 2015 Hello, do anyone know how to make max damage, deff, stats (will, str, agi, etc.) into 32k like TFF? Link to comment Share on other sites More sharing options...
sherwin Posted October 31, 2015 Share Posted October 31, 2015 @'Miharukun':> Hello, do anyone know how to make max damage, deff, stats (will, str, agi, etc.) into 32k like TFF?currently they are placed as max 255 because the variable that is being used is "Byte" just change it to "Long" and change the other process that connect with the Stats into Long Link to comment Share on other sites More sharing options...
Miharukun Posted October 31, 2015 Author Share Posted October 31, 2015 @'sherwin':> @'Miharukun':> > > Hello, do anyone know how to make max damage, deff, stats (will, str, agi, etc.) into 32k like TFF?> > currently they are placed as max 255 because the variable that is being used is "Byte" just change it to "Long" and change the other process that connect with the Stats into LongCan you show me how please shewin? I'm currently using Skywyre Primitive v7 Link to comment Share on other sites More sharing options...
sherwin Posted October 31, 2015 Share Posted October 31, 2015 I can't sorry, I'm currently busyTry to wait until someone help you with it Link to comment Share on other sites More sharing options...
Miharukun Posted October 31, 2015 Author Share Posted October 31, 2015 @'sherwin':> I can't sorry, I'm currently busy> Try to wait until someone help you with itAlright! thank you so much for the respond sher :D i'll ask my friend if they can change it for me. Link to comment Share on other sites More sharing options...
GalacticGlum Posted October 31, 2015 Share Posted October 31, 2015 Alright so atm the constant is a Byte all you have to do is find the constant and change it from "public const as Byte = xxxxxxx" to "public const as Long = xxxxxxxx". Link to comment Share on other sites More sharing options...
sherwin Posted October 31, 2015 Share Posted October 31, 2015 What are you talking about? It's not that Constant that deals with the Stats, It's on Types Link to comment Share on other sites More sharing options...
GalacticGlum Posted October 31, 2015 Share Posted October 31, 2015 Opps but it's the concept..* * *So find the type that deals with the stats and change it from "Byte" to "Long" Link to comment Share on other sites More sharing options...
Coyote Posted October 31, 2015 Share Posted October 31, 2015 Lol. just change byte to long. Search for Dim Damage as Byte and replace Byte with Long. Byte maximum is 255 and Long Maximum is 2147483647.It will be enough xD Link to comment Share on other sites More sharing options...
Growlith1223 Posted October 31, 2015 Share Posted October 31, 2015 as i read this entire thread im seeing the use of a Long in a situation where it will most likely never reach that high, it would be better to use an Integer, while it's not much there is a tiny bit of a faster read/write on Integers than what it would be on a Long Link to comment Share on other sites More sharing options...
Miharukun Posted October 31, 2015 Author Share Posted October 31, 2015 Woah thanks for the respond everyone! So, i just need to change Byte into Long? alrighty! :D once again thank you so much guys! Link to comment Share on other sites More sharing options...
BeNjO Posted October 31, 2015 Share Posted October 31, 2015 @'Growlith1223':> as i read this entire thread im seeing the use of a Long in a situation where it will most likely never reach that high, it would be better to use an Integer, while it's not much there is a tiny bit of a faster read/write on Integers than what it would be on a LongThis ^ Link to comment Share on other sites More sharing options...
Miharukun Posted October 31, 2015 Author Share Posted October 31, 2015 @'BeNjO':> @'Growlith1223':> > > as i read this entire thread im seeing the use of a Long in a situation where it will most likely never reach that high, it would be better to use an Integer, while it's not much there is a tiny bit of a faster read/write on Integers than what it would be on a Long> > This ^So i change it to Integer or Long? x-x do integer can reach 32k? Link to comment Share on other sites More sharing options...
Growlith1223 Posted October 31, 2015 Share Posted October 31, 2015 An integer's max is 32767(at least in vb6 it is, in .net it's the same size as a Long but a Long is larger in .net if i remember correctly) so yes, it can reach it, you shouldn't be using a variable bigger than what you absolutely need, it's waste of memory and a waste of speed Link to comment Share on other sites More sharing options...
Miharukun Posted October 31, 2015 Author Share Posted October 31, 2015 @'Growlith1223':> An integer's max is 32767(at least in vb6 it is, in .net it's the same size as a Long but a Long is larger in .net if i remember correctly) so yes, it can reach it, you shouldn't be using a variable bigger than what you absolutely need, it's waste of memory and a waste of speedAhh that's what i needed :DÂ thank you so much bro!so, i just go find byte and change it to Integer right? Link to comment Share on other sites More sharing options...
Growlith1223 Posted October 31, 2015 Share Posted October 31, 2015 @'Miharukun':> @'Growlith1223':> > > An integer's max is 32767(at least in vb6 it is, in .net it's the same size as a Long but a Long is larger in .net if i remember correctly) so yes, it can reach it, you shouldn't be using a variable bigger than what you absolutely need, it's waste of memory and a waste of speed> > Ahh that's what i needed :DÂ thank you so much bro!> > so, i just go find byte and change it to Integer right?Just go into modTypes, look around for PlayerRec, look for Stats(1 To Stats.StatCount - 1) As Byte. change that to an Integer, ofc you will have to change a lot of the subs that interact with those stats(change them i mean) and change their constructors(the word after As) to Integer Link to comment Share on other sites More sharing options...
Joyce Posted November 2, 2015 Share Posted November 2, 2015 As far as I am aware the runtime will convert any integers to longs in VB6(Internally, mind you.. You won't be able to use the full address space reserved for a Long yourself), which would make using an integer pointless as you'll just make it a tiny fraction slower with more limitations. Link to comment Share on other sites More sharing options...
Growlith1223 Posted November 2, 2015 Share Posted November 2, 2015 @'Joyce':> As far as I am aware the runtime will convert any integers to longs in VB6(Internally, mind you.. You won't be able to use the full address space reserved for a Long yourself), which would make using an integer pointless as you'll just make it a tiny fraction slower with more limitations.Might as well just throw a value of 1 onto a Long, im sure it'll convert!EDIT:Correction, judging from what you just said, might as well just throw no limitation and use a Single, im sure that'll be exceptionally fast Link to comment Share on other sites More sharing options...
Joyce Posted November 2, 2015 Share Posted November 2, 2015 I wonder about that, generally I would say pick what seems the most appropriate.. In this case an Integer, but VB6 Integers are rather strange. Link to comment Share on other sites More sharing options...
Growlith1223 Posted November 2, 2015 Share Posted November 2, 2015 @'Joyce':> I wonder about that, generally I would say pick what seems the most appropriate.. In this case an Integer, but VB6 Integers are rather strange.It's a small speed boost to choose an integer over a long but it adds up, trust me and with vb6 you need all the speed you can get >_> Link to comment Share on other sites More sharing options...
Joyce Posted November 2, 2015 Share Posted November 2, 2015 Boost? I'm not sure I understand how constantly having your data converted between a Long and Integer will be faster than just flatout using the format it'll convert to anyway. Link to comment Share on other sites More sharing options...
Growlith1223 Posted November 2, 2015 Share Posted November 2, 2015 @'Joyce':> Boost? I'm not sure I understand how constantly having your data converted between a Long and Integer will be faster than just flatout using the format it'll convert to anyway.I wasn't talking about converting back and forth i was talking about switching to Integers where needed since i highly doubt anyone ever is going to go past or even needs to go past 32k, just seems a bit unreasonable there(except for maybe experience) Link to comment Share on other sites More sharing options...
Joyce Posted November 2, 2015 Share Posted November 2, 2015 As I said though, internally an Integer is handled as a Long. Link to comment Share on other sites More sharing options...
Growlith1223 Posted November 2, 2015 Share Posted November 2, 2015 ok redoing my tests for this type of stuff, An integer is handled within a 2.3ms timespan for a 1 To 32k for loop. a Long is handled within a 1.8 For loop, HOWEVER, i have noticed that there was a small jump in memory consumption with a Long than what it would be with an Integer, being as a Long is 4 bytes memory and an Integer is 2 bytes of memory. Link to comment Share on other sites More sharing options...
Genusis Posted November 2, 2015 Share Posted November 2, 2015 funny thing the speed enhancement from a long is only if you are using a 32bit processor. Its why 32bit applications run slightly slower on 64bit processors than on 32bit processors this is due to the registers being 64bit in size. Anyways speed wise integer to long on most processors will calculate around the same speed down to the microsecond on a 64bit system. regardless though you should not use a variable type bigger than what is needed if you are going to send the players data over the net or to other people. Also using a long over a integer will double the amount of space the stats will take up PER user. in turn your server and client will use much more ram based on the array of users you have setup and how many stats you have within those users.Overall its better to just use a integer. Also do not use a floating point for this in vb6 it will end up making it slower for regular adding and subtracting as they do not follow the newer IEEE standards for floating points which most newer processors use to speed up floating point calculations.Other than that here are the variable types and their equivalent bit sizes.Byte 0 to 255 8bitsInteger -32,768 to 32,767 16bitsLong -2,147,483,648 to 2,147,483,647 32bitCurrency -922,337,203,685,477.5808 to 922,337,203,685,477.5807 64bitFloating points.single 32bitsdouble 64bitsDecimal 112bitsSo go with a integer. yes there will be a slightly decrease in speed but its worth the size. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now