Portal-Zone Gothic-Zone Gothic II-Zone Gothic 3-Zone Gothic 4-Zone Modifikationen-Zone Download-Zone Foren-Zone RPG-Zone Almanach-Zone Spirit of Gothic

 

Ergebnis 1 bis 5 von 5
  1. Beiträge anzeigen #1 Zitieren
    Apprentice
    Registriert seit
    Aug 2014
    Beiträge
    17
     
    ohje00 ist offline

    Damage formulas

    Hey guys,

    I want to edit the damage formulas for one-handed, two handed, bow and crossbow weapon types to balance out the str and dex differences, but I can't find the damage formulas anywhere...
    Where are they defined?
    Geändert von ohje00 (19.07.2018 um 15:23 Uhr)

  2. Homepage besuchen Beiträge anzeigen #2 Zitieren
    Ritter Avatar von MaGoth
    Registriert seit
    May 2007
    Ort
    Russland (Samara)
    Beiträge
    1.407
     
    MaGoth ist offline
    Zitat Zitat von ohje00 Beitrag anzeigen
    Where are they defined?
    Hi,
    In ZenGin..
    |: WOG.de :|: WOG.en :|: WOG.ru :|: WOG.ro :|||: MAGIC-Team :|
    [Bild: 106462_941c3dcc88ff9e9b5597d9f24d9aea88.jpg]
    |: WOR.de :|: WOR.en :|: WOR.ru :|: WOR.ro :|||: Piranha-Bytes :|
    -=GOTHIC UND DIE FREUNDSCHAFT FÜR ALLE ZEITEN!=-

  3. Beiträge anzeigen #3 Zitieren
    Knight
    Registriert seit
    Aug 2009
    Ort
    Hessen
    Beiträge
    1.487
     
    Cryp18Struct ist offline
    Lehona published a hook which allows you to change damage:
    https://forum.worldofplayers.de/foru...densberechnung

    The oSDamageDescriptor details include some guesswork, you might have to do some experiments.

  4. Beiträge anzeigen #4 Zitieren
    Apprentice
    Registriert seit
    Aug 2014
    Beiträge
    17
     
    ohje00 ist offline
    Zitat Zitat von MaGoth Beitrag anzeigen
    Hi,
    In ZenGin..
    Lehona published a hook which allows you to change damage:
    https://forum.worldofplayers.de/foru...densberechnung

    The oSDamageDescriptor details include some guesswork, you might have to do some experiments.
    Thank you guys.

  5. Beiträge anzeigen #5 Zitieren
    Local Hero
    Registriert seit
    Feb 2017
    Beiträge
    270
     
    F a w k e s ist offline

    G1 Calculate Weapon Damage

    Hey folks, maybe you can find something useful in the code below - this allows you to detect damage done by spells, melee and ranged weapons.

    Below in the code there is a #SPECIAL EFFECTS tag, where script recognizes what weapon is used and applies 'special effects' in case we are using special weapons like for example Legendary bow of Firestorm !
    https://youtu.be/yvwhrdyf6QY?t=1m40s

    Code:
    /***
         G1 [Tested with LeGo 2.5.0]
    ***/
    FUNC INT Calculate_Weapon_Damage (var int victimPtr, var int ddPtr, var int dmg)
    {
        var oSDamageDescriptor dmgDescriptor;
        dmgDescriptor = _^ (ddPtr);
    
        //Don't change anything if damage was not caused by NPC
        if (dmgDescriptor.pNpcAttacker == 0)
        || (victimPtr == 0)
        {
            return dmg;
        };
    
        var oCNPC oth; oth = _^(dmgDescriptor.pNpcAttacker);
        var oCNPC slf; slf = _^(victimPtr);
    
        //Spell
        if (dmgDescriptor.nSpellID > 0)
        {
            if (dmgDescriptor.nSpellID == SPL_ICECUBE)
            {
                // ...
            };
        };
    
        var c_item weapon;
    
        //If damage was done by Ranged weapons, nSpellID == -1
        if (dmgDescriptor.nSpellID == -1)
        {
            /***
            dmgDescriptor.pItemWeapon contains ammo !! therefore we have to check either Readied Weapon or Equipped Weapon
            might be there is a better way though ...
            ***/
    
            if (Npc_IsInFightMode(oth, FMODE_FAR)) {
                weapon = Npc_GetReadiedWeapon (oth);
            } else if (Npc_HasEquippedRangedWeapon (oth)) {
                weapon = Npc_GetEquippedRangedWeapon (oth);
            };
        };
        } else
        //Melee weapons
        if (dmgDescriptor.pItemWeapon != 0)
        {
            weapon = _^ (dmgDescriptor.pItemWeapon);
        };
        // ... whatever calculation you need ...
    
        //#SPECIAL EFFECTS
        //Check what weapon was used
        var int weaponInst;
        weaponInst = Hlp_GetInstanceID (weapon);
    
        //Legendary Bow of Firestorm !
        if (weaponInst == ItRw_Bow_FireStorm)
        {
            //Check NPC's mana - can Special effect be casted ?
    
            if (oth.attribute [ATR_MANA] >= ItRw_Bow_FireStorm.count[4])
            {
                oth.attribute [ATR_MANA] = oth.attribute [ATR_MANA] - ItRw_Bow_FireStorm.count[4];
    
                Wld_PlayEffect ("SPELLFX_FIRESTORM_SPREAD", slf, slf, 0, 0, 0, FALSE);
    
                /***
                NPC_MagicHurt_NPC - is an alternative to B_MagicHurtNpc
                Difference is you can specify DAM_TYPE and damage is not applied on 'self' but to 'victim', where victim is passed to function as C_NPC a paramater
                ***/
    
                //NPC_MagicHurt_NPC (attacker, victim, SPL_DAMAGE_FIRESTORM, DAM_FIRE);
                MEM_PushInstParam (oth);
                MEM_PushInstParam (slf);
                MEM_PushIntParam (SPL_DAMAGE_FIRESTORM);
                MEM_PushIntParam (DAM_FIRE);
                MEM_Call (NPC_MagicHurt_NPC);
            };
        };
    
        return dmg;
    };    
    
    FUNC VOID _HOOK_DMG_ONDMG_EVENT ()
    {
        //Remember this is example for G1 !
        EAX = Calculate_Weapon_Damage (EDI, MEM_ReadInt (ESP + 548), EAX);
    };
    
    //Hook it with
    HookEngine (7567329, 6, "_HOOK_DMG_ONDMG_EVENT");
    Geändert von F a w k e s (21.07.2018 um 14:03 Uhr) Grund: adding example of SPECIAL EFFECTS

Berechtigungen

  • Neue Themen erstellen: Nein
  • Themen beantworten: Nein
  • Anhänge hochladen: Nein
  • Beiträge bearbeiten: Nein
Impressum | Link Us | intern
World of Gothic © by World of Gothic Team
Gothic, Gothic 2 & Gothic 3 are © by Piranha Bytes & Egmont Interactive & JoWooD Productions AG, all rights reserved worldwide