Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feat] Adds A Chocobo Riding Game #6675

Draft
wants to merge 1 commit into
base: base
Choose a base branch
from

Conversation

CriticalXI
Copy link
Contributor

I affirm:

  • I understand that if I do not agree to the following points by completing the checkboxes my PR will be ignored.
  • I understand I should leave resolving conversations to the LandSandBoat team so that reviewers won't miss what was said.
  • I have read and understood the Contributing Guide and the Code of Conduct.
  • 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?

  • Adds A Chocobo Riding Game
  • Adds functionality to three gate glyph teleport scrolls awarded from the race.

Captures are being tracked here

Steps to test these changes

  1. Speak to any starter city or kazham chocobo NPC to begin a race.
  2. Either manually navigate to the destination or !zone
  3. Move to the gate for the destination zone and see a cutscene with a reward associated with the race you did

@CriticalXI
Copy link
Contributor Author

CriticalXI commented Jan 9, 2025

Sorry its a beefy PR 😓 Please let me know if I went about anything the wrong way, happy to tear the whole thing apart if I should have done this a different way.

I put this in a draft because I still need more captures to fully verify the race times. I also need to verify the windurst woods gate glyph teleport location.

Last thing todo still that I was hoping for some help with is to add a vanadiel day check to rotate between the different races in each starter city. I need to follow https://www.mithrapride.org/vana_time/chocoracetable.html and I wasn't quite sure how to accomplish this.

duration = 1800 + (player:getMod(xi.mod.CHOCOBO_RIDING_TIME) * 60)
end

if chocoGame then -- Start A Chocobo Riding Game
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Numeric values are not falsey on 0, so this will always default to true

}

-- Checks if the NPC can start a race and the player hasn't already participated this week
xi.chocoboGame.raceCheck = function(player, npc, zone)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given player and npc, there's probably not a good reason to need to pass zone into this function, as it can be derived

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got that adjusted to get the zone from the player

end

-- Get the event param to tell the player which city race they are offering
xi.chocoboGame.renterOnTrigger = function(player, destination, eventSucceed)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With this and onEventFinish, I'd almost prefer they're named something different if non-conforming to standard functions (onTrigger usually implies player, npc as args, whereas onEventFinish is player, csid, option, npc).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Renaming them to startRaceEvent and beginRace

end

-- Race complete event if a record for this path exists
if recordName then
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As previously, might want to confirm that an empty string is interpreted as false

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My testing showed this working correctly, the messaging from the NPC changed on my test depending on if a record existed or not

@CriticalXI CriticalXI force-pushed the chocobo_riding_game branch 4 times, most recently from 49af687 to c8ae610 Compare January 9, 2025 00:40
@Xaver-DaRed
Copy link
Contributor

I think I would separate the teleport items logic into a separate PR, considering they are "unrelated" enough and quite easy to immediately approve.
6 files are 6 files, after all.

@CriticalXI CriticalXI force-pushed the chocobo_riding_game branch from c8ae610 to 5dc2f56 Compare January 9, 2025 01:34
@CriticalXI CriticalXI force-pushed the chocobo_riding_game branch from 5dc2f56 to cbb7ea1 Compare January 9, 2025 02:06
@CriticalXI
Copy link
Contributor Author

Got that split out into #6676

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants