NathanKell
...
Because of course it's not like I'm overflowing in projects... :]
A thought I've been kicking around for, oh, probably six months, is to make a text input module for POTC.
That is, create a function that will save input config somewhere, create a temporary mapping of all alphanumeric keys (and shift/delete/enter etc.), create a handler for reading their input, and then a function to replace that with the normal input config saved at the start.
Then you'd simply call a function like StartTextInput() and pass it an aref to the place where the string will be stored (usually a string under GameInterface, I'd think). And when you hit enter, text input stops and everything goes back to normal.
Now, the really _freaky_ thing is that, because of the call command, we can have a /real/ console.
The call command is used to call a function whose name is the string given to call.
example:
string tmp = "reinit"
call tmp(true, true);
will execute reinit(true, true).
Which means that we can, using text input, tell the game _exactly_ what function we want it to call (as long as the function has no arguments since those are not strings).
Well, we /could/ make a handler for even that, using the init_interface() commands as an example of the way.
That is, support a few base forms of console-callable functions, i.e. "Chr, float" would have you type in the character ID and the float as inputs first, and other data types similarly.
No way to tell it what _variables_ to use, though (unless we have a preset list of choosable variables to pass).
Though probably if someone had time and inclination to write a little program that would find the names of all globals, write a giant switch statement that has the name of the variable as the case and returns the &variable as the codeblock, we could get around even that.
But a true in-game console would be a side benefit; the major thing would be being actually able to _type in_ a name, say, rather than using the idiotic console system of choose-caps, choose-letter, go-to-lower-case, choose-next-letter and so forth.
A thought I've been kicking around for, oh, probably six months, is to make a text input module for POTC.
That is, create a function that will save input config somewhere, create a temporary mapping of all alphanumeric keys (and shift/delete/enter etc.), create a handler for reading their input, and then a function to replace that with the normal input config saved at the start.
Then you'd simply call a function like StartTextInput() and pass it an aref to the place where the string will be stored (usually a string under GameInterface, I'd think). And when you hit enter, text input stops and everything goes back to normal.
Now, the really _freaky_ thing is that, because of the call command, we can have a /real/ console.
The call command is used to call a function whose name is the string given to call.
example:
string tmp = "reinit"
call tmp(true, true);
will execute reinit(true, true).
Which means that we can, using text input, tell the game _exactly_ what function we want it to call (as long as the function has no arguments since those are not strings).
Well, we /could/ make a handler for even that, using the init_interface() commands as an example of the way.
That is, support a few base forms of console-callable functions, i.e. "Chr, float" would have you type in the character ID and the float as inputs first, and other data types similarly.
No way to tell it what _variables_ to use, though (unless we have a preset list of choosable variables to pass).
Though probably if someone had time and inclination to write a little program that would find the names of all globals, write a giant switch statement that has the name of the variable as the case and returns the &variable as the codeblock, we could get around even that.
But a true in-game console would be a side benefit; the major thing would be being actually able to _type in_ a name, say, rather than using the idiotic console system of choose-caps, choose-letter, go-to-lower-case, choose-next-letter and so forth.