A couple of BP node questions and suggestions here with some background.
Background
Originally, I wanted to use an array of structs to manage data records. Each record could then have its own array of tags (defined in a BP enum). I could then add, remove, and check for tags whenever I want to affect gameplay and visuals.
However, there is a massive, completely ridiculous problem constantly plaguing of my projects: arrays of structs are currently busted in BP as you can’t set the member variables of individual structs in the array. Technically, you can replace the original struct in the array with a newly-built struct. However, that’s only true when the array is the original. In my case, I’m using a function to search through my records and return a separate search results array. If I were to use the old make-and-replace hack, it would only affect the search results array; the original data would never be touched.
Therefore, in my current project, I’m saving data to an array of strings. Each of those strings is a list of tags separated by commas. Mockup:
{"road,built", "bridge", "bridge,built", "road", ""}
gives me the freedom to add, remove, and check for as many arbitrary tags that I want. However, adding additional data complicates things. With existing string manipulation, something like is possible but unwieldy:
{"position:north|tags:road,built", "position:east|tags:bridge,broken"}
I’d love to use TMaps or Objects, but neither of them can be replicated.
Questions
Can TMaps components be made replicable?
Currently, TMaps crash the editor when their key/value pair isn’t found. Learned that when testing whether or not they replicated. Turns out, they don’t Is it possible to implement some error handling and a PairFound boolean?
Suggestions
A string array to string (collapse/flatten) node (with deliminator string) would be nice.
Regular expressions are probably a can of worms you don’t want to open, but they would be quite useful.
, another can of worms, could replace the monstrosity that is Structs, assuming the output could be saved to a string for easy replication. Edit: found an existing plugin. I’ll test it out once it’s updated to 4.6.1.
An in-memory (fileless) ini stored in a single string (so that it could be added to an array) could also fill the role quite nicely without becoming overcomplicated.
Finally, thanks for the work you’ve put into these nodes. They’re quite useful.