[0.10.24] The inns of ReligionCult [RESOLVED 0.10.27]

Locked
User avatar
KovuCougar
Posts: 61
Joined: Thu Aug 27, 2020 3:32 am

[0.10.24] The inns of ReligionCult [RESOLVED 0.10.27]

Post 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 2419 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.
Attachments
SAVE1.zip
(863.59 KiB) Downloaded 109 times

User avatar
Interkarma
Posts: 7236
Joined: Sun Mar 22, 2015 1:51 am

Re: [0.10.24] The inns of ReligionCult

Post 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.

User avatar
Hazelnut
Posts: 3015
Joined: Sat Aug 26, 2017 2:46 pm
Contact:

Re: [0.10.24] The inns of ReligionCult

Post 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.
See my mod code for examples of how to change various aspects of DFU: https://github.com/ajrb/dfunity-mods

User avatar
Interkarma
Posts: 7236
Joined: Sun Mar 22, 2015 1:51 am

Re: [0.10.24] The inns of ReligionCult

Post 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;
}

User avatar
Hazelnut
Posts: 3015
Joined: Sat Aug 26, 2017 2:46 pm
Contact:

Re: [0.10.24] The inns of ReligionCult

Post 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.
See my mod code for examples of how to change various aspects of DFU: https://github.com/ajrb/dfunity-mods

User avatar
Interkarma
Posts: 7236
Joined: Sun Mar 22, 2015 1:51 am

Re: [0.10.24] The inns of ReligionCult

Post 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?

User avatar
Hazelnut
Posts: 3015
Joined: Sat Aug 26, 2017 2:46 pm
Contact:

Re: [0.10.24] The inns of ReligionCult

Post 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.
See my mod code for examples of how to change various aspects of DFU: https://github.com/ajrb/dfunity-mods

User avatar
Interkarma
Posts: 7236
Joined: Sun Mar 22, 2015 1:51 am

Re: [0.10.24] The inns of ReligionCult

Post 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

User avatar
Hazelnut
Posts: 3015
Joined: Sat Aug 26, 2017 2:46 pm
Contact:

Re: [0.10.24] The inns of ReligionCult

Post 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.
See my mod code for examples of how to change various aspects of DFU: https://github.com/ajrb/dfunity-mods

User avatar
Interkarma
Posts: 7236
Joined: Sun Mar 22, 2015 1:51 am

Re: [0.10.24] The inns of ReligionCult

Post by Interkarma »

Ah, sorry I misunderstood. :)

Locked