Scape Goat's QuickTips
Part 2
As before, this information is, for the most part, intended for WDFUSE users who have an understanding of the basics and a decent knowledge of INF. Keep in mind that there's almost always more than one way to achieve a result. The methods I use here are not necessarily the best or easiest ways to handle their respective tasks. Think of these as starting points from which to develop your own personal techniques that are easiest for you. This time around, I focus on a few somewhat subtle things. Good luck, and if you have a problem, write me or post your question on the Message boards.
- Scape Goat
Making Walls Scroll
The scroll_wall elevator is a personal favorite of mine. Its many uses include waterfalls, animations, sequencer charges, etc.
There are a few things I want to cover. Very quickly: The INF for an 'elevator scroll_wall' needs to be placed on a sector, not directly on the wall you want to scroll. You control which walls scroll using a wall's Flag 1 (bit 64 / 128 / 256 / 512).
With that out of the way, let's start with a waterfall. Place the following on the sector :
seq
class: elevator scroll_wall
angle: 0
speed: 100
event_mask: 0
seqend
The speed is adjustable. Place the correct bits on flag 1 of the wall, and that's it.
Now, let's go a little beyond the basics. The graphic below displays the appropriate angles that you would use if you wanted to scroll a wall in a direction other than straight down.
Notice the ".01"'s. This is because I have noticed that if you set the angle to 90 or 270, the wall will not scroll completely parralel to the floor.
See for yourself; set a wall to scroll (at a fast speed) at an angle of 90. Test the GOB and watch the wall scroll by for about a minute. You'll see it gradually move upwards...
Now, change the angle to 90.01 and test it again.
Next up: Animations.
What I call animations are standard BMs (such as the ones taken from DF and pictured below) that are scrolled (at speed 0) to create an animated effect. This is great for screens, fans, multi-way switches, sequencer charges, codes, etc.
Here's how to make a simple fan. Start with the INF:
seq
class: elevator scroll_wall
angle: 0
speed: 0
event_mask: 0
stop: 0 0.5
stop: 64 0.5
seqend
Works like a normal elevator, except that the stops are measured in pixels instead of DF units (1 DFU = 8 pixels). You can make great use of this with custom BMs. By changing the event_mask, stops, etc., you can create a variety of effects.
Sky Offsets
You'll see this in a lot of levels:
It may not be the end of the world, but if you can fix it; why not do it? Try this: Take a look at the sector with the sky texture (Flag 1 bit 1). What you need to change is the sector's "Ceiling Tx Z Off". Setting it to 126.00 will align the top edge of the texture with the top of the screen (when looking up).
Ain't that something? The number 126 causes the sky texture to move 126 pixels upwards from the top of the screen when the player's view is centered. If you wish to tweak the positioning, then simply add to the 126 to move it up, and subtract to move it down. While I haven't done any experimentation, I assume that adjusting the PARALLAX settings in your .LEV file's header may alter the effect of the offset.
Back-up
This is only here because of its great importance. Can't stress it enough. Back-up your work to a floppy disk or two. You won't regret it, but you might regret not doing it…
How's that for quick and to the point?
The "Hexagon Trick"
Try creating a hexagon shaped (6 sided) sector / subsector / gap using the Polygon tab of WDFUSE's Tools dialog. Notice that the walls of the new sector are the same length as the sector's radius. For instance, if you build a sector with 6 sides and a radius of 16; you'll end up with a hexagon with 6 equal, 16 DFU long walls. I find this quite useful, but not everyone will see its value…
Creating a looping VOC
Now let's get a bit more technical. I'll assume you know what a VOC is. A "looping" VOC is a sound file that plays continuously, restarting whenever it finishes. Examples include the wind and water sounds in DF. Normally, when you create a custom VOC using a program like GoldWave, it will not loop properly when used as an ambient sound object, an elevator moving sound, etc.
This is copied directly from a message board posting I made back in December of 1999. Some changes were made, but nothing major:
I'll try to make this as simple as possible.
Hopefully I'm not missing anything important. Make sure the VOC you want to loop is in its final form. I'm not sure, but making changes afterwards might mess things up. Also, do yourself a favor and back up the file before doing anything.
You need 2 things:
1. A HEX editor.
Not a text editor like Notepad. Most text editors will save a binary VOC file as ASCII, which causes problems.
2. A looping VOC.
Just take one (such as WIND1.VOC) from sounds.gob.
I'll assume you're using frhed (see hex editor link).
First, open up the looping VOC with frhed. Look for the 06 (it should be in the second row, depending on your screen resolution). Highlight the string:
06 02 00 00 ff ff
Press Ctrl-C, then click OK.
Now open your custom VOC. Find the string:
0a 01 29 11 01
It should be right around where you found the 06 in the other file. Click on the second 01 (a black box should be on either the 0 or 1). Press Ctrl-V.
Select the option button "Insert", and click OK.
The string should now look like:
0a 01 29 11 06 02 00 00 ff ff 01
Scroll down to the bottom of the file.
It should end with a 00. Replace the 00 with:
07 00 00 00 00
Save the file, and cross your fingers.