Attached Files | Chat Log - 2022-08-25.txt [^] (11,930 bytes) 2022-08-26 01:45 [Show Content] [Hide Content]
Arkore: hey, in Zan 3.1, we have +FORCEALLYCOLLISION to bypass sv_shootthroughallies, but I'm looking for the opposite of this, something like +ISALLY that I can put on sentries I spawn, for example. currently, my bullets are hitting it, and damaging it. but implementing this, from a developer perspective, probably doesn't make sense because "allies" i believe is only players
Kaminsky: sv_shootthroughallies and sv_dontpushallies isn't limited to players only. It also affects friendly monsters or actors that are supposed to be on a designated team in team-based game modes.
Arkore: here is the sentry code I'm working with.
ACTOR SentryGun2 {
Tag "Sentry Gun"
obituary "%o was ventilated by an auto-sentry."
health 80
radius 20
height 56
mass 100000
speed 0
MaxTargetRange 1024
AttackSound "sentry/attack"
Decal "BulletChip"
MONSTER
Species "Player"
DamageType "Player"
RadiusDamageFactor 0
-SOLID
+SHOOTABLE
+THRUSPECIES
+DONTHARMSPECIES
+MISSILEMORE
+MISSILEEVENMORE
+FLOORCLIP
+FRIENDLY
+NOBLOOD
+LOOKALLAROUND
+QUICKTORETALIATE
+NEVERRESPAWN
+STANDSTILL
+NOBLOCKMONST
+DROPOFF
-COUNTKILL
States {
Spawn:
TNT1 A 0
TNT1 A 0 A_SetUserVar("user_ammo", 175)
SENT AAAAAAAAAAAAAAAA 4 A_LookEx(LOF_NOSOUNDCHECK|LOF_NOSEESOUND)
SENT A 0 HealThing(30,300)
SENT A 0 A_PlaySound ("Sentry/Active")
Loop
See:
SENT AAAAAAAAAAAAAAAA 1 A_Chase
SENT AAAAAAAAAAAAAAAA 1 A_Chase
SENT AAAAAAAAAAAAAAAA 1 A_Chase
SENT AAAAAAAAAAAAAAAA 1 A_Chase
SENT A 0 HealThing(30,300)
SENT A 0 A_PlaySound ("Sentry/Active")
SENT A 0 A_ClearTarget
loop
Missile:
SENT A 0 A_PlaySound("Sentry/Alert", CHAN_WEAPON)
Missiling:
SENT A 4 A_FaceTarget
TNT1 A 0 A_PlaySound("sentry/attack")
SENT B 2 bright A_CustomMissile("SentryTracerBullet2", 46, 0, Random(-400,400)/100.0)
SENT B 0 A_MonsterRefire(16, "See")
goto Missile+1
Death:
SENT C 1 A_PlaySoundEx ("Sentry/Death", "SoundSlot5")
SENT C 0 A_PlaySoundEx ("weapons/rocklx", "SoundSlot6")
SENT C 0 A_SpawnItem ("SentryBoom2", 0, 48)
SENT C 512
FadeOut:
SENT C 2 A_FadeOut (0.1)
loop
}
}
Arkore: hmm, it has +FRIENDLY
Trillster: it actually would be kinda convenient to have the flag that is the opposite of this instead
Kaminsky: Hm, I don't think the FRIENDLY flag would prevent the friendly actor from taking damage from the player though.
Arkore: yes, it will
Arkore: wait, you're right. railgun kills the sentry. lol
Arkore: yes, but i was looking for the opposite of that. to make something an "ally", to respect the full effects of sv_shootthroughallies which includes damage
Kaminsky: That's the only drawback: friendly actors are still vulnerable to friendly fire. Unless you use the DesignatedTeam actor property which only works in team-based game modes.
Arkore: so, what are your thoughts on this. do we need +ALLY, or do we do something else. or do we do nothing
Trillster: a flag there that implies don't get hurt by allies might just be the easiest
Trillster: you could do a whole damage event script to try and force that behavior for the moment tho
Arkore: there's been years of hacks around this. check Blood's Complex Doom Invasion, which is where this sentry comes from
Arkore: i'm going to add +NORADIUSDMG for now, to help it a bit. should be good enough, heh.
Kaminsky: I wonder why GZDoom never implemented a DONTHARMFRIENDLY flag.
Arkore: good question. and why does +HARMFRIENDS exist if that's the default behavior, or so it seems
Kaminsky: The +ALLY flag seems a little redundant when compared to +FRIENDLY flag.
Arkore: true
Kaminsky: Since they added HARMFRIENDS, they might've as well added the polar opposite like they did with species.
Arkore: would DONTHARMFRIENDLY be on the player then? so then all friendly things cannot be harmed
Arkore: what about configuring for specific things
Arkore: +NOFRIENDLYDMG 😉 (following naming convention of existing +NORADIUSDMG)
Arkore: +NOFRIENDLYTHRUST or +DONTTHRUSTFRIENDLY(following naming convention of existing +DONTTHRUST)
Kaminsky: In theory, adding DONTHARMFRIENDLY to the player would prevent them from harming other friendly actors, and adding the same flag to another actor class would prevent them from harming other friendly actors.
Arkore: yes, it would cover all friendly actors. but what if you wanted only specific actors to receive friendly damage, and some to not
Trillster: yeah I feel like you'd want it to be more like NOFRIENDLYDMG instead, it feels more useful to specify by the actor which you wish to not take friendly damage
Arkore: yeah
Kaminsky: I see.
Trillster: I'm not sure what you'd name it, but I think that flag and a flag that just enforces ally collision on the shootable actor's side would be very helpful
Trillster: like the opposite side to +FORCEALLYCOLLISION which you set on the projectile, something you set on the shootable actor to make it tank all ally bullets
Arkore: i've been programming for 25 years, so, if you teach me how to program zandronum, then i can help (and run things by you for approval), keeping you free to work on other things, Kaminsky.
Trillster: you can actually view the source and repository of zandronum already, I'm just not yet sure on how to make something like a merge request since I haven't gotten my zandro compilation setup yet and am a bit unfamiliar with osdn's UI which zandro's repo uses
Trillster: or if merge requests are even open for the particular repo
Kaminsky: FORCEALLYCOLLISION could probably be extended so that if the actor being shot has the flag enabled, it ignores sv_dontpushallies and sv_shootthroughallies? I'm not sure if that might be confusing though.
Trillster: I would be ok with that solution
Trillster: because we actually initially thought that flag did work like that
Trillster: like double-ended so it didn't matter whether it was on shooter or shot actor
Arkore: yeah, it's the setup and configuration i would need help with. once it's all setup and ready to go, and compiled successful. i can begin trying things. i can teach you merging, btw, Trillster.
Kaminsky: I'm just wondering if people also assume that FORCEALLYCOLLISION implies the shooter's attacks always collide with their allies, or the other way around.
Arkore: wait, it already does that.
Arkore: are you tired, or am i?
Arkore: 🙂
Trillster: I'm pretty much good on the idea of merging, I'm just more familiar with getting stuff up and running using github/gitlab's website UI compared to osdn's, so I'd just have to take a moment to poke around osdn to see where stuff is compared to those two
Trillster: also distinction here is that +FORCEALLYCOLLISION only works on the projectile that is shooting an actor, not the actor that is being shot
Arkore: oh, i missed that part "fired by"
Arkore: reading wiki now
Trillster: I didn't think about that point kaminsky just because I'd imagine you wouldn't be putting FORCEALLYCOLLISION on players or stuff that is then also shooting projectiles, but I guess that's a poor assumption to make, so it could be a bit confusing
Kaminsky: Right (what Trillster said), and the flag's usage in the source code is always connected to an actor (i.e. inflictor) that directly causes the attack, like a rocket or BFGBall.
Arkore: so, if you extend +FORCEALLYCOLLISION, then you're also needing to change +FRIENDLY default behavior to exclude railgun (or radius damage), right?
Kaminsky: Hm, I suppose.
Arkore: well, you would need to. i was just double checking that we're on the same page
Arkore: because right now a +FRIENDLY target takes railgun and radius damage, with sv_shootthroughallies enabled, even though players don't
Trillster: well it's more that players don't take friendly fire damage by default unless friendly fire damage is explicitly enabled
Trillster: I would imagine if you had sv_shootthroughallies enabled but friendly fire enabled as well, you could actually see the same behavior as you do with +FRIENDLY actors
Arkore: or maybe that was from sv_dontpushallies
Kaminsky: If sv_shootthroughallies is enabled and teamdamage > 0, then an allied player will still take friendly damage.
Arkore: yup
Kaminsky: My only concern right now is if GZDoom (since we're still based off it) added similar flags in the future.
Arkore: so, quick recap, i have sentry with +FRIENDLY, and +sv_shootthroughallies 1 +sv_dontpushallies 1 +cooperative +teamdamage 0, and it works perfectly, except railgun will hurt it.
Arkore: A_RailAttack (players) and A_CustomRailgun (for monsters, so, no as relevant, but same railgun tech, i would imagine)
Kaminsky: Perhaps the flag should not outright prevent damaging friendly actors, but apply the teamdamage factor onto the friendly actor?
Kaminsky: In that case, what would the name of the flag be?
Trillster: +FRIENDLYFIREABLE?
Trillster: tho that kinda implies the opposite default behavior
Trillster: like it implies that by default you can't friendly fire +FRIENDLY, and this flag enables that, which it does the opposite
Kaminsky: I was thinking of a name that could still include the word "ally" in it, or something.
Arkore: just so you know, damage and thrust are interesting in zan. for example, A_Explode(128,128,0) will set flags to 0, and therefore wont hurt the shooter, but this includes Thrust (causing no thrust). i use DamageType and DamageFactor on player for times when I want Thrust but 0 damage, because thrust is included for a DamageFactor of 0. so, when you use words like "factor" like when speaking to teamdamage, my brain started thinking extra
Kaminsky: ENFORCETEAMDAMAGE? Does this sound mutually intelligible to anyone who wanted the behaviour that we're looking for?
Trillster: that would make sense to me
Arkore: +sv_shootthroughallies 1 +sv_dontpushallies 1 truly is powerful.
Arkore: the only question we have now, is if "+FRIENDLY" should be truly considered as ally (therefore no need of +ALLY flag, otherwise if it is not, then it's not so redudant to have +ALLY), right?
Arkore: am i understanding this so far?
Arkore: i'm currently looking for the opposite, because the sentry is still taking damage. what naturally comes to my mind is +ALLY or +NOFRIENDLYDMG and +NOFRIENDLYTHRUST, or update(fix?) +FRIENDLY to be truly like "ally", following those two sv_ vars, and including ignoring railgun damage
Kaminsky: Hm, then another option is updating +FRIENDLY to "be truly like 'ally'" and adding a compatflag that restores the old behaviour, or the other way around.
Arkore: yes, seems so. but, what's teh compatflag, and what old behavior? 😉
Kaminsky: The old behaviour that FRIENDLY actors take full damage from their "allies", instead of not taking damage at all (unless teamdamage is non-zero).
Arkore: ah
Arkore: cool. so, does this all make sense? did we just arrive to a solution?
Arkore: should i create a ticket?
Kaminsky: I think we have. I would first like to discuss the idea with Torr about it and see what he thinks as well.
Arkore: yup. i can add the chat log to the ticket, and you can have him view it?
Kaminsky: Yes please, that would be appreciated.
Kaminsky: Or I can share with him the chat log during our meeting, but feel free to make the ticket.
TEST.wad [^] (156,158 bytes) 2022-08-26 01:46
TEST.bat [^] (249 bytes) 2022-08-26 01:47 |