.:: Bots United ::.  
filebase forums discord server github wiki web
cubebot epodbot fritzbot gravebot grogbot hpbbot ivpbot jkbotti joebot
meanmod podbotmm racc rcbot realbot sandbot shrikebot soulfathermaps yapb

Go Back   .:: Bots United ::. > Developer's Farm > SDK Programming discussions > Half-Life 1 SDK
Half-Life 1 SDK For developments focused around Half-Life (and its mods) Half-Life

Reply
 
Thread Tools
cs weapons modification
Old
  (#1)
BotUser
Member
 
Status: Offline
Posts: 39
Join Date: Jun 2004
Default cs weapons modification - 26-05-2005

Hi all,

I'm notoriously annoyed by the low damage HE grenades inflict in CS
(I'm talking of CS 1.6).

Hence, I decided to tackle on this on my own, such as to write an own metamod plugin in order to modify the HE grenades' damage.

Now the question: can this be done at all ?

How would one do it ? Modify the grenade's damage somehow or alter the damage that is inflicted on a player entity ?

Thanks and regards,

BotUser
  
Reply With Quote
Re: cs weapons modification
Old
  (#2)
Lazy
Member
 
Lazy's Avatar
 
Status: Offline
Posts: 236
Join Date: Jan 2004
Location: Toronto, Ontario, Canada
Default Re: cs weapons modification - 26-05-2005

You can't modify the damage it does but it is possible to fake it by adding more damage after it's been done.
You need to look for the server->client messages that say a grenade is exploding, get the origin and apply damage to people in that radius.
To find out who threw it, do a FindEntityInSphere at the origin and check for grenade entities. The grenade's owner should be in edict_t*->v.owner.

Somewhere on here I posted a function to do damage on players using trigger_hurts, can't find it for some reason but if you can that should work well enough.
  
Reply With Quote
Re: cs weapons modification
Old
  (#3)
BotUser
Member
 
Status: Offline
Posts: 39
Join Date: Jun 2004
Default Re: cs weapons modification - 08-09-2005

Thanks for your input. I browsed through the SDK and I think I could gather what I need (function RadiusDamage to inflict damage, just needs the Vector of the nade, the inflictor, the attacker etc etc).

However, I did not get how to determine if a grenade is exploding to trigger the RadiusDamage function. You're writing about a server->client messages thing. Could you elaborate that a bit more for me poor newbie ? How do I catch the event of an exploding nade ?

Thanks a lot

botuser

PS: yes, I'm, still on the hunt concerning this, though it's a long time I posted my question :-)

Last edited by BotUser; 08-09-2005 at 17:05..
  
Reply With Quote
Re: cs weapons modification
Old
  (#4)
Pierre-Marie Baty
Roi de France
 
Pierre-Marie Baty's Avatar
 
Status: Offline
Posts: 5,049
Join Date: Nov 2003
Location: 46°43'60N 0°43'0W 0.187A
Default Re: cs weapons modification - 08-09-2005

All grenades explode after the same amount of time. You could start a timer when the grenade is fired? (that's the simplest of the solutions, perhaps not the most elegant, ok).



RACC home - Bots-United: beer, babies & bots (especially the latter)
"Learn to think by yourself, else others will do it for you."
  
Reply With Quote
Re: cs weapons modification
Old
  (#5)
BotUser
Member
 
Status: Offline
Posts: 39
Join Date: Jun 2004
Default Re: cs weapons modification - 08-09-2005

Hi PMB,but that seems to boil down to the same problem. Finding out the point of time when a grenade is thrown would require me to react to a "throw-event" as well.

Maybe I didn't get it right. Please bear with me.

On the other hand, I'd like to not just make it work, but do it in the "right" way.
So if someone could kindly enlighten me concerning this message interception from server to client regarding an explosion event.

Thanks

botuser

Last edited by BotUser; 08-09-2005 at 18:02..
  
Reply With Quote
Re: cs weapons modification
Old
  (#6)
Pierre-Marie Baty
Roi de France
 
Pierre-Marie Baty's Avatar
 
Status: Offline
Posts: 5,049
Join Date: Nov 2003
Location: 46°43'60N 0°43'0W 0.187A
Default Re: cs weapons modification - 08-09-2005

I don't know by heart the type of message that is fired when a grenade explodes, but if I were you, here's what I'd do:

First, I'd download PMTools (get it from the filebase) and I'd set it to log all network messages to a text file with full details on.

Then, I'd run a game, spawn, buy a grenade, throw it, let it explode and after that I'd quit.

All the details about the network message that is involved when a grenade explodes will be in the PMTools log file you specified.

Then, in order to know how to hook a network message, I'd just look at the PMTools source code, since that's basically what it does



RACC home - Bots-United: beer, babies & bots (especially the latter)
"Learn to think by yourself, else others will do it for you."
  
Reply With Quote
Re: cs weapons modification
Old
  (#7)
BotUser
Member
 
Status: Offline
Posts: 39
Join Date: Jun 2004
Default Re: cs weapons modification - 09-09-2005

Hi PMB,


many thanks for your suggestions. Well, that sounds like a plan. I'll try that and report back

botuser
  
Reply With Quote
Re: cs weapons modification
Old
  (#8)
The Storm
Council Member / E[POD]bot developer
 
The Storm's Avatar
 
Status: Offline
Posts: 1,618
Join Date: Jul 2004
Location: Bulgaria
Default Re: cs weapons modification - 09-09-2005

I have one question,
PMB where I can find the log file that is exported by PMtools?
  
Reply With Quote
Re: cs weapons modification
Old
  (#9)
BotUser
Member
 
Status: Offline
Posts: 39
Join Date: Jun 2004
Default Re: cs weapons modification - 09-09-2005

Hi,

I just used the PMTools plugin to log the messages.

Just enter
logfile "C:\msg.txt"
(for example) in the console to set the logfile output to C:\msg.txt

botuser
  
Reply With Quote
Re: cs weapons modification
Old
  (#10)
BotUser
Member
 
Status: Offline
Posts: 39
Join Date: Jun 2004
Default Re: cs weapons modification - 09-09-2005

So, I had a look at the log which PMTools was spitting out.
Since I didn't know which message to hook into, I had to change the source code a little to have it hook into every message. I didn't find a way to tell PMTools to log just any message. But nevertheless.

What I found is that there seems no special message associated with the detonation of a HE grenade. The only message I got was a "Damage" message since I dropped the nade directly in front of me. Hmmm .....

Well, but if I can get a "Damage" message for an entity, might it be possible to determine the damage inflictor, and if the inflictor is a HE grenade, just modify the damage/health of the respective entity ?

Input more than welcome.

botuser
  
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

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



Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
vBulletin Skin developed by: vBStyles.com