Skip to content

Comments

feat: Adjust after battle EXP and Req rewards#640

Merged
EttyKitty merged 2 commits intoAdeptus-Dominus:mainfrom
EttyKitty:feat/exp-req-rewards
Apr 1, 2025
Merged

feat: Adjust after battle EXP and Req rewards#640
EttyKitty merged 2 commits intoAdeptus-Dominus:mainfrom
EttyKitty:feat/exp-req-rewards

Conversation

@EttyKitty
Copy link
Collaborator

@EttyKitty EttyKitty commented Mar 27, 2025

Purpose of changes

  • To make the reward table a bit more predictable and simple.

Describe the solution

  • Exp and Req reward formulas are now _quad_factor * sqr(threat);. Exp has the factor of 10, and Req of 6.
  • In practice, this means that the rewards are a bit smaller at lower levels, but higher at high levels.
    image

Describe alternatives you've considered

None

Testing done

None

Related links

None

Custom player notes entry

Use the PR title.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 27, 2025

📝 Walkthrough

Summary by CodeRabbit

  • New Features
    • Enhanced in-game reward calculations now use a quadratic formula based on threat levels for a more balanced outcome.
    • Battle experience gains have been updated to scale quadratically with threat, offering more dynamic progression.

Walkthrough

By the Omnissiah’s decree, the reward computation algorithms have been refactored in two sacred scripts. In Alarm_5.gml, the variable power_fought along with its associated calculations has been removed. The logic for computing requisition_reward now utilises a quadratic mechanism based on the square of the threat variable, thereby streamlining the code. In parallel, KeyPress_13.gml has its experience gain logic reengineered: the previous linear function (threat * 50) has been replaced by a quadratic relationship employing a new _quad_factor of 10 multiplied by the square of the threat. The variable declarations have been duly updated in Alarm_5.gml to remove any reference to the obsolete power_fought, while no changes have been made to the exported entities for KeyPress_13.gml.

Possibly related PRs

Suggested labels

Size: Small

Suggested reviewers

  • Blogaugis
  • OH296

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai plan to trigger planning for file edits and PR creation.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai or @coderabbitai title anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@github-actions github-actions bot added Size: Tiny Type: Feature Adds something new labels Mar 27, 2025
@EttyKitty
Copy link
Collaborator Author

Actually, can probably get away with reducing the factor to 4-6.

coderabbitai[bot]
coderabbitai bot previously approved these changes Mar 27, 2025
@Blogaugis
Copy link
Collaborator

Have to note of potential conflicts with #482

@EttyKitty EttyKitty added Category: Improvement Makes something better Category: Balance Affects game balance labels Mar 29, 2025
coderabbitai[bot]
coderabbitai bot previously approved these changes Mar 31, 2025
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

📜 Review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 5ce5048 and 5dc6642.

📒 Files selected for processing (2)
  • objects/obj_ncombat/Alarm_5.gml (2 hunks)
  • objects/obj_ncombat/KeyPress_13.gml (1 hunks)
🧰 Additional context used
📓 Path-based instructions (3)
`**/*.gml`: - Macro constants require a space between the constant name and value. Without it, the compiler will throw an error. I.e. `#macro ARR_body_parts["arm"]` will crash the ...

**/*.gml: - Macro constants require a space between the constant name and value. Without it, the compiler will throw an error. I.e. #macro ARR_body_parts["arm"] will crash the game, because there is no space between the array and the name of the macro.

  • Color codes in the code shouldn't have any spaces in their id. I.e., color code # 80 bf40 will crash the game.
  • objects/obj_ncombat/Alarm_5.gml
  • objects/obj_ncombat/KeyPress_13.gml
`**/*.gml`: - Always suggest adding JSDoc to every function and method that doesn't have it.

**/*.gml: - Always suggest adding JSDoc to every function and method that doesn't have it.

  • objects/obj_ncombat/Alarm_5.gml
  • objects/obj_ncombat/KeyPress_13.gml
`**/*.gml`: - Readability and maintainability are always the top priority throughout the code. - DRY principle is also very important.

**/*.gml: - Readability and maintainability are always the top priority throughout the code.

  • DRY principle is also very important.
  • objects/obj_ncombat/Alarm_5.gml
  • objects/obj_ncombat/KeyPress_13.gml
🔇 Additional comments (1)
objects/obj_ncombat/Alarm_5.gml (1)

387-388: The removal of extraneous variables is pleasing to the Machine God.

The refactoring of variable declarations by removing the obsolete power_fought variable enhances code purity and memory efficiency.

@EttyKitty EttyKitty merged commit 149e4d6 into Adeptus-Dominus:main Apr 1, 2025
13 checks passed
@EttyKitty EttyKitty deleted the feat/exp-req-rewards branch April 1, 2025 17:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Category: Balance Affects game balance Category: Improvement Makes something better Size: Tiny Type: Feature Adds something new

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants