Weapon scripting tips

Does anyone have any good links/tips to making new or new-ish weapons through .deh/.bex? My target ports are Eternity,  GZDoom (And Zandronum by extension), 3DGE, Doomsday and Doom Retro, and the lack of a better scripting language that works on them all requires me to use this. (I'm hoping UMAPINFO is done by the time it releases) I have a few questions in particular:

 

* I know homing rockets that target monsters are impossible, due to them homing only on players, but what about a gun that shoots a homing projectile that chases you?

 

* What are some creative DEHACKED weapon mods? Both silly and serious apply. 

 

* What would be a good way of going about "removing" weapons?  I don't need the entire Doom 2 arsenal but I don't want serious bugs for people who decide to try idkfa-ing through the game. (Though the idea of preventing cheating using this is tempting)

Edited by Death Egg
Changed topic name

Posted (edited)

Share this post


Link to post
3 hours ago, Death Egg said:

What would be a good way of going about "removing" weapons?

I just redirect all of their states to the ones used by fist. You'll have a few redundant fists among weapons, of course, but at least nothing will break.

 

3 hours ago, Death Egg said:

(Though the idea of preventing cheating using this is tempting)

In this case deprive their lower/raise/ready states from the appropriate functions. If they accidentally switch to such a weapon, they won't be able to switch away. Kek.

Share this post


Link to post

Batman Doom has a special weapon that uses such a deselect hack to make you lose if you switch weapons in the final boss fight. 

 

All Hell is Breaking Loose has creative dehacked work, though it's mostly the monsters. For creative weapons you can look at The Sky May Be. 

 

There are a few overpowered or rebalanced weapon patches, but they're mostly tweaks rather than really creative things. So as a rule of thumb, look for TCs and PCs to get more imaginative stuff.

Share this post


Link to post

For weapons which shoot projectiles which home on you, you can shoot a regular projectile and make it, at some point, fire a revenant projectile. It will home into you, because in Doom all projectiles treat their shooters as their "enemies".

 

If you're targeting MBF and above, you can have fun with the Spawn codepointer as well as friendly (FRIEND) things.

Share this post


Link to post
6 hours ago, Death Egg said:

(Though the idea of preventing cheating using this is tempting)

you must resist the temptation

 

6 hours ago, Death Egg said:

* What are some creative DEHACKED weapon mods? Both silly and serious apply. 

 

Share this post


Link to post

Note that changing cheat codes via DEHACKED will not work in ZDoom based ports and possibly others, likely as a deliberate part of those port's philosophy.

Edited by scifista42
2 people like this

Posted (edited)

Share this post


Link to post

There's a lot of very useful info so far,  thank you to all who have relied! I have another question that's somewhat related: if I only aimed to support Eternity,  GZDooom and 3DGE,  would there be benefits in relation to both scripting and possibly other features that those three together have in common that Doomsday and Doom Retro would not? This can apply to both scripting and other features only those three offer.

Share this post


Link to post

There are indeed many things that can be done in those 3 ports and not in any other ports, so benefits definitely exist. The problem is that each of the 3 ports implements its features in its own way, generally not compatible with each other. The difficulty of making a single wad work in all 3 of these ports while featuring something not doable in other ports will vary drastically, depending on what exactly you're trying to do, from easy to up impossible. In any case, it will require you to learn the specifics of 3 ports and spend 3 times more effort on a single project than if you either kept it widely compatible or targeted only one advanced port. I personally don't consider making a 3-different-port-specific-wad to be worth the effort.

Share this post


Link to post

Outside of scripting you have things like which content format you can use (PNG sprites and textures for example) as well as the capacity to define new actors (don't be too ambitious because you'll have to deal with a small subset of each port's custom content features).

Share this post


Link to post
22 hours ago, scifista42 said:

There are indeed many things that can be done in those 3 ports and not in any other ports, so benefits definitely exist. The problem is that each of the 3 ports implements its features in its own way, generally not compatible with each other. The difficulty of making a single wad work in all 3 of these ports while featuring something not doable in other ports will vary drastically, depending on what exactly you're trying to do, from easy to up impossible. In any case, it will require you to learn the specifics of 3 ports and spend 3 times more effort on a single project than if you either kept it widely compatible or targeted only one advanced port. I personally don't consider making a 3-different-port-specific-wad to be worth the effort.

Yeah,  it definitely would be a difficult task,  but not one I would consider impossible. I would want to use Boom mapping format to keep things simple,  with DEHACKED monsters due to the lack of a better shared scripting. To get people to want to try the other ports though,  I'm considering ways of having each have their own unique features;  at first I thought of each port having exclusive maps but that would be more time mapping.  Now I'm considering each having a different weapon set per port, almost like player classes but to show off advantages of that port,  but that would require decent programming and a lot of balancing. (Not to mention Eternity doesn't even have finished weapon scripting yet) I don't want any of the three to offer too much more than the others.  (Except maybe Eternity since it gets no love)

7 hours ago, Gez said:

Outside of scripting you have things like which content format you can use (PNG sprites and textures for example) as well as the capacity to define new actors (don't be too ambitious because you'll have to deal with a small subset of each port's custom content features).

PNG's are a nice advantage, but at least one of the ports doesn't use truecolor for rendering so it wouldn't really be worth it there.  Though,  I don't know if that applies to things like skies,  the HUD or title/intermission screens.

Share this post


Link to post

Does 3DGE Have the ability for weapons to have a second during ability,  and will Eternity add it?

Share this post


Link to post

What do you mean by "during ability"?

Share this post


Link to post

Apologies, made that post on my phone minutes before the end of a break at work. I meant a secondary weapon fire.

Share this post


Link to post

Yes (for EDGE), you would just use SECOND_ATTACK in the DDF entry; defined as the secondary attack in WEAPONS, and the attack logic itself via ATTACKS. You can also customize the secondary attack's reload state, if so desired.

Edited by Coraline
(for EDGE) - clarification

Posted (edited)

Share this post


Link to post

For Eternity, you'd have to petition @Altazimuth I think.

Edited by Gez

Posted (edited)

Share this post


Link to post

Secondary fire is a thing in Eternity's weapons-branch already, both with frame references (props attackstate2, flashstate2, holdstate2) and DECORATE frames (labels AltFire, AltFlash, AltHold). It needs more rigorous testing, but the first battery of tests went well enough that the extreme stress testing will occur later. No reload stuff yet, that'll probably either come later in the branch's life, or happen after the branch is merged in.

Whilst I will happily listen to feature requests at this point, I can't promise anything about when I would be able to get to it (if I approve of the request). Feature requests are certainly welcome though, especially fun ones (as they help keep me motivated in between getting the less glamourous & more tedious stuff done).

Edited by Altazimuth
Paragraph

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