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

making just a custom weapon available from another wad

Recommended Posts

Is there any way to, for example, import a custom weapon from the Brutal Doom mod but not import everything else? What would a novice at this have to do?

Let's say I want to play vanilla Doom or a vanilla megawad with the Brutal Doom chaingun. There's two possibilities for how it could happen: the new chaingun replaces the vanilla one, or the new chaingun is merely accessible with cheat commands (like I could make 'summon bd_chaingun' somehow spawn the new weapon). I don't really have a preference, I'm just looking for an easily achievable method.

Share this post

Link to post

I haven't used Brutal Doom, but it shouldn't be too hard to get this to happen. You say "novice" so I'm not going to assume any prior knowledge about ZDoom mods.

pk3 files are really just zip files with a different extension. So you can edit their contents just by unzipping them, or you can get a tool like SLADE to edit them. If you plan to get familiar with Doom modding in the future, I recommend SLADE, it's a great program.

The components for a new weapon are divided up into the graphic and sound resources, and the coding/scripting. In ZDoom, coding is done in DECORATE, which is the general way of defining new behaviours for enemies and weapons, and ACS, which is a level scripting system but also used for more complex functions that DECORATE can't do.

So you need to edit the pk3 file to isolate the code and resources for the chaingun. Isolating the code might be hard, because it might be spread across multiple files to make it easier for the programmer to manage. The graphics and sounds should be fairly easy to find, especially if they're sorted in the pk3 file properly which they likely are. In any case it doesn't hurt to copy unneeded gfx/sfx as long as they have a different name than the regular Doom resources, they'll just take up extra space.

If you just want this one weapon extracted, it's probably not to hard for someone to do it for you. If you're interested in learning modding, this is probably a good project to start on. I (or someone else) can write more on how to get started if you're going to do it yourself. The ZDoom wiki is a great source of information, but it's down at the moment :p

As far as replacing the chaingun vs. requiring a summon, neither is really any harder than the other. What's less work depends on whether the BD graphics replace those of the normal chaingun but all it would take is some renaming.

EDIT: Don't know why I didn't think of this, but there's a good chance that weapon (or something like it) is already available at Realm667. Although I don't think those weapons are quite in a "ready-to-use" state (might require summoning and probably not assigned to a weapon slot), they're not far off.

Share this post

Link to post

Yeah, I want to learn how to do it instead of asking for someone to do it. I certainly see myself wishing for other tweaks and customizations in the future.

I've explored around the .pk3 contents to get an preliminary idea of what I'm working with. I'll probably have to ask specific questions once I hack away at it.

So the tasks are:

1. Determine which files are code and which are resources.
2. Isolate the portions of the code files that are related to the weapon
3. Make sure to keep any code or resource file that is referenced by the portions in (2)
4. Delete _all_ other code portions not referenced in (2)
5. Delete any resources that are not referenced in (2), or at least those that reuse original Doom resource names

Is there an easy way to check if something is reusing an original Doom name?

Share this post

Link to post
dosboot said:

1. Determine which files are code and which are resources.

In SLADE, the type is usually auto-detected, so that graphics and text (code) is displayed automatically. Sometimes you need to click "view as text" to view code

4. Delete _all_ other code portions not referenced in (2)

Like with graphics, it doesn't matter if extra code is present as long as it doesn't conflict with anything else in Vanilla Doom.

You might want to download a weapon from Realm667 anyhow, just to get an idea of what's involved in having a new weapon. For a basic weapon there isn't a whole lot.

Is there an easy way to check if something is reusing an original Doom name?

You can open up doom2.wad in SLADE and type an entry name in the Filter box in the bottom-left hand corner. You can also check out the DECORATE for existing items on ZDoom wiki. Here's the google cache page of the Chaingun:

The 4-character codes (CHGG) is the sprite name, the next letter(s) (A or AB) are the frame names. So you've got 4 sprites for the original chaingun: CHGGA, CHGGB, CHGFA, CHFGB. The sprite names in doom2.wad will be 6 or 8 characters, in this case CHGGA0. The 0 refers to the angle - not used for weapon sprites, but for an Imp you get things like TROOA1 (front) or TROOA2A8 (left-front side or right-front side).

edit: A decent tutorial on making new weapons:

Share this post

Link to post

Thanks, that tutorial and the links therein are good to read. I will also check out Realm667 for examples.

Share this post

Link to post

I think I got it all figured out. I abandoned the idea of using the Brutal Doom minigun and used the Skulltag one instead, since Brutal Doom has a lot of extraneous code (using inventory to keep track of states) that makes it more time consuming to modify.

If anyone else finds this and wants to extract a weapon from a mod they have then what you need to extract/recreate is:

 (sound files go here)

 (frames of animation go here)

  ACTOR Minigun : Weapon replaces Chaingun
  { ... }
 (just need the line(s) which refer to the relevant sound files)
You also want to hunt down the definitions of things like $PICKUP_MINIGUN for displayed text, which are variables of some kind (seldom explained in DECORATE tutorials it seems).

Projectile weapons will need the actor(s) for the projectile itself, but I didn't actually try extracting any such weapon.

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