Integrating TWP Advertising into workshop

Avatar
Shane
243 Posts
Posted Aug 04, 2012
Although I am aware of how to place items as overlays in Hammer, I would like to go back and retrospectively edit some of my maps to include a TWP advertisement as a thank you for the extra plays my maps have had, however for obvious reasons I am reluctant to unpublish all of my maps and republish them so I would like if possible to create a custom item within the editor that would allow me to overlay the advertisement and still keep the upload and compile within the editor. I am aware of how to pack the textures into the BSP

I currently already use HMW's addons. I don't use the square warm light so I would be happy to replace that with the ad (I currently use zivi7's ratman style ad mostly so I'd be happy with that as my only choice)

So is there any way to achieve this?

Advertisement
Registered users don't see ads! Register now!
Avatar
Alexander Bell
306 Posts
Posted Aug 04, 2012
Replied 8 minutes later
Just edit the instance for one of your pre placed cubes, then just rotate by changing it to laser and back. Idk how you'll pack it, though.
Avatar
BenVlodgi
633 Posts
Posted Aug 04, 2012
Replied 12 minutes later
I would help you out with this however I have to go to work right now, then I need to make a puzzle for my contest map
but you could ask Carlto give you his autopacking exe and integrate a new item into the editor items for you to place those
it really wont be that difficult
Avatar
Alexander Bell
306 Posts
Posted Aug 04, 2012
Replied 11 minutes later
Fudepacker! Thats what you use to pack things in PTI maps. Go DL it, its in the P2 other files section. Not sure how to use it though.
Avatar
HMW
806 Posts
Posted Aug 04, 2012
Replied 53 minutes later
As for placing it in the map, you can just edit the square light instance (maps\instances_hmw\pti\square_light_warm.vmf) and replace its contents with a 128x128 brush + overlay. (The brush is necessary because the overlay needs a surface to attach to.)

Additionally, in your editoritems.txt, you need to look up the "ITEM_SQUARE_LIGHT" section and remove the whole block starting with "EmbedFace". This will remove the four sections of wall around the square light so you can use the whole 128x128 surface for your ad.

Avatar
Shane
243 Posts
Posted Aug 04, 2012
Replied 47 minutes later
I already use fudgepacker so adjusting to that won't be an issue

Also, Zivi's ad is 512x256, would a 128x128 brush be sufficient for a material of those dimensions?

Avatar
Alexander Bell
306 Posts
Posted Aug 04, 2012
Replied 13 minutes later

Shane wrote:
I already use fudgepacker so adjusting to that won't be an issue

Also, Zivi's ad is 512x256, would a 128x128 brush be sufficient for a material of those dimensions?

I doubt it, but a 512x256 brush might be...

and that is 4 panels high, 2 wide. But I think a 128 brush with it on it would work, because it might just flow on to the other brushes when the map spawns.

Avatar
HMW
806 Posts
Posted Aug 04, 2012
Replied 7 minutes later
If you want it to span across multiple cells, then you need to make more extensive changes to the item's definition in editoritems.txt. The definition for the large observation window should provide a decent starting point.

(Personally I would go with 256x128. 512x256 is quite huge for an image like that. It will also look better up close, if you scale it down a bit.)

Alexander Bell wrote:
I think a 128 brush with it on it would work, because it might just flow on to the other brushes when the map spawns.

An overlay doesn't automatically extend onto adjacent brushes. You really need to insert a brush of that size in the instance.

Avatar
Shane
243 Posts
Posted Aug 04, 2012
Replied 4 minutes later
Ok, thank you all for your advice I'll have a play and see what I can do
Avatar
Shane
243 Posts
Posted Aug 04, 2012
Replied 10 minutes later
Ok, sorry to be a further nuisance but I haven't got a clue what I'm doing here either with the editoritems.txt or square light VMF
Avatar
Shane
243 Posts
Posted Aug 04, 2012
Replied 16 minutes later

I've edited the part of editoritems.txt for the observation room as you suggested, so far I have this but I don't really understand too well what the other bits do

Quote:
"Item"
{
"Type" "ITEM_SQUARE_LIGHT"
"Editor"
{
"SubType"
{
"Name" "Square warm light"
"Model"
{
"ModelName" "hmw_square_light.3ds"
"TextureName" "buttons.png"
}
}
"MovementHandle" "HANDLE_NONE"
"Deletable" "1"
"Copyable" "1"
}
"Exporting"
{
"Instances"
{
"0"
{
"Name" "instances_hmw/pti/square_light_warm.vmf"
"EntityCount" "1"
"BrushCount" "8"
"BrushSideCount" "48"
}
}

      "TargetName"        "sqlight"
      "Offset"        "64 64 64"
      "OccupiedVoxels"
      {
          "Voxel"
          {
              "Pos"       "0 0 0"
              "Surface"
              {
                  "Normal"    "0 0 1"
              }
          }
          "Voxel"
          {
              "Pos"       "0 1 0"
              "Surface"
              {
                  "Normal"    "0 0 1"
              }
          }
      }
      "EmbeddedVoxels"
      {
          "Volume"
          {
              "Pos1"      "1 -1 0"
              "Pos2"      "-1 2 -1"
          }
      }
  }

}

Avatar
BenVlodgi
633 Posts
Posted Aug 04, 2012
Replied 2 hours later
you didn't edit the code for the observation room, thats for the square light
you need to change the instance name
also you dont need to include a brush like was earlier stated use the infodecal entity instead
Avatar
Shane
243 Posts
Posted Aug 04, 2012
Replied 8 minutes later
I edited the code for the 256x128 observation room, removed a couple of bits I knew were redundant (like limitations on placement and whether it can be deleted or copied) and added in the references for the square light (following on HMW's advice to start with that particular item). I just used that as a placeholder as the square light is what I am starting with, truth is I haven't really got that much of a clue what I'm altering besides the basic bits. I haven't even moved onto editing the actual VMF yet as I don't really know what I'm doing this is only from the editoritems.txt file
Avatar
BenVlodgi
633 Posts
Posted Aug 04, 2012
Replied 2 hours later

Shane wrote:
I edited the code for the 256x128 observation room, removed a couple of bits I knew were redundant (like limitations on placement and whether it can be deleted or copied) and added in the references for the square light (following on HMW's advice to start with that particular item). I just used that as a placeholder as the square light is what I am starting with, truth is I haven't really got that much of a clue what I'm altering besides the basic bits. I haven't even moved onto editing the actual VMF yet as I don't really know what I'm doing this is only from the editoritems.txt file

if you send me a fresh editor items, or the HWM one if thats the mod you want to keep installed, I'll make it for you
also give me the overlays you want to be able to place
my email is [email protected]

Avatar
Alexander Bell
306 Posts
Posted Aug 04, 2012
Replied 58 minutes later

HMW wrote:
If you want it to span across multiple cells, then you need to make more extensive changes to the item's definition in editoritems.txt. The definition for the large observation window should provide a decent starting point.

(Personally I would go with 256x128. 512x256 is quite huge for an image like that. It will also look better up close, if you scale it down a bit.)

Alexander Bell wrote:

I think a 128 brush with it on it would work, because it might just flow on to the other brushes when the map spawns.

An overlay doesn't automatically extend onto adjacent brushes. You really need to insert a brush of that size in the instance.

Oh, yeah.. was thinking of decals.

Avatar
Shane
243 Posts
Posted Aug 05, 2012
Replied 7 hours later
Emailed all the items to you, I appreciate your help on this one, thanks! I think in future once I have put the ads into all of my current maps I'll just export any new ones I make into Hammer and touch them up
Avatar
BenVlodgi
633 Posts
Posted Aug 05, 2012
Replied 5 hours later

sorry about the delay, I get distracted easily
and to be honest, I didn't even test it

https://dl.dropbox.com/u/59510602/porta ... 0decal.rar
but there it is
if you want to be able to publish right to the workshop you're going to need something that autopaks as you compile, ask carl if he is willing to let you use his special exes

Avatar
Shane
243 Posts
Posted Aug 05, 2012
Replied 17 minutes later
I use fudgepacker, which I think has worked well so far. I'll publish a test level before I edit my main levels and if all goes well i'll integrate it into my mainline levels

Edit: Doesn't show in the pallet, I selected the square light which still puts the square light into the chamber

Edit 2: It's fine I understand that you're a busy person. I really do appreciate you donating your time to help me out.

Avatar
BenVlodgi
633 Posts
Posted Aug 05, 2012
Replied 4 hours later

Shane wrote:
I use fudgepacker, which I think has worked well so far. I'll publish a test level before I edit my main levels and if all goes well i'll integrate it into my mainline levels

Edit: Doesn't show in the pallet, I selected the square light which still puts the square light into the chamber

Edit 2: It's fine I understand that you're a busy person. I really do appreciate you donating your time to help me out.

it was not supposed to take that spot, I decided to take away the monstercube incase anyone else wanted to use this

Advertisement
Registered users don't see ads! Register now!
Avatar
Shane
243 Posts
Posted Aug 05, 2012
Replied 5 minutes later
I think one of HMW's custom items already takes the place of that cube (if you're referring to the frankencube), maybe that's why it isn't showing?

Edit: Nope, it doesn't the frankencube is still there, the custom item doesn't show in it's place.