Best way to give / receive a long strong from the user?

I have a system that saves buildings to and from a specially coded string. Here is an example:

image

[["Car Chasis","Large Spring","Driver Seat","Winch","Steerable Wheel Mount","Large Wheel","Fixed Wheel Mount"],
{"1":1},
{"9":1,"15":"AACAPwCA77H+/wG1/v8BtW4BAC8AAIC/AIDvMQAAgD97AAAvAACAPwAAAAAAAAAA","13":"P2","12":2,"1":2},
{"9":1,"15":"AACAPwCA77H+/wG1/v8BtW4BAC8AAIC/AIDvMQAAgD97AAAvAABAPwAAAAAAAIA0","13":"Part","12":2,"1":2},
{"9":1,"15":"AACAvwCA77H+/wE1/v8BNW4BAC8AAIA/AIDvsQAAgD97AACvAACAvwAAAAAAAAAA","13":"P41","12":2,"1":2},
{"9":1,"15":"AACAvwCA77H+/wE1/v8BNW4BAC8AAIA/AIDvsQAAgD97AACvAABAvwAAAAAAAIC0","13":"P47","12":2,"1":2},
{"9":1,"15":"ypYrHwAAgD+Yo/Ee/9JtIZij8Z4AAIA/AACAP8qWK5//0m2hAAAAAAAAgD4AAAAA","13":"Primary","12":1,"1":3},
{"9":1,"15":"AAAAAAAAAAAAAIA/AAAAAAAAgD8AAAAAAACAvwAAAAAAAAAAAAAAAAAAAAAIAIA/","13":"HasAttach","12":1,"1":4},
{"9":2,"15":"Gj08MwAAgL+9z3+uAACAvxo9PLPw/4K18P+CNef/fy4AAIC/AAAAAAAAAL8AAAAA","13":"Bottom","12":1,"1":5},
{"9":8,"12":1,"1":6,"14":1},
{"9":3,"15":"Gj08MwAAgL+9z3+uAACAvxo9PLPw/4K18P+CNef/fy4AAIC/AAAAAAAAAL8AAAAA","13":"Bottom","12":1,"1":7},
{"9":10,"12":1,"1":6,"14":1},
{"9":4,"15":"Gj08MwAAgL+9z3+uAACAvxo9PLPw/4K18P+CNef/fy4AAIC/AAAAAAAAAL8AAAAA","13":"Bottom","12":1,"1":5},
{"9":12,"12":1,"1":6,"14":1},
{"9":5,"15":"Gj08MwAAgL+9z3+uAACAvxo9PLPw/4K18P+CNef/fy4AAIC/AACANAAAAL8AAAAA","13":"Bottom","12":1,"1":7},
{"9":14,"12":1,"1":6,"14":1}]

Normally these strings are not seen by the player and they will be stored / retrieved from a datastore. However I might want to have to option of saving or loading a vehicle directly from a string, similar to what Factorio allows with blueprints. To load I could probably use httpservice to read from Pastebin or something similar, but what would be a good way to send this string to the player so they can store it? Is there even a TOS way? No big deal if I can’t have this feature, but it would be pretty slick.

(About 1300 characters)

1 Like

Is your question on how to let the player copy and paste the string?
If so, you can set the text of a text box (I think editable can be set to false on it, might need to be set to true though) to the string. A player can then just copy it and save it (and share it) how they want

Is there any limit on the size of the string for text boxes?

Apparently there is - ~1020 characters. You could split the text into multiple textboxes and just have the user copy and paste all of them

This will probably not be feasible as this is a quite small vehicle and already too large for one text box. I could somehow send the text via http and have them obtain it somehow but I cannot imagine that would be remotely TOS.

You could store the string in a datastore with a unique key. Then tell the player that ID and they can copy / paste the ID instead of the whole string. Datastores have a much larger limit

1 Like

This is probably the best idea for you @azqjanna. You can just make a system where players can save items using a designed name, so you can just save something like this:

["CoolBuild"] = "1234567890ExampleString"