Post by Boaster on Jan 4, 2010 23:30:08 GMT -6
Through experimenting in the tedious trial and error method, I've made a few discoveries.
I can actually replace EXE variables creating new variable names that use the same integer value as the one found in the EXE.
For example:
UNITTYPE_STABLES_REQUIRED returns a value of 37 when called for.
In 'gs5_globals.gs' I assign variable UNITTYPE_MELEE_SLASHING_RESISTANCE to 37.
So now calling for either of those variables (the hard-coded or the soft-coded respectively), they return the same value.
UNITTYPE_stat variables are used only to call for a specific value in a dictionary found in 'units\easyunit.gs'.
In 'units\easyunit.gs' I found out I could rename '/stables_required' to '/slashing_melee_resistance' and voila.
A new unit stat, transformed from an old one.
So now I can potentially implement a more complex system of physical combat resistance types.
UNITTYPE_MELEE_ATTACK_TYPE
UNITTYPE_MISSILE_ATTACK_TYPE
UNITTYPE_MELEE_CRUSHING_RESISTANCE
UNITTYPE_MELEE_PIERCING_RESISTANCE
UNITTYPE_MELEE_SLASHING_RESISTANCE
UNITTYPE_MISSILE_CRUSHING_RESISTANCE
UNITTYPE_MISSILE_PIERCING_RESISTANCE
UNITTYPE_MISSILE_SLASHING_RESISTANCE
The following would just be variables as an alternative to using plain numbers. Using the name instead of 0, 1, or 2.
CRUSHING_ATTACK = 0
PIERCING_ATTACK = 1
SLASHING_ATTACK = 2
unitdictxref (unitdict cross reference)
/melee_attack_type 0 def
/ranged_attack_type 0 def
/crushing_melee_resistance 0 def
/piercing_melee_resistance 0 def
/slashing_melee_resistance 0 def
/crushing_missile_resistance 0 def
/piercing_missile_resistance 0 def
/slashing_missile_resistance 0 def
The above mentioned would be ways of modifying these stats via artifacts or spells.
I can actually replace EXE variables creating new variable names that use the same integer value as the one found in the EXE.
For example:
UNITTYPE_STABLES_REQUIRED returns a value of 37 when called for.
In 'gs5_globals.gs' I assign variable UNITTYPE_MELEE_SLASHING_RESISTANCE to 37.
So now calling for either of those variables (the hard-coded or the soft-coded respectively), they return the same value.
UNITTYPE_stat variables are used only to call for a specific value in a dictionary found in 'units\easyunit.gs'.
In 'units\easyunit.gs' I found out I could rename '/stables_required' to '/slashing_melee_resistance' and voila.
A new unit stat, transformed from an old one.
So now I can potentially implement a more complex system of physical combat resistance types.
UNITTYPE_MELEE_ATTACK_TYPE
UNITTYPE_MISSILE_ATTACK_TYPE
UNITTYPE_MELEE_CRUSHING_RESISTANCE
UNITTYPE_MELEE_PIERCING_RESISTANCE
UNITTYPE_MELEE_SLASHING_RESISTANCE
UNITTYPE_MISSILE_CRUSHING_RESISTANCE
UNITTYPE_MISSILE_PIERCING_RESISTANCE
UNITTYPE_MISSILE_SLASHING_RESISTANCE
The following would just be variables as an alternative to using plain numbers. Using the name instead of 0, 1, or 2.
CRUSHING_ATTACK = 0
PIERCING_ATTACK = 1
SLASHING_ATTACK = 2
unitdictxref (unitdict cross reference)
/melee_attack_type 0 def
/ranged_attack_type 0 def
/crushing_melee_resistance 0 def
/piercing_melee_resistance 0 def
/slashing_melee_resistance 0 def
/crushing_missile_resistance 0 def
/piercing_missile_resistance 0 def
/slashing_missile_resistance 0 def
The above mentioned would be ways of modifying these stats via artifacts or spells.