Item struct variable name revision #7303
kphoenix137
started this conversation in
General
Replies: 3 comments 2 replies
-
Beta Was this translation helpful? Give feedback.
2 replies
-
List looks good now feel free to apply this. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Here are the names used for the item struct fields in Djavul. Feel free to use any for inspiration : ) Of course, I know DevilX doesn't use abbreviations as much and such, so the style of naming may differ a bit. // _iAnimFlag
DropAnimPlaying bool
// _iSeed
Seed int32
// _iCreateInfo
ItemCreationFlags d1enum.ItemCreationFlags
// _itype
ItemType d1enum.ItemType
// _ix, _iy
Coordinate
// _iDelFlag
Delete bool // unused
// _iSelFlag
ItemSelect d1enum.ItemSelect
// _iPostDraw
DrawPost bool
// _iIdentified
Identified bool
// _iMagical
ItemQuality d1enum.ItemQuality
// _iName
NormalName string
// _iIName
MagicName string
// _iLoc
ItemLoc d1enum.ItemLoc
// _iClass
ItemClass d1enum.ItemClass
// _iCurs
ItemGraphicID d1enum.ItemGraphicID
// _ivalue
ItemBaseValue int
// _iIvalue
ItemValue int
// _iMinDam, _iMaxDam
MinDamage, MaxDamage int
// _iAC
ArmorClass int
// _iFlags
ItemAbilityFlags d1enum.ItemAbilityFlags
// _iMiscId
ItemMiscID d1enum.ItemMiscID
// _iSpell
SpellID d1enum.SpellID
// _iCharges, _iMaxCharges
CurCharges, MaxCharges int
// _iDurability, _iMaxDur
CurDur, MaxDur int
// _iPLDam
Damage int
// _iPLToHit
ChanceToHitBonus int
// _iPLAC
EnhancedArmorClass int
// _iPLStr
Str int
// _iPLMag
Mag int
// _iPLDex
Dex int
// _iPLVit
Vit int
// _iPLFR
FireResist int
// _iPLLR
LightningResist int
// _iPLMR
MagicResist int
// _iPLMana
MP int
// _iPLHP
HP int
// _iPLDamMod
DamageModifier int
// _iPLGetHit
DamageFromEnemies int
// _iPLLight
LightRadius int
// _iSplLvlAdd
SpellLvlBonus int
// _iRequest
HeldInHand bool
// _iUid
UniqueItemID d1enum.UniqueItemID
// _iFMinDam, _iFMaxDam
MinFireDamage, MaxFireDamage int
// _iLMinDam, _iLMaxDam
MinLightningDamage, MaxLightningDamage int
// _iPLEnAc
EnhancedAccuracy int
// _iPrePower
PrefixItemPowerID d1enum.ItemPowerID
// _iSufPower
SuffixItemPowerID d1enum.ItemPowerID
// _iVAdd1, _iVMult1
PrefixValue, PrefixValueMult int
// _iVAdd2, _iVMult2
SuffixValue, SuffixValueMult int
// _iMinStr, _iMinMag, _iMinDex
StrReq, MagReq, DexReq, VitReq int
// _iStatFlag
Equipable bool
// IDidx
ItemID d1enum.ItemID |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Suggested names to rename these variables to. All variable names are kept between 3-20 characters. I opted for full words when possible for clarity, and I'm assuming most modern IDEs have an autofill/autocomplete feature that makes it less tedious to type longer variable names.
_iSeed
->seed
_iCreateInfo
->creationFlags
_itype
->type
_iAnimFlag
->isAnimated
(Note: this is a boolean, so variable name should indicate as such for consistency in this codebase)position
AnimInfo
->animationInfo
_iDelFlag
-> REMOVED (Note: unused)_iPostDraw
->postDraw
_iIdentified
->isIdentified
_iMagical
->isMagical
_iName
->name
_iIName
->identifiedName
_iLoc
->equipLocation
_iClass
->class
_iCurs
->cursorGraphic
_ivalue
->value
_iIvalue
->idenfitiedValue
_iMinDam
->minDamage
_iMaxDam
->maxDamage
_iAC
->armorClass
_iFlags
->flags
_iMiscId
->miscID
_iSpell
->spell
IDidx
->tableID
_iCharges
->charges
_iMaxCharges
->maxCharges
_iDurability
->durability
_iMaxDur
->maxDurability
_iPLDam
->damagePercent
_iPLToHit
->toHit
_iPLAC
->armorClass
_iPLStr
->strength
_iPLMag
->magic
_iPLDex
->dexterity
_iPLVit
->vitality
_iPLFR
->resistFire
_iPLLR
->resistLightning
_iPLMR
->resistMagic
_iPLMana
->mana
_iPLHP
->life
_iPLDamMod
->damage
_iPLGetHit
->damageFromEnemies
_iPLLight
->lightRadius
_iSplLvlAdd
->spellLevel
_iRequest
->isBeingPickedUp
_iUid
->uniqueID
_iFMinDam
->minFireDamage
_iFMaxDam
->maxFireDamage
_iLMinDam
->minLightningDamage
_iLMaxDam
->maxLightningDamage
_iPLEnAc
->armorPierce
_iPrePower
->prefix
_iSufPower
->suffix
_iVAdd1
->addedValue1
_iVMult1
->valueMultiplier1
_iVAdd2
->addedValue2
_iVMult2
->valueMultiplier2
_iMinStr
->requiredStrength
_iMinMag
->requiredMagic
_iMinDex
->requiredDexterity
_iStatFlag
->canBeEquipped
_iDamAcFlags
->hellfireItemFlags
dwBuff
->extraFlags
Beta Was this translation helpful? Give feedback.
All reactions