I'm a total noob in ZDoom modding, and I usually play with GZDoom.
Ok... I see this funny axe/brutalaxe new weapon in all these Brutal Doom mods... but the hit distance is way too long and unrealistic. How can I change that to be closer?
Is there a sort of "range=" property I can edit to achieve this?
Change the maximum distance to hit of a weapon?
Moderator: GZDoom Developers
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.
Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.
Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)
-
- Posts: 6
- Joined: Mon Dec 12, 2022 3:14 am
- Preferred Pronouns: He/Him
- Operating System Version (Optional): Windows 10
- Graphics Processor: nVidia with Vulkan support
-
-
- Posts: 1849
- Joined: Sun Jul 21, 2019 8:54 am
Re: Change the maximum distance to hit of a weapon?
That depends on what functions the weapon is using, without knowing that it's hard to say.
If it uses A_CustomPunch, then one of the function's parameters is responsible for range, the one after defining what puff it should use.
If it uses A_CustomPunch, then one of the function's parameters is responsible for range, the one after defining what puff it should use.
-
- Posts: 6
- Joined: Mon Dec 12, 2022 3:14 am
- Preferred Pronouns: He/Him
- Operating System Version (Optional): Windows 10
- Graphics Processor: nVidia with Vulkan support
Re: Change the maximum distance to hit of a weapon?
Mmmh, seems to use A_CustomMIssile https://paste.sh/t4n7b5hf#SyX-6oIXmZqbv8vLQSHvdg1G
-
-
- Posts: 1849
- Joined: Sun Jul 21, 2019 8:54 am
Re: Change the maximum distance to hit of a weapon?
In this case you need to find the projectile that's being fired, in this case all of them seem to inherit from either AxeAttack or AltAxeAttack, and change its speed property to something lower.
-
- Posts: 6
- Joined: Mon Dec 12, 2022 3:14 am
- Preferred Pronouns: He/Him
- Operating System Version (Optional): Windows 10
- Graphics Processor: nVidia with Vulkan support
Re: Change the maximum distance to hit of a weapon?
Changing Speed changes impact fx distance (sparks etc. + metallic sound collision with walls) but will still hit the target at the same distance, without sound/sparks and only applying silently the decal when hits the wall...
-
-
- Posts: 1849
- Joined: Sun Jul 21, 2019 8:54 am
Re: Change the maximum distance to hit of a weapon?
Ah, apologies.
I didn't notice it at the time, but the weapon actually uses A_Saw for its attacks with a range of 120.
You would have to change that to something lower if you want to lower the range.
I didn't notice it at the time, but the weapon actually uses A_Saw for its attacks with a range of 120.
You would have to change that to something lower if you want to lower the range.
-
- Posts: 6
- Joined: Mon Dec 12, 2022 3:14 am
- Preferred Pronouns: He/Him
- Operating System Version (Optional): Windows 10
- Graphics Processor: nVidia with Vulkan support
Re: Change the maximum distance to hit of a weapon?
Thank you!
Adjusting both "Speed" for "ACTOR AxeAttack: FastProjectile" and "A_Saw" range I was finally able to correct the hit-distance!
... I still need your help
with punch replacement (again too long range) though. I tried hard to solve it by myself but I'm too noob
:
https://paste.sh/lmUmt9Ha#btysNtldDMAf8x50TY97JWo5
Seems to be a similar logic at "ACTOR KickAttackFist: FastProjectile {}" but changing speed alone there doesn't change the hit-distance or the special fx associated (smoke, sparkles...).
Adjusting both "Speed" for "ACTOR AxeAttack: FastProjectile" and "A_Saw" range I was finally able to correct the hit-distance!
... I still need your help
https://paste.sh/lmUmt9Ha#btysNtldDMAf8x50TY97JWo5
Seems to be a similar logic at "ACTOR KickAttackFist: FastProjectile {}" but changing speed alone there doesn't change the hit-distance or the special fx associated (smoke, sparkles...).
-
- Posts: 6
- Joined: Mon Dec 12, 2022 3:14 am
- Preferred Pronouns: He/Him
- Operating System Version (Optional): Windows 10
- Graphics Processor: nVidia with Vulkan support
Re: Change the maximum distance to hit of a weapon?
Ok, I got it.
Solved also the Fist hit-distance adding/editing "Speed = nn" to:
Line 1440: ACTOR MeleeStrike1: KickAttackFist //*Berserk mode: left-right jab, uppercut, right hook, left-hook (quickmelee)
Line 1463: ACTOR MeleeStrike2: MeleeStrike1 //*Uppercut and right hook. Quickmelee left-hook.
Line 1522: ACTOR MeleeStrikeNormal: MeleeStrike1 //*Left-Right jab.
Solved also the Fist hit-distance adding/editing "Speed = nn" to:
Line 1440: ACTOR MeleeStrike1: KickAttackFist //*Berserk mode: left-right jab, uppercut, right hook, left-hook (quickmelee)
Line 1463: ACTOR MeleeStrike2: MeleeStrike1 //*Uppercut and right hook. Quickmelee left-hook.
Line 1522: ACTOR MeleeStrikeNormal: MeleeStrike1 //*Left-Right jab.