Change the skybox based on the holiday?

Discussion in 'Mapping Questions & Discussion' started by 404UNF, Jun 27, 2016.

  1. 404UNF

    404UNF No longer a "TF2 Beta/Cut Content Historian".

    Messages:
    228
    Positive Ratings:
    58
    What I'm trying to do is change the skybox based on tf_logic_on_holiday.

    For example, if the holiday is April Fools, set the Skybox to the Pyroland skybox). I can do this easily in a SourceMod plugin, but I'd rather have it set up in the map. I figured I could use a point_servercommand entity to fire off the sv_skyname convar with the new skybox, but I was hoping there was some way of changing the skybox within the Map Properties via tf_logic_on_holiday's outputs.

    EDIT: Is it also possible to change the textures on specific brushes with the holiday logic? I assume if I use func_detail, I can *maybe* use it for things like wherever there's grass (like displacements in a forest area) and change the texture to snow for a Christmas holiday.

    I've already got some April Fools logic set up by the way. Here's what I've set up if anyone is interested in fun ideas they can implement on their map.

    Click to view the full-sized image.
    [​IMG]

    Pretty much inverts the spawn rooms so that RED spawns in BLU's spawn, and vice versa. Also takes care of switching the resupply lockers and the doors to leave spawn so players don't get stuck. Takes a lot of work setting everything up to work like this. I'm already pretty much naming every entity/trigger using a dedicated naming structure which you pretty much need to do if you want to have any sort of control over all the entities in the map on the fly for things like a SourceMod plugin or holiday logic.
     
    Last edited: Jun 27, 2016
  2. Gabe Noodle from Volvo

    Gabe Noodle from Volvo L3: Member

    Messages:
    142
    Positive Ratings:
    32
    I don't think you could change textures with the i/o system. But you could have multiple skybox brushes with different textures, and disable all but the ones used for the holiday.
     
    • Thanks Thanks x 1
  3. 404UNF

    404UNF No longer a "TF2 Beta/Cut Content Historian".

    Messages:
    228
    Positive Ratings:
    58
    Ahhh, good thinking Gabe! I plan on changing:

    - Environmental lighting
    - Sun placement
    - 2D Skybox based on the holiday
    - Halloween/Smissmas/Valentine's Day specifically; changing any lights within the map from their standard color to orange/purple for Halloween, red/green for Smissmas and red/pink for Valentine's Day.
    - Ground textures for Smissmas (snow!)
    - Enabling props that are hidden by default, based on the holiday (no more separate holiday-based map versions!)
    - Soundscapes if used/necessary

    Pretty much every entity in the map is getting named. Not just for output related stuff, but also for SourceMod plugin friendliness, allowing me to easily target and change the attributes of entities within a plugin if necessary. I could do all the holiday changes in a SourceMod plugin instead of with tf_logic_on_holiday, but I figure I'd save myself the hassle of having to code in all the stuff I want to accomplish.

    EDIT: Jesus am I dim. Why the heck did I individually name and number each spawn point? For some reason, I thought that an output couldn't target multiple entities with the same name. Then I tried it out, naming two entities the same thing and having a third entity send an output to them both and it worked. So I just decreased the # of outputs of my April Fool's controller by -30 outputs.
     
    Last edited: Jun 27, 2016
  4. Frosty Scales

    aa Frosty Scales

    Messages:
    83
    Positive Ratings:
    34
    You can change the skybox as long as you do it before the map initially loads. Not 100% sure, but if you had a point_servercommand do sv_skyname <sky> as the map spawns (so originating from a logic_auto maybe?) you should have a different skybox on holidays.

    the catch here is that the server running the map needs to set "sv_allow_point_servercommand always"
     
    • Thanks Thanks x 1
  5. 404UNF

    404UNF No longer a "TF2 Beta/Cut Content Historian".

    Messages:
    228
    Positive Ratings:
    58
    Yep, I remember that issue from the uh....oh god what's it called....that training map. I feel horrible that I can't remember the name....tr_...something.

    I already have my server set up with a cronjob SourceMod plugin that reboots the server at ~3:00AM every night to keep things fresh, so that would help with the fact that it's a trade map, and it'll help the map with detecting holiday changes when the map is initialized.
     
  6. Vel0city

    aa Vel0city func_fish

    Messages:
    1,909
    Positive Ratings:
    1,530
    You should ask @Crash how he did it on wubwubwub. That map has like 3 skybox brushes or something. Or watch his video on it, he has one breaking down the map logic 'n stuff (sill waiting on how Trainsawlaser does things though :) )
     
    • Agree Agree x 1
  7. worMatty

    aa worMatty Repacking Evangelist

    Messages:
    1,072
    Positive Ratings:
    833
    One thing you could do for Christmas is make snow displacements on roofs, stairs and the ground, export them to VMFs and use Propper to compile them into prop_dynamic.
     
    • Like Like x 1
  8. 404UNF

    404UNF No longer a "TF2 Beta/Cut Content Historian".

    Messages:
    228
    Positive Ratings:
    58
    Oh I've been using Propper already. Love it. I've been using the Ultimate Mapping Resource Pack (oddly enough, the player spawn entities don't use the half-red-half-blue Engineer models...), a custom FGD with two hidden mapping entities: filter_tf_class and trigger_add_or_remove_tf_player_attributes, Propper and a Valve lighting gallery map, along with several custom textures and models submitted here.
     
  9. worMatty

    aa worMatty Repacking Evangelist

    Messages:
    1,072
    Positive Ratings:
    833
    Hurrah.
     
    • Funny Funny x 1
  10. Diva Dan

    aa Diva Dan hello!

    Messages:
    831
    Positive Ratings:
    1,367
    He has 2 different skyboxes, however one is more of a psuedo-skybox. The initial desert scene has brushes on 5 sides with literall skybox textures of dust bowl or something. When the map launches into space, the fake skybox is removed and the actual skybox becomes visible (space). You'll notice the fake skybox actually rotates when taking off, something impossible to do with normal skyboxes. So sadly he really only uses one true skybox in his map!
     
    • Agree Agree x 1
  11. Pocket

    aa Pocket func_croc

    Messages:
    4,489
    Positive Ratings:
    2,217
    I think I brought this up before; it's possible to have a material proxy that changes some properties of the material when an entity sends an input, isn't it? You might want to look into that.
     
  12. worMatty

    aa worMatty Repacking Evangelist

    Messages:
    1,072
    Positive Ratings:
    833
    It's possible to switch between two light_environment by naming them. There's some information about it somewhere on the forum. Obviously you'd get two sets of lightmaps so keep an eye on that.
     
  13. Diva Dan

    aa Diva Dan hello!

    Messages:
    831
    Positive Ratings:
    1,367
    I think Byre does that when the alien ship explodes, actually!
     
  14. Crowbar

    aa Crowbar perfektoberfest

    Messages:
    1,429
    Positive Ratings:
    1,172
    Hell, why do you have each spawnpoint named differently? It's useless waste of entdata.
     
  15. Frosty Scales

    aa Frosty Scales

    Messages:
    83
    Positive Ratings:
    34
    It would be a good idea to read the thread before you make remarks about something that's already irrelevant to begin with
     
    • Funny Funny x 1
  16. worMatty

    aa worMatty Repacking Evangelist

    Messages:
    1,072
    Positive Ratings:
    833
    I'm not sure giving each spawn point a unique name would increase the size of the entity data block any more than giving each spawn point the same name. We're talking about kilobytes here though, which really don't matter.
     
    • Agree Agree x 1
  17. Crowbar

    aa Crowbar perfektoberfest

    Messages:
    1,429
    Positive Ratings:
    1,172
    Entdata here is increased by a lot of outputs.
     
  18. Idolon

    aa Idolon the worst admin

    Messages:
    1,489
    Positive Ratings:
    4,320
    Almost - it's a point light with a high constant value.
     
    • Thanks Thanks x 1
  19. Egan

    aa Egan

    Messages:
    1,305
    Positive Ratings:
    1,486
    The 'entdata' is increased by io, but there is no limit on entdata (afaik). There is a limit on entities (2048 networked, 2048 non-networked) but I've seen a map work on a full server that had over 700% 'entdata'. And as Wormatty said the increase of naming things is negligible.

    @404UserNotFound For the soundscape enable/disable, I don't think you can toggle a soundscape point entity, but you should be able to toggle the soundscape triggers if you use that method of soundscapes.

    You can also, if you want, put the outputs into several logic_relay which you can trigger through the IsAprilFools/etc outputs and then have each relay do the rest from the OnTrigger input. This will make it easier to test things out in the meantime because while in-game you can type into console (with sv_cheats 1 on):
    and it will trigger that relay for you to test and see what happens. This is also useful for organisation. ;)
     
  20. worMatty

    aa worMatty Repacking Evangelist

    Messages:
    1,072
    Positive Ratings:
    833
    That's true. Though I would presume anyone who knew about these things would be using wildcards to address each of the uniquely-named entities with one output. e.g. SpawnPoint_Blue_*