Project Zomboid

Project Zomboid

Advanced trajectory
Tchernobill 30 Dec, 2022 @ 10:53am
KillCount compatibility
Hi,

When a player kills a Z with a range weapon and this mod active: this mod increases xp directly and OnWeaponHitXp event is not triggered.
When a player kills a Z with a range weapon in Vanilla: xp is increased through OnWeaponHitXp event triggered by SwipeStatePlayer java class.

You could replace your direct xp update
vt[19]:getXp():AddXP(Perks.Aiming, 1);

by a OnWeaponHitXp call similar to vanilla
hittingPlayer:setLastHitCount(1);--do not forget this or you'll have xp gain discrepencies triggerEvent("OnWeaponHitXp",hittingPlayer, weapon, characterTarget, damage);

I am very interested because this OnWeaponHitXp event is used by KillCount mod to distinguish
car kills from weapon kills.
It would also ensure some consistency overtime with Vanilla.

If you do not like this solution but wanna help anyway, you could call an empty global function when killing a Z so that KillCount can override it and use that override to identify kill sources.

Anyway GG for this mod and thanx for the Rollover. :spiffo:
< >
Showing 1-11 of 11 comments
Shurenai 1 Jan, 2023 @ 5:40am 
I second this request- Like the mod, but I'm also using killcount, More Traits and More Traits' dynamic submod; The MT Dynamic submod uses killcount to make certain traits dynamic using killcount as part of it's criteria; EG, kill 1000 zombies with firearms to remove/add the associated trait.

So the way Advanced Trajectory implements exp gain n stuff breaks compatbility with several other mods- Ostensibly with any mod that calls on the onweapon hit thing as described.
Okaminho 15 Jan, 2023 @ 7:47pm 
Yes please!
I'd like for this to be fixed too as it kida doubles the number of kills I've been getting and it might impact the SOTO mod
BloodContact 16 Jan, 2023 @ 12:43pm 
:steamthis: :steamthumbsup:
The Bread Stealer 19 Jan, 2023 @ 9:24pm 
Has this been fixed?
Dovahkiin 30 Jan, 2023 @ 9:57pm 
Sorry to bother you but I would like to know where in the Vanilla version "OnWeaponHitXp" is called.
I just started trying to test some mods and don't know how to start
Fraywind 17 Feb, 2023 @ 12:15pm 
Came here just for this, I like the mod but the lack of KillCount compatibility does make it difficult to use with the other listed mods.
UshankaMan 20 Mar, 2023 @ 10:03pm 
is the mod fixed yet? ive been aware of it for a long time but never got it due to this exact reason. i am still waiting for a fix
Gato Sexo 24 Mar, 2023 @ 1:22pm 
nah
Tchernobill 4 May, 2023 @ 8:38pm 
This is corrected with update 4 :D
喵了个球  [developer] 5 May, 2023 @ 6:24pm 
Thank you for your suggestion
< >
Showing 1-11 of 11 comments
Per page: 1530 50