I edited the
Superlogs: PVKII plugin to work for "Territory" gamemode. I used the
gamemode_territory_capture event to reward all players who participated in a capture with points. I started a
discussion on alliedmods.net, because the updated plugin didn't seem to work. A scripter fixed my syntax and told me that the event could be broken somehow.
The already included functions in Superlogs for the events
chest_capture and
player_objective work perfectly. The problem is:
So my questions are the following:
- Are the listed PVKII events still up to date?
- Did I choose the right "territory"-specific event and is it functional?
Comments
If I remember correctly, the event list is somewhere in the client's installation tree. I'm not seeing a copy on my server. Would you mind uploading the latest version here? I'd be happy to update the wiki as necessary.
Author of PVKII Randomizer
Author of PVKII WeaponsMaster
The file looks like it agrees with what is on the wiki. It certainly looks like you got the right event.
Does the event ever get fired? Or are the userids still just not working correctly.
Author of PVKII Randomizer
Author of PVKII WeaponsMaster
Here's his version:
Shouldn't it atleast output the string I received? Even if the function below would be wrong, it should print the string.
You can be totally sure by using the chat call at the beginning with a straight "TerritoryCapture called" event message.
Also, just to be sure, is the event hooked properly?
Author of PVKII Randomizer
Author of PVKII WeaponsMaster
Author of PVKII Randomizer
Author of PVKII WeaponsMaster
Edit:
McFlurry: "So that means that the userids string is never filled by the event. I would contact the mod developers about that."
Either the code is wrong or the reason above.
They were originally to be userid's but they can go out of bounds of a char size while player entindices will not at our player limits
Also there is no delimiters in this string. Each character of the string should be converted to its integer value and you will have the entindex of the player. It is more than likely that most output of this data as a string will be gibberish as 33 or so down to 1 will be the contents of each character (0 also means that the end of the list has been reached as player entindices start at 1
Player Objective is only used by the death notice hud to display notices to the hud about objectives. So only score events that are showing something there will output player_objective event
For tracking doing objective related things there is player_points which can work. I will add the enum for what each score id is for next patch in the comments, but I can post it here when I am home. Anytime someone triggers a score type the player_points will fire with the id of the score type triggered.
We are already able to log all current objectives, including a territory capture.
My intention was to separate the points in "Territory" from the ones in "Booty" and other objectives.
Here are the scoretypes
Unknown = -1
Kill = 0
Assist = 1 (and so on...)
Death = 2 (A death where the player isn't penalized)
Suicide = 3(A death where the player is penalized) (I think there is a rare case this will trigger falsely because trigger_falldeath can be set to not cause suicides in which case the trigger_falldeath just decrements this score type so the player_points for the suicide still gets sent out even though it technically should not)
Kill A Chest Thief Bonus = 4
Assist Killing A Chest Thief Bonus = 5
Return A Stolen Chest = 6
Stealing A Chest = 7 (Grabbing a chest that doesn't belong to you, has some logic to prevent exploiting it, so won't fire multiple times on the same chest or in a short time)
Capture A Chest = 8 (Putting a chest that didn't belong to you into your chest zone)
Capturing A Territory = 9
Protecting A Territory = 10 (Essentially standing around the territory)
Kill An Enemy In An Owned Territory Bonus = 11
Assist Killing An Enemy In An Owned Territory Bonus = 12
Kill An Enemy In An Enemy Territory Bonus = 13
Assist Killing An Enemy In An Enemy Territory Bonus = 14
Grabbing A Trinket = 15
Killing A Trinket Carrier Bonus = 16
Assist Killing A Trinket Carrier Bonus = 17
Staying With Your Trinket Carrier Bonus = 18
Killing An Enemy With Trinket Graces Bonus = 19
Assist Killing An Enemy With Trinket Graces Bonus = 20
Trinket Carrier Bonus For Kills Under His Graces = 21
Nemesis Bonus = 22 (Nemesis gives 0 points, it is mainly there for tracking in scoreboard and a logic vessel for the system)
Revenge Bonus = 23 (Revenge occurs if the enemy killed in LTS has a gold coin in the scoreboard, which is gained when they kill you in a previous round [if the kill was not a revenge kill])