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

Add helper for the The Curse of Arrav quest #1833

Merged
merged 60 commits into from
Nov 18, 2024

Conversation

pajlada
Copy link
Contributor

@pajlada pajlada commented Nov 9, 2024

  • Is the difficulty correct?
  • Are the skill requirements correct?
  • Is the position in the optimal quest guide & optimal ironman quest guide correct?
    (optimal ironman guide doesn't have curse of arrav so i just added it where it felt good)
  • Are the monsters you have to fight correctly listed?
  • Are the rewards correct?
  • Does the "RuneScape Wiki" link work?

Unrelated changes I've made:

  • Added display text to ConditionForStep. This was useful in the RubbleSolver steps
  • Tried to consolidate the BasicQuestHelper step loading. the setupStep function is currently called twice when a quest is initialized. However, no logic has actually changed for now (as is explained in the added comment)
  • Added a new ObjectCondition ctor that accepts a list of valid ObjectIDs. This is useful for the RubbleSolver since stones that have 1, 2, or 3 hits on them have multiple different objectIDs for each "hits left" variant. I left the logic in the ObjectCondition check function that returns true if objectIDs is -1
  • Made it possible to post-construction update the Model ID we look for in the WidgetModelRequirement, and the text we look for in WidgetTextRequirement. I use this in the metal door puzzle solver to update what we're looking for depending on the code the user needs to enter.
  • Made it possible to add a custom "post process" function to WidgetStep's makeWidgetOverlayHint. This is used in the metal door puzzle solver to render text for how many steps are left
  • Added a ctor for WidgetDetails for group id + child id for convenience

@pajlada pajlada changed the title progress Add quest helper for the The Curse of Arrav quest Nov 9, 2024
@pajlada pajlada changed the title Add quest helper for the The Curse of Arrav quest Add helper for the The Curse of Arrav quest Nov 9, 2024
@pajlada pajlada marked this pull request as ready for review November 10, 2024 18:56
Copy link
Owner

@Zoinkwiz Zoinkwiz left a comment

Choose a reason for hiding this comment

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

Lots of puzzles, well done on getting through them all, solutons all look solid!

// If the user has not already put the key in the south lever, and does not have the key
((ConditionalStep) unsortedStep6).addStep(and(needToInsertKeyInSouthLever, not(hasSecondKey)), getSecondKey);
// If the user has not already put the key in the north lever, and does not have the key
((ConditionalStep) unsortedStep6).addStep(and(needToInsertKeyInNorthLever, not(hasFirstKey)), getFirstKey);
Copy link
Owner

Choose a reason for hiding this comment

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

Step marked as not sorted, but to ensure it's highlighted it currently directs to get key 2 before key 1.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This has been resolved in my refactors (no commit hash sorry)

pullSouthLever.addDialogStep("Yes.");
var getToSouthLever = new ObjectStep(this, ObjectID.ODD_MARKINGS_50207, new WorldPoint(3891, 4554, 0), "Search the Odd markings to the south to get to the south lever. Search the markings again if you fail.");
var needToInsertKeyInSouthLever = new VarbitRequirement(11482, 0);
var needToFlipSouthLever = new VarbitRequirement(11482, 1);
Copy link
Owner

Choose a reason for hiding this comment

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

Need to flip it if it's 1 or 0.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This should have been fixed, but its logic is kind of weird. I've added unit tests to try to make it sane.


var insideTomb = new Zone(new WorldPoint(3842, 4603, 0), new WorldPoint(3900, 4547, 0));
var insideTombReq = new ZoneRequirement(insideTomb);
var hasFirstKey = new ItemRequirement("Mastaba Key", ItemID.MASTABA_KEY);
Copy link
Owner

Choose a reason for hiding this comment

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

Can add conditional show on steps for if used on lever.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I decided not to add this because:

  1. It messes with the conditional step logic if the key is used as a condition
  2. I think either key works for either lever (but I could be wrong with this)

var getToNorthLever = new ObjectStep(this, ObjectID.ODD_MARKINGS_50208, new WorldPoint(3891, 4597, 0), "Search the Odd markings to the north to get to the north lever. Search the markings again if you fail.");
pullNorthLever = new ObjectStep(this, ObjectID.LEVER_50205, new WorldPoint(3894, 4598, 0), "Pull the lever to the north-east.", hasFirstKey);
pullNorthLever.addDialogStep("Yes.");
var needToInsertKeyInNorthLever = new VarbitRequirement(11481, 0);
Copy link
Owner

Choose a reason for hiding this comment

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

Needs using if making its own step. Else can just make a the 'need to pull' check, where the key hides itself if used.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This has been cleaned up

)));
panels.add(new PanelDetails("Fort Invasion", List.of(
unsortedStep20,
rubbleMiner1,
Copy link
Owner

Choose a reason for hiding this comment

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

All as one substep of a single one I think as it's the same text, or if not more distinguished text.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

this.addMineRubbleStep(2767, 10278, RubbleType.One, Direction.WEST); // 12
this.addMineRubbleStep(2767, 10279, RubbleType.Two, Direction.WEST); // 13
this.addMineRubbleStep(2768, 10279, RubbleType.One, Direction.WEST); // 14
this.addMineRubbleStep(2767, 10279, RubbleType.One, Direction.SOUTH); // 15
Copy link
Owner

Choose a reason for hiding this comment

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

Step 15 needs to come before 14, as 15 is blocking 14.

Screenshot 2024-11-12 113848

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done


@Override
protected void setupRubbleSteps() {
this.addMineRubbleStep(2766, 10279, RubbleType.Three, Direction.WEST); // 5
Copy link
Owner

Choose a reason for hiding this comment

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

I like this as a clean solution! Players will be able to break it by deciding to mine from a non-directed direction, but it shouldn't hopefully ever be too problematic and 99% of people almost certainly won't.

rubbleMiner2,
rubbleMiner3,
rubbleMiner4,
unsortedStep30,
Copy link
Owner

Choose a reason for hiding this comment

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

This and below 3 steps need to be changed to actual steps.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This has been cleaned up

* The third column is for strip 1
* The fourth column is for strip 3
*/
private static final int[][] CODE_MAPPING = new int[][]{
Copy link
Owner

Choose a reason for hiding this comment

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

Would be good for this to have a few extra features:

  1. Arrow highlight to have number of times you still need to click it.
  2. Overlay saying what the answer is
  3. Allow for down arrow to be used if it's closer to answer

The existing door solvers from like Tribal Totem and SOTN should provide templates for those bits.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This has been done, but in a bit of a unique way since I I'm using a DetailedOwnerStep instead of a straight up QuestStep

@Zoinkwiz Zoinkwiz merged commit 3125e28 into Zoinkwiz:master Nov 18, 2024
1 check passed
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.

2 participants