eliasdoehne / stellaris-dashboard

A graph dashboard and event log for Stellaris.
122 stars 14 forks source link

Update leader historical events #115

Closed MichaelMakesGames closed 2 months ago

MichaelMakesGames commented 8 months ago

Leaders have received quite a few changes with the 3.8 / Paragons update.

For reference, here are the leader events currently implemented:

    # tied to a specific leader:
    ruled_empire = enum.auto()
    governed_sector = enum.auto()
    research_leader = enum.auto()
    faction_leader = enum.auto()
    leader_recruited = enum.auto()
    leader_died = enum.auto()  # TODO
    level_up = enum.auto()
    fleet_command = enum.auto()

With 3.8, research_leader and faction_leader are no longer relevant. New events could be added for appointed_to_council, governed_planet, leader_retired (retirement already existed, but is more common post-3.8), and heir_appointed (this is also not new to 3.8).

Potentially, new events could also be added for leader_gained_subclass_trait and leader_gained_destiny_trait (or an event for any gained trait, but that might be too much).

It's worth noting that 3.10, due to be released before the end of the year, will include significant changes to leaders, so it probably makes sense to wait until that's released before working on this.

eliasdoehne commented 8 months ago

I started some related work a while ago in this branch but never finished it, it adds some events for council appointments, and at least this part still seems to work: image

Your other comments:

I can pick this topic up again this weekend. I think it could be a good step to get back into the code, and if the next release changes things, then so be it... :D

MichaelMakesGames commented 8 months ago

I'm sure something broke about tracking leader traits, so I assume things are represented differently in the save files now. I'd that first and then decide how granular to track this

Not sure what you mean about something breaking... I don't see any code (at least on master) for tracking leader traits; only species traits. Leader traits are a list of strings in the traits property of leader gamestate.

Retirement vs death was previously not distinguishable in the save file

Ah, looks like that is still the case. It might be worth changing the message for the leader_died event to mention retirement instead of just "died or was fired", since that happens a fair amount now.

I can pick this topic up again this weekend. I think it could be a good step to get back into the code, and if the next release changes things, then so be it... :D

Glad to hear I'm rekindling your interest :) Btw the new update just got a release date for Nov 16. Hopefully we'll get some details on the leader rework in tomorrow's DD

eliasdoehne commented 8 months ago

Good to know about that release date, that's really soon! I'll still spend a bit of time on leaders before then, just to get back into the code.

Not sure what you mean about something breaking... I don't see any code (at least on master) for tracking leader traits; only species traits. Leader traits are a list of strings in the traits property of leader gamestate.

You're right, I confused it with leader level ups but those seem to work. Anyway I got started on the traits, it's not too complicated.

died or was fired

I never liked that message much anyway, retired sounds much better. :+1:

MichaelMakesGames commented 2 months ago

Implemented in 7cabf081af69bb8367e4ec1cabba551e39851bcc