Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Sign in to follow this  
Andrea Rovenski

How would I create a custom switch texture?

Recommended Posts

There are 2 ways to create custom switch textures:

1. Replace an existing switch graphic patch with your custom patch, but keep the name of the original patch. Remember, you're replacing the patch, not the entire texture. You'll need to do this for both the switch positions (i.e., on & off). This will automatically place your new switch graphics in all the textures that contain that patch. If the size of your patch is different from that of the patch it is replacing, you will need to edit the relevant textures to align the patches properly.

2. If you're using a source port you can insert patches with completely new names. You can insert the patches into textures in the usual manner. Then you'll need to create the code necessary to animate the switches. In ZDooM you'll need an ANIMDEFS lump.

Share this post


Link to post
Manhunt21 said:

Uhhh... So, could I just add the switch patch to an existing texture..?

Keep in mind what I said before. If your custom patch has the same name as an existing patch, then you don't need to do any more than insert the patch into your wad (using a tool such as XWE) and adjust the alignment within the switch texture if necessary.

For example, the texture named SW1BRNGN consists of a wall patch named WALL62_2 and a switch patch named SW4S0 (which is 24 x 24 sized). The alignment of the switch patch is x = 20; y = 80.

1. If you insert a custom 24 x 24 switch patch and use the name SW4S0, your SW1BRNGN texture will still have the WALL62_2 wall patch, but will have your custom switch graphic on it in exactly the same location as the original SW4S0.
2. If you insert a custom 32 x 32 switch patch and use the name SW4S0, your SW1BRNGN texture will have the WALL62_2 wall patch, and will have your custom switch graphic on it in but it will not be centered. The proper x offset to center your custom patch would be 16 (not 20, as in the original). As for the y-offset, the top of the switch patch will be higher than in the original, but it may work for you.
3. You can also create a brand new switch texture, using a completely new wall patch and your custom switch patch.

If you're creating a switch patch with a brand new name, then you need to insert it into your wad, create the animation code, and apply your patch to the texture of your choice.

Share this post


Link to post

Err.. But say if I wanted to add an already existing switch patch to another already existing patch....no new patches, just adding one to the other....Sorry if I'm not being clear.

Share this post


Link to post
Manhunt21 said:

Uhhh... So, could I just add the switch patch to an existing texture..?
Like add a switch to the already existing Brick textures?

You can do that by editing an existing switch texture (two actually, since you'll need both OFF and ON states) since they're basically one patch superimposed on another.

Share this post


Link to post
Manhunt21 said:

Err.. But say if I wanted to add an already existing switch patch to another already existing patch....no new patches, just adding one to the other....Sorry if I'm not being clear.

As GreyGhost says, you can mix and match any patches that are in your wad. Of course, I'm not sure why you'd want to add one switch patch to another. I'm assuming you meant you want to add an existing switch patch to an existing wall (or other) texture.

Manhunt21 said:

Er...how?

Here's what you do:

1. You'll need a tool such as XWE. [The remainder of this discussion assumes you're using XWE.]
2.Make sure your wad has a TEXTUREx lump. If it doesn't, use XWE to copy the lump from DooM/2.wad
3. Open your wad in XWE, and find the TEXTUREx lump. Select to open the Textures entry.
4. Find the texture that has the switch patch you need, and note its name. (You can also do a search by texture name within the Textures lump.) Do the same for the wall texture you need.
5. Open the Textures menu and select 'New'. This will create a blank, new texture entry. Put in your new texture name (e.g., NEWSWT1A; make sure you use no more than 8 alpha-numeric characters).
6. In the left-side window edit the dimensions of the texture to create the texture size you want. (E.g., 128 x 128).
7. From the Textures menu select 'New Patch'. A default patch will be inserted. In the right-side window, put in your wall patch name in the field named 'PatchName'. This will create your background texture.
8. Repeat step 7, above. This will put another wall patch into your texture (XWE defaults to the most recent patch used). You'll note that the right-side window now has 2 patch entries, each identical except for the UID.
9. Edit the second entry and insert your switch patch name. You'll notice that the switch patch is positioned in the top left corner of the texture. That's because the new patch is automatically assigned the offsets of the previous patch (in this case, xpos = 0, ypos =0).
10. For your switch patch put in your desired values for xpos and ypos. You're now done with your first (of two) switch textures.
11. From the Textures menu, select 'Duplicate Texture', which creates a copy of your new switch texture, and names it slightly differently (usually simply by incrementing the numeric value at the end of the original texture name, e.g., NEWSWT1A will become NEWSWT1A1; NEWSWT1 will become NEWSWT2). Edit this name to the desired name for your second switch texture, say NEWSWT1B.
12. Edit the right-side window to put in your second switch patch name. It will be inserted at exactly the same position as your first one.
13. From the Textures menu, select 'Save'.

As you're creating a completely new switch texture, you'll need to put in the proper code for the animation. Ask if you need help.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  
×