Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
XDelusion

Making new switches change color when activated.

Recommended Posts

I am going through and adding textures to my maps, and discovered there is something very basic which I do not know howto do.

I have made a new WAD file in Wintex, added in a ton of BMP files as my patches, then went into the Texture editor, and started creating fresh new textures.

For some of my textures I copied over a 64x128 bmp file, then added a 16x16 switch on top of it. But this of course does not make the switches change color when activated during game play. How exactly do I set it up to do that?

Share this post


Link to post

You need to replace one of the existing switch textures, SW1* and SW2*. Normal textures do not change appearance when used as a switch.

Share this post


Link to post

To expand on what Mordeth said, you need 2 different graphic patches for a switch if it is to change appearance. One is for the "off" position, which you will insert into your SW1 texture, the other is for the "on" position which you will insert into your SW2 texture. (Or, if you prefer you can insert the "on" graphic patch into the SW1 texture, and the "off" patch into the SW2 texture.)

For the typical kind of switch, make sure the x- and y-offsets for the two patches are identical in their respective textures.

Share this post


Link to post

Ya, I understood that and have been using that method, but wanted to move on from there and create more switches. For instance I have a new switch which is 64x32 and replaces sw2_1 and sw2_2 as an example. Anyhow when you enter the Texture Editing menu under Wintex, it shows the old switch patch gfx as replaced by the new ones, but the prefab Textures that use them has it all off centered, seeing as the switch was originally 32x32. So I go in and delete the old switch patch from the center block that shows all the patches used to make the texture, and replace it with a new one, only this time correctly centering it. Only problem now is that the switch fails to change color, even though everything is still going by the same name. It seems as if I am not allowed to alter the texture what so ever. :/


There has to be a fix for this, I do not want to be stuck with the size of the old switch patches, I wish to make them larger, if not smaller in some cases, and I also want the ability to make new switch textures.

There is a tool that is supposed to cater to this need, it is called:

SWANTBLS.EXE

It seems to be able to make new textures, flats, and switches for BOOM, I just need to figure out howto work with it exactly.

There is also an interesting piece on this subject here:

http://zdoom.notgod.com/reference/boomlumps.html


If you guys are saying making new switches is impossible then you might want to read this. :)

Share this post


Link to post

I see what I was overlooking now. SWANTBLS.EXE makes all this possible.

Here is an example of a slightly edited DAT file for use with it, this will create 2 new lump files that can be placed into your PWAD which will now allow you to use new animated textures, floors, and none other thand those damn switches. :)

I added in a handful of new switches, as well as 1 new ani-texture, which of course is the Tanks that you notice flashing in the early stages of Jedi Knights 2.


#
# This file is input for SWANTBLS.EXE, it specifies the switchnames
# and animated textures and flats usable with BOOM. The output of
# SWANTBLS is two lumps, SWITCHES.LMP and ANIMATED.LMP that should
# be inserted in the PWAD as lumps.
#
#switches usable with each IWAD, 1=SW, 2=DOOM2, 3=registered/Ultimate DOOM
[SWITCHES]
#epi texture1 texture2
1 SW1BRCOM SW2BRCOM
1 SW1BRN1 SW2BRN1
1 SW1BRN2 SW2BRN2
1 SW1BRNGN SW2BRNGN
1 SW1BROWN SW2BROWN
1 SW1COMM SW2COMM
1 SW1COMP SW2COMP
1 SW1DIRT SW2DIRT
1 SW1EXIT SW2EXIT
1 SW1GRAY SW2GRAY
1 SW1GRAY1 SW2GRAY1
1 SW1METAL SW2METAL
1 SW1PIPE SW2PIPE
1 SW1SLAD SW2SLAD
1 SW1STARG SW2STARG
1 SW1STON1 SW2STON1
1 SW1STON2 SW2STON2
1 SW1STONE SW2STONE
1 SW1STRTN SW2STRTN

2 SW1HNDL SW2HNDL
2 SW1CRCL SW2CRCL
2 SW1SQUR SW2SQUR
2 SW1LONG SW2LONG
2 SW1MECH SW2MECH
2 SW1LION SW2LION
2 SW1SATYR SW2SATYR
2 SW1SKIN SW2SKIN
2 SW1VINE SW2VINE
2 SW1WOOD SW2WOOD

3 SW1PANEL SW2PANEL
3 SW1ROCK SW2ROCK
3 SW1MET2 SW2MET2
3 SW1WDMET SW2WDMET
3 SW1BRIK SW2BRIK
3 SW1MOD1 SW2MOD1
3 SW1ZIM SW2ZIM
3 SW1STON6 SW2STON6
3 SW1TEK SW2TEK
3 SW1MARB SW2MARB
3 SW1SKULL SW2SKULL

#animated flats, spd is number of frames between changes
[FLATS]
#spd last first
8 NUKAGE3 NUKAGE1
8 FWATER4 FWATER1
8 SWATER4 SWATER1
8 LAVA4 LAVA1
8 BLOOD3 BLOOD1

8 RROCK08 RROCK05
8 SLIME04 SLIME01
8 SLIME08 SLIME05
8 SLIME12 SLIME09

#animated textures, spd is number of frames between changes
[TEXTURES]
#spd last first
8 TANKS6 TANKS1
8 SLADRIP3 SLADRIP1

8 BLODRIP4 BLODRIP1
8 FIREWALL FIREWALA
8 GSTFONT3 GSTFONT1
8 FIRELAVA FIRELAV3
8 FIREMAG3 FIREMAG1
8 FIREBLU2 FIREBLU1
8 ROCKRED3 ROCKRED1

8 BFALL4 BFALL1
8 SFALL4 SFALL1
8 WFALL4 WFALL1
8 DBRAIN4 DBRAIN1



Share this post


Link to post

My stupid switches aren't working either. I don't use BOOM, though, so I can't use that program. The first switch textures I made, SW1ELEV and SW2ELEV (elevator switches), worked fine at first. Then I tried making another texture called SW1FILE and SW2FILE (switch on a file cabinet), and it didn't change color. What's more, the elevator switch no longer works. In the texture editor, it said that those patches were "Switch OFF" and "Switch ON," like they're supposed to be. Then, what's the matter?

Note: yes, I did post this in its own thread a couple of weeks ago, I just never was able to fix it and now I finally found another thread on this subject...

Share this post


Link to post

The switch textures are hard-coded into the .exe, so just naming the textures SW1* and SW2* won't help. You have to replace the existing switched. What you can do it to place your new switches beside the original switch (making the texture wider). IIRC TNT and Plutonia made use of that.

Share this post


Link to post

Hey, I just got an idea. Yes, I could do that... or, I could double the horizontal size of the switch texture (from 64 to 128), and then just put the other switch patches on that side. Then I set the offset to X=64 and get the other switch instead! I could even make two different kinds of switches on one texture, and then put the offset there to use the alternate switch. I'm going to go try that now.

Share this post


Link to post
netnomad312 said:

Hey, I just got an idea. Yes, I could do that... or, I could double the horizontal size of the switch texture (from 64 to 128), and then just put the other switch patches on that side. Then I set the offset to X=64 and get the other switch instead! I could even make two different kinds of switches on one texture, and then put the offset there to use the alternate switch. I'm going to go try that now.

That's exactly what I meant :)

Share this post


Link to post

I thought so, I wasn't quite sure if that's what you meant by putting them "next to each other." My switches work now. I've also made a wider variety of switches for certain wall types; for instance, both "gray" switches now have two switch patches each.

Share this post


Link to post

Hmm, ok I edited my DAT file so that I would have a texture that begins with Tank1, and ends with Tank8 at a speed of 8.I loaded up the 8 patches into wintex, then went into the Texture editor, made 8 textures of the same name. Saved, exited Wintex, as I could not find a data section.
Opened XWE, loaded up the animated.lmp
Made a small map using the tank1 texture tried to load legacy but got an error:
P_InitPicAnims:bad cycle from TANK1 to TANK8.

Share this post


Link to post

Hmm, ok I edited my DAT file so that I would have a texture that begins with Tank1, and ends with Tank8 at a speed of 8


in your animated.lmp did you have your texture like this? :

8 Tank8 Tank1


I am sure that isn't the problem, try checking if your tank textures are in order in the wad. if not, then try organizing them and see if it works.

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
×