REDIVIVUS

Proposals / #831

Name the pre-rolled property value parameter nRolledValue in the ITEMPROP_ family

applied · by jaenster · submitted 2026-11-02, applied 2026-11-02

Ghidra v1809 · 9528519

Stack[0x18] is the 8th slot of the shared fpProperties signature. The dispatcher (0065fd70) starts it at 0 and after the row's first property function does nFuncIdx = nFuncRetVal, so funcs 2..7 receive what func 1 returned. Handlers treat it exactly so: ITEMPROP_AddStat_Simple loads [EBP+0x1c] at 0065f2c6, tests it at 0065f2c9, and only when zero calls ITEMMOD_RollRandomValue at 0065f2da with the record's fmin/fmax; the value then becomes the nValue argument of ITEMMOD_AddStatToItem at 0065f2f5. The family already records this: four handlers are named ITEMPROP_AddStat_PreserveRolledValue..., ITEMPROP_AddMinDamage is documented as rolling this parameter when zero, and the matching local is already nRolledValue64 in six handlers. ITEMPROP_AddEnhancedDamage (0065f010) is left out because it already has a local named nRolledValue.

Changes 24, applied together

  1. Rename variable win 0x0065eb30 Stack[0x18]

    namedwParam2→nRolledValue
  2. Rename variable win 0x0065eba0 Stack[0x18]

    namedwParam3→nRolledValue
  3. Rename variable win 0x0065ec10 Stack[0x18]

    namenParam4→nRolledValue
  4. Rename variable win 0x0065ec80 Stack[0x18]

    namenParam3→nRolledValue
  5. Rename variable win 0x0065ecf0 Stack[0x18]

    namenParam12→nRolledValue
  6. Rename variable win 0x0065ee80 Stack[0x18]

    namenParam12→nRolledValue
  7. Rename variable win 0x0065f2b0 Stack[0x18]

    namenParam3→nRolledValue
  8. Rename variable win 0x0065f310 Stack[0x18]

    namenParam3→nRolledValue
  9. Rename variable win 0x0065f390 Stack[0x18]

    namenParam3→nRolledValue
  10. Rename variable win 0x0065f3f0 Stack[0x18]

    namenParam3→nRolledValue
  11. Rename variable win 0x0065f470 Stack[0x18]

    namedwParam3→nRolledValue
  12. Rename variable win 0x0065f590 Stack[0x18]

    namenParam2→nRolledValue
  13. Rename variable win 0x0065f6a0 Stack[0x18]

    namedwParam4→nRolledValue
  14. Rename variable win 0x0065f870 Stack[0x18]

    namedwParam4→nRolledValue
  15. Rename variable win 0x0065f960 Stack[0x18]

    namedwParam3→nRolledValue
  16. Rename variable win 0x0065f9d0 Stack[0x18]

    namedwParam3→nRolledValue
  17. Rename variable win 0x0065fa40 Stack[0x18]

    namedwParam3→nRolledValue
  18. Rename variable win 0x0065fae0 Stack[0x18]

    namedwParam4→nRolledValue
  19. Rename variable win 0x0065fb50 Stack[0x18]

    namedwParam2→nRolledValue
  20. Rename variable win 0x0065fba0 Stack[0x18]

    namedwParam3→nRolledValue
  21. Rename variable win 0x0065fbf0 Stack[0x18]

    namedwParam3→nRolledValue
  22. Rename variable win 0x0065fc40 Stack[0x18]

    namedwParam3→nRolledValue
  23. Rename variable win 0x0065fc90 Stack[0x18]

    namedwParam2→nRolledValue
  24. Rename variable win 0x0065fd20 Stack[0x18]

    namedwParam4→nRolledValue