Report this content
We want the Dreams coMmunity to be a safe, diverse and tolerant place for everyone, no matter their age, gender, race, sexual orientation or otherwise. If you believe this content to contradict these principles, you can file a report for our coMmunity teams to investigate.
Note that misuse of the reporting tool will not be tolerated.Item being reported:
This would probably be pretty involved to add, and these ideas aren't thought through all the way, but here's what I've been thinking.
People have been asking for string manipulation/dynamic text for some time, so I think it'd be cool to add a new fat wire type for strings. Perhaps it could be another case of Dreams adding a feature with a very simple surface-level use case (text), but allow depth for more advanced creators (directly manipulating the characters in a string to utilize it as a general array).
So how would this new wire type play with other gadgets?
Inputs (green gadgets)
- New gadget: "Text data" - A debug gadget of sorts that outputs a constant pre-defined string. Basically the equivalent to a slider or switch, but for strings.
- New gadget: "Text input" - A gadget with an input that, when pulsed, brings up the system text input, allowing the user to input a string. Outputs a text wire holding the text the user inputted. Maybe it could have a setting for max length (that can't be changed at runtime? Contributes to some kind of text memory gameplay sub-thermo? Or add to the wire count since more characters effectively = more wires? I don't know.)
- Others: Anywhere you can input text currently could also have a string wire output, allowing you to access things like tag names, object names, or text displayer contents directly.
Processing (yellow gadgets)
This category is pretty tricky, since the wire would need to play nicely with all the existing gadgets, and there are a lot of interactions that don't quite make sense.
- Possible operations:
- String concatenation using combiners.
- Element-wise array operations using calculators. Some operations would do more string-specific stuff (> and < could do alphabetical comparison, = would check equality of the entire string etc.)
- New gadget: "Text manipulator" that could do string operations like format, split, trim, find, charAt, etc. (although I'm not sure how useful some of these operations would be in something like Dreams where loops don't exist).
- Splitters could do... something? Give you access to individual characters or substrings? Or maybe some kind of metadata like color or font if that ends up being stored alongside the string?
- Remaining questions:
- What would the default value of a text wire be (i.e. the value when you plug it somewhere that expects a scalar)? Unicode value (or Dreams equivalent) of the first character? String length? Treat the entire thing as a giant fat wire and get its magnitude?
- How would this interact with other wires? e.g. How do blending, modulate, and overwrite input modes work? Or adding a string and a scalar (maybe same as fat wire + scalar, e.g. "AAAA" + 1 = "BBBB")?
- What would it mean to keyframe/animate a string?
- How would a "text manipulator" gadget behave when given scalars or other fat wires?
- Can you store text in a variable somehow?
Outputs (pink gadgets)
- Text displayers, subtitle displayers, and dialog text displayers could accept a text wire for their display text.
- Similar to how gadget names could output a wire, they could also accept an input wire and be renamed on the fly.
- Things like teleporters, followers, and zones could accept a text wire input so the thing they follow/detect can change dynamically.
Anyway those are just ideas that would probably be a pain to implement, lemme know your thoughts.