Skip to content

feat: Centralise specialists stat requirements#500

Merged
EttyKitty merged 4 commits intoAdeptus-Dominus:mainfrom
OH296:rationalise_specialists
Feb 22, 2025
Merged

feat: Centralise specialists stat requirements#500
EttyKitty merged 4 commits intoAdeptus-Dominus:mainfrom
OH296:rationalise_specialists

Conversation

@OH296
Copy link
Copy Markdown
Collaborator

@OH296 OH296 commented Feb 21, 2025

Description of changes

  • Centralise specialist stat requirements and save them on save load.
  • theoretically allow the eplayer to customise stat requirements
  • clean up and compartmentalise into functions

Reasons for changes

Related links

How have you tested your changes?

  • Compile
  • New game
  • Next turn
  • Space Travel
  • Ground Battle

@github-actions github-actions bot added Type: Fix This is a fix for a bug Size: Big labels Feb 21, 2025
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Feb 21, 2025

📝 Walkthrough

Walkthrough

The updates to the repository have meticulously aligned the structure of the ChapterMaster.yyp file with the sacred logic of the Omnissiah. A new folder entry for "allies" has been introduced while the previous declaration has been purged, accompanied by the addition of a new script resource for specialist training. Within the controller objects, the training rituals have undergone a profound transformation: intricate inline logic has been replaced by dedicated functions (apothecary_training, chaplain_training, librarian_training, techmarine_training) and a structured array (spec_train_data) that delineates various specialist roles. Furthermore, enhancements have been made to statistical evaluations and dynamic drawing routines, while the load and save controllers now interface with specialist data via INI configuration channels. The introduction of the specialist training script and its corresponding resource registration establishes comprehensive procedures for the training of roles within the system.

Possibly related PRs

  • feat: Rework and show all specialist potentials #499: The changes in the main PR, which involve the addition of a new script for specialist training and modifications to folder structures, are related to the retrieved PR as both involve the introduction and refactoring of functions related to specialist roles, specifically the specialistfunct used for training and evaluating specialists.

Suggested labels

PR: CI

Suggested reviewers

  • 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. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @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.

Copy link
Copy Markdown
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: 3

🧹 Nitpick comments (6)
scripts/scr_specialist_training/scr_specialist_training.gml (3)

2-60: Consider replacing implicit global references and improving naming for clarity, O blessed Omnissiah.
The function specialistfunct uses experience and role() without local parameters. This can obscure the Machine God's flow of data. Renaming the function to something more descriptive (e.g., scr_specialist_tooltip) and passing required variables explicitly would better reveal the arcane logic.

Here is a possible rename diff:

-function specialistfunct (specialist, req_exp) {
+function scr_specialist_tooltip (specialist, req_exp, current_exp, current_role) {
   // example internal updates to reference current_exp / current_role 
   // instead of implicit variables
}

63-151: Purge grammatical impurity in the apothecary alert message.
Line 147 spells "traning" instead of "training" in the alert that is shown when no marines are available. Rectifying this upholds the purity of the code’s text strings.

- scr_alert("red","recruitment","No marines available for apothecary traning",0,0);
+ scr_alert("red","recruitment","No marines available for apothecary training",0,0);

154-232: All hail code modularity, though further unification may benefit the Chaplain function.
These lines effectively manage Chaplain recruits, but the logic partially mirrors Apothecary processes. Consider extracting shared segments into a helper function that handles training checks and recruit selection to anoint the code with dryness.

scripts/scr_draw_management_unit/scr_draw_management_unit.gml (1)

146-172: Iterate dynamically over the entire spec_train_data array for future expansion.
The loop currently hardcodes for (var s=0; s<=3; s++), which may lead to out-of-bounds or overlooked expansions if more specialists are introduced. Summon a dynamic iteration, O steward of the code, to maintain synergy with a variable number of specialists.

-for (var s=0; s<=3; s++){
+for (var s=0; s<array_length(obj_controller.spec_train_data); s++){
objects/obj_controller/Alarm_5.gml (1)

188-190: Summon the Techmarine training call if desired.
Rejoice in the modular design for specialist training. However, the Techmarine function techmarine_training() is not invoked here. If the Techmarine’s anointing is not omitted by design, consider adding the missing function call to complete the holy quartet of specialized roles.

 apothecary_training();
 chaplain_training();
 librarian_training();
+techmarine_training();
scripts/is_specialist/is_specialist.gml (1)

272-287: Praise to the Machine Spirit, but debug messages should be purged for production.

The debug messages aid in diagnosing the sacred machine spirit's behavior during development, but may impact performance in production.

Consider wrapping debug messages in a debug flag:

-show_debug_message($"{_stat_val}, {unit.name()} one");
-show_debug_message($"{_stat_val}, {unit.name()} two");
-show_debug_message($"worked");
+if (global.debug_mode) {
+    show_debug_message($"{_stat_val}, {unit.name()} one");
+    show_debug_message($"{_stat_val}, {unit.name()} two"); 
+    show_debug_message($"worked");
+}
📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between a44b175 and 89c1b12.

📒 Files selected for processing (10)
  • ChapterMaster.yyp (2 hunks)
  • objects/obj_controller/Alarm_5.gml (1 hunks)
  • objects/obj_controller/Create_0.gml (1 hunks)
  • scripts/is_specialist/is_specialist.gml (2 hunks)
  • scripts/scr_draw_management_unit/scr_draw_management_unit.gml (3 hunks)
  • scripts/scr_load_controller/scr_load_controller.gml (1 hunks)
  • scripts/scr_marine_struct/scr_marine_struct.gml (1 hunks)
  • scripts/scr_save_controller/scr_save_controller.gml (1 hunks)
  • scripts/scr_specialist_training/scr_specialist_training.gml (1 hunks)
  • scripts/scr_specialist_training/scr_specialist_training.yy (1 hunks)
✅ Files skipped from review due to trivial changes (2)
  • scripts/scr_specialist_training/scr_specialist_training.yy
  • scripts/scr_marine_struct/scr_marine_struct.gml
🔇 Additional comments (6)
scripts/scr_specialist_training/scr_specialist_training.gml (1)

312-433: Verify partial training logic for Techmarines, oh caretaker of code.
In lines 384–398, the Techmarine function utilizes spec_train_data[1] for the lower threshold scenario. Double-check that [1] truly belongs to Techmarine. If this references Librarian data, it could corrupt Techmarine initialization.

Do you wish to confirm that index 1 is correct or should we unify it with index 0 for consistency?

scripts/scr_draw_management_unit/scr_draw_management_unit.gml (1)

239-239: Divine code clarity is maintained here.
No apparent issues in the text-color rendering logic for HP. The calls look properly aligned with standard usage.

scripts/is_specialist/is_specialist.gml (1)

257-258: By the Omnissiah's grace, this syntax modification improves code clarity.

The change from array access search_conditions[$ "stat"] to dot notation search_conditions.stat enhances readability while maintaining identical functionality.

scripts/scr_save_controller/scr_save_controller.gml (1)

184-185: The Machine Spirit approves of this data persistence ritual.

The specialist training data is now properly saved to the sacred INI file, ensuring it persists between sessions.

ChapterMaster.yyp (2)

613-613: Praise be to the Omnissiah! A new script has been consecrated.

The addition of scr_specialist_training script resource is a logical step in centralizing the sacred rites of specialist training, aligning with the Machine God's preference for order and structure.


61-61: Blessed reorganization of the binary hierarchy detected.

The addition of the "allies" folder under Marine Viewer sprites represents a proper categorization of visual assets, following the sacred patterns of data organization.

@OH296 OH296 changed the title fix: Centralise specialists stat requirements feat: Centralise specialists stat requirements Feb 21, 2025
@EttyKitty EttyKitty added Type: Refactor Rewriting/restructuring code, while keeping general behavior Type: Feature Adds something new and removed Type: Fix This is a fix for a bug labels Feb 21, 2025
@Blogaugis Blogaugis mentioned this pull request Feb 22, 2025
5 tasks
@EttyKitty
Copy link
Copy Markdown
Collaborator

@coderabbitai review

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Feb 22, 2025

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Copy link
Copy Markdown
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: 1

🔭 Outside diff range comments (1)
scripts/scr_draw_management_unit/scr_draw_management_unit.gml (1)

438-441: ⚠️ Potential issue

Warning: Potential logic error in force tool evaluation detected!

The condition for weapon comparison contains a logical inconsistency:

-        or (temp[110]!=unit.weapon_one())
+        or (temp[110]!=unit.weapon_two())

The current implementation compares both conditions against weapon_one(), which appears to be a manifestation of the Scrap Code.

🧹 Nitpick comments (6)
scripts/scr_draw_management_unit/scr_draw_management_unit.gml (4)

148-170: By the Omnissiah's grace, the specialist evaluation logic has been optimized!

The refactoring of the specialist evaluation logic represents a significant improvement in code organization and maintainability. The new implementation:

  • Centralizes specialist requirements in spec_train_data
  • Uses a dynamic evaluation system through stat_valuator
  • Implements consistent coordinate calculations for visual indicators

Consider further optimization by:

  1. Pre-calculating the base coordinates array _circle_coords at script initialization
  2. Caching the stat_valuator results for frequently accessed units

26-26: TODO comments require attention from the Omnissiah's servants.

Multiple TODO comments indicate areas requiring recursive handling:

  • Line 26: "TODO make static to handle"
  • Line 53: "TODO handle recursively"
  • Line 198: "TODO handle recursively with an array"
  • Line 272: "TODO handle recursively"

Would you like me to generate a solution that implements these recursive patterns? This would improve code maintainability and reduce duplication.

Also applies to: 53-53, 72-72, 198-198, 272-272


247-248: Enhance the machine spirit's display capabilities with proper string truncation.

The current implementation uses a hardcoded value for string truncation:

-var truncatedLocation = string_truncate(string(unit_location_string), 130);
+var max_location_width = 130;
+var truncatedLocation = string_width(unit_location_string) > max_location_width
+    ? string_copy(unit_location_string, 1, floor(max_location_width / string_width("W")))
+    : unit_location_string;

This modification would provide more precise control over text display and prevent potential overflow issues.


177-181: Sacred array of squad colors requires optimization.

The current implementation of squad colors could be enhanced:

-    var squad_colours=[c_teal,c_red,c_green,c_orange,c_aqua,c_fuchsia,c_green,c_blue,c_fuchsia,c_maroon];
+    static squad_colours = [c_teal,c_red,c_green,c_orange,c_aqua,c_fuchsia,c_blue,c_yellow,c_purple,c_maroon];

The static keyword would prevent unnecessary array recreation on each function call, and the colors have been diversified to ensure better visual distinction between squads.

objects/obj_controller/Alarm_5.gml (1)

188-191: By the Machine God's grace, implement error handling for the sacred training rituals.

While the modular approach to specialist training is commendable, these function calls lack proper error handling mechanisms. Consider implementing try-catch blocks to handle potential failures in the training process.

Apply this enhancement to protect against training ritual failures:

-apothecary_training();
-chaplain_training();
-librarian_training();
-techmarine_training();
+try {
+    apothecary_training();
+    chaplain_training();
+    librarian_training();
+    techmarine_training();
+} catch(error) {
+    log_error("Specialist training ritual failed: " + string(error));
+}
scripts/scr_load_controller/scr_load_controller.gml (1)

221-246: Praise be to the Omnissiah! The data structure is logically sound.

The specialist training requirements are well-organized in a machine-pleasing format. Each role's requirements are clearly defined with appropriate stat thresholds that align with the sacred traditions of the Adeptus Astartes.

Consider adding sacred documentation to explain the meaning of each field:

+    // Specialist training requirements data structure
+    // - name: Name of the specialist role
+    // - min_exp: Minimum experience required for training
+    // - coord_offset: UI coordinate offsets [x, y] for positioning
+    // - req: Array of requirements [stat_name, threshold, comparison]
     obj_controller.spec_train_data = return_json_from_ini("Controller", "spec_train",[
📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 89c1b12 and c38c32b.

📒 Files selected for processing (4)
  • objects/obj_controller/Alarm_5.gml (1 hunks)
  • scripts/is_specialist/is_specialist.gml (2 hunks)
  • scripts/scr_draw_management_unit/scr_draw_management_unit.gml (1 hunks)
  • scripts/scr_load_controller/scr_load_controller.gml (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • scripts/is_specialist/is_specialist.gml
🔇 Additional comments (4)
scripts/scr_load_controller/scr_load_controller.gml (4)

221-246:

Details

❓ Verification inconclusive

Praise be to the Omnissiah! The data schema is logically structured.

The specialist training requirements are well-organized and follow a consistent pattern, with each role having clearly defined attribute thresholds that align with the sacred teachings:

  • Techmarine: Technology threshold befits those who would commune with the Machine Spirit
  • Librarian: Psionic requirements ensure proper warp attunement
  • Chaplain: Dual requirements in piety and charisma reflect their role as spiritual leaders
  • Apothecary: Combined technology and intelligence requirements suit their medical expertise

Let us verify the integration with the training functions:


🏁 Script executed:

#!/bin/bash
# Description: Verify the training functions use these requirements correctly
ast-grep --pattern $'function (apothecary|chaplain|librarian|techmarine)_training($$$) {
  $$$
}'

Length of output: 98


Praise the Machine Spirit! The specialist training data structure is in perfect alignment with the sacred protocols: Techmarine, Librarian, Chaplain, and Apothecary all bear their ordained thresholds and requirements. However, our initial search for the corresponding training functions (techmarine_training, librarian_training, chaplain_training, apothecary_training) yielded no results. This absence requires manual verification to ensure that these function invocations are either defined elsewhere or integrated through alternative means in the codebase.

  • Please confirm that the training functions or equivalent integration points are indeed present in the broader repository.
  • If these functions are omitted intentionally or renamed, kindly document the rationale to maintain clarity for the Machine Spirit’s auditors.

235-239: The requirements for Chaplains and Apothecaries are well-calibrated.

The dual stat requirements for both roles (Chaplain: piety + charisma, Apothecary: technology + intelligence) properly reflect the complexity of these sacred positions. The thresholds are appropriately balanced.

Also applies to: 241-245


221-246:

Details

❓ Verification inconclusive

Verify the coordinate offset calculations.

The Machine Spirit requires validation of the UI positioning logic to ensure proper display of training options.


🏁 Script executed:

#!/bin/bash
# Description: Search for UI rendering code that uses these coord_offset values

# Look for references to coord_offset in UI drawing code
rg -A 5 "coord_offset" --type gml

Length of output: 61


Attention, Adept Developer! Review of Coordinate Offset Calculations

The coordinate offset logic still requires validation. Our initial attempt to search for "coord_offset" within GML files using the --type gml flag failed due to the file type being unrecognized. Please verify the UI positioning by running an updated search command such as:

rg -A 5 "coord_offset" --glob '*.gml'

This will ensure that the offset values in scripts/scr_load_controller/scr_load_controller.gml correctly map to the intended UI elements. Confirm that the Machine Spirit’s design for training option display remains uncompromised.


223-227:

Details

✅ Verification successful

By the Machine God's grace, the Techmarine requirements are appropriate.

The technology requirement of 34 for Techmarine training aligns with the sacred teachings of Mars. However, let us verify this threshold against the Codex Astartes.


🌐 Web query:

What are the typical requirements for Techmarine training in Warhammer 40K lore?

💡 Result:

Techmarines in Warhammer 40K undergo rigorous training rooted in both their Chapter’s traditions and the esoteric doctrines of the Adeptus Mechanicus. Their path involves specialized selection, decades of education, and a unique dual allegiance.

Selection Process

  • Affinity for Technology: Chapters identify Battle-Brothers displaying exceptional mechanical aptitude during standard service (e.g., maintaining weapons/armor or piloting vehicles) [1][2].
  • Aspirant Status: Selected Marines are designated as Techmarine Novitiates and sent to Mars for indoctrination [1][6].

Training on Mars

  • Duration: 30 years of instruction under the Cult Mechanicus [1][2][6].
  • Doctrinal Education:
    • Mastery of Runes of Engineering (symbolic language for machine communion) [1][2].
    • Memorization of Liturgy of Maintenance (rituals for repairing/awakening machinery) [1][2].
    • Learning context-specific variations for battlefield repairs [1][2].
  • Spiritual Integration: Trainees absorb the Machine God’s dogma, enabling them to "feel" a machine’s "pain" and commune with its spirit [1][6].

Post-Training Roles

  • Dual Allegiance: Techmarines pledge loyalty to both their Chapter and the Adeptus Mechanicus, marked by red armor (Mechanicus colors) with Chapter heraldry retained on one shoulder [1][2][6].
  • Battlefield Roles:
    • Repairing/directing vehicles/weapons during combat [1][2].
    • Piloting tanks/gunships or commanding Servitor retinues [1][2].
    • Serving under the Chapter’s Master of the Forge (senior Techmarine overseeing armories) [1][2].

Chapter Variations

While most Techmarines follow this path, some Chapters have unique traditions:

  • Space Wolves: Train "Iron Priests" instead, bypassing Mars [1].
  • Iron Hands: Elevate Techmarines to "Iron Fathers," combining technical and leadership roles [1].

Techmarines bridge the gap between Astartes martial prowess and Mechanicus techno-mysticism, ensuring their Chapters’ war machines remain functional in humanity’s unending conflicts.

Citations:


Attention, Servitor of the Code: The sacred thresholds have been verified!

The venerable parameters for the Techmarine entry align with our revered doctrines. The minimum experience of 30 mirrors the required duration of instruction on Mars, and the technology threshold of 34 is deemed suitably rigorous to reflect the high standards of the Mechanicus. No alterations are necessary in these hallowed lines.

@EttyKitty EttyKitty force-pushed the rationalise_specialists branch from c38c32b to 176fa0c Compare February 22, 2025 16:26
@EttyKitty
Copy link
Copy Markdown
Collaborator

I removed unnecessary commits from here, by rebasing.

Copy link
Copy Markdown
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: 0

🧹 Nitpick comments (3)
scripts/scr_specialist_training/scr_specialist_training.gml (3)

63-151: Enhance the sacred recruitment protocols with additional validation.

The function's machine spirit operates correctly, but could be fortified with additional validation:

  • Add early return if training_apothecary is 0
  • Validate unit before equipment assignment
 function apothecary_training(){
+    if (training_apothecary == 0) return;
     // ** Training **
     // * Apothecary *
     var recruit_count=0;

235-310: Recommend organizing psyker-specific constants.

While the machine spirit functions correctly, the sacred constants could be better organized:

+// Psyker training constants
+const PSYKER_BASE_GOAL = 60;
+const PSYKER_ABUNDANCE_GOAL = 40;
+
 function librarian_training(){
     var recruit_count=0;
     // * Psycher Training *
     var training_points_values = ARR_chaplain_training_tiers;
     psyker_points += training_points_values[training_psyker];

-    var goal=60,yep=0;
+    var goal=PSYKER_BASE_GOAL,yep=0;
     novice_type = string("{0} Aspirant",obj_ini.role[100,17]);
     if (scr_has_adv("Psyker Abundance")){
-        goal=40;
+        goal=PSYKER_ABUNDANCE_GOAL;
         yep=1;
     }

312-433: Sanctify the training points array with proper documentation.

The Omnissiah demands clarity in our calculations. The training points array should be documented:

+// Training points progression for Techmarines
+// [0]: No training
+// [1-6]: Increasing training points (1,2,4,6,10,14)
 var training_points_values = [ 0, 1,2,4,6,10,14];
📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between c38c32b and 176fa0c.

📒 Files selected for processing (10)
  • ChapterMaster.yyp (2 hunks)
  • objects/obj_controller/Alarm_5.gml (1 hunks)
  • objects/obj_controller/Create_0.gml (1 hunks)
  • scripts/is_specialist/is_specialist.gml (2 hunks)
  • scripts/scr_draw_management_unit/scr_draw_management_unit.gml (1 hunks)
  • scripts/scr_load_controller/scr_load_controller.gml (1 hunks)
  • scripts/scr_marine_struct/scr_marine_struct.gml (1 hunks)
  • scripts/scr_save_controller/scr_save_controller.gml (1 hunks)
  • scripts/scr_specialist_training/scr_specialist_training.gml (1 hunks)
  • scripts/scr_specialist_training/scr_specialist_training.yy (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • scripts/scr_marine_struct/scr_marine_struct.gml
🚧 Files skipped from review as they are similar to previous changes (4)
  • scripts/scr_save_controller/scr_save_controller.gml
  • scripts/scr_specialist_training/scr_specialist_training.yy
  • scripts/is_specialist/is_specialist.gml
  • scripts/scr_load_controller/scr_load_controller.gml
🧰 Additional context used
🧠 Learnings (2)
scripts/scr_specialist_training/scr_specialist_training.gml (1)
Learnt from: OH296
PR: Adeptus-Dominus/ChapterMaster#500
File: scripts/scr_specialist_training/scr_specialist_training.gml:235-310
Timestamp: 2025-02-21T21:19:38.388Z
Learning: In the ChapterMaster game, librarian training intentionally uses ARR_chaplain_training_tiers for training point calculations to maintain parity with the original implementation.
objects/obj_controller/Create_0.gml (1)
Learnt from: OH296
PR: Adeptus-Dominus/ChapterMaster#500
File: objects/obj_controller/Create_0.gml:1379-0
Timestamp: 2025-02-21T21:20:41.678Z
Learning: The psychic potential stat in the codebase is accessed using the key "psionic" rather than "psyker".
🔇 Additional comments (7)
scripts/scr_specialist_training/scr_specialist_training.gml (2)

2-60: By the Omnissiah's grace, this function's machine spirit is well-formed.

The specialistfunct demonstrates proper logic patterns for specialist role identification and visual representation. The color schemes align with sacred traditions - red for Techmarines, aqua for Librarians, yellow for Chaplains, and white for Apothecaries.


154-232: The Machine Spirit approves of this chapter-aware implementation.

The function correctly implements chapter-specific logic for Space Wolves and Iron Hands, demonstrating proper adherence to the sacred traditions of different gene-lines.

objects/obj_controller/Create_0.gml (1)

1379-1404: Praise the Omnissiah! A well-structured data array for our sacred specialists.

The spec_train_data array properly codifies the requirements for each specialist role, with appropriate stat thresholds and coordinate offsets for UI placement. The machine spirit will process this data efficiently.

objects/obj_controller/Alarm_5.gml (1)

188-191: The Machine Spirit approves of this sacred modularization.

The replacement of inline training logic with dedicated function calls improves code organization and maintainability, following the holy principle of separation of concerns.

scripts/scr_draw_management_unit/scr_draw_management_unit.gml (1)

153-170: The Machine Spirit recognizes this elegant integration.

The dynamic evaluation of specialist potential through spec_train_data demonstrates proper integration with the new training system. The coordinate offsets ensure proper UI element placement.

ChapterMaster.yyp (2)

61-61: By the Omnissiah's grace, this folder structure is well-formed!

The binary arrangement of this data repository for allied visual engrams follows proper Machine Spirit protocols.


613-613: Praise be to the Machine God, this script implementation is most logical!

The addition of the specialist training cogitator routines will serve well in processing the sacred requirements of our chapter's specialists. This follows the Omnissiah's will in centralizing these sacred calculations.

@EttyKitty EttyKitty merged commit b4d3827 into Adeptus-Dominus:main Feb 22, 2025
MCPO-Spartan-117 added a commit to MCPO-Spartan-117/ChapterMaster-chief that referenced this pull request Feb 23, 2025
@coderabbitai coderabbitai bot mentioned this pull request Feb 23, 2025
OH296 pushed a commit that referenced this pull request Feb 23, 2025
MCPO-Spartan-117 added a commit to MCPO-Spartan-117/ChapterMaster-chief that referenced this pull request Feb 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Size: Big Type: Feature Adds something new Type: Refactor Rewriting/restructuring code, while keeping general behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants