[Content Patcher] add 'data file index' token
Pathoschild opened this issue ยท 2 comments
Add a token which returns the index of a key in a data file. This can be used in a few specialized cases like adding an NPC to a festival map.
For example, Abigail is the first entry in Data/NPCDispositions
so {{DataFileIndex: Data/NPCDispositions, Abigail}}
= 0
.
This isn't feasible with the way Content Patcher is implemented; the token needs to load the asset to get its value, and tokens loading assets does weird things. This is only really needed for a specific case, so I'll suggest a change in the game code to accommodate that case instead.