[WIP] Print Text - 02/01/15 01:03 AM
With the way that the text currently works in D:OS, it's nearly impossible to output the value of a String variable if you don't already know what is supposed to be in it.
Which leads to my current WIP workaround, with the aim of allowing developers to output the value of an unknown variable. Now, I'm practically inactive in terms of creating an actual mod, but I'm wanting to throw out this idea to see if it sounds reasonable.
Here's some (untested) Story code:
The idea is fairly simple.
1. Have a Key:Content list in the TranslatedString Keys comprised of the individual letters of the alphabet. IE Key: A, Content: A, etc etc.
2. Find out which letters the word contains and store them in a temp database.
3. Starting with a blank string, continue testing letters by concatenating them and seeing if the actual word contains the result.
4. Repeat #3, but with concatenating in the other direction
5. Output result
Now the code posted above doesn't clean itself up (yet) and probably outputs in an incorrect manner, but the gist of it should be usable (or not, since it's untested).
Consider this:
Which leads to my current WIP workaround, with the aim of allowing developers to output the value of an unknown variable. Now, I'm practically inactive in terms of creating an actual mod, but I'm wanting to throw out this idea to see if it sounds reasonable.
Here's some (untested) Story code:
The idea is fairly simple.
1. Have a Key:Content list in the TranslatedString Keys comprised of the individual letters of the alphabet. IE Key: A, Content: A, etc etc.
2. Find out which letters the word contains and store them in a temp database.
3. Starting with a blank string, continue testing letters by concatenating them and seeing if the actual word contains the result.
4. Repeat #3, but with concatenating in the other direction
5. Output result
Now the code posted above doesn't clean itself up (yet) and probably outputs in an incorrect manner, but the gist of it should be usable (or not, since it's untested).
Consider this: