• Center Save Changes Reset

TF2 Map Scrambler 1.0.1

Map randomization for fun and destruction!

  1. The_Evil_Pickle

    The_Evil_Pickle L2: Junior Member

    Messages:
    56
    Positive Ratings:
    63
    TF2 Map Scrambler - 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).


    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
    • 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.
    • The output file doesn't write properly, it stops after the word "material": If your readfiles list is empty, add the file it should be basing the map on into it.
      • For example if you are reading form cp_steel_d.vmf change
        readfiles = {}
        to
        readfiles = {'cp_steel_d.vmf'}


    Example maps included in the download:
    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.
     
    • Like Like x 1
  2. The_Evil_Pickle

    The_Evil_Pickle L2: Junior Member

    Messages:
    56
    Positive Ratings:
    63
    Last-minute update: Added a new example map (cp_gorge_scrambled), fixed some simple bugs I'd overlooked, and added a bit more commenting to the code.

    Read the rest of this update entry...