server icon indicating copy to clipboard operation
server copied to clipboard

[Module] Create module for quest workarounds

Open hooksta4 opened this issue 1 year ago • 10 comments

I affirm:

  • [x] I understand that if I do not agree to the following points by completing the checkboxes my PR will be ignored.
  • [x] I understand I should leave resolving conversations to the LandSandBoat team so that reviewers won't miss what was said.
  • [x] I have read and understood the Contributing Guide and the Code of Conduct.
  • [x] I have tested my code and the things my code has changed since the last commit in the PR and will test after any later commits.

What does this pull request do?

Allows players to complete the quest Wish Upon a Star. Currently, Bastok does not have a "NONE" weather and therefore will never take the fallen star item. Adding sunshine (clear) remediates this.

Adds an or player:getWeather() == xi.weather.SUNSHINE

Steps to test these changes

Run through the quest players will now be able to complete the quest.

hooksta4 avatar May 24 '24 19:05 hooksta4

Would the right thing to do here be to give Bastok NONE weather?

zach2good avatar May 26 '24 12:05 zach2good

Looking at my weather tracker on retail: image

zach2good avatar May 26 '24 12:05 zach2good

Would the right thing to do here be to give Bastok NONE weather?

Yes, that would be the correct fix.

hooksta4 avatar May 26 '24 12:05 hooksta4

image

zach2good avatar May 26 '24 12:05 zach2good

db.zip

Here is my current sqlite db for the weather reporter, there should be enough information in there to get you started, plus the query in the SS above.

zone.cpp explains in great detail how to set up weather information for zones:


/*************************************************************************
 *                                                                        *
 *  Loads weather for the zone from zone_bweather SQL Table               *
 *                                                                        *
 *  Weather is a rotating pattern of 2160 vanadiel days for each zone.    *
 *  It's stored as a blob of 2160 16-bit values, each representing 1 day  *
 *  starting from day 0 and storing 3 5-bit weather values each.          *
 *                                                                        *
 *              0        00000       00000        00000                   *
 *              ^        ^^^^^       ^^^^^        ^^^^^                   *
 *          padding      normal      common       rare                    *
 *                                                                        *
 *************************************************************************/

void CZone::LoadZoneWeather()
{
    TracyZoneScoped;
    static const char* Query = "SELECT weather FROM zone_weather WHERE zone = %u";

zach2good avatar May 26 '24 12:05 zach2good

Reason I won't accept this (as I explained once in a stream) is that if this goes in, it'll never be properly fixed because it's so small an innocuous. All the information to do it properly is available.

zach2good avatar May 26 '24 12:05 zach2good

That's fair.

hooksta4 avatar May 26 '24 12:05 hooksta4

If you're not able to do the weather data breakdown, you can change this PR to provide a 'workarounds' Lua module that changes this condition using xi.module.modifyInteractionEntry, which will be off by default.

zach2good avatar May 26 '24 13:05 zach2good

In that module, you can provide the steps needed to remedy and get rid of the workaround

zach2good avatar May 26 '24 13:05 zach2good

@zach2good - tested this out good to go. Reverted the original file back to what it is currently.

hooksta4 avatar May 27 '24 00:05 hooksta4

Please don't resolve conversation threads on your own, you've checked this box:

 I understand I should leave resolving conversations to the LandSandBoat team so that reviewers won't miss what was said.

It's there to make reviewers lives easier.

zach2good avatar Aug 04 '24 08:08 zach2good

modules/era/lua/quest_workarounds.lua

This doesn't have anything to do with a specific era, I'm going to pull this down into a different branch and git mv it, and submit it in a new PR (attribution preserved, obviously)

zach2good avatar Aug 04 '24 08:08 zach2good