ArchipelagoMW-HollowKnight / Archipelago.HollowKnight

Hollow Knight mod enabling Archipelago multiworld interoperability.
MIT License
6 stars 10 forks source link

Add text plando support for lore tablets/NPC dialogue #191

Closed Zhetadelta closed 1 year ago

Zhetadelta commented 1 year ago

Link to the Past is the only game on Archipelago that supports text plando setting, and I think it would be fun to allow that feature to be used to add text into the game.

I actually went and implemented this in a few hours today before reading the contribution guidelines because I wanted it as a personal thing, but I realized that since it's fully functional I might as well offer this functionality to the main repo.

It requires modifications to the archipelago generation and server (which I also implemented today) and a small text changing mod that I also wrote today. All of these forks are visible on my profile if you wanted to try them out. Should I submit a pull request after tidying up the code?

BadMagic100 commented 1 year ago

I would not be inclined to merge this as Custom Knight's Swapper feature can provide this functionality - incidentally this means your TextChanger mod is redundant (though I suppose it is much more lightweight than CK if all you care about is the text, for some reason).

I don't particularly see the value of including it in Archipelago because it is primarily a cosmetic option rather than a functional one - the only reason it makes sense for ALTTP is because Archipelago is generating the ROM patch, so it's somewhat of a necessity to support the feature. That is not the case here.

BadMagic100 commented 1 year ago

As an additional note I certainly wouldn't support adding a required dependency (as you are doing in your implementation now) on either TextChanger or CK to support this in Archipelago even if I were persuaded to add the feature

Zhetadelta commented 1 year ago

The benefit of adding this into Archipelago is that it would enable the in-game text to be entirely dependent on randomized items/locations with YAML triggers. There could be things such as (as an example) Cornifer in the Basin giving a hint on where the Void Heart is, without the player needing to add the string manually and spoiling the "surprise" as it were. The Archipelago YAML snippet about the LTTP "mercenary" mode was the main inspiration for this, actually.

Regarding the additional dependency, if this is something you'd be willing to add then I could easily move my code over into this mod to fix that issue.

BadMagic100 commented 1 year ago

Hmm, that is intriguing. I will check the discord and see if other people would be interested in this.

My proposed implementation approach would then probably be to use Custom Knight's API as an optional dependency - this can be done pretty easily with a ModHooks.GetMod query and then isolating the code that calls CK into another class. That way we don't actually have to reinvent/maintain the text swapping code but also people are only forced to have the extra mod installed if they want the feature, rather than to make the mod run at all

Zhetadelta commented 1 year ago

I ended up making a "proof of usability" with this feature; I've got a YAML that sets up the game such that the void heart items are locked behind three random bosses, and Elderbug tells you where one of them is. The other two are on the plaques in Mantis Village and one of them is guaranteed to be a dream boss. It's pretty fun!

BadMagic100 commented 1 year ago

I'd be interested to see the yaml

Zhetadelta commented 1 year ago

Mantis Headhunt.zip

If you're trying it out, make sure to change the name field. Most of the settings can be changed to anything you want, though some settings will get safely overwritten by the triggers if they conflict with the mode. Notably, that radiance is the goal, a starting inventory with the mantis items, and randomized nail+swim to keep it from being too easy.

BadMagic100 commented 1 year ago

Nah, I was just looking at what the user experience would be like. I don't like using sheet-key pairs here (even though it's a simpler implementation) because I don't expect the even the most powerful power user (on average) to know the sheets and keys for language strings, which would really heavily diminish the value of the feature.

Also as an aside your setup for start geo was very amusing when random-range-MIN-MAX exists lol

Zhetadelta commented 1 year ago

Fair enough. I'll just keep my fork for personal use then