Hunters Performance Review OBSE

Post » Mon Mar 14, 2011 9:19 pm

trollf's http://www.tesnexus.com/downloads/file.php?id=6821 is really nice, at least for those of us who like meaningless statistics, but it doesn't recognize mod added creatures/NPCs, which makes it rather useless with MMM/FCOM as many if not most enemies are. I remember trying to add creatures to it but then you had to split up the script in lots of parts etc. IIRC. And I'm rather illiterate when it comes to scripts at that. Anyway, I wonder if not OBSE functions would be perfect for such a mod, i.e. a mod counting creature kills from all mods you're using? Not an expert on OBSE to say the least but it just seems like one of those plugins that might even be a piece of cake with OBSE?
User avatar
Jack Moves
 
Posts: 3367
Joined: Wed Jun 27, 2007 7:51 am

Post » Tue Mar 15, 2011 7:21 am

Never seen this mod in actual use, but from looking at it, I would think creating something similar that works for all actors (including the mod-added) would be doable. What I would do was to start with an empty array. Whenever an actor was killed, its base object id is looked up in the array. If the base object id doesn't exist, it is added as a new entry in the array with kill count 1. If it already exists, the kill count is incremented.

When displaying the kill stats, it is a matter of looping through the array, extracting the name and kill number and printing the info. Grouping could be a bit of trouble, but there's some general functions to do some grouping (IsCreature, GetCreatureType, GetClass, etc.)


There's of course a bit more to it, but it doesn't seem too difficult.
User avatar
DAVId MArtInez
 
Posts: 3410
Joined: Fri Aug 10, 2007 1:16 am

Post » Tue Mar 15, 2011 9:40 am

Whenever an actor was killed, its base object id is looked up in the array. If the base object id doesn't exist, it is added as a new entry in the array with kill count 1. If it already exists, the kill count is incremented.


I wonder if mod added kills are stored in the save? They should be, right? You have a count of Creatures killed with the vanilla game and Hunters Performance Review works with any save.
User avatar
mollypop
 
Posts: 3420
Joined: Fri Jan 05, 2007 1:47 am

Post » Tue Mar 15, 2011 5:50 am

I wonder if mod added kills are stored in the save? They should be, right? You have a count of Creatures killed with the vanilla game and Hunters Performance Review works with any save.

You're rigth. I didn't know a function like GetDeadCount existed. It takes a base actor ID as input and returns the number of dead actors of that type. Assuming this function works well for modd-added actors, the problem is then to build the list of base actor IDs to use it with. AFAIK, there's no such function as a "GetAllBaseActors ", so the base actor IDs probably have to be collected on the fly. That could be done by scanning the loaded cells looking for actors now and then, and adding the found base actor IDs to an array of actors to display stats for. This means that while you then can get kill stats of mod added actors you killed before installing the stat mod, you will not see it in the list until you've met at least one such actor after installing the stats mod.

Of course, this array could be pre-built with all vanilla Oblivion actors, and could easily have pre-built array sections for MMM, OOO, etc - that were added if those mods are loaded. The actor lists can be exported with WB and easily (with some search/replace) be made into an OBSE array.
User avatar
maria Dwyer
 
Posts: 3422
Joined: Sat Jan 27, 2007 11:24 am

Post » Tue Mar 15, 2011 5:44 am

You're rigth. I didn't know a function like GetDeadCount existed. It takes a base actor ID as input and returns the number of dead actors of that type. Assuming this function works well for modd-added actors, the problem is then to build the list of base actor IDs to use it with. AFAIK, there's no such function as a "GetAllBaseActors ", so the base actor IDs probably have to be collected on the fly. That could be done by scanning the loaded cells looking for actors now and then, and adding the found base actor IDs to an array of actors to display stats for. This means that while you then can get kill stats of mod added actors you killed before installing the stat mod, you will not see it in the list until you've met at least one such actor after installing the stats mod.

Of course, this array could be pre-built with all vanilla Oblivion actors, and could easily have pre-built array sections for MMM, OOO, etc - that were added if those mods are loaded. The actor lists can be exported with WB and easily (with some search/replace) be made into an OBSE array.


Thanks! So possible and not THAT difficult then? Makes me itch a bit to learn up on arrays/OBSE and tinker with it. :)
User avatar
Hella Beast
 
Posts: 3434
Joined: Mon Jul 16, 2007 2:50 am


Return to IV - Oblivion