-
Notifications
You must be signed in to change notification settings - Fork 43
feat: Ground Combat Rebalance #431
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
base: main
Are you sure you want to change the base?
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
1eabd4f to
51b6826
Compare
|
rebased onto current development |
Inverts values so Damage reduction works as intended
|
This PR is marked as stale, because it has been open for 7 days with no activity. |
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 6
♻️ Duplicate comments (11)
scripts/scr_en_weapon/scr_en_weapon.gml (1)
154-166: Parameter naming inconsistency disrupts the litany of readability.Throughout the freshly-forged hunk, the code oscillates between
name(the declared parameter) andargument0. While functionally identical, this duality hinders clarity for future maintainers.Recommendation: standardise on the explicit
nameparameter for legibility, or add a local alias at the top of the function and use it consistently.scripts/scr_equipment_struct/scr_equipment_struct.gml (1)
169-180: Equality incantations mis-written; armor-penetration spirit is always set to Anti-Vehicle.The comparison sigils employ a single
=symbol, which in GML is assignment, not equivalence. Thus:if (arp=4) { … }mutates
arpto 4, the expression evaluates to true, and every weapon immediately acquires the "Anti Vehicle" property—even las-cutlery.Sanctify the logic with
==(or, for elegance, aswitch) so the Machine Spirit may discern the correct descriptor:- if (arp=4){ + if (arp == 4) { array_push(special_properties_array, "Anti Vehicle") - } - else if (arp=1){ + } + else if (arp == 1) { array_push(special_properties_array, "Low Penetration") - } - else if (arp=2){ + } + else if (arp == 2) { array_push(special_properties_array, "Medium Penetration") - } - else if (arp=3){ + } + else if (arp == 3) { array_push(special_properties_array, "High Penetration") }Without this correction, in-game balance will be catastrophically skewed.
objects/obj_p_assra/Step_0.gml (2)
70-70: Vestigial variable contamination persists.The unused
boarding_difficultyvariable remains in the declaration list despite previous review feedback.
96-102: Weapon array cogitation error persists.The weapon check still compares structs to empty strings and uses
breakinstead ofcontinuein the loop, as identified in previous reviews.scripts/scr_shoot/scr_shoot.gml (3)
295-295: Out-of-band AP values detected - weapon effectiveness compromised.The missile emplacement (-1) and silo (0) AP values fall outside the 1-4 range, resulting in zero armor reduction.
Map these to valid values:
- armour_pierce = -1; + armour_pierce = 3; // Moderate AP for missile emplacement- armour_pierce = 0; + armour_pierce = 2; // Lower AP for area effect siloAlso applies to: 300-300
306-333: Inverted armor reduction cogitators - blessed penetration becomes cursed reinforcement.The AP multipliers strengthen armor instead of weakening it. Higher AP values multiply armor by larger factors.
Reverse the multiplier logic:
if (target_object.dudes_vehicle[target_type]) { if (armour_pierce == 4) { target_armour_value = 0; } if (armour_pierce == 3) { - target_armour_value = target_armour_value * 2; + target_armour_value = target_armour_value * 0.25; } if (armour_pierce == 2) { - target_armour_value = target_armour_value * 4; + target_armour_value = target_armour_value * 0.5; } if (armour_pierce == 1) { - target_armour_value = target_armour_value * 6; + target_armour_value = target_armour_value * 0.75; } } else { if (armour_pierce == 4) { target_armour_value = 0; } if (armour_pierce == 3) { - target_armour_value = target_armour_value * 1.5; + target_armour_value = target_armour_value * 0.3; } if (armour_pierce == 2) { - target_armour_value = target_armour_value * 2; + target_armour_value = target_armour_value * 0.5; } if (armour_pierce == 1) { - target_armour_value = target_armour_value * 3; + target_armour_value = target_armour_value * 0.7; } }
432-453: Duplicate machine-code detected - violates the sacred DRY principle.Extract this repeated armor calculation into a blessed helper function.
Create a helper function:
function calculate_armor_reduction(base_armor, ap_value, is_vehicle) { if (ap_value == 4) return 0; var multipliers_vehicle = [0, 0.75, 0.5, 0.25]; // index by AP var multipliers_infantry = [0, 0.7, 0.5, 0.3]; // index by AP if (ap_value >= 1 && ap_value <= 3) { return base_armor * (is_vehicle ? multipliers_vehicle[ap_value] : multipliers_infantry[ap_value]); } return base_armor; // No reduction for invalid AP }scripts/scr_culture_visuals/scr_culture_visuals.gml (1)
1930-1940: Wrist-mount lacks servo-arm calibration data.Add positioning metadata for proper gauntlet integration.
base: { weapon_data: { display_type: "normal_ranged", - new_weapon_draw: true + new_weapon_draw: true, + arm_type: 1, + hand_type: 0 }, },scripts/scr_weapon/scr_weapon.gml (3)
1087-1095: Missile Launcher description requires adjustment to reflect reduced penetrationThe cogitators detect inconsistency between the weapon's description mentioning "armor-piercing" capability and its reduced armor penetration value of 2. This truth must be revealed to users.
704-704: Integrated weapon systems lack sacred documentationThe Machine Spirits of Integrated-Grav, Integrated-Melta, Integrated-Plasma, and Integrated-Flamer require proper liturgical descriptions for the Tech-Adepts to understand their blessed functions.
Also applies to: 879-879, 976-976, 1584-1584
2058-2060: Artificer Armour tier variance requires cogitationThe sacred armor values remain uniform across quality tiers (30/30/30), defying the hierarchical doctrine of the Mechanicus. Master-crafted and artifact variants should manifest superior protection.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
⛔ Files ignored due to path filters (2)
sprites/spr_cyclone_launcher/8cb6d9eb-f4d0-4e70-8a60-33dd017f0b50.pngis excluded by!**/*.pngsprites/spr_cyclone_launcher/layers/8cb6d9eb-f4d0-4e70-8a60-33dd017f0b50/0f31cf23-d758-4aec-a384-f40c841e8042.pngis excluded by!**/*.png
📒 Files selected for processing (13)
ChapterMaster.yyp(3 hunks)objects/obj_enunit/Alarm_1.gml(26 hunks)objects/obj_p_assra/Step_0.gml(4 hunks)objects/obj_popup/Draw_0.gml(3 hunks)scripts/scr_clean/scr_clean.gml(4 hunks)scripts/scr_culture_visuals/scr_culture_visuals.gml(2 hunks)scripts/scr_en_weapon/scr_en_weapon.gml(13 hunks)scripts/scr_equipment_struct/scr_equipment_struct.gml(3 hunks)scripts/scr_player_combat_weapon_stacks/scr_player_combat_weapon_stacks.gml(3 hunks)scripts/scr_shoot/scr_shoot.gml(5 hunks)scripts/scr_unit_equip_functions/scr_unit_equip_functions.gml(4 hunks)scripts/scr_weapon/scr_weapon.gml(61 hunks)sprites/spr_cyclone_launcher/spr_cyclone_launcher.yy(1 hunks)
🧰 Additional context used
📓 Path-based instructions (3)
`**/*.*`: - 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.
sprites/spr_cyclone_launcher/spr_cyclone_launcher.yyscripts/scr_en_weapon/scr_en_weapon.gmlscripts/scr_equipment_struct/scr_equipment_struct.gmlscripts/scr_unit_equip_functions/scr_unit_equip_functions.gmlobjects/obj_popup/Draw_0.gmlobjects/obj_p_assra/Step_0.gmlscripts/scr_shoot/scr_shoot.gmlscripts/scr_clean/scr_clean.gmlscripts/scr_player_combat_weapon_stacks/scr_player_combat_weapon_stacks.gmlobjects/obj_enunit/Alarm_1.gmlChapterMaster.yypscripts/scr_culture_visuals/scr_culture_visuals.gmlscripts/scr_weapon/scr_weapon.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_cyclone_launcher/spr_cyclone_launcher.yy
`**/*.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
# 80bf40will crash the game.- All code should comply with the main GML documentation: https://manual.gamemaker.io/beta/en/GameMaker_Language/GML_Reference/GML_Reference.htm
scripts/scr_en_weapon/scr_en_weapon.gmlscripts/scr_equipment_struct/scr_equipment_struct.gmlscripts/scr_unit_equip_functions/scr_unit_equip_functions.gmlobjects/obj_popup/Draw_0.gmlobjects/obj_p_assra/Step_0.gmlscripts/scr_shoot/scr_shoot.gmlscripts/scr_clean/scr_clean.gmlscripts/scr_player_combat_weapon_stacks/scr_player_combat_weapon_stacks.gmlobjects/obj_enunit/Alarm_1.gmlscripts/scr_culture_visuals/scr_culture_visuals.gmlscripts/scr_weapon/scr_weapon.gml
🔇 Additional comments (44)
ChapterMaster.yyp (3)
1073-1073: Cyclone launcher sprite integration verified.
The entry forspr_cyclone_launcheradheres to naming conventions and correct folder path.
1656-1656: Omnissian Axe sprite entry is correct.
spr_weapon_omnissian_axefollows the project's prefix and resource path standards.
1675-1675: Shotgun sprite added appropriately.
Thespr_weapon_shotgunresource aligns with naming and directory conventions.objects/obj_popup/Draw_0.gml (3)
1272-1273: LGTM: Data retrieval follows the blessed patterns.The gear and mobility data retrieval aligns with the existing weapon data patterns. The Machine Spirit approves this consistency.
1448-1448: Simplified validation logic sanctified.The removal of "Assortment" from the exclusion list whilst retaining ITEM_NAME_ANY and ITEM_NAME_NONE maintains proper validation hierarchy.
1470-1484: Tag-based validation replaces archaic string matching.This blessed refactoring replaces hardcoded compatibility checks with flexible tag-based validation. The logic properly enforces terminator and dreadnought compatibility rules through the sacred has_tag() methods.
scripts/scr_en_weapon/scr_en_weapon.gml (2)
20-20: Default armor penetration blessed with the sacred unity.The elevation of base armor penetration from 0 to 1 establishes a proper foundation for the new penetration hierarchy. The Machine Spirit approves this standardisation.
Also applies to: 29-29
36-1038: Comprehensive weapon rebalancing sanctified by the Omnissiah.The systematic elevation of armor penetration values across all enemy weapon systems aligns with the sacred rebalancing protocols. The standardisation of attack values and refinement of range/splash parameters demonstrates proper adherence to the new combat doctrines.
sprites/spr_cyclone_launcher/spr_cyclone_launcher.yy (1)
1-90: Sacred sprite resource properly inscribed in the data-vaults.The Cyclone Launcher sprite follows the blessed GameMaker resource structure. Proper categorisation under MarineViewer texture group ensures efficient rendering. The Machine Spirit approves this addition to the arsenal.
scripts/scr_equipment_struct/scr_equipment_struct.gml (2)
49-49: Maintenance calculation sanctified with additive logic.The change from assignment to addition allows proper accumulation of maintenance values rather than overwriting existing calculations. The Machine Spirit approves this refinement.
326-326: Documentation blessed with clarity.The addition of parameter documentation for
gear_weapon_dataenhances the sacred knowledge-base for future Tech-Adepts.objects/obj_enunit/Alarm_1.gml (5)
76-1733: Blessed be the Omnissiah's rebalancing protocols.The extensive defensive stat adjustments align with the broader combat rebalancing initiative. The values appear systematically adjusted to create better unit differentiation and combat progression.
798-800: Machine-spirit classification corrected.The reclassification of "Shining Spear" units from infantry to vehicles aligns with their jetbike nature. This will properly apply vehicle combat mechanics to these units.
1774-1774: Proper instance termination protocols engaged.Passing the instance ID to
instance_destroy()ensures correct target elimination.
1781-1781: Engagement detection subroutines optimised.The consolidated collision detection with increased offset (14 units) simplifies the logic while maintaining functionality.
786-786: Cogitate: Verify weapon nomenclature consistency.The weapon name change from "Eldar Missile Launcher" to "Tempest Launcher" must be reflected across all data files and weapon definitions to prevent null reference exceptions.
#!/bin/bash # Description: Verify the weapon name change is consistent across the codebase # Search for any remaining references to the old weapon name rg "Eldar Missile Launcher" -A 2 -B 2 # Verify the new weapon exists in weapon definitions ast-grep --pattern 'Tempest Launcher'scripts/scr_unit_equip_functions/scr_unit_equip_functions.gml (2)
331-368: Tag-based validation protocols are most efficient.The comprehensive validation logic properly enforces equipment restrictions using the tag system. The specific handling for terminator armour, power armour requirements, and the edge case for Jump Packs without armour demonstrates thorough implementation.
334-382: Error cogitation protocols vastly improved.The transition from string error codes to boolean returns with detailed logging follows standard machine-spirit communication protocols. The contextual error messages will aid future Tech-Adepts in diagnostics.
scripts/scr_clean/scr_clean.gml (1)
135-150: By the Omnissiah’s cog, scanning for weapons with AP values 2 or 3…#!/bin/bash # Description: Check for weapons with AP values 2 or 3 rg "arp *= *[23]" -n scripts/scr_weapon/objects/obj_p_assra/Step_0.gml (2)
85-132: Modular boarding protocols are most efficient.The separation of boarding odds into distinct components (base odds, advantages, disadvantages, gear bonuses, marine bonuses) with final clamping creates a more maintainable and balanced system.
104-114: Tag-based weapon protocols properly implemented.The transition from hardcoded weapon checks to tag-based bonuses ("boarding 1", "boarding 2", "boarding 3") aligns with the Omnissiah's grand design for modular weapon systems.
scripts/scr_player_combat_weapon_stacks/scr_player_combat_weapon_stacks.gml (4)
38-54: Ammunition allocation protocols enhanced.The conditional ammo multipliers based on unit type and equipment tags (dreadnought 3x, bonus_ammo 2x, vehicle 4x) provide meaningful equipment differentiation.
332-341: Combat flow subroutines properly centralised.The
set_up_player_blocks_turnfunction consolidates alarm setting and turn increment logic, improving code organisation.
343-359: Message array reset protocols consolidated.The
reset_combat_message_arraysfunction properly centralises message handling logic previously scattered across combat objects.
292-292: Vehicle weapon stack protocols correctly implemented.Passing "vehicle" as the unit parameter properly triggers the 4x ammunition multiplier for vehicle-mounted weapons.
scripts/scr_shoot/scr_shoot.gml (2)
100-100: Blessed consistency in parameter propagation.The weapon_index_position parameter addition to all scr_clean invocations is properly implemented.
Also applies to: 136-136, 187-187
144-146: Proper timing adjustment for attack modifier application.Moving the shots_fired multiplication before the melee check ensures consistent application across all combat types.
scripts/scr_culture_visuals/scr_culture_visuals.gml (3)
612-619: Cyclone Missile System integration - properly blessed.The sacred missile augmentation is correctly configured for Terminator deployment.
1942-1952: Scout shotgun manifest - correctly catalogued.The close-quarters blessed boomstick is properly configured.
1954-1968: Omnissian Axe sanctified - proper servo-arm grip parameters.The blessed implement of tech-redemption is correctly configured with appropriate melee handling.
scripts/scr_weapon/scr_weapon.gml (14)
17-17: Blessed modification to Storm Shield boarding protocolsThe addition of "boarding 2" tag aligns with the sacred doctrines of void combat. The Machine Spirit approves.
33-33: Optimal boarding designation for Boarding ShieldThe "boarding 3" tag correctly represents this shield's superior protection during boarding actions, as befitting its designation.
51-56: Archeotech Laspistol sanctified with proper combat parametersThe holy trinity of range (4.1), splash (0), and armor penetration (1) has been properly calibrated. The Omnissiah smiles upon these adjustments.
61-72: Combat Knife lethality parameters optimizedAttack values (100/125/150) and splash damage (2) properly reflect this blade's effectiveness in Astartes hands. The armor penetration value of 1 is appropriate for a basic melee weapon.
77-88: Chainsword receives righteous fury enhancementThe increased attack values (150/180/250) and addition of "savage" and "boarding 1" tags properly represent this weapon's brutal nature. Splash damage of 4 reflects its chain-teeth's area effect.
289-312: The Omnissiah's blessed implement manifests!This sacred weapon of the Mechanicus is properly configured with formidable attack values (400/450/550) and the divine "combi_tool" special property. The armor penetration of 3 and "boarding 3" tag befit a weapon of such holy purpose.
648-663: Scout Shotgun parameters correctly calibratedThe weapon's close-range nature (4.1) and high splash damage (8) properly simulate scatter-shot effectiveness. Attack values (250/300/350) are appropriately balanced for scout operations.
1097-1112: Cyclone Missile Launcher ordained for righteous devastationThis terminator-mounted weapon system shows proper calibration with doubled splash damage (20) compared to standard patterns, befitting its rapid-fire capability. The Omnissiah approves these specifications.
1194-1207: Heavy Bolter penetration protocols adjusted per sacred edictThe reduction to armor penetration 2 properly reflects this weapon's role as an anti-infantry platform rather than anti-armor. The Machine Spirit acknowledges this rebalancing.
1032-1047: Deathwatch xenophase targeting protocols implementedThis sanctified long-rifle shows proper superiority over standard patterns with enhanced damage output (250/300/350) and improved armor penetration (2). The Watch approves.
88-88: Boarding action protocols properly sanctifiedThe sacred gradations of boarding effectiveness (1-3) have been applied with appropriate logic across the arsenal. Basic implements receive minimal blessing, while siege-rated weapons achieve maximum void-combat efficiency.
Also applies to: 109-109, 173-173, 231-231, 287-287, 352-352, 402-402, 418-418
2793-2796: Servo-appendage machine spirits properly attunedThe transition from "special_properties" to "specials" field represents proper data sanctification. The "combi_tool" values (1 for arm, 2 for harness) correctly reflect their blessed repair capabilities.
Also applies to: 2809-2812
1145-1145: Integrated-Bolter designation achieves uniformityThe hyphenated nomenclature now aligns with other integrated weapon patterns, bringing harmony to the data-spirits.
2822-2829: Cyclone Missile System integration protocols verifiedThis blessed Terminator-exclusive system properly links to its weapon profile and applies appropriate hand usage penalties. The "terminator_only" tag ensures proper deployment restrictions.
Blogaugis
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't see any obvious issues.
|
This PR is marked as stale, because it has been open for 7 days with no activity. |
|
Bumping this. It should be ready for the merge. Someone just needs to update it and solve conflicts. |
This PR migrated from here EttyKitty#163.
As per original description:
Intent:
Desired End-state
Changes
Notes
A related PR: #315
A structured doc with all said rebalance changes:
https://docs.google.com/spreadsheets/d/1ZMPRXjmd3tWvFmWiIYb-nQ9qT5PYPiu_75SJNhcYqvg/edit?gid=1993273333#gid=1993273333