Raised This Month: $12 Target: $400
 3% 

Realistic Bullet: Real-Life Bullet physics to CS - FINAL VERSION


Post New Thread Reply   
 
Thread Tools Display Modes
VoivoDpl
Junior Member
Join Date: Apr 2017
Old 09-14-2018 , 15:45   Re: Bullet Speed Management
Reply With Quote #21

Quote:
Originally Posted by EFFx View Post
Yeah, when I reload the thread I thought about that way...

Lemme ask you a question, how would you suggest to manage the damage when the bullet gets through a wall? Like damage / times_that_the_bullet_gets_through_the_wall?
To do this accurately one must know:
Weapon base damage, Texture(type of a wall), ammo type penetration(this can be researched on youtube since there are tons of movies about ammo penetration), distance.


For example you hit wall with texture duct_XXX. So you've hit a ventilation shaft. We are gonna ignore thickness to real life comparison cause vent on cs_assault is simplified for editing(and it's quite thick). We can even do multiple wallshots since awp ammo could propably penetrate like 10 or more thin vent metal plates.

Let's simplify walls, group them into two groups where one only checks if the bullet reached max penetration length and the other checks penetration length, give them damage reduction points:

This is DR per penetration, piercing ammo type divides this by 2, also we must add max penetration(8 or 16 game units/inches):
wooden door 20
metal door 35
metal plate 45
ventilation 15

This is DR per inch of penetration, piercing ammo type divides this by 2:
concrete wall 7-15(i'm not sure, but I think we should pick a number from this range)
wooden wall 7-15
dirt 7-15

impenetrable:
metal wall
thick metal door
everything else

Distance:
lets say normal ammo distance check looks like this:
Code:
damage *= (3000.0 - distance) / 3000.0
piercing:
damage *= (6000.0 - distance) / 6000.0
shotgun:
damage *= (1500.0 - distance) / 1500.0
example:
AK47 through wooden door, distance 1000u:
Code:
36 * 0.84 - (20 / 2) = ~ 20 damage
(weapon base damage * distance modifier - (damage reduction from penetration / 2 because ammo is piercing)
example2:
AK47 through 3 units thick concrete wall, distance 2000u:
Code:
36 * 0.66 - ( (15 / 2) * 3) = 1.26 damage
(bullet HP * distance modifier - ((damage reduction from penetration / 2 because ammo is piercing) * 3 inches)
When fired bullet starts with it's base weapon damage as HP number and with each penetration the bullets HP decreases. When it reaches 0 it's removed from the game.
Texture names and wall types should be listed in a config file, also the plugin should support debug mode where it displays texture name on screen where the player is aiming.

Phew...

Last edited by VoivoDpl; 09-14-2018 at 15:46.
VoivoDpl is offline
EFFx
Veteran Member
Join Date: Feb 2016
Location: São Paulo, Brasil
Old 12-27-2018 , 01:08   Re: Bullet Speed Management
Reply With Quote #22

It's been 3 months and I'm still getting my mind blown everytime I try to read this...
__________________
• Ranking System • AutoMix 5vs5 System
• Web Ban System • Plugins for free

____________________________________________
For private works:
• Discord: EFFEXo#8850 • Steam: EFFEXo
EFFx is offline
EFFx
Veteran Member
Join Date: Feb 2016
Location: São Paulo, Brasil
Old 03-22-2019 , 23:48   Re: Bullet Speed Management
Reply With Quote #23

Updated to v1.3:
open spoiler below

Spoiler
__________________
• Ranking System • AutoMix 5vs5 System
• Web Ban System • Plugins for free

____________________________________________
For private works:
• Discord: EFFEXo#8850 • Steam: EFFEXo
EFFx is offline
DJEarthQuake
Veteran Member
Join Date: Jan 2014
Location: Astral planes
Old 05-06-2019 , 22:16   Re: Bullet Speed Management
Reply With Quote #24

@EFFx. Thank you for the custom version.
__________________
DJEarthQuake is offline
pakgamerz
AlliedModders Donor
Join Date: Aug 2017
Old 09-05-2019 , 14:33   Re: Bullet Speed Management
Reply With Quote #25

how to fix this?


] amx_cvar slowbullet_show_damage
[AMXX] Unknown cvar: slowbullet_show_damage
pakgamerz is offline
EFFx
Veteran Member
Join Date: Feb 2016
Location: São Paulo, Brasil
Old 09-05-2019 , 19:10   Re: Bullet Speed Management
Reply With Quote #26

I've removed the hud damage displayment on the v1.3 update.

Just to let someone who wants to know, i'm currently working on bullet penetration, it could take too long because i'm currently no longer with free time to work on such hard thing, but i'm trying my best to.
__________________
• Ranking System • AutoMix 5vs5 System
• Web Ban System • Plugins for free

____________________________________________
For private works:
• Discord: EFFEXo#8850 • Steam: EFFEXo

Last edited by EFFx; 09-05-2019 at 19:12.
EFFx is offline
DJEarthQuake
Veteran Member
Join Date: Jan 2014
Location: Astral planes
Old 10-02-2019 , 15:58   Re: Bullet Speed Management
Reply With Quote #27

Thank you for non-cstrike version attempt. Today I finally got the time test. It needs more than the cstrike excluded. It just won't work or load without crashing on Half-life please set the Modification to Counter-strike instead of All.

Code:
FATAL ERROR (shutting down): Host_Error: EV_Precache:  file events/decal_reset.sc missing from server
Quote:
BFD: Warning: /home/topsecret/Steam/steamapps/common/Half-Life/core is truncated: expected core file size >= 181309440, found: 1081344.
Cannot access memory at address 0xb774f91c
Cannot access memory at address 0xb774f918
Python Exception <class 'gdb.MemoryError'> Cannot access memory at address 0xbf88f2e0:
debug.cmds:1: Error in sourced command file:
Cannot access memory at address 0xbf88f2e0
email debug.log to [email protected]
Once I put event into Gearbox directory it loaded right up but does not work for a few reasons.

1st.
Invalid event (name "HLTV") (plugin "testing/bulletspeed-custom.amxx")

2nd.
The weapon event list is strictly for cstrike as is everything CSW_ ,which is all of it.

3rd.
Please update with register_concmd. I had to go back to this website instead of type amx_help to find anything about the plugin.


My original question.

"Do you have any snippets I could use to either make the bullet veer to the right or left please? I am working on adding windage in one of my mods. I saw your work -- would give you proper credit of course. I can see how the gravity or speed could work out if the wind is blowing at or behind the shooter. I have the data feed and the direction of the wind comes as speed and degrees so 180 degree wind would be blowing at the shooter and say gravity or speed could be adjusted."
Attached Files
File Type: sma Get Plugin or Get Source (bulletSpeed-custom.sma - 123 views - 14.1 KB)
__________________

Last edited by DJEarthQuake; 12-17-2020 at 02:17. Reason: This is NOT a modification for all but has major potential.
DJEarthQuake is offline
EFFx
Veteran Member
Join Date: Feb 2016
Location: São Paulo, Brasil
Old 12-16-2020 , 21:36   Re: Bullet Speed Management
Reply With Quote #28

Updated to v1.4
open spoiler below

Spoiler


Still workin' on bullet penetration...
__________________
• Ranking System • AutoMix 5vs5 System
• Web Ban System • Plugins for free

____________________________________________
For private works:
• Discord: EFFEXo#8850 • Steam: EFFEXo

Last edited by EFFx; 12-16-2020 at 22:48.
EFFx is offline
DJEarthQuake
Veteran Member
Join Date: Jan 2014
Location: Astral planes
Old 12-17-2020 , 02:02   Re: Bullet Speed Management
Reply With Quote #29

Tested this. Thoroughly enjoyed it. Up for porting bullet tracers to all mods? Possibly as a lighter weight plugin.
__________________
DJEarthQuake is offline
EFFx
Veteran Member
Join Date: Feb 2016
Location: São Paulo, Brasil
Old 12-17-2020 , 04:48   Re: Bullet Speed Management
Reply With Quote #30

Isn't it already working with everything? Doesnt the forward gets called when the player is killed by the bullet?
__________________
• Ranking System • AutoMix 5vs5 System
• Web Ban System • Plugins for free

____________________________________________
For private works:
• Discord: EFFEXo#8850 • Steam: EFFEXo
EFFx is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 04:02.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode