×
Меню
Индекс

MSFD Determining and changing reputation and disposition

 
Get/Mod/SetReputation
 
Get/Mod/SetDisposition
 
SetDisposition refers to base disposition (as set in the TES CS, unaltered by any modifiers). To set the disposition value used in game, use a combination of GetDisposition (returns current value) and ModDisposition; for example, to completely control an NPC's disposition from a global "myRealDisp" (can be a short, it doesn't need to be a float unless you want to change disposition by float values), the NPC's local script could include something like this:
if ( myRealDisp > 100 )
     set myRealDisp to 100
elseif ( myRealDisp < 0 )
     set myRealDisp to 0
endif
set localFloatVar to ( GetDisposition )
set localFloatVar to ( myRealDisp - localFloatVar )
ModDisposition localFloatVar