Thread:Deathstalker666/@comment-1496755-20180827202615/@comment-3547390-20191016012752



The problem there is that nights are quiet, which means I can't exactly record during them of course. And yes, it mostly is just a matter of waiting... and hoping... that things will eventually improve.

Oh, that is quite nice to hear, it is definitely good to get into one of the lull periods. I think that summarizes gaming with everyone, we start out barely making it before we eventually become too experienced, so we end up with these crazy brutal challenges. I should mention the server is still, personally, too easy since I can do the entirety of Episode 1 without dying on a consistent basis.

Oh definitely, especially since by now most aren't Aftershock but regular test maps. It has been that long. DOORH is Horizontal Door Example now!

I have heard of the X-Men one for sure. I also know of an Aliens one, a Star Wars one, and a Jurassic Park one. Plus you got Shrak and Malice. So yeah, have heard of a few, but never touched any. I think I tried Shrak a long time ago, but couldn't get it working right as all the models were totally corrupt or something.

Personally, I think it was better when we made the most of websites. Nowadays everything feels so... congregated. There just aren't crazy cat ladies worshiping Catzilla these days. I miss the days of everyone having a web page. One reason Myspace was much better than Facebook, and Geocities better than Myspace. We just keep getting worse.

So, I got my father's girlfriend's son to play on the server... where I learned some fun things about it. Specifically, it is highly broken with two players! When I designed everything, I only had myself to work with, so I got it working on my end and it looked great. Once another player was added, it all went haywire.

So I have gone back and ironed out some of the bugs. First real bug was that spectator mode was only working for the server host, me, which means it pretty much was useless to everyone else. It would work if I spawned multiple instances of myself, but anyone else would just respawn and get skin issues. So, I tore apart the code and reworked it, so now spectator code is working for everyone. A side effect of this is that it is actually working in Single Player now, before you had to create a server to get that feature working. The weird thing is that frags seem to get reset; combined with Single Player working you would think that would mean telefragging would result in immediate spectator mode. Yet somehow that is working fine, I was able to spawn into a Q2 level and properly enter spectator mode at the right time and not get an issue from that initial spawn. So yeah, I have reworked things a bit under the hood and now they work better (meaning they actually work and didn't really work before).

The bad news is that there are some apparent other bugs, if a noobie to Quake can be believed. While in spectator mode they allegedly were able to pick up some ammo, when they shouldn't be able to interact with anything. There is also some weird issue whereby, once one of the players is sent to spectator mode, they will crash the server after a short bit of time. None of this happens with just me, even with a duplicate version of myself, so this will require some more testing. I am at least one step closer. Just currently... the server pretty much would be a crash fest, it ironically works best as a Single Player mod. This is probably why having a person testing this stuff would help a lot :P

EDIT: So, testing through things myself, I have found the issues to be that the game crashes when you try to change Weapons when in spectator mode. Need to figure out how to lock those impulses in Spectator mode. Also, the ammo being picked up is specifically backpacks.

I apparently missed a line when doing the change Weapons part, plus I needed to do it for the inverse, which of course was not a thing in 1.01. I am pleased to report neither is causing the server to crash anymore. Now to just get rid of that backpack bug.

Still haven't gotten that far. It seems that backpacks only work the way they do (explosive) when made solid, but the problem is that by making them solid spectators can pick them up. Granted, it isn't a big deal, especially as the ammo cannot be used.

Bigger news to report is that, by tearing apart the backpack code, I got an epiphany about monster heads. Testing it out on the problematic Grunt, I can proudly say that I have finally figured out how to keep all the solid monster mechanics while preventing players from getting stuck on heads. Grunts can be killed without getting stuck, even when standing on one.

As for the backpacks, the best solution seems to be setting the spectator mode so that it is putting the player in Noclip instead of Fly. It makes sense as well, I am not really sure spectators need to be inhibited by entities like monsters.

Also, randomizer. I have run across an open source Willy the Spider code that replaced Hell Knights. It didn't exactly tell me much, but managed to inspire me to essentially write some code from scratch, using the replacer function as a base. So far I have made it so that Rottweilers can replace Death Knights half the time... this means I essentially got something sort of like the Psionic Slug. I could entirely randomize out a particular opponent; it is even different with each game! Say we die, become spectators, and have the level restart. It will actually randomize everything out again, meaning this essentially is EXACTLY what I have been looking for. The answer is getting there.

Now, with the above mentioned, I could swap out Ogres or something and randomize it all out. The problem, as you might infer, is that I need to pick 1 enemy to randomize. The way this works is that when defining the entity, it may randomly decide to pick a different entity from a list. The problem? The entity needs to be defined... which of course means I can't exactly swap Rottweilers with Death Knights if the former comes before the latter in the list. This means, at the moment, we got a sort of tiered replacer that could of course replace earlier entities while not touching those later in the list. Custom opponents would be great here, they could go at the start of the list, and would automatically be there for any vanilla opponent. The main issue is just swapping out vanilla opponents with each other.

Oh, am I glad I have gotten used to the code as much as I have. This sort of thing would be impossible in the past, but now I am pretty much writing like a programmer. I also figured out how to do the inverse. I then proceeded to get Grunts to be replaced by Death Knights and Rottweilers, plus all three combinations (figuring out how to get multiple types to work required a whole different can of worms). The result makes E1M1 now have a bunch of Death Knights on top of Grunts and Rottweilers with a totally unpredictable experience each game. Granted, there are a few caveats to mention. First and foremost, randomizers can make things harder or easier, it is the nature of the beast after all. Secondly, bounding boxes are a thing and vary per monster, so one that might not get stuck may get stuck as a different type. Worst case here, an alcove might refuse to open like the Nail area of E1M1. Both don't mean much to me; I rather have the randomization and unpredictability.

The biggest issue with the randomizer is a bit of a weird issue, but if you have ever heard of the Ogre Marksman, I am apparently doing something similar to what you see there. The entity is still seen as a different entity (in that case, nothing) but pulls most things from the Ogre. The problem is the remaining things are the same issues as the Ogre Marksman. You can infight multiple of the same "type", they still make the same alert sound (meaning death knights could sound like grunts at first, but then become death knights), and the death messages are whatever the original entity was. Need to figure out how to change these, but the basics are there. Willy the Spider doesn't help much here, it fully replaced the Death Knight and thus could just say if the entity was a Hell Knight to use the new obituary. It also doesn't help much with the initial sound, since Willy doesn't have said sound.

Obviously Chthon and Shub-Niggurath will be excluded, I also think Rotfish are best not to swap around due to them not handling ground well and being buggy enough as it is (plus I could swap them with water based entities later on if I found some more; I can actually be very specific about what swaps out what). Similarly, I will not alter the Scrag, since they are flying monsters. While I probably could do the Scrag, I feel like there would be instances like E2M4 where it just would drop an opponent into the slime. Best to keep the three types to their own generators.

Had a big issue with Zombies since they can be crucified, which in turn is a mess for other monsters that don't have said animations. Eventually managed to figure out how to make crucified zombies not be touched by the randomizer. Of course, now I need to figure out how to prevent crucified zombies being one of the randomized monsters... and why regular zombies aren't being randomized...

Seems at some point it starts crashing a lot; there are definitely a lot of issues with this still. I will need to experiment around for a bit more...


 * Step 1: Replace everybody with Rottweilers with a small decimal percentage. That actually is working really well. No crashes or instabilities, now we get Rottweilers throughout the game.
 * Step 2: Add in Grunts to replace everything as well. Still no crashing at all.
 * Step 3: Ogres. Still no crashing. E1M1 has a chance of having Shrek.
 * Step 4: Knight. First attempt in E1M1 resulted in a Knight seeing me, then deciding to use the knight run, which in turn crashed the game... now the question is, why? Why can Ogres and Grunts replace each other fine, yet Knights are so different? Especially since Hell Knights, based on previous tests, works fine. Looking into how the engine handles this, it looks like the classname also affects attacks... somehow? This would explain why my randomized Shamblers insisted on trying to use melee. But why can Rottweilers and Grunts replace each other?

And trying something else, I manage to figure out how to control classnames as well. I managed to fix the Ogre Marksmen, now they are pretty much regular Ogres! Now Rottweilers act and sound like Rottweilers! Time to see if Knights still crash the game.

No they do not! In fact, things are working really well at this stage. Time to keep adding enemies and see if it breaks things. Zombies seem to be a hassle to define, so I likely won't randomize them. You haven't lived until you had an army of Shamblers at the start of E1M1.

So, what are the randomized opponents? Rottweiler, Grunts, Enforcers, Ogres, Knights, Fiends, and Shamblers all have a chance of swapping between each other. Adding the Hell Knight, oddly enough, is when my game started crashing. I need to look into why now.

So, testing without the Hell Knight, the game works... 95% of the time. Then randomly it just will crash on generation. I don't get it. Time to redo it and spam the restart button.

So it has been redone, and now I am moving past where I was. Death Knights working with everything else now. In fact, I got all the vanilla monsters in, but upon adding the Spawn it has become a bit more unstable. Now need to figure out why.

More experimenting has revealed that the reason it is crashing is because of something that doesn't make much sense, but at least can be understood and followed as a rule. To spawn each monster, you must set a specific spawn chance and the range it can spawn. To make the original opponent not overwhelm all other choices, you want to set the full range to be about the number of entities you desire. The problem with this? For some reason, the upper portion of the range (say the last 25%) doesn't like to be defined. This means there is a slight bias to the original opponent, as opposed to it being fully different each time, but this appears to make it far more reliable. Changing this one mechanic, I went from consistently crashing after a couple restarts to not being able to crash at all.

In any event, we have now managed to get the last big thing I really wanted for the server. We will still add things as we find them, but the server is now solidified enough to feel quite awesome in its current state. I still have all the resources to be doing, of course, but the monsters alone make the server really feel like something else at this point. Everything now is shining and more clear than it was in the past. Funny too, I did not expect such good randomization just a short time after spectator mode. It felt like an impossibility, and yet here we are, with a generator that is even bringing in some custom monsters with fully solid bodies. Patrol paths, spawning, everything works so well.

I also added a weapon randomizer. It actually was a lot easier than the monster one, especially now that I understand the latter, which means I got it working pretty quickly. One extra piece of variation. I plan to expand with some custom stuff here later. For the time being, I have reconstructed the closed source Laser Gun from P.A.I.N, specifically the Double-Barrelled one that has a proper world model. It is slightly more powerful than the version found there, it causes 30 damage (2 Enforcer lasers for 15 each) for a bit more balancing. Pretty much the same damage as a Thunderbolt, but with the benefit of firing more controlled shots, albeit ones that require some sort of closeness if you don't want one of the shots to miss. This means we have some variation with the firepower beyond the vanilla ones at least.

Next step? Recreating the Hell Scrag for our server. Ambitious, but something definitely worth doing at this point. I shall try to make it fire some fireballs that cause some more damage as well, make it a bit different from the normal Scrag. Then I can randomize out the regular Scrag and Hell Scrag!

So I got the randomization portion done, as well as recreating all portions from the original Hell Scrag. I also cranked up its health to make it more of a threat. I couldn't figure out how to affect its projectiles or even its movement speed, so I did the next best thing. I gave it a bunch of projectiles it can fire at once in a pretty concentrated area. So the Hell Scrag sort of works like a super Scrag, you dodge and you can pretty much avoid all of its shots, but let it hit you... it can take you down most of your life if you get directly hit. Think Shotgun vs Double-Barrelled. Needless to say, enough to make it noticeable, there is now no way that you will miss a Hell Scrag trying to kill you.

Admittedly, I could spend more effort on the Hell Scrag, but I think I like the combo between a Hell Knight and a Scrag. The idea of multiple weak projectiles is very Hell Knight inspired, plus is better than the practically suicidal method of explosives (remembering Qtest's nature to kill themselves). Rapid fire could be interesting, but since they are long range, I feel like it would just lead to even more infighting. No, a concentrated shot of death seems to work best and feel right for the Hell Scrag.

So, the server now has all the custom enemies we have covered but one. The well known and all loved Psionic Slug is still missing because it is closed source. It is definitely something to try tackling, but unlike the Hell Scrag it has its own animations and whatnot, which can make it harder to line everything up. Will take some playing around with for sure.

Check out the image I uploaded with this post. Currently the Psionic Slug is just replacing Grunts for testing purposes. As seen, the basic animations are actually in place (once you learn what to do it isn't too bad, just very time consuming), at least for being idle. The main thing now is just trying to get the behavior of the original opponent. Not exactly sure how to create the rings in the manner the original mod had it, so that will require more testing. The pain sound also confuses me, since there aren't any pain animations, and I am not sure how to call a pain sound without some animation being tied to it. But at least the Psionic Slug is in the server in some form. It can move around with the proper animations and even plays both of its movement sounds.

The problem is that the Psionic Slug's attack is pretty broken. As in.. it crashes the server at the moment. So the Psionic Slug is great to look at with notarget, but doesn't exactly work for real gameplay just yet. Need to figure out how to get it more functional and like the original Psionic Slug.

So the reason for the crashing appears to be that all opponents naturally run, but since I specifically didn't include running mechanics so it would slowly move around, it would crash the game. I can fix this by just saying that it is running when it is really walking. The good news is this results in the game not crashing, the bad news is the attack is still highly broken.

I got the Psionic Slug to properly make the right sound when detecting the player, then start trying to move towards them. It can bleed and get injured by pain, whereupon a sound plays, and it also makes movement sounds. Most of the animations (outside of attacking) look right. Killing the Psionic Slug works fine, it becomes a corpse that you can hack up, complete with its own custom head. The main issue right now is that the Psionic Slug doesn't attack.

Once again, it is all the fault of running apparently. I needed to create a whole separate set of runs that pretty much duplicated the walk. It seemed pretty pointless, yet the difference is that the latter somehow allows the opponent to attack while the former does not. Currently it shoots a Scrag projectile that seems to appear between its antennae. Will need to figure out how to make this more true to the original design.

So I have now gotten the rings (I made them rings) to fire from the right location. I also changed the frequency around, now it spams the attacks like the original slug would. I got all the sounds properly implemented by this stage, including when a projectile hits you. I also completely isolated the projectile so that it doesn't become a nail and bounce off walls. Instead, it just disappears like the original would. From messing around with the original I also know there is a sort of distance limit sort of similar to the Shambler, so I will need to see if I can figure out how the Shambler limit works. So yeah, it is definitely at a point where it is recognizable even. One more tweak and we got the Psionic Slug fully functional!

Only problem there is that I have no idea how to get this mechanic to work right. Shamblers/Thunderbolt is a bit different... it is all based on it being a flat 2d object that can stretch whatever distance is set. A 3d object that can only travel so far before being removed is something I am not sure how to do. I don't think any other monster has a limitation on range, at least any with a projectile that flies straight. This means I am sort of baffled by what is in truth a very small component. I guess the good news is that, even if I can't figure it out, we got Psionic Slugs on the server. Specifically we got the ability to shoot Psionic Slugs with Laser Guns, something that would never normally be possible due to the closed source nature of both mods. Still, it would be nice to figure out this one detail and be 100% faithful.