Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

[EO 3.0] Basic Programming Questions


willzter
 Share

Recommended Posts

So, recently I got my hands on a copy of visual basic 6\. After playing around with it and changing some basic stuffs such as damage formulas and followed a couple of tutorials I would like to get abit more "advanced", I am still pretty early in the learning curve but I have had some experience with visual basic.net earlier and I'm a pretty quick learner so I don't think I will have to hard of a time with the stuff I'm thinking about, but before I do this I'd like to know some basic stuff about eclipse first.

   Firstly I'd like to know where I change the max level, I have tried looking in the code on my own and tried alot of diffrent possible combinations in the "finder" (CTRL+F) however I haven't had any luck yet so I wonder if someone could point me in the right direction for this. If possible I would also like to know how I change the exp needed for leveling up.

   Secondly I'd like to know if the performance loss would be to great if I would change bytes such as STR, weapon damage and more into longs, if I remember correctly a byte can only contain numbers between -255 to 255 while a long can contain numbers between ca. -30k to 30k but longs will take longer for the computer to work with and it will therefore be some kind of a performance loss. If the performance loss however wouldn't be to bad I would also like to know where I should change these.

   As I am still pretty new to programming overall, as mentioned abow I do have some previous experience with VB.NET but this is really nothing more than first following tutorials and later making my own version of old classics, so please don't tell me I'm a noob because I can't figure out how to change the max level or such..
Link to comment
Share on other sites

First off, the default level for stats, are 255 because (If I remember correctly) the 255 is the max value for most numeric operations used by VB6 via (eclipse), such as scroll bars. So just change it to a smaller number according to what you want. Secondly, I also believe the max level for your overall combat level is 100, I don't remember where it is so such search '100' in the SERVER side. Also its all good asking questions, I feel as if there are thousands of useless tutorials in the tutorial section so I can understand that it may have been hard to search for this first. Finally you are correct, there would not be a HUGE preformance loss. VB6 just knows its limitations when it comes to certain data types.

-Sincerely ![](http://www.eclipseorigins.com/community/uploads/profile/photo-thumb-76741.jpg?_r=1387331422)
Link to comment
Share on other sites

Thanks for the quick replies, sadly I had to go soon after posting this and as I have been pretty busy today I have not had time to reply earlier.I have now found where the max_levels are located, for some reason the finder thing didn't show me it when I searched for it earlier, it might be case-sensitive.. When it comes to the variabels I am still pretty confused tough, is there a way to change the max stats from 255 to something higher or will VB6 not allow this? When I changed the max level constant I also noticed constants such as max_items that were set to 255 and as I changed these to a higher number I got no errors when I started it, nor when I made say 256 items instead of the original 255\. However I didn't find anything about stats in the same area, such as STR and END, and as these are something I would like to increase the maximum of, I would like high level players to perhaps have 500-1000 STR, I would like to know where I can change these. I have been trying to look for it myself, both manually and with CTRL+F, however without any succes. If there is any tutorials or the alike already existing on the forums I am sorry for not looking well enough, but if there are then they are probably very old and as I am still human I can't look through every single post in the tutorial section but belive me, I have tried searching for stuff like this on the forums.
Link to comment
Share on other sites

For add more than 255, this tutorial is for EO 2.0 but maybe this works in EO 3.0 too. However, make an backup of your game before start.

In Client side search:

```
If GetPlayerStat(Index, x) < 255 Then
```

or

```
If GetPlayerStat(Index, x) < 250 Then
```

and change for:

```
If GetPlayerStat(Index, x) < MAX_LONG Then
```

after search for:

```
If Index > MAX_PLAYERS Then Exit Sub
    If Value <= 0 Then Value = 1
    If Value > MAX_BYTE Then Value = MAX_BYTE
    Player(Index).Stat(Stat) = Value
```

and change for:

```
If Index > MAX_PLAYERS Then Exit Sub
    If Value <= 0 Then Value = 1
    If Value > MAX_LONG Then Value = MAX_LONG
    Player(Index).Stat(Stat) = Value
```

In **Private Type PlayerRec** search for:

```
Stat(1 To Stats.Stat_Count - 1) As Byte
```

And change for:

```
Stat(1 To Stats.Stat_Count - 1) As Long
```

**Client~Side** finished, now in the **Server~Side** search for:

```
If GetPlayerRawStat(Index, PointType) >= 255 Then
```

or

```
If GetPlayerRawStat(Index, PointType) >= 250 Then
```

and change for:

```
If GetPlayerRawStat(Index, PointType) >= MAX_LONG Then
```

Now in the end of modConstants add:

```
'values
Public Const MAX_BYTE As Byte = 255
Public Const MAX_INTEGER As Integer = 32767
Public Const MAX_LONG As Long = 2147483647
```

After in **Private Type PlayerRec** search for:

```
Stat(1 To Stats.Stat_Count - 1) As Byte
```

and change for:

```
Stat(1 To Stats.Stat_Count - 1) As Long
```

It's done.

I translated it from this site: [http://aldeiarpgbr.forumeiros.com/t3054-add-mais-de-255-em-1-stat](http://aldeiarpgbr.forumeiros.com/t3054-add-mais-de-255-em-1-stat)
Link to comment
Share on other sites

Please do not store variables any higher than they need to be, it's just additional memory consumption.

When you start getting more players (ie. saving all of those account files), and actually start to host quite a bit, you'll find it adds up and creeps up on you more quickly than you'd realise.

Do your stats need to be higher than 255? If so, do they need to be higher than 65,535?

If yes, then carry on with using Long. If not, change it to Integer.
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
 Share

×
×
  • Create New...