[EW] More HP, every next level

Hello everyone

  • Iwould like to ask for help. Where can I edit amount of HP Player in the engine Eclipse Worlds  1.2.6
  • **I **wanted to be when player ‘level up’ his gets +40hp more no 8 or 10 like it’s now
  • I guesses it will be somewhere in server code modCombat, modPlayer or gameHandleData but I don’t see this

Thx for solution Eclipsian

It should be in GetMaxPlayerVitals, but there’s no easily configurable option. It’s all hardcoded math that you’ll have to edit.

Exactly, I thought that this is it. I can not check it because I have a problem with the compile server, but okey

I will try later put somewhere for example “+20” and we will see efect 🙂


' ################################
' ##      Basic Calculations    ##
' ################################
Function GetPlayerMaxVital(ByVal Index As Long, ByVal Vital As Vitals) As Long
    If Index > Player_HighIndex Or Index < 1 Then Exit Function

    Select Case Vital
        Case HP
            Select Case Class(GetPlayerClass(Index)).CombatTree
                Case 1 ' Melee
                    GetPlayerMaxVital = ((GetPlayerLevel(Index) / 2) + (Account(Index).Chars(GetPlayerChar(Index)).Stat(Stats.Endurance) / 3)) * 15 + 135
                Case 2 ' Range
                    GetPlayerMaxVital = ((GetPlayerLevel(Index) / 2) + (Account(Index).Chars(GetPlayerChar(Index)).Stat(Stats.Endurance) / 3)) * 10 + 100
                Case 3 ' Magic
                    GetPlayerMaxVital = ((GetPlayerLevel(Index) / 2) + (Account(Index).Chars(GetPlayerChar(Index)).Stat(Stats.Endurance) / 3)) * 5 + 75
            End Select

        Case MP
            Select Case Class(GetPlayerClass(Index)).CombatTree
                Case 1 ' Melee
                    GetPlayerMaxVital = ((GetPlayerLevel(Index) / 2) + (Account(Index).Chars(GetPlayerChar(Index)).Stat(Stats.Intelligence) / 3)) * 5 + 75
                Case 2 ' Range
                    GetPlayerMaxVital = ((GetPlayerLevel(Index) / 2) + (Account(Index).Chars(GetPlayerChar(Index)).Stat(Stats.Intelligence) / 3)) * 10 + 100
                Case 3 ' Magic
                    GetPlayerMaxVital = ((GetPlayerLevel(Index) / 2) + (Account(Index).Chars(GetPlayerChar(Index)).Stat(Stats.Intelligence) / 3)) * 15 + 135
            End Select
    End Select
End Function

  • I guesses it will be somewhere in server code modCombat, modPlayer or gameHandleData but I don’t see this.

Well, in fact, it actually is in modCombat, in the first function Function GetPlayerMaxVital. The script is configurated in a way that the user’s hp depends on the combat tree.

If you want to change the part that has to do with the the, in Case HP, replace the formulas with the ones that you want. If you want to change the lvl part, change ((GetPlayerLevel(index) / 2) to  ((GetPlayerLevel(index) * 40).

Well it’s working thank you very much

This is what I was looking for 🙂

BTW I replace it to ((GetPlayerLevel(Index) * 2) then every single level i get more 30hp 🙂

How did you do this. I’d like my guys to get about the same amount of hp gain per level+ whatever they add from endurance after.

Log in to reply