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

NPC HP Values > 32767


JadeCurt1ss
 Share

Recommended Posts

Well, when I started this project, I wanted tough NPCs especially boss NPCs; however the current system of NPC Creation did not allow for that, as scroll bars only go up to 32,767 (The size of an integer in VB6)

Well, looking in the game finds that the NPC HP values are longs which can reach 2,147,850,675\. Thats a far cry from 32,767\. So, let's unlock the potential of NPCs:

First: Obtain VB6, and a copy of EE 2.7 (I haven't tested on anything lower.)

Open your client, and then examine the interface of frmNPCeditor. Find the scrollbar for NPC HP, and delete it.
Next, create a Textbox in its place with the name "StartHP".

Double Click on the Code and change the .value to .text
Under that, input this code:

> Private Sub StartHP_KeyPress(KeyAscii As Integer)
>     Dim Counter As Byte
>     Dim IsNumber As Boolean
>    
>     IsNumber = False
>    
>     For Counter = 0 To 9
>         If Chr$(KeyAscii) = Trim(Counter) Then IsNumber = True
>     Next
>    
>     If Not IsNumber Then MsgBox ("That is not a number.")
> End Sub

This makes sure you have a number as your input.

Next, hit CTRL + F simultaneously. This opens the search/find box. Enter StartHP.Value into the search terms and set the search parameters to "Enitre Project" using the radio buttons. Everwhere it shows you a "StartHP.Value" change it to a "StartHP.Text".

That's all there is to it! Have fun!
Link to comment
Share on other sites

ok ok, now what was the topic again?

oh yeah, we should really remove the slider bars for the most part.
I hate when my mouse jumps and tried to pick like 20k and i crash the server
you should go through 2.7 and see if its helps to switch the majority of them.
add a check for above max and just tell user its too high… instead of crash.
Link to comment
Share on other sites

  • 4 weeks later...
The only problem with using more longs then integers is that longs take up more data ._.

Personally I would rather make the long an integer in this case and just increase the defense by a lot instead of the hp.

Because more def > more hp
Link to comment
Share on other sites

@Skieth:

> an integer uses 2 bytes
>
> a long uses 4 bytes
>
> your game therefore is faster with integers =D

But is it really by very much? 500 NPCs with integer HP would probably use 1 KB, while 500 NPCs with long HP just take 2, if I'm understanding this correctly.
Link to comment
Share on other sites

@Firestar:

> But is it really by very much? 500 NPCs with integer HP would probably use 1 KB, while 500 NPCs with long HP just take 2, if I'm understanding this correctly.

But see, initially HP is long but the variable change is used via integer scrolling bars, so all she is doing is opening the full capability of the Long HP variables used in the eclipse source… lol
Link to comment
Share on other sites

@MrMiguu:

> But see, initially HP is long but the variable change is used via integer scrolling bars, so all she is doing is opening the full capability of the Long HP variables used in the eclipse source… lol

which is why you should change it from long to integer like I did 5 minutes ago xD
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...