TF2 Map Scrambler 1.0.1
Map randomization for fun and destruction!
Last jam I made a program that tried to create good maps from scratch. This time, I've made a program that ruins perfectly good maps! Why? Because I can! And also because I just didn't have a lot of time to work with and made the first thing that jumped into my head.
Introducing: The TF2 map scrambler! It takes existing maps and randomly swaps around textures, props, lighting, sound effects, and whatever else it can get its hands on.
This program runs on Lua, and is much easier to use than my previous entry. The download zip contains the source code, as well as examples of maps scrambled using it. To run the program, open up the code and change the settings variables found at the top of the file - this is where you need to set up what files the program reads and what parts of the map it scrambles. Then just run the file with lua (you do need to actually install lua, of course).
The nucleus scramble used every kind of scramble the program has (except for control point). It's the only map of the three examples to display prop scrambling, as prop scrambling doesn't work for most maps yet.
Because turbine is all indoors, it is lit entirely with light entities rather than skybox lighting. For this reason, it is an excelent example of how the color scrambling on lights works.
As if steel wasn't confusing enough already, it's now been scrambled! The signs leading you to controls points and resupply rooms are all wrong, and the names and hud positions of the control points have been randomized. This scramble was done with nonrandomtextureshuffle=1, meaning that texture shuffling was entirely consistent (for example all dirt floor textures turned into blue concrete wall textures). If steel is scrambled without this setting, it encounters the "too many textinfos" error when you try to compile it.
This is a pretty simple scramble of cp_gorge. It was done using the default settings that the .lua file has in the download zip, so no prop or cp scrambling happened, and the color scrambling isn't as intense as it is in turbine for example. This map scramble was done without anything in the readfiles setting, so the program only used textures already present in cp_gorge_d.
Introducing: The TF2 map scrambler! It takes existing maps and randomly swaps around textures, props, lighting, sound effects, and whatever else it can get its hands on.
This program runs on Lua, and is much easier to use than my previous entry. The download zip contains the source code, as well as examples of maps scrambled using it. To run the program, open up the code and change the settings variables found at the top of the file - this is where you need to set up what files the program reads and what parts of the map it scrambles. Then just run the file with lua (you do need to actually install lua, of course).
Here's a list of what the program can do:
- Scramble surface textures
- Scramble overlay textures
- Scramble light colors
- Scramble render colors
- Scramble prop skins
- Scramble prop models [!WIP/Unstable!]
- Scramble audio soundscapes
- Scramble ambient audio
- Scramble control point layout [!WIP/Unstable!]
Common problems and fixes:
- Broken areaportals: Decompiled valve maps, which are what this was tested on, tend to mess up areaportals. Just hide them in hammer if they cause problems.
- "too many textinfos" error on complile: This error can pop up when scrambling textures on bigger maps. To fix it, look at the lua file at lines 41-45, "troubleshooting settings." Set the "nonrandomtextureshuffle" variable to some value between 0 and 1. Increasing this value makes the texture shuffling less random and chaotic; keep increasing it until the too many textinfos error stops showing up.
- for example change
nonrandomtextureshuffle=0
to
nonrandomtextureshuffle=0.8
- for example change
- Part of the map is invisible!: Usually this is due to areaportals being broken (see broken areaportals). Can also be caused by water, prop model scrambling, or (rarely) texture scrambling. Try disabling those to make it work.
Example maps included in the download:
koth_nucleus_scrambled
koth_nucleus_scrambled
The nucleus scramble used every kind of scramble the program has (except for control point). It's the only map of the three examples to display prop scrambling, as prop scrambling doesn't work for most maps yet.
ctf_turbine_scrambled
Because turbine is all indoors, it is lit entirely with light entities rather than skybox lighting. For this reason, it is an excelent example of how the color scrambling on lights works.
cp_steel_scrambled
As if steel wasn't confusing enough already, it's now been scrambled! The signs leading you to controls points and resupply rooms are all wrong, and the names and hud positions of the control points have been randomized. This scramble was done with nonrandomtextureshuffle=1, meaning that texture shuffling was entirely consistent (for example all dirt floor textures turned into blue concrete wall textures). If steel is scrambled without this setting, it encounters the "too many textinfos" error when you try to compile it.
cp_gorge_scrambled
This is a pretty simple scramble of cp_gorge. It was done using the default settings that the .lua file has in the download zip, so no prop or cp scrambling happened, and the color scrambling isn't as intense as it is in turbine for example. This map scramble was done without anything in the readfiles setting, so the program only used textures already present in cp_gorge_d.