Page 1 of 1

[0.10.24] The inns of ReligionCult [RESOLVED 0.10.27]

Posted: Wed Sep 16, 2020 12:11 am
by KovuCougar
This is possibly classic Daggerfall behaviour, but figured I'd post it, since I didn't see it already in the Forums to verify.

I got to the Shrine of Ephen on a holy day, and (16th Sun's Dawn) and the text popped up explaining it, but in the middle explaining the benefit was:

"the inns of the ReligionCult offer a free room for visitors."

In cities ReligionCult seems to be replaced by a descriptor for the city type (in Aldmore it's replaced by Hamlet, for example), but since I'm at a Shrine, possibly without a dominant 'religion' or possibly because it's not a real city with inns, it doesn't know what to do.

If this is Classic behaviour, don't know if it's a place to fix a cosmetic bug :D
ReligionCult.jpg
ReligionCult.jpg (129.89 KiB) Viewed 2493 times
If you want to see it in action, I'm attaching a save. Just walk forward toward the shrine and the message will appear pretty quick.

Re: [0.10.24] The inns of ReligionCult

Posted: Wed Sep 16, 2020 12:59 am
by Interkarma
The original text is "the inns of the %ct". We expand this to CityType, which can result in the raw location type being shown in text. Looks like we need to take a look at the %ct macro expansion. I'll move this one to bug reports.

As a note to self, this expansion also needs to support localization and not present enum value as text.

Re: [0.10.24] The inns of ReligionCult

Posted: Wed Sep 16, 2020 4:17 pm
by Hazelnut
It's possible this is a mis-match between the holiday trigger location types and the city types handled by the %ct macro, definitely appear to have missed the cults and so it falls through and uses the enum value text. Pretty sure it's because I didn't know what they were at the time. That's easy enough to add and I can submit a PR soon.

However, I notice that the holiday code appears to be setup to fire for any location types other than your ship or covens - so that would include dungeons etc which don't appear to be appropriate for the %ct macro. I've never seen a holiday text pop up at a dungeon location, so maybe there's some conditional I missed when looking over the code, but that could be an issue too.

Re: [0.10.24] The inns of ReligionCult

Posted: Wed Sep 16, 2020 8:23 pm
by Interkarma
Thanks for looking into %ct macro Hazelnut. Happy to take a PR when you have time. :)

Dungeons are filtered out because PlayerEnterExit.PlayerGPS_OnEnterLocationRect() handles dungeon types first, then location types other than covens and ships, and that's where holiday text is primed. It would be easy enough to further exclude cults and covens with a conditional like below wrapping the holiday primer starting from line 1337.

Code: Select all

if (location.MapTableData.LocationType != DFRegion.LocationTypes.ReligionCult &&
    location.MapTableData.LocationType != DFRegion.LocationTypes.Coven)
{
    if (holidayTextTimer <= 0 && !holidayTextPrimed)
    {
        holidayTextTimer = 2.5f; // Short delay to give save game fade-in time to finish
        holidayTextPrimed = true;
    }
    holidayTextLocation = GameManager.Instance.StreamingWorld.CurrentPlayerLocationObject;
}

Re: [0.10.24] The inns of ReligionCult

Posted: Thu Sep 24, 2020 9:50 pm
by Hazelnut
Submitted a PR but the git commit only found my code change and ignored the localization text addition I made. Not sure what to do.

Re: [0.10.24] The inns of ReligionCult

Posted: Fri Sep 25, 2020 12:01 am
by Interkarma
Should be all taken care of now. I've added the new text (key="temple", string="temple"), rebuilt addressables on master, and merged your changes.

Dunno why git didn't pick up your changes. Did you save project after editing in string table editor?

Re: [0.10.24] The inns of ReligionCult

Posted: Fri Sep 25, 2020 9:15 am
by Hazelnut
Save the project? Nope. I save code changes but I don't really make changes in Unity. I will do that next time.

Re: [0.10.24] The inns of ReligionCult

Posted: Fri Sep 25, 2020 11:22 am
by Interkarma
Localisation string tables must be edited in unity using the string table editor editor. There are multiple dependencies on shared data and key generation, so we can't add these directly to JSON.

I'll cover all this stuff in the tutorial series. I have more time now that 0.10.26 is out. :D

Re: [0.10.24] The inns of ReligionCult

Posted: Fri Sep 25, 2020 11:37 am
by Hazelnut
Interkarma wrote: Fri Sep 25, 2020 11:22 am Localisation string tables must be edited in unity using the string table editor editor.
Yep I figured that out and did it, but didn't save anything as I am not used to making unity changes.

Re: [0.10.24] The inns of ReligionCult

Posted: Fri Sep 25, 2020 7:09 pm
by Interkarma
Ah, sorry I misunderstood. :)