Sauerworld Forum

Sending Mapmodels via Maptitle - Concept


  • ***
  • 111
  • +24/-1
    • Projects by Salatiel
Sending Mapmodels via Maptitle - Concept
« on: December 14, 2019, 03:31:06 PM »
This post shows a little known function to create/send .md5 models and .cfg files using the famous /do $maptitle command.

As you may know, using the map title we can make texts available for other clients to execute, so any plain text file can be created with any extension in any sauerbraten folder (and out of it too  ::)). Although it's something simple, it can be dangerous if used by malicious players to harm uninformed players, so be aware and read the /maptitle before you run it.

Let's say you already have a .md5 model and his configuration file, both are plain texts that you can save in maptitle, you just need to create two variables with their content, for example:

(you can open the .md5mesh file in a text editor and copy everything to your maptitle)

And now you need to save the contents of these variables as files, respecting their original extension.

The textsave command has the power to create or replace any existing file, that's the dangerous part.

The way it is now, it won't work. You need to show the contents of the variables in a gui menu using text fields.

The text fields will look ugly, use your creativity to hide them :D

And done, send it to the maptitle and convince everyone to run /do $maptitle.

It's not possible to "create" images this way, so your model can only use textures that are already present in the sauerbraten models folder... It's all very limited and tricky, but fun.

Something I noticed a little late, if you save the map after applying a huge maptitle, it will end up replacing the octree and deleting all the map content.
« Last Edit: March 11, 2020, 03:12:52 AM by Salatiel »