I was just a moment ago trying to figure out how to rename stamps, and belive I have finally struck upon the correct method (I am aware there is another post about renamins stamps, but the mothod used there does nto seem to work, or may be outdated)!
It would appear, after some exprminetation, that the only 'trick; to renamign stamps is simply to make certain that [filename].stm is EXACTLY 10 characters long. I am aware there was some previous conjecture that stated that you only needed to make sure that your filename was under 10 characters, and ended with '00' before the .stm . This is not the case, and filenames that do not end in zeros will work just fine!
If anyone can find any different/better information, please comment!
I am just going to assume that you are a Dev/modder, as this is a bit technical.
Persumeably, from what I can observe, you are saving the strings to strings.def on the same line, then simply reading them like this:
counter = 0
for counter < len(strings.def) /10 # note than len is something that returns the length of a sting, and we are #going to assume for the purpose of this post that string.def is actually a function returning the first line of #strings.def.
toDisplayIngame.append(strings.def[counter:counter + 10]
This is a bit rough, but it get the idea across.
So here's my throught: just store a different filename on each line of stamps.def. In python, it is relativly trivial to do this with 'linecache.getlien(lineNumber)', although I am not sure if there is a lua/C/C++ equivilant. To prevent it from just loopign forever, you could have a counter, call it 'blanks', each time it reads a blank line, it ignors it and incriments 'blanks' by one. If 'blanks' exceeds a certain value, it stops reading the file. The reason for having this counter is just in case someone edits styrings.def and leaves a line or two blank.
All told, unless I am grossly misunderstanding the capabilities of Lua and how powderToy is written, it shoul dbe pretty simple to impliment this, and would allow users to rename stamps to be whatever they want, with filenames as long as they want, and should make it trivial to impliment an ingame renaming feature in teh future.
Let me know what you think!