// -------------------------------------------------------------------------
// Set stats that are modified per level.
// instead of looping, we just multiply by level
//
// Note:
// Rank Modifier is applied to only Health and Mana.
// -------------------------------------------------------------------------
float fDamageMod = (GetclassDataFloat(class_DATA_DAMAGE_BONUS , nclass) + (GetRaceDataFloat(RACE_DATA_DAM_PER_LEVEL, nRace))) * nLevelsToAdd;
float fHealth = (GetclassDataFloat(class_DATA_HEALTH_PER_LEVEL, nclass) * fRankModifierHealth) * nLevelsToAdd ;
float fMana = GetclassDataFloat(class_DATA_MANA_PER_LEVEL, nclass) * nLevelsToAdd * fRankModifier;
float fDefMod = (GetclassDataFloat(class_DATA_DEFENSE_PER_LEVEL, nclass) + (GetRaceDataFloat(RACE_DATA_DEF_PER_LEVEL, nRace))) * nLevelsToAdd;
float fArmMod = (GetclassDataFloat(class_DATA_ARMOR_PER_LEVEL, nclass) + (GetRaceDataFloat(RACE_DATA_ARM_PER_LEVEL, nRace))) * nLevelsToAdd;
float fAttMod = (GetclassDataFloat(class_DATA_ATTACK_PER_LEVEL, nclass) + (GetRaceDataFloat(RACE_DATA_ATT_PER_LEVEL, nRace))) * nLevelsToAdd;
Chargen_ModifyCreaturePropertyBase(oCreature,PROPERTY_ATTRIBUTE_DAMAGE_BONUS, fDamageMod);
Chargen_ModifyCreaturePropertyBase(oCreature,PROPERTY_DEPLETABLE_HEALTH, fHealth);
Chargen_ModifyCreaturePropertyBase(oCreature,PROPERTY_DEPLETABLE_MANA_STAMINA, fMana);
Chargen_ModifyCreaturePropertyBase(oCreature,PROPERTY_ATTRIBUTE_DEFENSE, fDefMod);
Chargen_ModifyCreaturePropertyBase(oCreature,PROPERTY_ATTRIBUTE_ARMOR, fArmMod);
Chargen_ModifyCreaturePropertyBase(oCreature,PROPERTY_ATTRIBUTE_ATTACK, fAttMod);
Damage, health and mana bonuses work, the rest don't. And I don't think the race part of damage bonus works, either. I've spent quite a long while on this and just can't seem to get this to work. Any ideas?
Edit: and yes, I've added the fields to the gda files and defined the constants in 2da_constants.
Modifié par Anomaly-, 05 avril 2010 - 05:44 .





Retour en haut






