Doomy__Doom Posted November 3, 2022 8 minutes ago, RDETalus said: What's a good way to create a randomly selected event in a Boom format map? Scenario: I have one red key and three different rooms. When the player starts the map, I want the red key to randomly appear in one of these three rooms. I can move the red key into any of these three rooms using Boom format conveyor and teleportation tricks, but I don't know how to do the random selection part. You can create this type of randomness in Boom by using monster closets and initial RNG seed dictating wake-up order. Refer to Magnolia MAP02's "math puzzle" for the technique. 1 Quote Share this post Link to post
RDETalus Posted November 3, 2022 (edited) 4 hours ago, Doomy__Doom said: You can create this type of randomness in Boom by using monster closets and initial RNG seed dictating wake-up order Thanks, I checked it out, and it gave me an idea for a different randomness generator: I create a string of 1 MU length linedefs in front of a door. Each linedef is an invisible switch that is assigned to one of three possible events. When the player activates the door, he also unknowingly activates one of the three invisible linedef switches. The randomness comes from the unpredictability of the player's precise position and angle with respect to the door he's trying to open. I have attached an example WAD in case anyone else is interested. Just go up and hit the switch, it should be virtually impossible for you to repeatedly get the same result. 3_way_random_switch.zip Edited November 3, 2022 by RDETalus 0 Quote Share this post Link to post
Gez Posted November 3, 2022 On mercredi 2 novembre 2022 at 12:50 AM, SMG_Man said: You will probably have to manually convert the new textures/flat animation definitions to the format, but it's very simple to do so and shouldn't take too much time. SLADE can generate an ANIMDEFS lump from an ANIMATED lump. 1 Quote Share this post Link to post
SilverMiner Posted November 4, 2022 I want every water floor in the wad to heal players. So far I used TERRAIN and custom pain state terrain water { damageamount 1 damagetimemask 7 DamageType Healing } floor fwater1 water floor fwater2 water floor fwater3 water floor fwater4 water ACTOR DoomPlayer2: DoomPlayer { States { Pain.Healing: PLAY G 4 HealThing(1) Goto Spawn } } How do I get a player into pain state damaging him for 0 damage? (otherwise my healing floor kills 1 hp player lol, but in other cases it heals rapidly) Or should I use completely different way to do? 0 Quote Share this post Link to post
Gez Posted November 4, 2022 Dunno if this will work, but have you tried using a negative damage value? With ZScript you could probably process the level to give every sector with a water floor the sector type 196 (Sector_Heal). Of course this approach has the drawback of having to choose what to do when water sectors already have a sector type... 0 Quote Share this post Link to post
ViolentBeetle Posted November 4, 2022 I'm playing with MBF21 again, using Decohack tool. Made a monster that is invulnerable unless it extended itself to attack. Code: Spoiler thing MTF_EXTRA08 "Sentricle" { +SOLID +RANGEHALF Health 100 Mass 32000 Reactiontime 2 Radius 20 Height 136 Painchance 100 ProjectileGroup 2 Speed 0 Ednum 1006 States { Spawn: SP05 A 4 A_Look Loop See: SP05 A 0 A_JumpIfFlagsSet(SeeTall, SHOOTABLE) SP05 A 2 A_Chase Loop SeeTall: SP05 GGGHH 2 A_Chase SP05 H 2 A_RandomJump(Retract, 64) Loop Retract: SP05 FEDCB 3 SP05 A 3 A_RemoveFlags(SHOOTABLE) Goto See Missile: SP05 B 0 A_JumpIfFlagsSet(Fire, SHOOTABLE) SP05 B 3 A_AddFlags(SHOOTABLE) SP05 CDEF 3 Goto Fire Fire: SP05 I 6 Bright SP05 K 6 Bright SP05 J 6 Bright A_MonsterProjectile(MTF_EXTRA10, 0.0, 0.0, 0.0, 80.0) SP05 I 6 Bright A_CPosRefire Loop Pain: SP05 L 6 A_Pain Goto SeeTall Death: SP05 L 4 A_Scream SP05 M 4 A_Fall SP05 NOPQRS 4 SP05 T -1 Stop } } It seems however that when monster wakes up it jumps to SeeTall state, why is that? 0 Quote Share this post Link to post
SilverMiner Posted November 4, 2022 27 minutes ago, Gez said: Dunno if this will work, but have you tried using a negative damage value? With ZScript you could probably process the level to give every sector with a water floor the sector type 196 (Sector_Heal). Of course this approach has the drawback of having to choose what to do when water sectors already have a sector type... I used Sector_Heal, it works well, but I wondered if I could heal a player faster than each 32 tics. Negative damage doesn't work, maybe cuz the healing is applied via P_GiveBody but there is no that one here. THE END void P_PlayerOnSpecialFlat (player_t *player, int floorType) { if (Terrains[floorType].DamageAmount && !(level.time % (Terrains[floorType].DamageTimeMask+1))) { AInventory *ironfeet = NULL; if (Terrains[floorType].AllowProtection) { auto pitype = PClass::FindActor(NAME_PowerIronFeet); for (ironfeet = player->mo->Inventory; ironfeet != NULL; ironfeet = ironfeet->Inventory) { if (ironfeet->IsKindOf (pitype)) break; } } int damage = 0; if (ironfeet == NULL) { damage = P_DamageMobj (player->mo, NULL, NULL, Terrains[floorType].DamageAmount, Terrains[floorType].DamageMOD); } if (damage > 0 && Terrains[floorType].Splash != -1) { S_Sound (player->mo, CHAN_AUTO, Splashes[Terrains[floorType].Splash].NormalSplashSound, 1, ATTN_IDLE); } } } 0 Quote Share this post Link to post
Gez Posted November 4, 2022 28 minutes ago, SilverMiner said: Negative damage doesn't work, maybe cuz the healing is applied via P_GiveBody but there is no that one here. THE END Looking into it, P_DamageMobj() uses a helper function to calculate how much damage is actually inflicted based on damage factors and resistances and other stuff, and a negative return from that function is interpreted as damage being entirely canceled. So you can't heal with negative damage. Too bad. 0 Quote Share this post Link to post
RDETalus Posted November 5, 2022 Does anyone have any insights into how to make monsters act like stationary turrets more effectively? Is there a minimum or maximum amount of room you need to give the monster to move around so it has a higher chance of shooting at the player? I think I am noticing that if you box the monster in very tight so it can't move, it is way less likely to shoot at the player. 0 Quote Share this post Link to post
Edward850 Posted November 5, 2022 3 hours ago, RDETalus said: Does anyone have any insights into how to make monsters act like stationary turrets more effectively? Is there a minimum or maximum amount of room you need to give the monster to move around so it has a higher chance of shooting at the player? I think I am noticing that if you box the monster in very tight so it can't move, it is way less likely to shoot at the player. Your question is actually covered in detail by this video: 1 Quote Share this post Link to post
Kyka Posted November 5, 2022 (edited) This is only partially an editing question, but also partially a speedrunning question. Do fast opening doors open instantly, (even though you can see them moving?) How quickly do they open? The speedrunning part of this question is something I have often wondered. Do speedrunners back up ever so slightly when opening fast-open doors, as they do with 'normal' opening doors, in order to build/maintain some momentum during a speedrun? Or do they simply push up against the fast opening door and 'launch' when the door opens far enough? My second question is what is the maximum distance that a spider mastermind can still damage a player/monster, and in conjunction, what is the maximum distance that a spider mastermind can be heard when firing? Thank you. Edited November 5, 2022 by Kyka 0 Quote Share this post Link to post
Edward850 Posted November 5, 2022 (edited) 1 hour ago, Kyka said: Do fast opening doors open instantly, (even though you can see them moving?) How quickly do they open? If you can see them moving, then by definition and observation they don't open instantly. You already observed the answer but still asked the question. Specifically, they move at 4 times the speed of a regular door. Edited November 5, 2022 by Edward850 1 Quote Share this post Link to post
Gez Posted November 5, 2022 Fast doors do not open instantly. They open at four times the speed of a regular door. While a regular door will move by two units per tic (a 128-tall door will be fully opened in 62 tics -- not 64 as they move to 4 units below the ceiling, so a 128-tall door will only raise by 124 units), a fast door will do that in just 16 tics. Since Doomguy is 56 units tall, it takes 28 tics for a regular door to open enough for him to go through, but only 7 tics for a fast door to do that. As for the spiderdemon question, they use the same attack function as the shotgun guys (they just use it a lot more), A_SPosAttack, so their aiming and attacking is subject to the same range limit of MISSILERANGE, which is defined as (32*64*FRACUNIT), or 2048 map units. For the sound rolloff, we find this in s_sound.c, so I guess the answer is 1200 map units. // when to clip out sounds // Does not fit the large outdoor areas. #define S_CLIPPING_DIST (1200*0x10000) 1 Quote Share this post Link to post
Kyka Posted November 5, 2022 3 minutes ago, Edward850 said: If you can see them moving, then by definition and observation they don't open instantly. You already observed the answer but still asked the question. Specifically, they move at 4 times the speed of a regular door. Thank you for the reply. To clarify, I thought that perhaps the doors had the "appearance" of movement, but in terms of actual engine calculations, the door was instantly open. In the same way, some budget FPS games used to have weapons that were hitscan, but would still have a graphic showing a streaking bullet moving through the air. The glowing line of bullet travel was purely cosmetic, and did not have anything to do with the actual hitscan calculation of the games engine and physics. @Gez Thank you for the reply also. 0 Quote Share this post Link to post
Edward850 Posted November 5, 2022 (edited) 9 minutes ago, Kyka said: Thank you for the reply. To clarify, I thought that perhaps the doors had the "appearance" of movement, but in terms of actual engine calculations, the door was instantly open. In the same way, some budget FPS games used to have weapons that were hitscan, but would still have a graphic showing a streaking bullet moving through the air. The glowing line of bullet travel was purely cosmetic, and did not have anything to do with the actual hitscan calculation of the games engine and physics. Doom doesn't have this concept at all, given doors are just changing sector heights as you know, hence why you still set the sector height to the floor and set the upper textures. Though it did almost have sliding doors that were going to be like that, however. Edited November 5, 2022 by Edward850 1 Quote Share this post Link to post
Kyka Posted November 5, 2022 3 minutes ago, Edward850 said: Doom doesn't have this concept at all, given doors are just changing sector heights as you know, hence why you still set the sector height to the floor and set the upper textures. Though it did almost have sliding doors that were going to be like that, however. This game continues to blow my mind. Wow. Thank you for the link. No surprise that it was Fraggle who posted the information. 0 Quote Share this post Link to post
ViolentBeetle Posted November 5, 2022 Is there anything in MBF21 modding that I can do to make object cling to the ceiling. Not spawn on ceiling and be not affected by gravity, but never go down. I tried to do ceiling monster and found out that they do try to descend at times. Which sucks because I really wanted a ceiling turret. 0 Quote Share this post Link to post
SilverMiner Posted November 5, 2022 (edited) 1 hour ago, ViolentBeetle said: Is there anything in MBF21 modding that I can do to make object cling to the ceiling. Not spawn on ceiling and be not affected by gravity, but never go down. I tried to do ceiling monster and found out that they do try to descend at times. Which sucks because I really wanted a ceiling turret. void A_AccTeleGlitter(mobj_t * actor) { if (++actor->health > 35) { actor->momz += actor->momz / 2; } } If you're able to use hexen code pointers in dsdhacked, this is the only thing leading to solution I found. (the only pointer that adds to the thing's momz) I suppose you could try to make it not to be affected by gravity and cycle this codepointer so it'd try to stick to the ceiling. BUT: to go ↑, the turret must have more than 35 hp and I'm afraid it'll heal by 1 rapidly, making it invincible lol edit: it's heretic, not hexen func, but it's not crucial and also I dunno how to make momz non zero so it could grow edit2: if you could hold the turret in place by like impassable lines, you could probably use this (A_SmBounce) rapidly to make it stick to the ceiling cuz it should add some to momz void A_SmBounce(mobj_t * actor) { // give some more momentum (x,y,&z) actor->z = actor->floorz + FRACUNIT; actor->momz = (2 * FRACUNIT) + (P_Random(pr_hexen) << 10); actor->momx = P_Random(pr_hexen) % 3 << FRACBITS; actor->momy = P_Random(pr_hexen) % 3 << FRACBITS; } Edited November 5, 2022 by SilverMiner 0 Quote Share this post Link to post
ViolentBeetle Posted November 5, 2022 @SilverMiner I don't think anything here would be of any use for me. I did however, discover an absolutely outrageous hack. It invovles constantly removing FLOAT flag from a thing when it does anything, except, for zero duration frame when it calls A_Chase, at which point it must be re-set and then removed again. 2 Quote Share this post Link to post
Doomy__Doom Posted November 5, 2022 (edited) 11 minutes ago, ViolentBeetle said: I did however, discover an absolutely outrageous hack. It invovles constantly removing FLOAT flag from a thing when it does anything, except, for zero duration frame when it calls A_Chase, at which point it must be re-set and then removed again. I did a similar thing with my shadow arch-vile, constantly flipping SHADOW and SOLID between chase and resurrect to make it only damageable when raising. The biggest advice I can give for set/remove flag hijinks - make sure to test on a bunch of different ports that it works identically. In my case Gz didn't properly handle SHADOW changes, for instance. Edited November 5, 2022 by Doomy__Doom 0 Quote Share this post Link to post
SilverMiner Posted November 6, 2022 @ViolentBeetle how do you set flags? 0 Quote Share this post Link to post
ViolentBeetle Posted November 6, 2022 Just now, SilverMiner said: @ViolentBeetle how do you set flags? A_AddFlags and A_RemoveFlags respectively. I think it was introduced in MBF21. 0 Quote Share this post Link to post
SilverMiner Posted November 6, 2022 1 minute ago, ViolentBeetle said: A_AddFlags and A_RemoveFlags respectively. I think it was introduced in MBF21. Ha, I've been seaching for something like "A_SetFlag" thinking that the first argument should be a flag and the second one is 0 or 1. Quite odd implementation 0 Quote Share this post Link to post
Stabbey Posted November 12, 2022 In ports which allow free-look, is there some way to prohibit rocket jumping without disabling free look? Even though I specifically disable jumping, some of my testers use rocket jumping to get places they shouldn't. 0 Quote Share this post Link to post
Alper002 Posted November 12, 2022 28 minutes ago, Stabbey said: In ports which allow free-look, is there some way to prohibit rocket jumping without disabling free look? Even though I specifically disable jumping, some of my testers use rocket jumping to get places they shouldn't. The problem you might be running into is that GZDoom (by default) makes explosions launch things vertically, which not all doom sourceports do! Assuming gzdoom, one of the compatibility options (Referred outside of menus as Compat_Explode1) prevents this, which should remove the ability to do those rocket jumps. You can force it within MAPINFO by putting in "compat_explode1 = 1". 1 Quote Share this post Link to post
Stabbey Posted November 12, 2022 That's exactly what I need, thanks! 0 Quote Share this post Link to post
Kyka Posted November 13, 2022 (edited) [EDIT] I have figured out this problem, thanks to the sound propagation mode in GZDB, which I only discovered after posting this post originally with a question involving how to check sound propagation. Without that I never would have. A long chain of off-map sectors that are there to propagate sound into off map monster closets was creating the issue. I will leave the post up as is in case it helps anyone, but problem solved. Cheers. [Original Post] I have a sound propagation problem: When I fire a shot at the pink asterisk, it somehow is propagating into the green area, and triggering two chaingunners in monster closets that should not wake up at that point. I have checked self referencing sectors and other things and there seems to be no way sound is getting in. (I have only recently discovered sound propagation mode, ie, about 10 minutes ago, so now I see there are some unnecessary sound lines. o_0 Thoughts? Thank you. Edited November 13, 2022 by Kyka 0 Quote Share this post Link to post
ViolentBeetle Posted November 13, 2022 In MBF21, what controls the items monsters drop on death. I know it can be inherited, so it should be possible to specify, right? 0 Quote Share this post Link to post
Stabbey Posted November 14, 2022 Now that my Water, Fire and Blood map is finished, I want to go back to another map I had started: BFG Factory. I'm trying to decide what map format to use. I have this map to the same level of completion in three different map formats, I just need to decide what to use. It's a city map set in a factory. I'd like some features. A working conveyor belt which carries an endless loop of BFGs which, once they reach the end, silently teleport back to the beginning of the belt. Ideally, I'd like an earthquake-like thing at the end, Hexen style, with the rumbling sound and quaking floor. I don't need-NEED that, the actual change to architecture will happen off-screen, and I could use crushed-barrel explosions for the sound, but it would be nice to have the full effect However, I've looked at the actions available in a Boom-format map, and looked again, but I don't see anything which seems to be an earthquake effect. I guess Hexen used scripting for that, which makes sense. My other option is probably UDMF, and I could toss in some scripting, some slopes and 3D floors to make full use of that, but UDMF limits the ports which can run it, and people seem to hate that. I'm just about ready to ditch all attempts to map for UDMF just based on the current trends. Any thoughts or suggestions on what my best option is? 0 Quote Share this post Link to post
Lanie Posted November 14, 2022 (edited) Dear Doomers, I have a question about ACS: I want to change a texture (and maybe also some other properties) of a certain linedef by shooting, be it a mid-texture or a normal. (Lets say by shooting a window or a tvscreen..) I know that there is a command for changing textures (e. g. setlinetexture(1, SIDE_FRONT, TEXTURE_MIDDLE, "SPAWN09"), but i am not sure how to manage the rest. What I probably need is to track IF the linedef is shoot in order to then execute the change-texture script? Is there anybody who could help me out with that? I already did some scripting for managing monster spawns sunder style, so I got some, although little, experience with this topic. Thank you, Lanie. Edited November 14, 2022 by Lanie 0 Quote Share this post Link to post
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.