Toribash
Original Post
Luandry List
(The title is a pun.)

After Wii development stops, attention turns towards Toribash 4.0, and Lua's due for some additions. Whatever Lua coders we have, I'm sure, all have a thing or two we'd like to see added to the SDK. This thread is to get what is and isn't necessary discussed and organized. I'll maintain a master list in this post.

Please don't bother posting unless you're familiar with what is and isn't possible with the SDK as it stands, and you're speaking in the context of code. This isn't the suggest a script thread.

Also note that this is strictly about the SDK. If something you want is possible to implement with Lua alone, as it is now, it doesn't belong here.

I'll use my executive thread starting power to get the list rolling.

Functions:
  • Player Status
    • A way to check if a player is an operator or ingame mod. -Blam
    • Get current win streak, player rank. -DeFransen
    • Method to disable bout list. -DeFransen
  • I/O
    • Extended File System Access
      • In addition to the scripts directory, it would be nice to be able to access the entire data directory, at least. -Dafe
    • Directory Listing
      • some directory functions so we can read in and display custom directories. -Hampa
    • require()
      • Needed for any serious development to import library files only when necessary, rather than using dofile().
  • Drawing
    • Lines
      • I've written some line drawing code that drew a ton of boxes or spheres in 2D and 3D context, respectively, but it's inefficient. There's code in place already to draw lines, but it's commented out for some reason. Easy fix. -Dafe
    • Planes
      • Functions are needed to draw planes, without having to waste resources drawing 6 planes to make a really flat box. I think a triangular plane would be sufficient, just specifying the 3 vertices, and we could create code to draw whatever kind of surfaces we want from there. -Dafe
  • Win/Loss triggers
    • There needs to be a function that's just like: winner(1, "win message"), so we can make custom game modes and not have to hack people into disqualification, etc. -Dafe
  • Environment
    • I need a function to change an environment object from one shape to another. i.e. a box to a sphere -Dafe
    • Functions for controlling environment joints would make for interesting mods and would allow for simulated body extension. -Dafe
  • Console
    • Complex scripts will need a way to read from the console for custom commands. So a function to get the current console text buffer is necessary. -Dafe
    • run_cmd() should return the value of its chat output. -Dafe
  • Camera
    • Setting the point that the camera looks at covers pitch and heading, but there needs to be a way to control the camera roll, either via a setCameraRoll function or setCameraOrientation(<euler angles> | <matrix>) -Dafe
  • Sounds
    • Should be able to play sound files from inside the data directory. Starting timestamp and ending timestamp would be nice, but not crucial. -Dafe
Hooks:
  • console:
    • There's currently no way to get the command just submitted in the console, so a hook is needed to intercept the input, with a variable in the callback that holds the input. -Dafe
  • enter_frame:
    • The enter_frame hook doesn't fire during replays, but if it did, it would fix a fair number of scripts being broken during playback. I'd originally suggested that it just be changed to fire during replay playback as well, to retroactively fix old scripts, but it's probably best to just introduce a new hook, in case you need to differentiate. Old scripts can then be ammended easily. -Dafe
Last edited by Dafe; Sep 7, 2009 at 12:07 PM.
Radioactive torso's description should be, "You have cancer like wow."
Good catch. That was on my list when I was developing environment extension, but I forgot about it.
Radioactive torso's description should be, "You have cancer like wow."
Have access to the Toricredits & Qi of the other players (it would make stuff easiers for custom HUD etc...)

A streak "memory" that keeps the streaks of players.
Gone
The ability to read files from anywhere in the data folder, not just the script folder?
(just make a custom io function, say io.openread(file) which does a io.open("./data/"..file, "r") or whatever before you limit io.open to the script folder or something)

Edit:
Oh and a way to check if a player is an operator or ingame mod.
Last edited by Blam; May 4, 2009 at 11:49 AM.
:D
Originally Posted by Fyerrblad View Post
Have access to the Toricredits & Qi of the other players (it would make stuff easiers for custom HUD etc...)

A streak "memory" that keeps the streaks of players.

I don't pay attention to that stuff much. Is that all stuff that's currently publicly accessible?

Originally Posted by Blam View Post
The ability to read files from anywhere in the data folder, not just the script folder?
(just make a custom io function, say io.openread(file) which does a io.open("./data/"..file, "r") or whatever before you limit io.open to the script folder or something)

Edit:
Oh and a way to check if a player is an operator or ingame mod.

I added the data folder thing when I added Hampa's note. Adding the mod status now.
Radioactive torso's description should be, "You have cancer like wow."
Added:

Sounds:
Should be able to play sound files from inside the data directory. Starting timestamp and ending timestamp would be nice, but not crucial.
Radioactive torso's description should be, "You have cancer like wow."
Added:

I/O:
require()
Needed for any serious development to import library files only when necessary, rather than using dofile().
Radioactive torso's description should be, "You have cancer like wow."
Added:

Environment:
Functions for controlling environment joints would make for interesting mods and would allow for simulated body extension.
Radioactive torso's description should be, "You have cancer like wow."
Qi is available, but rank of players and current streak is missing, tc shouldnt be available for privacy i think.
Reenable disabling of the bout list

PS: Access to files in all folders is possible by modifying the startup.lua script, look at the section where io.open gets overridden.
Last edited by DeFransen; Sep 7, 2009 at 11:46 AM.
"Wenn Sensei Tanaka sein Shodushi ist, dann soll er hingehen und uns den Dimak zeigen!"