Aldeia RPG

Gostaria de reagir a esta mensagem? Crie uma conta em poucos cliques ou inicie sessão para continuar.

Suporte ao desenvolvimento de jogos


2 participantes

    [HP] Alterações

    jackwack
    jackwack
    Iniciante
    Iniciante


    Mensagens : 42
    Créditos : 0

    [HP] Alterações Empty [HP] Alterações

    Mensagem por jackwack Seg Jul 06, 2015 5:37 pm

    Alguem poderia me dizer onde eu consigo alterar o hp inicial das classes, e o hp obtido por level.

    + 1 rep para quem puder me ajudar.
    GallighanMaker
    GallighanMaker
    Colaborador
    Colaborador


    Medalhas : [HP] Alterações ZgLkiRU
    Mensagens : 985
    Créditos : 102

    Ficha do personagem
    Nível: 1
    Experiência:
    [HP] Alterações Left_bar_bleue0/0[HP] Alterações Empty_bar_bleue  (0/0)
    Vida:
    [HP] Alterações Left_bar_bleue30/30[HP] Alterações Empty_bar_bleue  (30/30)

    [HP] Alterações Empty Re: [HP] Alterações

    Mensagem por GallighanMaker Seg Jul 06, 2015 6:37 pm

    Server Side em ModCombat,
    Function GetPlayerMaxVital:
    Código:
    GetPlayerMaxVital = ((GetPlayerLevel(index) / 2) + (GetPlayerStat(index, Endurance) / 2)) * 15 + 100

    Essa é a formula que eu utilizo para o gurreiro (exemplo) voce pode modificar ao seu gosto.

    Ou seja, no meu caso conforme o level do jogador a formula irá aumentar os valores de HP e conforme a resistencia (endurance) que o jogador destribuir.

    Por exemplo para o MP:
    Código:
    GetPlayerMaxVital = ((GetPlayerLevel(index) / 2) + (GetPlayerStat(index, Intelligence) / 2)) * 5 + 25

    Função completa com exemplo de 3 classes:
    Código:
    ' ################################
    ' ##      Basic Calculations    ##
    ' ################################

    Function GetPlayerMaxVital(ByVal index As Long, ByVal Vital As Vitals) As Long
        If index > MAX_PLAYERS Then Exit Function
        Select Case Vital
            Case HP
                'GetPlayerMaxVital = ((GetPlayerLevel(index) / 2) + (GetPlayerStat(index, Endurance) / 2)) * 30 + 10
                Select Case GetPlayerClass(index)
                    Case 1 ' corpo a corpo
                        GetPlayerMaxVital = ((GetPlayerLevel(index) / 2) + (GetPlayerStat(index, Endurance) / 2)) * 15 + 100
                    Case 2 ' longa distancia
                        GetPlayerMaxVital = ((GetPlayerLevel(index) / 2) + (GetPlayerStat(index, Endurance) / 2)) * 15 + 55
                    Case 3 ' elemnetal
                        GetPlayerMaxVital = ((GetPlayerLevel(index) / 2) + (GetPlayerStat(index, Endurance) / 2)) * 10 + 50
                    Case Else ' Anything else - Warrior by default
                        GetPlayerMaxVital = ((GetPlayerLevel(index) / 2) + (GetPlayerStat(index, Endurance) / 2)) * 15 + 100
                End Select
            Case MP
                'GetPlayerMaxVital = ((GetPlayerLevel(index) / 2) + (GetPlayerStat(index, Intelligence) / 2)) * 30 + 10
                Select Case GetPlayerClass(index)
                    Case 1 ' corpo a corpo
                        GetPlayerMaxVital = ((GetPlayerLevel(index) / 2) + (GetPlayerStat(index, Intelligence) / 2)) * 5 + 25
                    Case 2 ' longa distancia
                        GetPlayerMaxVital = ((GetPlayerLevel(index) / 2) + (GetPlayerStat(index, Intelligence) / 2)) * 30 + 30
                    Case 3 ' elemental
                        GetPlayerMaxVital = ((GetPlayerLevel(index) / 2) + (GetPlayerStat(index, Intelligence) / 2)) * 30 + 60
                    Case Else ' Anything else - Warrior by default
                        GetPlayerMaxVital = ((GetPlayerLevel(index) / 2) + (GetPlayerStat(index, Intelligence) / 2)) * 5 + 25
                End Select
        End Select
    End Function

    Lembrando que eu uso uma engine derivada da crystalshire.


    _________________
    [HP] Alterações 8dVK0ku
    using C# and import Python developer || Expert in Unity Engine IDE. || [HP] Alterações 769_heart 2D pixel games.
    jackwack
    jackwack
    Iniciante
    Iniciante


    Mensagens : 42
    Créditos : 0

    [HP] Alterações Empty Re: [HP] Alterações

    Mensagem por jackwack Ter Jul 07, 2015 12:50 am

    GallighanMaker escreveu:Server Side em ModCombat,
    Function GetPlayerMaxVital:
    Código:
    GetPlayerMaxVital = ((GetPlayerLevel(index) / 2) + (GetPlayerStat(index, Endurance) / 2)) * 15 + 100

    Essa é a formula que eu utilizo para o gurreiro (exemplo) voce pode modificar ao seu gosto.

    Ou seja, no meu caso conforme o level do jogador a formula irá aumentar os valores de HP e conforme a resistencia (endurance) que o jogador destribuir.

    Por exemplo para o MP:
    Código:
    GetPlayerMaxVital = ((GetPlayerLevel(index) / 2) + (GetPlayerStat(index, Intelligence) / 2)) * 5 + 25

    Função completa com exemplo de 3 classes:
    Código:
    ' ################################
    ' ##      Basic Calculations    ##
    ' ################################

    Function GetPlayerMaxVital(ByVal index As Long, ByVal Vital As Vitals) As Long
        If index > MAX_PLAYERS Then Exit Function
        Select Case Vital
            Case HP
                'GetPlayerMaxVital = ((GetPlayerLevel(index) / 2) + (GetPlayerStat(index, Endurance) / 2)) * 30 + 10
                Select Case GetPlayerClass(index)
                    Case 1 ' corpo a corpo
                        GetPlayerMaxVital = ((GetPlayerLevel(index) / 2) + (GetPlayerStat(index, Endurance) / 2)) * 15 + 100
                    Case 2 ' longa distancia
                        GetPlayerMaxVital = ((GetPlayerLevel(index) / 2) + (GetPlayerStat(index, Endurance) / 2)) * 15 + 55
                    Case 3 ' elemnetal
                        GetPlayerMaxVital = ((GetPlayerLevel(index) / 2) + (GetPlayerStat(index, Endurance) / 2)) * 10 + 50
                    Case Else ' Anything else - Warrior by default
                        GetPlayerMaxVital = ((GetPlayerLevel(index) / 2) + (GetPlayerStat(index, Endurance) / 2)) * 15 + 100
                End Select
            Case MP
                'GetPlayerMaxVital = ((GetPlayerLevel(index) / 2) + (GetPlayerStat(index, Intelligence) / 2)) * 30 + 10
                Select Case GetPlayerClass(index)
                    Case 1 ' corpo a corpo
                        GetPlayerMaxVital = ((GetPlayerLevel(index) / 2) + (GetPlayerStat(index, Intelligence) / 2)) * 5 + 25
                    Case 2 ' longa distancia
                        GetPlayerMaxVital = ((GetPlayerLevel(index) / 2) + (GetPlayerStat(index, Intelligence) / 2)) * 30 + 30
                    Case 3 ' elemental
                        GetPlayerMaxVital = ((GetPlayerLevel(index) / 2) + (GetPlayerStat(index, Intelligence) / 2)) * 30 + 60
                    Case Else ' Anything else - Warrior by default
                        GetPlayerMaxVital = ((GetPlayerLevel(index) / 2) + (GetPlayerStat(index, Intelligence) / 2)) * 5 + 25
                End Select
        End Select
    End Function

    Lembrando que eu uso uma engine derivada da crystalshire.
    Obrigado Amigo + 1 pra você

    Off: Teria algum tutorial de como alterar posição da gui e como personalizar uma gui ?
    GallighanMaker
    GallighanMaker
    Colaborador
    Colaborador


    Medalhas : [HP] Alterações ZgLkiRU
    Mensagens : 985
    Créditos : 102

    Ficha do personagem
    Nível: 1
    Experiência:
    [HP] Alterações Left_bar_bleue0/0[HP] Alterações Empty_bar_bleue  (0/0)
    Vida:
    [HP] Alterações Left_bar_bleue30/30[HP] Alterações Empty_bar_bleue  (30/30)

    [HP] Alterações Empty Re: [HP] Alterações

    Mensagem por GallighanMaker Ter Jul 07, 2015 1:11 am

    É bem simples, você vai começar com o seguinte codigo...

    - ModGeneral, Sub InitializeGUI (Acho que é esse o nome)

    Tamanho do menu in-game
    Código:
    With GuiWindow(GUI_MENU)
         .Width = largura da image, Exemplo 200
         .Heigth = Altura da image, exemplo 40 
        .X = Posicao X do botao (Largura)
        .Y = posicao Y do botao (Altura)
    End with

    Posicionando os botões
    Código:
    With button(numero do botao)
         .Width = largura da image, Exemplo 32
         .Heigth = Altura da image, exemplo 32
        .X = Posicao X do botao (Largura)
        .Y = posicao Y do botao (Altura)
    End with

    Bom acho que é só isso, porque como a engine usa o mouse pra tentar localizar o tamanho da imagem, ele deve fazer todo o resto, só falta você encontrar o botão certo, mas há uma forma de não errar, veja a imagem do botão na pasta GUI, dentro dela cada botão tem um numero é so ir de acordo com esse numero dentro do código.


    _________________
    [HP] Alterações 8dVK0ku
    using C# and import Python developer || Expert in Unity Engine IDE. || [HP] Alterações 769_heart 2D pixel games.

    Conteúdo patrocinado


    [HP] Alterações Empty Re: [HP] Alterações

    Mensagem por Conteúdo patrocinado


      Data/hora atual: Sáb Jul 27, 2024 7:53 am