SphereCommunity
Physical Armor is not being counted - Printable Version

+- SphereCommunity (https://forum.spherecommunity.net)
+-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d)
+--- Forum: Script Help (/Forum-Script-Help)
+--- Thread: Physical Armor is not being counted (/Thread-Physical-Armor-is-not-being-counted)

Pages: 1 2


RE: Physical Armor is not being counted - AmpereJoule - 01-16-2013 02:47 AM

I think I have none o.o, look:

sphere.ini:
Code:
...
//Events related to all NPCs
//EventsPet=your_event

//Events related to all players
//EventsPlayer=your_event

//Events related to all regions
//EventsRegion=your_event
...



RE: Physical Armor is not being counted - darksun84 - 01-16-2013 03:41 AM

if you AR is 50 and the skeleton doesn't have any elemental damage that means that somewhere in your scripts, there is the dam_god flag attached to damage.( i guess)


RE: Physical Armor is not being counted - AmpereJoule - 01-16-2013 07:39 AM

Using the Notepad++ I found:
C:\sphere\scripts\add-on\combat\sphere_combat_events.scp (4 hits)
Line 72: argn2 |= dam_god
Line 88: argn2 |= dam_god
Line 184: argn2 |= dam_god
Line 200: argn2 |= dam_god

and here it is "sphere_combat_events.scp":
Code:
...
on=@gethit
if <tag0.hbcs>
    if <tag0.ignore.combat>
    argn2 |= dam_god // <<<<<<<<<<<<<<<<<<<<<<<<<<< LINE 72
    tag.ignore.combat
    elif ((<def.scp.Combat_FormulasUsed> == 1) && <def.scp.Combat_UseResistances>) || (<def.scp.Combat_FormulasUsed> == 3)
    ref1 = <qval (<src.weapon>) ? <src.weapon>:<src>>
    local.realphy = <eval 100 - (<ref1.tag0.DamFire> + <ref1.tag0.DamCold> + <ref1.tag0.DamPoison> + <ref1.tag0.DamEnergy>)>
    local.physical = <muldiv <argn1>,<local.realphy>,100>
    local.physical -= <muldiv <local.physical>,<eval <armor> + <modar>>,100>
    local.fire = <muldiv <argn1>,<ref1.tag0.DamFire>,100>
    local.fire -= <muldiv <local.fire>,<ResFire>,100>
    local.cold = <muldiv <argn1>,<ref1.tag0.DamCold>,100>
    local.cold -= <muldiv <local.cold>,<ResCold>,100>
    local.poison = <muldiv <argn1>,<ref1.tag0.DamPoison>,100>
    local.poison -= <muldiv <local.poison>,<ResPoison>,100>
    local.energy = <muldiv <argn1>,<ref1.tag0.DamEnergy>,100>
    local.energy -= <muldiv <local.energy>,<ResEnergy>,100>
    argn1 = <eval <local.physical> + <local.fire> + <local.cold> + <local.poison> + <local.energy>>
    argn2 |= dam_god // <<<<<<<<<<<<<<<<<<<<<<<<<<< LINE 88
    endif
endif
...
...
on=@gethit
if <tag0.hbcs>
    if <tag0.ignore.combat>
    argn2 |= dam_god // <<<<<<<<<<<<<<<<<<<<<<<<<<< LINE 184
    tag.ignore.combat
    elif ((<def.scp.Combat_FormulasUsed> == 1) && <def.scp.Combat_UseResistances>) || (<def.scp.Combat_FormulasUsed> == 3)
    ref1 = <qval (<src.weapon>) ? <src.weapon>:<src>>
    local.realphy = <eval 100 - (<ref1.tag0.DamFire> + <ref1.tag0.DamCold> + <ref1.tag0.DamPoison> + <ref1.tag0.DamEnergy>)>
    local.physical = <muldiv <argn1>,<local.realphy>,100>
    local.physical -= <muldiv <local.physical>,<eval <armor> + <modar>>,100>
    local.fire = <muldiv <argn1>,<ref1.tag0.DamFire>,100>
    local.fire -= <muldiv <local.fire>,<ResFire>,100>
    local.cold = <muldiv <argn1>,<ref1.tag0.DamCold>,100>
    local.cold -= <muldiv <local.cold>,<ResCold>,100>
    local.poison = <muldiv <argn1>,<ref1.tag0.DamPoison>,100>
    local.poison -= <muldiv <local.poison>,<ResPoison>,100>
    local.energy = <muldiv <argn1>,<ref1.tag0.DamEnergy>,100>
    local.energy -= <muldiv <local.energy>,<ResEnergy>,100>
    argn1 = <eval <local.physical> + <local.fire> + <local.cold> + <local.poison> + <local.energy>>
    argn2 |= dam_god // <<<<<<<<<<<<<<<<<<<<<<<<<<< LINE 200
    endif
endif
...


PS: I also found "dam_god flag" at: "sphere_champion_harrower.scp", "sphere_special_moves_event.scp", "sphere_special_moves_items.scp", "sphere_doom_dun.scp", "sphere_hunger_system.scp", "sphere_typedef_bola.scp", "sphere_spells_necromancy.scp", "sphere_defs.scp".


RE: Physical Armor is not being counted - RanXerox - 01-16-2013 08:33 AM

Since you (and your monsters) do not have the elemental damage events... all of those TAG.DAM* and TAG.Resist* values are ignored. What that leaves you with is the basic built-in combat calculation that uses AR and whatnot (as described here: http://wiki.sphere.torfo.org/index.php/Armor_Calculation )

If you want the elemental damage stuff, then all your players and monsters need those events... also all your armor and weapons (perhaps more generally - all your "equippable" items) may need events as well.

To handle elemental damage and resistance, the SCP has the following values for eventsPet and eventsPlayer:

Code:
//Events related to all NPCs
EventsPet=e_NpcGenericEvent,e_NpcCombatEvent,e_NpcPropertiesEvent

//Events related to all players
EventsPlayer=e_PlayerGenericEvent,e_PlayerCraftingEvent,e_PlayerCombatEvent,e_Pl​ayerPropertiesEvent,e_PlayerTooltipEvent,e_special_moves

...Not all of those events are necessary, but likely e_NpcCombatEvent and e_NpcCombatEvent are.

To handle other related stuff on the "equippable" items, the SCP has TEVENTS=t_iprop on them...


RE: Physical Armor is not being counted - AmpereJoule - 01-16-2013 10:21 AM

I did that and now I am testing.

I notice that my MaxHits is not my Str, Is it because of these events? Can I change it?