Skip to content
Permalink
Browse files

Noninvasive dynaprops (#89)

Added new mobile and item props from the AOS update. Please read docs to understand how they are applied and how they stack from items to mobiles.
  • Loading branch information...
sigmantium committed Jun 17, 2019
1 parent 23b0789 commit 7c627437af6198017228c541772936b822f49db9
@@ -359,6 +359,7 @@ Spell (int spellid)
[CoreHandledLocks (0/1 {default 0})]
[DefaultAttributeCap (int in tenths {default 1000})]
[CoreSendsCaps (0/1 {default 0})]
[CoreIgnoresDefenceCaps (0/1 {default 0})]
[SendStatLocks (0/1 {default 0})]
[MaxContainerSlots (int {default 125})]
[UseContainerSlots (0/1 {default 0})]
@@ -399,7 +400,8 @@ Spell (int spellid)
<explain><i>AllowMovingTrade:</i> 0 Disables moving more than 4 tiles away with an open trade window, cancels trading window.</explain>
<explain><i>CoreHandledLocks:</i> If enabled, core will handle the change of skill locks and stat locks from the client (setting the attribute locks).</explain>
<explain><i>DefaultAttributeCap:</i> defines which value POL should use as cap for attributes.</explain>
<explain><i>CoreSendsCaps:</i> makes POL send attribute cap information in the Send Skills (0x3A) packet</explain>
<explain><i>CoreSendsCaps:</i> makes POL send attribute cap information in the Send Skills (0x3A) packet.</explain>
<explain><i>CoreIgnoresDefenceCaps:</i> makes POL ignore the caps for elemental resists and damage increase properties when calculating the value.</explain>
<explain><i>SendStatLocks:</i> makes POL send stat lock message (Client version &gt; 3)</explain>
<explain><i>MaxContainerSlots:</i> This will allow setting the internal overall allowed item count for containers. This is introduced for future KR support.</explain>
<explain><i>UseContainerSlots:</i> check to can add bulk code to ensure not going over max slot capacity of 255 and a container's max slot capacity.</explain>
@@ -1337,6 +1339,36 @@ NpcTemplate (string unique templatename)
[SaveOnExit (0/1 {default 1})]
[MethodScript (string scriptname)]
[NoDropException (0/1 {default 0})]

[LowerReagentCost (int/(die-string value))]
[SpellDamageIncrease (int/(die-string value))]
[FasterCasting (int/(die-string value))]
[FasterCastRecovery (int/(die-string value))]
[DefenceIncrease (int/(die-string value))]
[DefenceIncreaseCap (int/(die-string value))]
[LowerManaCost (int/(die-string value))]
[HitChance (int/(die-string value))]
[FireResistCap (int/(die-string value))]
[ColdResistCap (int/(die-string value))]
[EnergyResistCap (int/(die-string value))]
[PhysicalResistCap (int/(die-string value))]
[PoisonResistCap (int/(die-string value))]
[Luck (int/(die-string value))]

[LowerReagentCostMod (int/(die-string value))]
[SpellDamageIncreaseMod (int/(die-string value))]
[FasterCastingMod (int/(die-string value))]
[FasterCastRecoveryMod (int/(die-string value))]
[DefenceIncreaseMod (int/(die-string value))]
[DefenceIncreaseCapMod (int/(die-string value))]
[LowerManaCostMod (int/(die-string value))]
[HitChanceMod (int/(die-string value))]
[FireResistCapMod (int/(die-string value))]
[ColdResistCapMod (int/(die-string value))]
[EnergyResistCapMod (int/(die-string value))]
[PhysicalResistCapMod (int/(die-string value))]
[PoisonResistCapMod (int/(die-string value))]
[LuckMod (int/(die-string value))]

[CProp (string name, string value, will set a CProp on the npc at creation)]
[Cprop (...)]
@@ -1423,6 +1455,38 @@ Item (objtype)
[EnergyDamage (int/(die-string value))]
[PoisonDamage (int/(die-string value))]
[PhysicalDamage (int/(die-string value))]

[LowerReagentCost (int/(die-string value))]
[SpellDamageIncrease (int/(die-string value))]
[FasterCasting (int/(die-string value))]
[FasterCastRecovery (int/(die-string value))]
[DefenceIncrease (int/(die-string value))]
[DefenceIncreaseCap (int/(die-string value))]
[LowerManaCost (int/(die-string value))]
[HitChance (int/(die-string value))]
[FireResistCap (int/(die-string value))]
[ColdResistCap (int/(die-string value))]
[EnergyResistCap (int/(die-string value))]
[PhysicalResistCap (int/(die-string value))]
[PoisonResistCap (int/(die-string value))]
[Luck (int/(die-string value))]

[LowerReagentCostMod (int/(die-string value))]
[SpellDamageIncreaseMod (int/(die-string value))]
[FasterCastingMod (int/(die-string value))]
[FasterCastRecoveryMod (int/(die-string value))]
[DefenceIncreaseMod (int/(die-string value))]
[DefenceIncreaseCapMod (int/(die-string value))]
[LowerManaCostMod (int/(die-string value))]
[HitChanceMod (int/(die-string value))]
[FireResistCapMod (int/(die-string value))]
[ColdResistCapMod (int/(die-string value))]
[EnergyResistCapMod (int/(die-string value))]
[PhysicalResistCapMod (int/(die-string value))]
[PoisonResistCapMod (int/(die-string value))]
[LuckMod (int/(die-string value))]


[StackLimit (int {default 60000})]
[NoDrop (0/1 {default 0})]

@@ -2,9 +2,19 @@
<ESCRIPT>
<header>
<topic>Latest Core Changes</topic>
<datemodified>04-26-2019</datemodified>
<datemodified>06-17-2019</datemodified>
</header>
<version name="POL100">
<entry>
<date>06-17-2018</date>
<author>DevGIB:</author>
<change type="Added">Support for LowerReagentCost, SpellDamageIncrease, FasterCasting, FasterCastRecovery, DefenceIncrease, DefenceIncreaseCap, LowerManaCost, Hitchance,<br/>
Luck, FireResistCap, ColdResistCap, EnergyResistCap, PhysicalResistCap, and PoisonResistCap and their subsequent mods to UObject as dynaprops.</change>
<change type="Changed">Elevated Luck to UObject and added related LuckMod.</change>
<change type="Added">Support for new prop changes to the status bar packet.</change>
<change type="Added">Resistances will now be limited to caps by core, unless caps aren't set or are 0.</change>
<change type="Added">CoreIgnoresDefenceCaps to servspecopt.cfg which defaults to 0. If set to 1 core will not calculate resistances and defence increase limits set on the mobile.</change>
</entry>
<entry>
<date>04-26-2019</date>
<author>Nando:</author>
@@ -140,6 +140,35 @@
<member mname="name_suffix" type="String" access="r/o" mdesc="For adding crafter marks or such, will be appended to desc" />
<member mname="house" type="House" access="r/o" mdesc="Returns a reference to the House this item is component of, if any" />
<member mname="no_drop" type="Boolean" access="r/w" mdesc="If set no drop of this item is allowed, except no_drop_exception is set for target" />
<member mname="lower_reagent_cost" type="Integer" access="r/o" mdesc="Total of base property plus mod, applied to characters when equipt." />
<member mname="spell_damage_increase" type="Integer" access="r/o" mdesc="Total of base property plus mod, applied to characters when equipt." />
<member mname="faster_casting" type="Integer" access="r/o" mdesc="Total of base property plus mod, applied to characters when equipt." />
<member mname="faster_cast_recovery" type="Integer" access="r/o" mdesc="Total of base property plus mod, applied to characters when equipt." />
<member mname="defence_increase" type="Integer" access="r/o" mdesc="Total of base property plus mod, applied to characters when equipt." />
<member mname="defence_increase_cap" type="Integer" access="r/o" mdesc="Total of base property plus mod, applied to characters when equipt." />
<member mname="lower_mana_cost" type="Integer" access="r/o" mdesc="Total of base property plus mod, applied to characters when equipt." />
<member mname="hit_chance" type="Integer" access="r/o" mdesc="Total of base property plus mod, applied to characters when equipt." />
<member mname="resist_fire_cap" type="Integer" access="r/o" mdesc="Total of base property plus mod, applied to characters when equipt." />
<member mname="resist_cold_cap" type="Integer" access="r/o" mdesc="Total of base property plus mod, applied to characters when equipt." />
<member mname="resist_energy_cap" type="Integer" access="r/o" mdesc="Total of base property plus mod, applied to characters when equipt." />
<member mname="resist_physical_cap" type="Integer" access="r/o" mdesc="Total of base property plus mod, applied to characters when equipt." />
<member mname="resist_poison_cap" type="Integer" access="r/o" mdesc="Total of base property plus mod, applied to characters when equipt." />
<member mname="luck" type="Integer" access="r/o" mdesc="Total of base property plus mod, applied to characters when equipt." />
<member mname="defence_increase_mod" type="Integer" access="r/w" mdesc="Modifier for property, added to base of the object." />
<member mname="defence_increase_cap_mod" type="Integer" access="r/w" mdesc="Modifier for property, added to base of the object." />
<member mname="lower_mana_cost_mod" type="Integer" access="r/w" mdesc="Modifier for property, added to base of the object." />
<member mname="hit_chance_mod" type="Integer" access="r/w" mdesc="Modifier for property, added to base of the object." />
<member mname="resist_fire_cap_mod" type="Integer" access="r/w" mdesc="Modifier for property, added to base of the object." />
<member mname="resist_cold_cap_mod" type="Integer" access="r/w" mdesc="Modifier for property, added to base of the object." />
<member mname="resist_energy_cap_mod" type="Integer" access="r/w" mdesc="Modifier for property, added to base of the object." />
<member mname="resist_physical_cap_mod" type="Integer" access="r/w" mdesc="Modifier for property, added to base of the object." />
<member mname="resist_poison_cap_mod" type="Integer" access="r/w" mdesc="Modifier for property, added to base of the object." />
<member mname="lower_reagent_cost_mod" type="Integer" access="r/w" mdesc="Modifier for property, added to base of the object." />
<member mname="spell_damage_increase_mod" type="Integer" access="r/w" mdesc="Modifier for property, added to base of the object." />
<member mname="faster_casting_mod" type="Integer" access="r/w" mdesc="Modifier for property, added to base of the object." />
<member mname="faster_cast_recovery_mod" type="Integer" access="r/w" mdesc="Modifier for property, added to base of the object." />
<member mname="luck_mod" type="Integer" access="r/w" mdesc="Modifier for property, added to base of the object." />


<method proto="splitStackAt(x, y, z, realm, amount)" returns="Item" desc="Will split the item into 2 stacks. Returns a reference to the new stack made from item. Places new stack at the coordinates" />
<method proto="splitStackInto(container, amount)" returns="Item" desc="Will split the item into 2 stacks. Returns a reference to the new stack made from item. Places new stack into the container" />
@@ -238,7 +267,6 @@
<member mname="skillcap" type="Integer" access="r/w" mdesc="This is for storage of overall skillcap, default 700" />
<member mname="followers_max" type="Integer" access="r/w" mdesc="Max followers for statmsg packet, default 0 "/>
<member mname="followers" type="Integer" access="r/w" mdesc="This is for storage for the Followers byte in statmsg packet, default 0 "/>
<member mname="luck" type="Integer" access="r/w" mdesc="Luck for statmsg packet, default 0 "/>
<member mname="tithing" type="Integer" access="r/w" mdesc="Tithing for statmsg packet, default 0 "/>
<member mname="party" type="Party" access="r/o" mdesc="party object reference"/>
<member mname="candidate_of_party" type="Party" access="r/o" mdesc="party object reference"/>
@@ -268,6 +296,34 @@
<member mname="active_skill" type="Boolean" access="r/o" mdesc="1 if character has an active attached skill script"/>
<member mname="casting_spell" type="Bool" access="r/o" mdesc="1 if character has an active attached spell script"/>
<member mname="last_textcolor" type="Struct" access="r/o" mdesc="last text color used by the character. Values are between 2 and 1001. Returns 0 if not yet spoken. (will not be saved inside of the datafile)"/>
<member mname="lower_reagent_cost" type="Integer" access="r/o" mdesc="Total calculation of all modifiers from items equipt plus personal modifier and personal base." />
<member mname="spell_damage_increase" type="Integer" access="r/o" mdesc="Total calculation of all modifiers from items equipt plus personal modifier and personal base." />
<member mname="faster_casting" type="Integer" access="r/o" mdesc="Total calculation of all modifiers from items equipt plus personal modifier and personal base." />
<member mname="faster_cast_recovery" type="Integer" access="r/o" mdesc="Total calculation of all modifiers from items equipt plus personal modifier and personal base." />
<member mname="defence_increase" type="Integer" access="r/o" mdesc="Total calculation of all modifiers from items equipt plus personal modifier and personal base." />
<member mname="defence_increase_cap" type="Integer" access="r/o" mdesc="Total calculation of all modifiers from items equipt plus personal modifier and personal base." />
<member mname="lower_mana_cost" type="Integer" access="r/o" mdesc="Total calculation of all modifiers from items equipt plus personal modifier and personal base." />
<member mname="hit_chance" type="Integer" access="r/o" mdesc="Total calculation of all modifiers from items equipt plus personal modifier and personal base." />
<member mname="resist_fire_cap" type="Integer" access="r/o" mdesc="Total calculation of all modifiers from items equipt plus personal modifier and personal base." />
<member mname="resist_cold_cap" type="Integer" access="r/o" mdesc="Total calculation of all modifiers from items equipt plus personal modifier and personal base." />
<member mname="resist_energy_cap" type="Integer" access="r/o" mdesc="Total calculation of all modifiers from items equipt plus personal modifier and personal base." />
<member mname="resist_physical_cap" type="Integer" access="r/o" mdesc="Total calculation of all modifiers from items equipt plus personal modifier and personal base." />
<member mname="resist_poison_cap" type="Integer" access="r/o" mdesc="Total calculation of all modifiers from items equipt plus personal modifier and personal base." />
<member mname="luck" type="Integer" access="r/o" mdesc="Total calculation of all modifiers from items equipt plus personal modifier and personal base." />
<member mname="defence_increase_mod" type="Integer" access="r/w" mdesc="Modifier for property, added to base property." />
<member mname="defence_increase_cap_mod" type="Integer" access="r/w" mdesc="Modifier for property, added to base property." />
<member mname="lower_mana_cost_mod" type="Integer" access="r/w" mdesc="Modifier for property, added to base property." />
<member mname="hit_chance_mod" type="Integer" access="r/w" mdesc="Modifier for property, added to base property." />
<member mname="resist_fire_cap_mod" type="Integer" access="r/w" mdesc="Modifier for property, added to base property." />
<member mname="resist_cold_cap_mod" type="Integer" access="r/w" mdesc="Modifier for property, added to base property." />
<member mname="resist_energy_cap_mod" type="Integer" access="r/w" mdesc="Modifier for property, added to base property." />
<member mname="resist_physical_cap_mod" type="Integer" access="r/w" mdesc="Modifier for property, added to base property." />
<member mname="resist_poison_cap_mod" type="Integer" access="r/w" mdesc="Modifier for property, added to base property." />
<member mname="lower_reagent_cost_mod" type="Integer" access="r/w" mdesc="Modifier for property, added to base property." />
<member mname="spell_damage_increase_mod" type="Integer" access="r/w" mdesc="Modifier for property, added to base property." />
<member mname="faster_casting_mod" type="Integer" access="r/w" mdesc="Modifier for property, added to base property." />
<member mname="faster_cast_recovery_mod" type="Integer" access="r/w" mdesc="Modifier for property, added to base property." />
<member mname="luck_mod" type="Integer" access="r/w" mdesc="Modifier for property, added to base property." />

<method proto="setpoisoned(bool)" returns="true/error" desc="sets the character poisoned, controller of calling script is flagged as in repsystem" />
<method proto="setparalyzed(bool)" returns="true/error" desc="sets the character paralyzed, controller of calling script is flagged as in repsystem" />
@@ -257,7 +257,34 @@ enum MemberID
MBR_CARRYINGCAPACITY,
MBR_NO_DROP,
MBR_NO_DROP_EXCEPTION,
MBR_PORT, // 220
MBR_PORT, // 220
MBR_LOWER_REAG_COST,
MBR_SPELL_DAMAGE_INCREASE,
MBR_FASTER_CASTING,
MBR_FASTER_CAST_RECOVERY,
MBR_DEFENCE_CHANCE_INCREASE, // 225
MBR_DEFENCE_CHANCE_INCREASE_CAP,
MBR_LOWER_MANA_COST,
MBR_FIRE_RESIST_CAP,
MBR_COLD_RESIST_CAP,
MBR_ENERGY_RESIST_CAP, // 230
MBR_POISON_RESIST_CAP,
MBR_PHYSICAL_RESIST_CAP,
MBR_HIT_CHANCE,
MBR_LOWER_REAG_COST_MOD,
MBR_SPELL_DAMAGE_INCREASE_MOD, // 235
MBR_FASTER_CASTING_MOD,
MBR_FASTER_CAST_RECOVERY_MOD,
MBR_DEFENCE_CHANCE_INCREASE_MOD,
MBR_DEFENCE_CHANCE_INCREASE_CAP_MOD,
MBR_LOWER_MANA_COST_MOD, // 240
MBR_FIRE_RESIST_CAP_MOD,
MBR_COLD_RESIST_CAP_MOD,
MBR_ENERGY_RESIST_CAP_MOD,
MBR_POISON_RESIST_CAP_MOD,
MBR_PHYSICAL_RESIST_CAP_MOD, // 245
MBR_LUCK_MOD,
MBR_HIT_CHANCE_MOD,
};


@@ -273,6 +300,6 @@ extern int n_objmembers;

ObjMember* getKnownObjMember( const char* token );
ObjMember* getObjMember( int id );
}
}
} // namespace Bscript
} // namespace Pol
#endif

0 comments on commit 7c62743

Please sign in to comment.
You can’t perform that action at this time.