peace-maker / smrpg

A generic RPG plugin for SourceMod
88 stars 40 forks source link

Experience for Kill does not get credited #385

Closed DeewaTT91 closed 1 year ago

DeewaTT91 commented 1 year ago

Running on Counter Strike Source the kill exp does not work. It always gives 1 exp + bonus headshot exp (this one works correctly). Any Idea why that is?

DeewaTT91 commented 1 year ago

So I played around a bit with changing weapon specific exp and different values. I found that changing knife "exp_damage" to "1" would net me 1* victim level for a kill, regardless of "exp_kill" (which I set at 2).

So to sum up the problem: My smrpg server yields me exp for kills not based on "exp_kill" but based on "exp_damage"

peace-maker commented 1 year ago

That is very weird. Can you uncomment the _DEBUG define in the smrpg_cstrike module and validate the output there?

Could you please paste the contents of your weapon_experience.cfg file as well?

DeewaTT91 commented 1 year ago

// This defines a list of weapons which's experience rates differ from the default setting. // You can give more experience for a kill with a difficult weapon to reward players using it.

// Put the weapon classname as the section key (you might omit "weapon_") // There are a few options: // - "exp_kill": The experience for a kill multiplied by the victim's level. // - "exp_damage": The experience for hurting an enemy multiplied by the damage done. // - "exp_bonus": Extra constant experience to give on top of the regular experience on a kill. // // You don't have to specify each option for each weapon. // It defaults back to the global settings of the smrpg_exp_damage, smrpg_exp_kill and smrpg_exp_kill_bonus convars. // E.g. // // "weapon_knife" // { // "exp_damage" "8.0" // "exp_kill" "15.0" // "exp_bonus" "10" // } "SMRPGWeaponExperience" { "weapon_knife" { "exp_damage" "1.1" } "weapon_usp" { "exp_kill" "0.25" } "weapon_glock" { "exp_kill" "0.25" } "weapon_deagle" { "exp_kill" "0.25" } "weapon_p228" { "exp_kill" "0.25" } "weapon_elite" { "exp_kill" "0.25" } "weapon_fiveseven" { "exp_kill" "0.25" } "weapon_m3" { "exp_kill" "0.25" } "weapon_xm1014" { "exp_kill" "0.25" } "weapon_galil" { "exp_kill" "0.25" } "weapon_ak47" { "exp_kill" "0.25" } "weapon_scout" { "exp_kill" "0.25" } "weapon_famas" { "exp_kill" "0.25" } "weapon_p90" { "exp_kill" "0.25" } "weapon_ump45" { "exp_kill" "0.25" } "weapon_mp5navy" { "exp_kill" "0.25" } "weapon_mac10" { "exp_kill" "0.25" } "weapon_tmp" { "exp_kill" "0.25" } "weapon_m4a1" { "exp_kill" "0.25" }
"weapon_sg552" { "exp_kill" "0.25" }
"weapon_aug" { "exp_kill" "0.25" } "weapon_awp" { "exp_kill" "0.25" } "weapon_g3sg1" { "exp_kill" "0.25" } "weapon_sg550" { "exp_kill" "0.25" } "weapon_m249" { "exp_kill" "0.25" } "weapon_hegrenade" { "exp_damage" "8.8" } "weapon_smokegrenade" { "exp_damage" "1.0" } }

DeewaTT91 commented 1 year ago

I've uncommented _Debug define but when I try to compile it gives me this error: smrpg\scripting\include\smlib\entities.inc(1773) : error 418: deprecated syntax; see https://wiki.alliedmods.net/SourcePawn_Transitional_Syntax#Typedefs

peace-maker commented 1 year ago

You need to get the transitional_syntax branch of smlib. https://github.com/bcserv/smlib/tree/transitional_syntax

DeewaTT91 commented 1 year ago

So the compiling did work. Do I have to do something for it to print out a log file? Because I am not getting anything, even when enabling the debug mode in plugin.smrpg.cfg.

peace-maker commented 1 year ago

There should be some smrpg_experience_Xxx.log in sourcemod/data/

DeewaTT91 commented 1 year ago

Got it. I get lots of lines with exp gains like:

01/19/2023 - 22:31:25: Chet (lvl 1882 [424/1883]) got 168 exp for cs_playerkill Tyler (lvl 1675).

which equals 10%

my settings are: smrpg_exp_damage "0.1" smrpg_exp_kill "0.25"

so exp_kill doesnt seem to be called.

peace-maker commented 1 year ago

Thank you for the detailed report! It's been a regression when updating the plugin for SM 1.11 :/

DeewaTT91 commented 1 year ago

You're welcome. Im glad you're still updating this :)