[v4] Less Frustrating Revenants

Projects that alter game functions but do not include new maps belong here.
Forum rules
The Projects forums are ONLY for YOUR PROJECTS! If you are asking questions about a project, either find that project's thread, or start a thread in the General section instead.

Got a cool project idea but nothing else? Put it in the project ideas thread instead!

Projects for any Doom-based engine (especially 3DGE) are perfectly acceptable here too.

Please read the full rules for more details.

Re: [v2] Less Frustrating Revenants

Postby Enjay » Wed Jan 27, 2021 2:38 pm

JohnnyTheWolf wrote:But do you think there could be compatibility problems with TehRealSalt's Alternate take on Partial Invisibility mod?

It might but, if it does, probably not in a problematic way. Alternative Take checks to see if the player has the SHADOW flag then does some cunning stuff to spawn an invisible target at the player's location that the bad guys then target.

This mod checks the same SHADOW flag and then jumps to a state where it doesn't home. So, that will either still work or the missile could end up homing towards the dummy target (not sure which would happen). Either way, the missile will not be homing towards the player.


Actually, forget that. I haven't checked why yet but having both mods loaded seems to make it so that revenant missiles never home at all.
User avatar
Enjay
Everyone is a moon, and has a dark side which he never shows to anybody. Twain
 
 
 
Joined: 15 Jul 2003
Location: Scotland

Re: [v2] Less Frustrating Revenants

Postby JohnnyTheWolf » Wed Jan 27, 2021 2:56 pm

I noticed the same thing on my end. :?
JohnnyTheWolf
 
Joined: 05 Oct 2015

Re: [v2] Less Frustrating Revenants

Postby Enjay » Wed Jan 27, 2021 3:12 pm

OK, I'm not sure why, but I know where the incompatibility comes in. For some reason, the health check in this mod:
Code: Select allExpand view
TNT1 A 0 A_JumpIfHealthLower(1, "Spawn2", AAPTR_TARGET)

causes the problem.

If that is commented out, the mods interact as I expected them to - i.e. the revenants will fire tracing rockets at the dummy target spawned by the Alternative Take on Invisibility (and if the target is far enough away, they will stop homing before they get there - not that it really matters because the target doesn't move and if the player fires, a new one is spawned that the already spawned rockets are not homing towards either).
User avatar
Enjay
Everyone is a moon, and has a dark side which he never shows to anybody. Twain
 
 
 
Joined: 15 Jul 2003
Location: Scotland

Re: [v2] Less Frustrating Revenants

Postby doomduck » Wed Jan 27, 2021 3:52 pm

Huh, that's weird.
I'm really not sure why the health check causes incompatibility with that mod...
I'll see if I can make some kind of workaround to that.
For now, you'll just have to open the mod in Slade and delete the health check line.
User avatar
doomduck
A.k.a Pato Fanático
 
Joined: 15 Apr 2020
Location: The Moon
Discord: Pato Fanático#7396

Re: [v2] Less Frustrating Revenants

Postby Enjay » Wed Jan 27, 2021 4:12 pm

Another feature that might be worth considering: a little randomness to how long it takes for the missiles to stop homing. At present, it feels quite mechanical how they always stop homing after the same period of time. A little variation in there might seem more natural.
User avatar
Enjay
Everyone is a moon, and has a dark side which he never shows to anybody. Twain
 
 
 
Joined: 15 Jul 2003
Location: Scotland

Re: [v2] Less Frustrating Revenants

Postby Matt » Wed Jan 27, 2021 4:22 pm

The way I've incorporated this into MDT, once the homing stops the missile tries to reorient itself to intercept the target (with the aggressiveness of the adjustment randomized) and accelerates. The randomized change of direction combined with the relative rarity of two missiles spawning at exactly the same time seems to break up the monotony for me enough, but YMMV.
User avatar
Matt
Putting the XD into *xdeath since 2007
 
Joined: 04 Jan 2004
Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia

Re: [v2] Less Frustrating Revenants

Postby doomduck » Thu Jan 28, 2021 2:39 pm

Enjay wrote:Actually, forget that. I haven't checked why yet but having both mods loaded seems to make it so that revenant missiles never home at all.


Well, I just loaded both mods together and they actually work fine without any compatibility issues. The missiles still home in on the player just fine and the modified partial invisibility powerup still works as intended too. I'm really not sure why it didn't work correctly for you...

Enjay wrote:Another feature that might be worth considering: a little randomness to how long it takes for the missiles to stop homing. At present, it feels quite mechanical how they always stop homing after the same period of time. A little variation in there might seem more natural.


That's a good idea. Noted.

Matt wrote:The way I've incorporated this into MDT, once the homing stops the missile tries to reorient itself to intercept the target (with the aggressiveness of the adjustment randomized) and accelerates. The randomized change of direction combined with the relative rarity of two missiles spawning at exactly the same time seems to break up the monotony for me enough, but YMMV.


I went ahead and tested your mod to see how exactly it works there, and I must say, you actually handled that better than me lol
Would you mind if I add that feature to this mod too?

Also, another idea I had for a feature, is to make the time it takes for the homing to stop actually be based on the difficulty you're playing in.
So, for example, on HMP it would take 4-5 seconds while on UV it would take 6-7 seconds.
User avatar
doomduck
A.k.a Pato Fanático
 
Joined: 15 Apr 2020
Location: The Moon
Discord: Pato Fanático#7396

Re: [v2] Less Frustrating Revenants

Postby JohnnyTheWolf » Thu Jan 28, 2021 4:14 pm

Maybe it has something to do with the loading order?

Edit: No, it does not. :(
JohnnyTheWolf
 
Joined: 05 Oct 2015

Re: [v2] Less Frustrating Revenants

Postby Matt » Thu Jan 28, 2021 4:25 pm

Don't mind at all :D
User avatar
Matt
Putting the XD into *xdeath since 2007
 
Joined: 04 Jan 2004
Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia

Re: [v2] Less Frustrating Revenants

Postby Enjay » Thu Jan 28, 2021 4:36 pm

Hmmm... there is something weird going on. The revenant missile's ability to home comes and goes with both mods loaded (either order).

Here is a typical scenario:
Start Doom2 with both mods loaded
Warp to map12 (nice open space to run around)
type "kill monsters" at the console (or just use -nomonsters when starting)
summon a whole bunch of revenants at the console then run away

Usual result: the revenants will fire lots of missiles in your direction, but none will home.

Now, fire a weapon - suddenly the revenants seem to be able to fire homing rockets which behave as this mod intends.

If either mod is loaded on its own, then the revenant missiles work as they are intended to for that mod.
User avatar
Enjay
Everyone is a moon, and has a dark side which he never shows to anybody. Twain
 
 
 
Joined: 15 Jul 2003
Location: Scotland

Re: [v2] Less Frustrating Revenants

Postby doomduck » Thu Jan 28, 2021 5:28 pm

Enjay wrote:Usual result: the revenants will fire lots of missiles in your direction, but none will home.

Now, fire a weapon - suddenly the revenants seem to be able to fire homing rockets which behave as this mod intends.


Oh, that must be what happened then. I tested it on Plutonia and I shot at the Revenants on Map01, so they were working as intended.
This is really weird...

I guess the simplest solution for now is to add a "patched" version of the mod to the download. I'll have to cut a feature, but I think it's better than having that bug.
User avatar
doomduck
A.k.a Pato Fanático
 
Joined: 15 Apr 2020
Location: The Moon
Discord: Pato Fanático#7396

Re: [v3] Less Frustrating Revenants

Postby doomduck » Fri Jan 29, 2021 2:31 pm

Updated!

The time it takes for the missile to stop homing is now random.
User avatar
doomduck
A.k.a Pato Fanático
 
Joined: 15 Apr 2020
Location: The Moon
Discord: Pato Fanático#7396

Re: [v3] Less Frustrating Revenants

Postby Enjay » Fri Jan 29, 2021 3:54 pm

I'm looking at your code for the random duration and I'm not sure that it will add that much randomisation. (Maybe that's what you wee going for?)

As I read it, every time the missile loops, it considers a jump and it jumps to an inventory check for 30, 35 or 40 counters then loops again. So, this only becomes important when the missile has at least 30 counters. Lower than that and it will never stop homing (i.e. original behaviour of the mod).

At the 30 counters point, it has a slightly greater than 50% chance of just falling through to the 30 item check and stopping homing.

If it jumps to one of the other checks, it won't satisfy the check and will therefore loop again and go back to meet the first jump. Again it has a slightly greater than 50% chance of jumping to the 30 item check and stopping homing. So around half of the missiles will have the original mod behaviour.

Getting to 35 counters in the inventory is actually not going to be that common because it will have to make a less than 50% chance jump 5 times in a row to manage it.

If it does, however, then next time around it has a roughly 50% chance of jumping to the 30 check and a roughly 25% chance of jumping to the 35 check. Both will stop it homing.

Only a jump to the 40 check will allow it to keep homing for another cycle and then next time around it will again have a ~75% chance of stopping homing.

The likelihood of reaching an inventory of 40 counters is therefore really quite low. It would have had to not jumped a ~50% liklihood jump 5 times and then also not jumped a ~75% jump for another 5 times.

Given that a single cycle of the missile is 4 tics and the maximum variance 10 counters, the maximum duration variance is 10x4 tics (just over a second - whcih seems about right). However, the chances of ever taking a full second longer to stop homing is very low. Most of the time, the variance will just equate to a few tics - an almost unnoticeable fraction of a second difference, with roughly half of the rockets, by design, all stopping at the shortest possible duration.

At least that's how my brain is reading the logic. Please correct me if I have got it wrong.

I tried it in game and, mostly because I was looking for it, I could tell that there was some variance. However, most of the time it was close to imperceptible and highy unlikely to be noticed in game I feel.

Unfortunately, right now, I don't have a good clean-code answer. I tried a few things myself last night and got very similar results. The best I could come up with was "trapping" the missile in loops with 30, 35 and 40 checks so that once it has made the initial choice of 30, 35 or 40, then those values become fixed as the numbers that must be satisfied by the counter check, no re-chosen each cycle. However, the way I did it led to quite messy code with too much copy/paste duplication for such a simple idea. There is probably a better way to do it though.
User avatar
Enjay
Everyone is a moon, and has a dark side which he never shows to anybody. Twain
 
 
 
Joined: 15 Jul 2003
Location: Scotland

Re: [v3] Less Frustrating Revenants

Postby fakemai » Sun Jan 31, 2021 11:14 am

I kind of like this solution but there's many ways to skin this particular cat. As counter-intuitive as it sounds, making the missiles faster often makes them easier to deal with. It's pretty obvious if you play with the DoomRL Monsters because the standard ones are the usual pain but the Nightmare and Cyber ones are usually less threatening since the missiles don't have the same lingering presence. Except at long range where the Nightmare variety snipe you from afar. The other thing is their wildly varying damage, wiki ciaims 10-80, that is dependent on how the RNG works, but in practice it is noticeably luck-dependent.
User avatar
fakemai
 
Joined: 12 Feb 2018
Location: Australia

Re: [v3] Less Frustrating Revenants

Postby dawnbreez » Sun Feb 07, 2021 4:23 am

I've been thinking about doing something similar to this, but my idea was inspired more by flightsims, especially the more arcadey ones: Missiles stop tracking after passing within a certain radius of the player. This mimics some of the properties of IRL heatseekers, and also rewards the player for playing chicken with enemy homing rockets--a near-miss means that the rocket won't be coming back for round two.
User avatar
dawnbreez
 
Joined: 08 Jul 2015

PreviousNext

Return to Gameplay Mods

Who is online

Users browsing this forum: Cutmanmike, Dr_Cosmobyte, Gorec and 17 guests