Page 1 of 2

Loading wads... among other things

Posted: Mon Apr 09, 2007 10:38 am
by Darlos
According to the wiki (yeah, I read there first lol), you can do things like specify stuff with [*.AutoLoad], -file in a shortcut, or put stuff in a "skins" folder in order to load wads. But whenever I try to do that, I just either end up getting the screen to select from multiple IWADs, or if I tell that not to ask me again, it just keeps loading what I loaded last time. I made a custom wad with a somewhat modified pistol, but it doesn't seem to be working. Also, when that list of IWADs come up, my custom WAD doesn't appear, even if its in the folder with the ZDoom.exe.

Of course, I could have made that wad wrong as well. When you're making a weapon (or anything really) I noticed in the top declaration you can put "replaces such-and-such" instead of just declaring "Ammo" or "Weapon" or whatever. Whats the exact syntax for that? I might be getting that wrong. I put...

Code: Select all

actor Magnum: replaces Pistol
is it supposed to be

Code: Select all

actor Magnum: Magnum replaces Pistol
?

Posted: Mon Apr 09, 2007 10:40 am
by Ryan Cordell

Code: Select all

ACTOR Magnum : Weapon replaces Pistol
Try that.

Posted: Mon Apr 09, 2007 10:55 am
by HotWax
Your custom WADs aren't going to show up in the list of IWADs. Instead, you need to load these by specifying them to ZDoom. You can do this in a few different ways:

The Quick-and-Dirty Way (assuming you're only loading one custom WAD at a time): Double-click your WAD file. The first time you do this, Windows will ask you to associate a program with it. Click Browse..., locate your ZDoom.exe file, hit OK, make sure "Always use this program to open files of this type" is checked and hit OK again. Pick the appropriate IWAD and off you go. (Note: If something has already been associated with WAD files (e.g. XWE), right-click the file and click Open With... to get to the window where you select which program to use)

The Permanent Way (assuming you're going to load one or more custom WADs very often): Create a shortcut by right-clicking, selecting New, and selecting Shortcut. In the target box, click Browse and find your ZDoom.exe file. After hitting OK on that dialog, change the target text so it looks something like this:

Code: Select all

C:\Games\Doom\zdoom.exe -iwad DOOM2.WAD -file MYFILE1 MYFILE2
Note: The path to zdoom will be different depending on where you put it. Also, substitute the appropriate IWAD for DOOM2.WAD above, or leave it out entirely if you want to choose every time. You can specify as many files as you want after -file and they will all be loaded at once. Files appearing last on the line will override files appearing earlier (so if both contain a MAP01, only the later file's MAP01 will be used). You can also add other commands to the line if you want to do specific things when this shortcut is used, such as warp to a specific map or being a netgame. See [wiki=Command_line_parameters]here[/wiki] for a full list of parameters you can specify.

After doing all that, click Next, name your shortcut something nifty, and click Finish to create the shortcut.

The Technical Way: Open a DOS prompt by selecting it from the Start menu or going to Start->Run and typing cmd into the box. You should see a black window will a flashing cursor waiting for typed instructions. Use this to navigate to your ZDoom folder (i.e. "cd \games\zdoom") and then run ZDoom however you like by typing the command in manually.

Example:

Code: Select all

zdoom -iwad DOOM2.WAD -file MYFILE1 MYFILE2 MYDEH.DEH -skill 4 -warp 01 -record MYDEMO
If seeing a DOS prompt makes your head explode, you should probably stick to the other methods above. Or you can go here for more help.

Batch file

Posted: Mon Apr 09, 2007 11:15 am
by durnurd
I wrote a batch file to help load PWADs for me. I just use Run.bat, which prompts me which files to use, and then runs the program. I don't have to worry about installing frontend programs or anything. I also wrote a manual version where you can type in filenames yourself.
Spoiler:

Posted: Mon Apr 09, 2007 11:53 am
by Phobus
I use ZDL3, as do a lot of other people, I think :P

Posted: Mon Apr 09, 2007 11:56 am
by hnsolo77
Phobus wrote:I use ZDL3, as do a lot of other people, I think :P
quick easy and painless once you set it up, and its useful for far more ports than just ZDoom

Posted: Mon Apr 09, 2007 4:49 pm
by Doomguy0505
Phobus wrote:I use ZDL3, as do a lot of other people, I think :P

Posted: Mon Apr 09, 2007 6:05 pm
by Zippy
HotWax wrote:The Technical Way: Open a DOS prompt by selecting it from the Start menu or going to Start->Run and typing cmd into the box. You should see a black window will a flashing cursor waiting for typed instructions. Use this to navigate to your ZDoom folder (i.e. "cd \games\zdoom") and then run ZDoom however you like by typing the command in manually.

Example:

Code: Select all

zdoom -iwad DOOM2.WAD -file MYFILE1 MYFILE2 MYDEH.DEH -skill 4 -warp 01 -record MYDEMO
If seeing a DOS prompt makes your head explode, you should probably stick to the other methods above. Or you can go here for more help.
I personally don't bring up the DOS prompt at all and just do it straight from the Run window, since the recent history usually either has exactly what I need (since I tend to play one or two levels at a time) or at least starts with C:\blah\ZDoom\zdoom.exe -iwad doom.wad...

Posted: Mon Apr 09, 2007 6:53 pm
by TheDarkArchon
I just use KwikStrip :P

Posted: Mon Apr 09, 2007 8:23 pm
by Darlos
Sigh... this still isn't working. Though I think I can safely assume at this point that this is because I just have my stuff programmed wrong. I seem to be able to load wads correctly now. It just loads with the normal pistol.

So, here's how I tried going about making a new weapon (that, obviously, replaces the Pistol). I wanted to just make it so you start with a pistol that does 50 damage per shot, just to see if I could get it right. Trying to follow what I understood from the wiki and other places, I did this:

I opened up the Doom2.wad with SLumpEd, then created a new lump. Actually, I made three lumps because I wanted to replace the Clip and the ClipBox. So... here's the code for the Magnum:

Code: Select all

ACTOR Magnum : Weapon replaces Pistol
{
  obituary "%o got a hole put through them by %k's .50 Cal."
  attacksound "weapons/sshotf"
  weapon.selectionorder 1900
  weapon.kickback 100
  weapon.ammotype "Clip"
  weapon.ammouse 1
  weapon.ammogive 20
  states
  {
  Ready:
    PISG A 1 A_WeaponReady
    loop
  Deselect:
    PISG A 1 A_Lower
    loop
  Select:
    PISG A 1 A_Raise
    loop
  Fire:
    PISG A 4
    // Next 2 states replace A_FirePistol
    PISG B 0 A_FireBullets (0, 0, 1, 50, "BulletPuff")
    PISG B 6 A_GunFlash
    PISG C 4
    PISG B 5 A_ReFire
    goto Ready
  Flash:
    PISF A 7 bright A_Light1
    PISF A 0 bright A_Light0
    stop
  }
}
Next the Clip:

Code: Select all

ACTOR 50Cal : Ammo replaces Clip
{
	spawnid 11
	radius 20
	height 16
	inventory.pickupmessage "Picked up a magazine of .50 cals"
	inventory.icon "CLIPA0"
	inventory.amount 7
	inventory.maxamount 1000
	ammo.backpackamount 7
	ammo.packpackmaxamount 1000
	States
	{
		CLIP A -1
		stop
	}
}
Then the ClipBox:

Code: Select all

ACTOR 50CalBox : Ammo replaces ClipBox
{
	spawnid 139
	radius 20
	height 16
	inventory.pickupmessage "Picked up a box of 100 magnum cartridges"
	inventory.icon "AMMOA0"
	inventory.amount 100
	inventory.maxamount 1000
	ammo.backpackamount 100
	ammo.packpackmaxamount 1000
	States
	{
		AMMO A -1
		stop
	}
}
Now, something I noticed is how people seem to refer to new stuff they make as DECORATE, which is apparently some type of object that can pretty much be made into anything. In SLumpEd, up at the top of the editing box under "Lump Content", there's a drop-down menu where you can select "Decorate", among other things. It makes certain things light up like they're programming keywords in the script, so I assume it designates something to make it work. But when I save it and come back, it gets set back to "None", and all the script is just gray.

I have a feeling I've done something wrong here...

Posted: Mon Apr 09, 2007 8:26 pm
by hnsolo77
try doing pistol replaces pistol, clip replaces clip and clipbox replaces clipbox

Posted: Mon Apr 09, 2007 8:26 pm
by XutaWoo
You need only one decorate lump.

Also don't forget KEYCONF.

Posted: Mon Apr 09, 2007 8:34 pm
by Darlos
XutaWoo wrote:You need only one decorate lump.

Also don't forget KEYCONF.
Wut?

Clarify please...

Posted: Mon Apr 09, 2007 8:36 pm
by XutaWoo
Darlos wrote:
XutaWoo wrote:You need only one decorate lump.

Also don't forget KEYCONF.
Wut?

Clarify please...
I opened up the Doom2.wad with SLumpEd, then created a new lump. Actually, I made three lumps because I wanted to replace the Clip and the ClipBox. So... here's the code for the Magnum:
Unless that's a typo, you did three lumps.

And KEYCONF is used to add weapons to slots.

Posted: Mon Apr 09, 2007 9:08 pm
by Darlos
Alright, yeah, I just figured out that he meant you put everything in one lump called "DECORATE". Plus, I got my Magnum.wad loaded alongside the Doom2.wad, so its all good up to that point.

I have the ammo replaced, because when I pick up a clip in the game it gives my new ".50 cal" messages. The pistol just isn't stronger.

I just figured out the KEYCONF thing. I get how its supposed to work, but its not working...

Of course, I think the problem is that when the game starts up it still just starts with the regular pistol. How do I make it start with the one I made?

Oh, also, here's the lump for my weapons modifications:

Code: Select all

ACTOR 50Cal : Clip replaces Clip
{
	spawnid 11
	radius 20
	height 16
	inventory.pickupmessage "Picked up a magazine of .50 cals"
	inventory.icon "CLIPA0"
	inventory.amount 7
	inventory.maxamount 1000
	ammo.backpackamount 7
	ammo.backpackmaxamount 1000
	States
	{
		CLIP A -1
		stop
	}
}

ACTOR 50CalBox : ClipBox replaces ClipBox
{
	spawnid 139
	radius 20
	height 16
	inventory.pickupmessage "Picked up a box of 100 magnum cartridges"
	inventory.icon "AMMOA0"
	inventory.amount 100
	inventory.maxamount 1000
	ammo.backpackamount 100
	ammo.backpackmaxamount 1000
	States
	{
		AMMO A -1
		stop
	}
}

ACTOR Magnum : Pistol replaces Pistol
{
  obituary "%o got a hole put through them by %k's .50 Cal."
  attacksound "weapons/sshotf"
  weapon.selectionorder 1900
  weapon.kickback 100
  weapon.ammotype "Clip"
  weapon.ammouse 1
  weapon.ammogive 20
  states
  {
  Ready:
    PISG A 1 A_WeaponReady
    loop
  Deselect:
    PISG A 1 A_Lower
    loop
  Select:
    PISG A 1 A_Raise
    loop
  Fire:
    PISG A 4
    // Next 2 states replace A_FirePistol
    PISG B 0 A_FireBullets (0, 0, 1, 100, "BulletPuff")
    PISG B 6 A_GunFlash
    PISG C 4
    PISG B 5 A_ReFire
    goto Ready
  Flash:
    PISF A 7 bright A_Light1
    PISF A 0 bright A_Light0
    stop
  }
}
...just in case there's anything wrong with it.