I understand how concatenation works, but is there a way to reverse it, to pull data out of a concatenated string, if I used a separator.
Here is an example:
I have a NPC follower that I want to replace with another NPC follower, but when I dismiss the first follower I would like to be able to rehire him later in the game with all his current stats and inventory intact. If I concatenate all his data into a string with separators, say… “Name|Armor|Weapon|HP” etc… Is there a way to extract the data from the string back into the appropriate variables using only choicescript, or would I have to use *script?
I could create separate variables for every stat for every companion in the above example, but this is not practical in the game I am working on.
I have tried searching the forums and the documentation with no luck.
I am thinking that some sort of loop is the answer, just not sure how to identify the separator.
Any help would be appreciated.