GW2Raidar / gw2raidar

A log parsing website for Guild Wars 2 combat logs
http://www.gw2raidar.com
GNU General Public License v3.0
20 stars 14 forks source link

EVTC change that will happen eventually #316

Closed deltaconnected closed 5 years ago

deltaconnected commented 6 years ago

The last 3 episodes have bumped skill ID's from 40,000 (expansion) to 52,500 (this LS episode) so I've got probably half a year before the cbtevent struct blows up (skillid > u16 max). There's plenty that could be nice-ified in evtc but until there's some hard limit I'm leaning towards keeping what works.

What it is now:

/* combat event - for logging (original struct, when byte12 == 0)  */
typedef struct cbtevent {
    uint64_t time;
    uintptr_t src_agent;
    uintptr_t dst_agent;
    int32_t value;
    int32_t buff_dmg;
    uint16_t overstack_value;
    uint16_t skillid;
    uint16_t src_instid;
    uint16_t dst_instid;
    uint16_t src_master_instid;
    uint8_t iss_offset;
    uint8_t iss_offset_target;
    uint8_t iss_bd_offset;
    uint8_t iss_bd_offset_target;
    uint8_t iss_alt_offset;
    uint8_t iss_alt_offset_target;
    uint8_t skar;
    uint8_t skar_alt;
    uint8_t skar_use_alt;
    uint8_t iff;
    uint8_t buff;
    uint8_t result;
    uint8_t is_activation;
    uint8_t is_buffremove;
    uint8_t is_ninety;
    uint8_t is_fifty;
    uint8_t is_moving;
    uint8_t is_statechange;
    uint8_t is_flanking;
    uint8_t is_shields;
    uint8_t pad63;
    uint8_t pad64;
} cbtevent;

What it will likely be:

/* combat event - for logging (revision 1, when byte12 == 1) */
typedef struct cbtevent1 {
    uint64_t time;
    uintptr_t src_agent;
    uintptr_t dst_agent;
    int32_t value;
    int32_t buff_dmg;
    uint32_t overstack_value;
    uint32_t skillid;
    uint16_t src_instid;
    uint16_t dst_instid;
    uint16_t src_master_instid;
    uint16_t dst_master_instid;
    uint8_t iff;
    uint8_t buff;
    uint8_t result;
    uint8_t is_activation;
    uint8_t is_buffremove;
    uint8_t is_ninety;
    uint8_t is_fifty;
    uint8_t is_moving;
    uint8_t is_statechange;
    uint8_t is_flanking;
    uint8_t is_shields;
    uint8_t pad60;
    uint8_t pad61;
    uint8_t pad62;
    uint8_t pad63;
    uint8_t pad64;
} cbtevent1;

Notably skillid us up to u32, overstack_value is up to u32, a matching dst_master_instid was added, and my internal sorting/tracking bytes were removed. In theory it should be as easy as using the "new" struct and writing a cbtevent.=cbtevent1. operator or function to assign everything if old revision.

It's not set in stone yet but will probably be how it ends up, I'll b watching this for comments and suggestions

deltaconnected commented 6 years ago

Today's build can generate "new" logs if you add in a new_cbtevent=1 key under [main] in the ini. I didn't actually test it (but given nothing broke I assume it works)

merforga commented 6 years ago

Thanks! Do you have a plan on when you're going permanently switch over?

deltaconnected commented 6 years ago

Nope. Still plenty time before we hit the skillid ceiling, so I've no problem waiting til everyone's got their code in place. The only thing I can't do with the old struct is cast my way to storing 6 floats for effect info but that was rip anyway for now - position logging was also denied originally

merforga commented 5 years ago

New Logs.zip

merforga commented 5 years ago

Version 2.2.6 released on 2018-10-05 10:41:35