Mister X Posted April 20, 2023 Posted April 20, 2023 Heyho, I have the following problem: I want to use a Message object to show some bounty and the crime faction it was added to. The gold amount is no problem, that's done by the float arguments of the Message.Show() function, but how can I receive the display name of the faction? The environment: I have a "Start Game Enabled" quest that holds the PlayerRef and a crime victim ref. The VictimRef gets filled via Papyrus each time the crime happens. Then I want to show a message that tells the player the amount and the faction the bounty was added to. My idea is: if the victim is member of a crime faction, then add the gold to that faction. If not, then add the bounty to the current hold's crime faction. So I need some text replacement to show the display name of the crime faction. I couldn't test it, but I hope that the text replacement <Alias.CrimeFaction=VictimRef> does work if the victim is member of a Crime faction. But if not, how can I show the name of the hold's crime faction instead?
traison Posted April 21, 2023 Posted April 21, 2023 Do factions even have names? I mean I'm looking at the faction script here and there's a distinct lack of "GetName()" in there. I realize script methods != a quest alias, my point is is this even a concept that exists in Skyrim?
Mister X Posted April 21, 2023 Author Posted April 21, 2023 Factions inherit from the Form script, and there's the GetName() function. And I checked that first, of course: Beth was so smart to give crime faction the same name of the faction they belong to. For Crime factions of a hold, it's the Hold name. Meaning the crime faction with the name "CrimeFactionWhiterun" returns "Whiterun" as name, "CrimeFactionSons" returns "Stormcloaks" and so on. Currently I just use that and a Papyrus notification, but that's not easy to translate. I just want to go good practice and try to use messages for any common output. But I got an idea: using a generic ReferenceAlias, eg for a xMarker, and rename it using [ObjectReference].SetDisplayName() to change it to the name of the faction. THen I could use that Display name to create the message. Weird work around, I know, but for some reason I want to try if it works ^^
traison Posted April 21, 2023 Posted April 21, 2023 1 hour ago, Mister X said: Factions inherit from the Form script, and there's the GetName() function. Hm, totally missed that.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now