Skip to content

Conversation

@OH296
Copy link
Collaborator

@OH296 OH296 commented Jun 5, 2025

Purpose

  • Self-descriptive.

Describe your changes/additions

  • Self-descriptive.

What can/needs to be improved/changed

  • Nothing.

Testing done

  • None, and I understand the risks.

Related things and/or additional context

  • None.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jun 5, 2025

📝 Walkthrough

Summary by CodeRabbit

  • New Features

    • Introduced an interactive, animated book-style UI for chapter briefings, including page navigation and visual effects.
    • Added new sprites for the book and page highlight to enhance the UI experience.
  • Bug Fixes

    • Improved text formatting and page splitting for chapter introduction messages.
  • Refactor

    • Replaced manual string truncation with a structured, dynamic paging system for briefing text.
    • Streamlined menu interaction logic for the welcome screen.
  • Style

    • Updated formatting and versioning in several sprite resources for consistency.
  • Chores

    • Reduced the frequency of background memory clean-up processes.

Walkthrough

By the Omnissiah’s will, this update introduces two new sprite resources—“spr_pixel_book_page_highlight” and “spr_pixel_servo_book”—to the project’s resource manifest. Associated code refactors the chapter briefing UI, implements a new animated book interface, and adjusts related drawing, input, and utility scripts. Minor formatting and timing changes are also enacted.

Changes

Files/Paths Change Summary
ChapterMaster.yyp Added two new sprite resources: spr_pixel_book_page_highlight and spr_pixel_servo_book.
objects/obj_controller/Create_0.gml Refactored chapter briefing UI: introduced servo_data_book object, new page splitting logic, animated book display, and interactive navigation.
objects/obj_controller/Draw_64.gml Added new drawing logic for the Welcome menu and trade screen; invokes new book UI draw method.
objects/obj_garbage_collector/Step_0.gml Increased garbage collection interval from 50 to 50000.
scripts/scr_complex_colour_kit/scr_complex_colour_kit.gml Removed coord_relevative_positions function.
scripts/scr_controller_helpers/scr_controller_helpers.gml Simplified menu input block; now only sets global.ui_click_lock instead of modifying menu or cooldown.
scripts/scr_hit/scr_hit.gml Added coord_relevative_positions and point_and_click_relative utility functions.
scripts/scr_planetary_feature/scr_planetary_feature.gml Minor formatting: added missing space in assignment.
scripts/scr_ui_advisors/scr_ui_advisors.gml Removed all code for rendering the Welcome menu.
sprites/spr_pixel_book_page_highlight/spr_pixel_book_page_highlight.yy New sprite resource: page highlight animation, two frames, UI folder.
sprites/spr_pixel_servo_book/spr_pixel_servo_book.yy New sprite resource: servo book image, one frame, UI folder.
sprites/spr_checker_texture/spr_checker_texture.yy
sprites/spr_mk7_complex_knees/spr_mk7_complex_knees.yy
sprites/spr_ship_apoc/spr_ship_apoc.yy
sprites/spr_ship_nem/spr_ship_nem.yy
Reformatted JSON, added seqHeight/seqWidth to sequences, and updated visibleRange property.
sprites/spr_psy_hood_alpha/spr_psy_hood_alpha.yy
sprites/spr_psy_hood_alpha2/spr_psy_hood_alpha2.yy
Updated resource format version and minor JSON formatting.

Possibly related PRs

Suggested labels

PR: Feature, PR: Sprites, Size: Small


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 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.
    • Explain this complex logic.
    • 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 explain this code block.
    • @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 explain its main purpose.
    • @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.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

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 generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @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.

@github-actions github-actions bot added Area: Sprites Changes to sprites/images or their under-the-hood functionality Size: Big Type: Feature Adds something new labels Jun 5, 2025
@OH296
Copy link
Collaborator Author

OH296 commented Jun 5, 2025

@EttyKitty When your a loose end let me know if this is a step in the right direction or utter garbage visually speaking, i won't be offended either way

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: 5

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

1-1: 🧹 Nitpick (assertive)

The sacred TODO requires attention, Tech-Adept.

This enumeration task would enhance code maintainability and reduce the risk of menu code conflicts.

Would you like me to create a GitHub issue to track the implementation of menu area code enums?

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 01c9f73 and dd5e16a.

⛔ Files ignored due to path filters (8)
  • sprites/spr_pixel_book_page_highlight/b2fa8fe8-d578-4536-9b73-d27307ff7ee1.png is excluded by !**/*.png
  • sprites/spr_pixel_book_page_highlight/ff33b9ca-cd77-419d-9726-8f86005a22e6.png is excluded by !**/*.png
  • sprites/spr_pixel_book_page_highlight/layers/b2fa8fe8-d578-4536-9b73-d27307ff7ee1/35e396be-c8bb-46cc-9c62-2823941f9307.png is excluded by !**/*.png
  • sprites/spr_pixel_book_page_highlight/layers/b2fa8fe8-d578-4536-9b73-d27307ff7ee1/54d77c4a-f0ee-4053-b919-a71b0f425e0f.png is excluded by !**/*.png
  • sprites/spr_pixel_book_page_highlight/layers/ff33b9ca-cd77-419d-9726-8f86005a22e6/35e396be-c8bb-46cc-9c62-2823941f9307.png is excluded by !**/*.png
  • sprites/spr_pixel_book_page_highlight/layers/ff33b9ca-cd77-419d-9726-8f86005a22e6/54d77c4a-f0ee-4053-b919-a71b0f425e0f.png is excluded by !**/*.png
  • sprites/spr_pixel_servo_book/ff33b9ca-cd77-419d-9726-8f86005a22e6.png is excluded by !**/*.png
  • sprites/spr_pixel_servo_book/layers/ff33b9ca-cd77-419d-9726-8f86005a22e6/35e396be-c8bb-46cc-9c62-2823941f9307.png is excluded by !**/*.png
📒 Files selected for processing (17)
  • ChapterMaster.yyp (1 hunks)
  • objects/obj_controller/Create_0.gml (2 hunks)
  • objects/obj_controller/Draw_64.gml (2 hunks)
  • objects/obj_garbage_collector/Step_0.gml (1 hunks)
  • scripts/scr_complex_colour_kit/scr_complex_colour_kit.gml (0 hunks)
  • scripts/scr_controller_helpers/scr_controller_helpers.gml (1 hunks)
  • scripts/scr_hit/scr_hit.gml (1 hunks)
  • scripts/scr_planetary_feature/scr_planetary_feature.gml (1 hunks)
  • scripts/scr_ui_advisors/scr_ui_advisors.gml (0 hunks)
  • sprites/spr_checker_texture/spr_checker_texture.yy (2 hunks)
  • sprites/spr_mk7_complex_knees/spr_mk7_complex_knees.yy (2 hunks)
  • sprites/spr_pixel_book_page_highlight/spr_pixel_book_page_highlight.yy (1 hunks)
  • sprites/spr_pixel_servo_book/spr_pixel_servo_book.yy (1 hunks)
  • sprites/spr_psy_hood_alpha/spr_psy_hood_alpha.yy (3 hunks)
  • sprites/spr_psy_hood_alpha2/spr_psy_hood_alpha2.yy (3 hunks)
  • sprites/spr_ship_apoc/spr_ship_apoc.yy (1 hunks)
  • sprites/spr_ship_nem/spr_ship_nem.yy (1 hunks)
💤 Files with no reviewable changes (2)
  • scripts/scr_complex_colour_kit/scr_complex_colour_kit.gml
  • scripts/scr_ui_advisors/scr_ui_advisors.gml
🧰 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.

  • objects/obj_garbage_collector/Step_0.gml
  • scripts/scr_planetary_feature/scr_planetary_feature.gml
  • scripts/scr_controller_helpers/scr_controller_helpers.gml
  • objects/obj_controller/Draw_64.gml
  • scripts/scr_hit/scr_hit.gml
  • objects/obj_controller/Create_0.gml
`**/*.*`: - Having humanly understandable and maintainable code is always the top most priority. - DRY (Don't repeat yourself) principle is also very important. - Ensure that the c...

**/*.*: - Having humanly understandable and maintainable code is always the top most priority.

  • DRY (Don't repeat yourself) principle is also very important.
  • Ensure that the code is compliant with the CODE_STYLE.MD: https://github.com/Adeptus-Dominus/ChapterMaster/blob/main/docs/CODE_STYLE.md
  • If a TODO comment is added, ask the user if you should create a GitHub issue for this TODO.
  • If a TODO comment is deleted, remind the user if there is an active GitHub issue related to that comment.
  • objects/obj_garbage_collector/Step_0.gml
  • sprites/spr_psy_hood_alpha/spr_psy_hood_alpha.yy
  • scripts/scr_planetary_feature/scr_planetary_feature.gml
  • sprites/spr_psy_hood_alpha2/spr_psy_hood_alpha2.yy
  • sprites/spr_ship_nem/spr_ship_nem.yy
  • scripts/scr_controller_helpers/scr_controller_helpers.gml
  • sprites/spr_ship_apoc/spr_ship_apoc.yy
  • objects/obj_controller/Draw_64.gml
  • sprites/spr_pixel_servo_book/spr_pixel_servo_book.yy
  • sprites/spr_pixel_book_page_highlight/spr_pixel_book_page_highlight.yy
  • sprites/spr_mk7_complex_knees/spr_mk7_complex_knees.yy
  • scripts/scr_hit/scr_hit.gml
  • sprites/spr_checker_texture/spr_checker_texture.yy
  • ChapterMaster.yyp
  • objects/obj_controller/Create_0.gml
`**/*.yy`: - When any script or sprite .yy files are deleted, their paths should also be deleted from the .yyp file, otherwise the game will crash. - When any script or sprite .yy ...

**/*.yy: - When any script or sprite .yy files are deleted, their paths should also be deleted from the .yyp file, otherwise the game will crash.

  • When any script or sprite .yy files are created, their paths should be added to the .yyp file, otherwise they'll fail.
  • sprites/spr_psy_hood_alpha/spr_psy_hood_alpha.yy
  • sprites/spr_psy_hood_alpha2/spr_psy_hood_alpha2.yy
  • sprites/spr_ship_nem/spr_ship_nem.yy
  • sprites/spr_ship_apoc/spr_ship_apoc.yy
  • sprites/spr_pixel_servo_book/spr_pixel_servo_book.yy
  • sprites/spr_pixel_book_page_highlight/spr_pixel_book_page_highlight.yy
  • sprites/spr_mk7_complex_knees/spr_mk7_complex_knees.yy
  • sprites/spr_checker_texture/spr_checker_texture.yy
🔇 Additional comments (22)
scripts/scr_planetary_feature/scr_planetary_feature.gml (1)

129-132: Cave depth assignment spacing correct
The added space between = and irandom(3) aligns with GML formatting conventions and does not alter behaviour.

sprites/spr_ship_nem/spr_ship_nem.yy (1)

66-68: Sequence dimensions added
The new seqHeight and seqWidth properties match other sprite resources and standardise sequence metadata.

sprites/spr_mk7_complex_knees/spr_mk7_complex_knees.yy (1)

37-43: Metadata formatting aligns
The multi-line tileMode and explicit seqHeight/seqWidth entries adhere to the project’s sprite conventions.

Also applies to: 86-88

sprites/spr_pixel_servo_book/spr_pixel_servo_book.yy (2)

66-67: Sequence metadata declared
The seqHeight and seqWidth values correctly specify dimensions for the new servo book sprite.


1-4: New sprite resource detected
Verify that sprites/spr_pixel_servo_book/spr_pixel_servo_book.yy is referenced in ChapterMaster.yyp to prevent missing resource errors.

ChapterMaster.yyp (2)

1412-1412: Entry for spr_pixel_book_page_highlight is correct. The ID and path match project conventions; verify the sprite file exists at sprites/spr_pixel_book_page_highlight/.


1416-1416: spr_pixel_servo_book resource added properly. Naming and placement align with other pixel sprites; confirm the asset is present in sprites/spr_pixel_servo_book/.

objects/obj_garbage_collector/Step_0.gml (1)

7-7:

❓ Verification inconclusive

By the Omnissiah's will, this timing alteration requires scrutiny!

The garbage collection interval has been increased by a factor of 1000 (from 50 to 50000 frames). This dramatic reduction in collection frequency could lead to memory accumulation issues, particularly with the new servo skull UI system.

Verify that this change doesn't cause memory bloat during extended gameplay sessions:


🏁 Script executed:

#!/bin/bash
# Search for memory-intensive operations that might require more frequent GC
rg -A 3 -B 3 "instance_create|sprite_create|surface_create|draw_surface|array_create" --type gml

Length of output: 126


By the Omnissiah’s will, scan all .gml scripts for memory-intensive rituals:


🏁 Script executed:

#!/bin/bash
# Searching memory-intensive operations across all .gml files
rg -A 3 -B 3 "instance_create|sprite_create|surface_create|draw_surface|array_create" --glob "*.gml"

Length of output: 117939


Critical: Verify GC interval change to 50000 frames for memory bloat
By the Omnissiah’s will, this 1000× reduction in garbage-collection frequency demands scrutiny. Our codebase invokes hundreds of memory-allocating rituals—instance_create, array_create, surface_create, draw_surface—across UI, gameplay and rendering scripts.

Key areas of intense allocation:
• scr_scrollbar.gml: surface_create + draw_surface_part
• scr_draw_unit_image.gml: surface_create + sprite_create_from_surface
• Multiple combat and UI scripts using instance_create for popups, fleets, projectiles
• scr_uuid_generate.gml: array_create(32) per invocation

Such volume of allocations over minutes without timely GC may lead to unbounded memory growth. Profile long sessions or reduce gc_timer to a safer threshold to prevent potential bloat.

sprites/spr_psy_hood_alpha/spr_psy_hood_alpha.yy (1)

2-2: The Machine Spirit approves these resource sanctifications.

The version updates and formatting standardisation align with proper GameMaker resource management protocols. These changes maintain compatibility whilst improving resource structure.

Also applies to: 15-15, 73-73

scripts/scr_controller_helpers/scr_controller_helpers.gml (1)

37-37: Elegant simplification serves the Omnissiah's design.

The removal of menu and cooldown manipulation logic properly delegates control to the new servo_data_book system, preventing state conflicts between the old and new UI frameworks.

sprites/spr_ship_apoc/spr_ship_apoc.yy (1)

66-67: Blessed are these resource optimisations.

The addition of explicit sequence dimensions and the visibleRange normalisation enhance resource definition clarity. The improved Channels formatting follows proper JSON structuring protocols.

Also applies to: 78-78, 73-75

sprites/spr_psy_hood_alpha2/spr_psy_hood_alpha2.yy (1)

2-2: By the Omnissiah's grace, the machine spirits are properly versioned.

Standard GameMaker resource version upgrades detected. The sacred format transitions from empty strings to proper version identifiers align with the Mechanicus protocols.

Also applies to: 15-15, 73-73

sprites/spr_pixel_book_page_highlight/spr_pixel_book_page_highlight.yy (2)

54-54: Animation timing follows proper chronometer protocols.

The 2-second duration at 30 FPS with frame transitions at 0 and 1 second marks demonstrates sound temporal engineering.

Also applies to: 64-64


20-20:

❓ Verification inconclusive

The dimensions of this sacred tome exceed standard parameters.

This sprite's resolution (4160x3744) is substantial and may burden the machine spirits during rendering. Verify that such high resolution is necessary for the intended use case.

Also applies to: 96-96


🏁 Script executed:

#!/bin/bash
# Verify sprite registration in project file
rg -A 2 -B 2 "spr_pixel_book_page_highlight" ChapterMaster.yyp

Length of output: 641


Validate high-resolution sprite necessity

The sprite sprites/spr_pixel_book_page_highlight/spr_pixel_book_page_highlight.yy is indeed registered in ChapterMaster.yyp and carries dimensions of 4160×3744. Such a large asset may strain rendering performance—please confirm that this level of detail is required for the intended use case, or consider downscaling.

• Sprite file: sprites/spr_pixel_book_page_highlight/spr_pixel_book_page_highlight.yy
• Registration: ChapterMaster.yyp (entry found)

objects/obj_controller/Draw_64.gml (3)

24-36: New sacred interface protocols implemented with precision.

The welcome menu rendering logic demonstrates proper adherence to the sacred drawing rituals. Text alignment and image positioning follow established patterns.


180-186: Trade interface protocols properly sanctified.

The conditional rendering for trading interfaces demonstrates sound logic gates. The diplomacy and trade_attempt validation follows proper safety protocols.


37-37:

❌ Incorrect review comment

Unconditional invocation of servo_data_book detected.

The servo_data_book.draw() executes without conditional restraints. Verify this serves the intended purpose, as it may render when unnecessary.


🏁 Script executed:

#!/bin/bash
# Search for servo_data_book usage patterns
ast-grep --pattern 'servo_data_book.$_($$$)'

Length of output: 46


I invoke the Machine Spirit to unearth all servo_data_book incantations:


🏁 Script executed:

#!/bin/bash
rg -n 'servo_data_book' .

Length of output: 518


I invoke the Omnissiah’s gaze upon the servo_data_book definition and its draw incantation:


🏁 Script executed:

#!/bin/bash
sed -n '1650,1800p' objects/obj_controller/Create_0.gml

Length of output: 4354


No conditional guard needed for servo_data_book.draw()

The servo_data_book.draw() call is intentionally unconditional: its initial off-screen coordinates and built-in animate_commands handle both entry and exit animations. Calling draw() every frame drives the Machine Spirit’s motion and off-screen rendering. No additional condition is required.

Likely an incorrect or invalid review comment.

sprites/spr_checker_texture/spr_checker_texture.yy (1)

36-42: Sacred formatting rituals enhance data sanctity.

The structural improvements to tileMode array formatting and addition of sequence dimensions demonstrate proper care for the machine spirit's comprehension. The seqHeight and seqWidth properties align with sprite dimensions as the Omnissiah intended.

Also applies to: 85-86, 92-94

scripts/scr_hit/scr_hit.gml (1)

24-26: The Omnissiah approves this implementation.

The relative coordinate wrapper functions as intended, maintaining consistency with existing patterns.

objects/obj_controller/Create_0.gml (3)

1622-1631: Sacred text formatting protocols enhanced.

The restructured message strings utilize proper line termination sequences, improving readability as decreed by the Codex Mechanicus.


1685-1706: Servo-skull interface matrix properly initialized.

The data structure for the animated codex display follows proper servo-skull operational parameters.


1839-1839: ⚠️ Potential issue

Another logic corruption identified.

Assignment operator contamination detected in conditional check.

Apply this correction:

-        } else if (obj_controller.menu > 500 && !array_length(animate_commands) && move_time == 0){
+        } else if (obj_controller.menu > 500 && !array_length(animate_commands) && move_time == 0){

Wait, I observe this line already uses == correctly. Disregard previous assessment.

Comment on lines +15 to +17
function coord_relevative_positions(coords, xx, yy){
return [coords[0]+xx, coords[1]+yy,coords[2]+xx, coords[3]+yy];
}
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue

Correct the cogitator designation anomaly.

The function name contains a typographical error: coord_relevative_positions should be coord_relative_positions. This inconsistency violates the Machine God's principle of precision.

Apply this blessed correction:

-function coord_relevative_positions(coords, xx, yy){
+function coord_relative_positions(coords, xx, yy){
 	return [coords[0]+xx, coords[1]+yy,coords[2]+xx, coords[3]+yy];
 }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
function coord_relevative_positions(coords, xx, yy){
return [coords[0]+xx, coords[1]+yy,coords[2]+xx, coords[3]+yy];
}
function coord_relative_positions(coords, xx, yy){
return [coords[0]+xx, coords[1]+yy,coords[2]+xx, coords[3]+yy];
}
🤖 Prompt for AI Agents
In scripts/scr_hit/scr_hit.gml around lines 15 to 17, the function name
coord_relevative_positions contains a typo. Rename the function to
coord_relative_positions to correct the spelling and maintain naming
consistency.

Comment on lines +1716 to 1741
var new_servo_pages = function(_string){
var _string_short = function(_string2){
var _bas_height = string_height(" ");
var _string_width = 680*0.6;
var _two_pages = string_height_ext(_string2, -1, _string_width);
var _lines = _two_pages/_bas_height;
return (_lines<=20);
}
if (!_string_short(_string)){
var _tally = "";
var _splits = string_split(_string, "\n");
for (var i=0;i<array_length(_splits);i++){
if (!_string_short(_tally + _splits[i])){
array_push(servo_data_book.pages, _tally);
_tally = "";
}

if (welcome_pages>=1){
for(var i=0; i<4000; i++){
if (string_height(string_hash_to_newline(temp[65]))>260){
lig=string_length(temp[65]);
temp[65]=string_delete(temp[65],lig,1);
_tally += _splits[i]+"\n";
if (i == array_length(_splits)-1){
array_push(servo_data_book.pages, _tally);
}
}
} else {
array_push(servo_data_book.pages, _string);
}
}
Copy link
Contributor

Choose a reason for hiding this comment

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

🧹 Nitpick (assertive)

Text pagination servos functional but suboptimal.

The nested function pattern deviates from standard GML practices. Consider extracting _string_short as a separate script for enhanced maintainability.

🤖 Prompt for AI Agents
In objects/obj_controller/Create_0.gml around lines 1716 to 1741, the nested
function _string_short inside new_servo_pages is not following standard GML
practices. To fix this, extract the _string_short function out of
new_servo_pages and create it as a separate script. Then call this new script
from within new_servo_pages to improve code maintainability and clarity.

Comment on lines +1875 to +1881
/*if (obj_controller.menu = 501){
draw_text_ext(_l_loc[0]+(250*scale), _l_loc[1] + (150*scale), string_hash_to_newline(pages[0]), -1, 680*scale);
draw_text_ext(_r_loc[0]+(250*scale), _l_loc[1] + (150*scale), string_hash_to_newline(pages[1]), -1, 680*scale);
} else if (obj_controller.menu == 502){
draw_text_ext(_l_loc[0]+(250*scale), _l_loc[1] + (150*scale), string_hash_to_newline(pages[2]), -1, 680*scale);
draw_text_ext(_r_loc[0]+(250*scale), _l_loc[1] + (150*scale), string_hash_to_newline(pages[3]), -1, 680*scale);
}*/
Copy link
Contributor

Choose a reason for hiding this comment

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

🧹 Nitpick (assertive)

Purge inactive code segments.

Commented code blocks violate the principle of clean cogitation chambers. Remove these dormant instructions to maintain code sanctity.

-            /*if (obj_controller.menu = 501){
-                draw_text_ext(_l_loc[0]+(250*scale), _l_loc[1] + (150*scale), string_hash_to_newline(pages[0]), -1, 680*scale);
-                draw_text_ext(_r_loc[0]+(250*scale), _l_loc[1] + (150*scale), string_hash_to_newline(pages[1]), -1, 680*scale);
-            } else if (obj_controller.menu == 502){
-                draw_text_ext(_l_loc[0]+(250*scale), _l_loc[1] + (150*scale), string_hash_to_newline(pages[2]), -1, 680*scale);
-                draw_text_ext(_r_loc[0]+(250*scale), _l_loc[1] + (150*scale), string_hash_to_newline(pages[3]), -1, 680*scale);
-            }*/
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
/*if (obj_controller.menu = 501){
draw_text_ext(_l_loc[0]+(250*scale), _l_loc[1] + (150*scale), string_hash_to_newline(pages[0]), -1, 680*scale);
draw_text_ext(_r_loc[0]+(250*scale), _l_loc[1] + (150*scale), string_hash_to_newline(pages[1]), -1, 680*scale);
} else if (obj_controller.menu == 502){
draw_text_ext(_l_loc[0]+(250*scale), _l_loc[1] + (150*scale), string_hash_to_newline(pages[2]), -1, 680*scale);
draw_text_ext(_r_loc[0]+(250*scale), _l_loc[1] + (150*scale), string_hash_to_newline(pages[3]), -1, 680*scale);
}*/
🤖 Prompt for AI Agents
In objects/obj_controller/Create_0.gml around lines 1875 to 1881, there is a
block of commented-out code that is inactive and should be removed to keep the
codebase clean. Delete the entire commented section including the if-else
statements and their contents to eliminate dead code and improve
maintainability.

Comment on lines +1787 to +1800
if (move_time = 0 && array_length(animate_commands) > 0){
current_command = animate_commands[0];
array_delete(animate_commands, 0, 1);
move_time = current_command.move_time*room_speed;
x_turn_move = (current_command.x_end - x)/move_time;
y_turn_move = (current_command.y_end - y)/move_time;
scale_change = (current_command.end_scale - scale)/move_time;
command_count++;
} else if (array_length(animate_commands) == 0 && move_time = 0){
x_turn_move = 0;
y_turn_move = 0;
scale_change = 0;
}
draw_sprite_ext(spr_pixel_servo_book, 0, x, y, scale, scale, 0, c_white, 1);
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue

Critical logic malfunction detected in animation protocols.

Machine spirits report erroneous assignment operators where comparisons are required. These heretical constructs will corrupt the animation sequences.

Apply these sanctified corrections:

-        if (move_time = 0 && array_length(animate_commands) > 0){
+        if (move_time == 0 && array_length(animate_commands) > 0){
-        } else if (array_length(animate_commands) == 0 && move_time = 0){
+        } else if (array_length(animate_commands) == 0 && move_time == 0){
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
if (move_time = 0 && array_length(animate_commands) > 0){
current_command = animate_commands[0];
array_delete(animate_commands, 0, 1);
move_time = current_command.move_time*room_speed;
x_turn_move = (current_command.x_end - x)/move_time;
y_turn_move = (current_command.y_end - y)/move_time;
scale_change = (current_command.end_scale - scale)/move_time;
command_count++;
} else if (array_length(animate_commands) == 0 && move_time = 0){
x_turn_move = 0;
y_turn_move = 0;
scale_change = 0;
}
draw_sprite_ext(spr_pixel_servo_book, 0, x, y, scale, scale, 0, c_white, 1);
if (move_time == 0 && array_length(animate_commands) > 0){
current_command = animate_commands[0];
array_delete(animate_commands, 0, 1);
move_time = current_command.move_time*room_speed;
x_turn_move = (current_command.x_end - x)/move_time;
y_turn_move = (current_command.y_end - y)/move_time;
scale_change = (current_command.end_scale - scale)/move_time;
command_count++;
} else if (array_length(animate_commands) == 0 && move_time == 0){
x_turn_move = 0;
y_turn_move = 0;
scale_change = 0;
}
draw_sprite_ext(spr_pixel_servo_book, 0, x, y, scale, scale, 0, c_white, 1);
🤖 Prompt for AI Agents
In objects/obj_controller/Create_0.gml around lines 1787 to 1800, the code uses
assignment operators (=) instead of comparison operators (==) in the if
conditions, causing logic errors. Replace all instances of single equals (=) in
the if and else if conditions with double equals (==) to correctly perform
comparisons and fix the animation sequence logic.

bookleft_page_loc = [(1000 * scale),1100*scale, 2000*scale, 2400*scale];
bookright_page_loc = [(2000 * scale),1100*scale, 3000*scale, 2400*scale];

var rel_locations = [coord_relevative_positions(bookleft_page_loc,x,y), coord_relevative_positions(bookright_page_loc,x,y)];
Copy link
Contributor

Choose a reason for hiding this comment

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

💡 Verification agent

🧩 Analysis chain

Update function invocation to match corrected designation.

When correcting the function name typo in scr_hit.gml, ensure this invocation is also updated.


🏁 Script executed:

#!/bin/bash
# Description: Verify all usages of the misspelled function name
# Test: Search for all occurrences of the typo. Expect: Only these two locations.
rg "coord_relevative_positions" -A 2 -B 2

Length of output: 1306


By the Omnissiah, correct the function spelling across the codebase.

The typo coord_relevative_positions must be renamed to coord_relative_positions in all definition and invocation sites:

• scripts/scr_hit/scr_hit.gml
– Rename function definition
• scripts/scr_complex_colour_kit/scr_complex_colour_kit.gml
– Update invocation
• objects/obj_controller/Create_0.gml (line 1805)
– Update both calls in the array literal

Example diff for Create_0.gml:

- var rel_locations = [coord_relevative_positions(bookleft_page_loc,x,y), coord_relevative_positions(bookright_page_loc,x,y)];
+ var rel_locations = [coord_relative_positions(bookleft_page_loc, x, y), coord_relative_positions(bookright_page_loc, x, y)];
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
var rel_locations = [coord_relevative_positions(bookleft_page_loc,x,y), coord_relevative_positions(bookright_page_loc,x,y)];
var rel_locations = [coord_relative_positions(bookleft_page_loc, x, y), coord_relative_positions(bookright_page_loc, x, y)];
🤖 Prompt for AI Agents
In objects/obj_controller/Create_0.gml at line 1805, the function name
coord_relevative_positions is misspelled and should be updated to
coord_relative_positions. Change all occurrences of coord_relevative_positions
in this line to coord_relative_positions to match the corrected function name
used throughout the codebase.

@EttyKitty
Copy link
Collaborator

@EttyKitty When your a loose end let me know if this is a step in the right direction or utter garbage visually speaking, i won't be offended either way

I checked this, and I can't really tell how I feel about this.
The idea is cool in theory, in practice it's a bit hard to look at, especially with the text bend.
I think trying to fit text on an already premade asset is not an ideal approach in the first place, and it should be the other way around.
If you were to use the current scroll sprite and add some kind of animation to it (not sure what kind), plus good fonts - it would've been better imo. Both better looking and... pleasantly looking?

The sprite you use is a good fit for a button, like a button to open a ledger, or codex, or quest log, etc. Imo, that is.
Or, worst case, as a nice, noninteractive decal for any other screen you may think of.

@EttyKitty
Copy link
Collaborator

EttyKitty commented Jun 5, 2025

An alternative route - you redo half of the asset, so that it's a perfect base for the text. Not sure how far you want to go with this, though, and not sure if it'll be worth it in the end.

@OH296
Copy link
Collaborator Author

OH296 commented Jun 5, 2025

An alternative route - you redo half of the asset, so that it's a perfect base for the text. Not sure how far you want to go with this, though, and not sure if it'll be worth it in the end.

This is kind of like more what i was thinking like this is ostensibly a currently working and technically working but theoretically wip, like i'm 100% certain if i was to go with this route i wouldn;t keep the background on the sprite and i would rework the sprite to fit wit the text. And i'm allso 100% certain i would get a different font for the text aand also makee the background so the text could be black not white.

In hindsight these are probably caveats i should have mentioned from the outset. but yeah, as i say not sure, the concept may be best useable else where with any number of variations to it, or it might be fine but i gotta just keep working it.

Also i'm kind of just experimenting with how a revised ui might work so in general is a more dynamic movable setup something even worth investing time in (i mean it's also just generally enjoyable so pure effort vs reward is kinda irrelevant to me on some levels)

@github-actions
Copy link
Contributor

This PR is marked as stale, because it has been open for 7 days with no activity.

@github-actions github-actions bot added the Status: Stale No activity for more than a week label Jun 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: Sprites Changes to sprites/images or their under-the-hood functionality Size: Big Status: Stale No activity for more than a week Type: Feature Adds something new

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants