ModifyKeywordData - Location

From the Fallout4 CreationKit Wiki
Jump to navigation Jump to search

Member of: Location Script

Modifies the data attached to the specified keyword on this location by adding the passed-in data to the current value, but as a single function call so it is thread-safe.

Syntax[edit | edit source]

Function ModifyKeywordData(Keyword akKeyword, float afData)

Parameters[edit | edit source]

  • akKeyword: The Keyword to query for.
  • afData: The amount to modify the current value by.

Return Value[edit | edit source]

None.

Examples[edit | edit source]

; Add 50 to the cost keyword on this location
MyHouseProperty.ModifyKeywordData(CostKeywordProperty, 50)


; Subtract 25 from the cost keyword on this location
MyHouseProperty.ModifyKeywordData(CostKeywordProperty, -25)

Notes[edit | edit source]

  • You CAN modify keyword data on locations which do not have that keyword in the master file. This may be confusing. Here is an example:
    • If a location does not have a keyword, and you modify keyword data on it (add 10 for example) then:
      • LocationHasKeyword condition will return false and
      • GetKeywordDataForLocation for that keyword will return 10 (which is 0 + 10)

See Also[edit | edit source]