-
Couldn't load subscription status.
- Fork 39
feat: Imperial Loyalty #635
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?
feat: Imperial Loyalty #635
Conversation
|
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the 📝 WalkthroughSummary by CodeRabbit
WalkthroughIn this sacred update, a new resource, scr_battle_count, has been inscribed into the hallowed configuration of the project, augmenting its capabilities for tracking enemy clearance. The modifications within the alarm event now increment the enemies_cleared_count, invoking the newly established battle count function. This function, scr_battle_count, executes specific actions upon the achievement of enemy clearance milestones, selecting random alerts and logging significant events whilst recalibrating faction dispositions within prescribed limits. Furthermore, the cleansing logic within the enemy AI has undergone refinement, ensuring proper comparison mechanics and structured operations through the introduction of an additional variable to capture the original state of the planet's ownership. The global controller now bears the enemies_cleared_count variable, with enhancements to the load and save routines facilitating the preservation of this vital data via an INI file. Thus, the changes serve to expand resource management and enemy tracking functionalities, as decreed by the Machine Spirit’s sacred codex. ✨ Finishing Touches🧪 Generate Unit Tests
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed 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)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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: 4
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (5)
ChapterMaster.yyp(2 hunks)objects/obj_ncombat/Alarm_5.gml(1 hunks)scripts/scr_battle_count/scr_battle_count.gml(1 hunks)scripts/scr_battle_count/scr_battle_count.yy(1 hunks)scripts/scr_enemy_ai_a/scr_enemy_ai_a.gml(1 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
`**/*.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 ga...
**/*.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.
scripts/scr_battle_count/scr_battle_count.gmlobjects/obj_ncombat/Alarm_5.gmlscripts/scr_enemy_ai_a/scr_enemy_ai_a.gml
`**/*.gml`: Color codes in the code shouldn't have any spaces in their id. I.e., color code `# 80 bf40` will crash the game.
**/*.gml: Color codes in the code shouldn't have any spaces in their id. I.e., color code# 80 bf40will crash the game.
scripts/scr_battle_count/scr_battle_count.gmlobjects/obj_ncombat/Alarm_5.gmlscripts/scr_enemy_ai_a/scr_enemy_ai_a.gml
🔇 Additional comments (10)
scripts/scr_battle_count/scr_battle_count.yy (2)
10-11: Resource Type and Version Adherence
The sacred attributes"resourceType":"GMScript"and"resourceVersion":"2.0"are clearly set. These declarations honour the canonical format required by the engine and are blessed by the Omnissiah.
12-12: Object Closure Sanctity
The closing brace finalises the object as required by the rites of our JSON-like lore. All is in order to please the Machine Spirit.ChapterMaster.yyp (1)
789-789: Addition of new script resource is logically sound and properly formatted.Praise be to the Omnissiah! This binary alteration introduces the sacred script
scr_battle_countto the project's holy registry. The machine spirit shall now correctly recognize and execute this new component when invoked. This addition serves the divine purpose outlined in the sacred PR - the implementation of imperial recognition and disposition rewards for the faithful who purge enemies of mankind every fourth planetary cleansing. The format adheres to the correct syntactical patterns observed throughout the configuration file. The Mechanicus approves this integration with the project's logical structure.objects/obj_ncombat/Alarm_5.gml (1)
378-379: Praise be to the implementation of the imperial recognition mechanism!This implementation properly tracks the count of vanquished enemies and initiates the rewards protocol. The Emperor's servants shall be pleased with the systematic elimination of xenos filth.
scripts/scr_battle_count/scr_battle_count.gml (4)
1-6: Function initialization and safety protocols acceptable.The binary initiation logic properly validates the existence of the global variable before proceeding. This defensive programming ritual appeases the Machine Spirit.
8-12: Logical assessment of cleansing milestones.The function correctly evaluates if the enemies_cleared_count is both positive and divisible by 4, ensuring the reward protocol activates at appropriate intervals. Excellent application of the sacred modulo operator.
13-55: Random selection algorithm pleases the Omnissiah.The implementation of five different message variants introduces appropriate variance in imperial communications. The switch statement is a logical and efficient structure for this purpose.
59-67: Disposition adjustment values follow appropriate imperial protocol.The loyalty increments to relevant imperial factions are properly weighted according to their position in the hierarchy of the Imperium. The error logging for missing controller is a prudent safeguard.
scripts/scr_enemy_ai_a/scr_enemy_ai_a.gml (2)
829-830: Proper implementation of imperial recognition mechanism.These lines correctly increment the global enemy clearance counter and activate the reward function in accordance with the sacred rituals of the Administratum.
831-832: Event logging and notification protocols follow imperial standards.The implementation properly records the cleansing of heretical entities in the event log and dispatches appropriate notifications. The disposition threshold check for planetary allegiance shift is logically sound.
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.
Would be funny to see disposition increase even when renegade, but we'll tackle that later.
Yes but then this will create a problem. where all your deeds will only be imperium and there will be no inquisition deeds because they do not control anything directly and it doesn't make sense for you to preform deeds only for inquisition to somehow feel anything other than you doing your job. |
|
However in my case i assume that these actions do not directly target any specific faction deed instead it will be general impression from you just making everything better. if we were to apply that logic to deeds it would make the function probably multi-layered. Either that or make the function itself call another to calculate X amount of deeds for inquisition to take notice and then we will have to apply that logic to mechanicus and others because their control is very limited unlike the imperium. |
|
For now the game code will only check if the threat in the planet is cleared not the fact it was extreme or otherwise. which is another problem if we gonna make the system complex. |
Well, it's not really a problem. You just award the inq deed points on other actions. |
|
By the way, perhaps battling hostile forces can also be made to award loyalty, in addition to disposition? |
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.
Generally, I think the idea is okay, but requires refinement, as otherwise it's very cheesy atm.
I already feel like my req points reward for battles is pushing the cheesiness of battle rewards, same with the exp rewards.
| } else if (p_first[_run] == eFACTION.Mechanicus || p_type[_run] == "Forge") { // If originally Mechanicus or a Forge World | ||
| who_return = "the Adeptus Mechanicus"; | ||
| obj_controller.disposition[eFACTION.Mechanicus] += 5; // FACTION disposition bonus |
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.
Isn't it possible to cheese all of these dispo/planet dispo rewards, by leaving a squad on the planet and waiting for a lvl 1 enemy to pop up?
I think there should be some kind of relation to the enemy power fought.
Also, population % from max should matter, perhaps.
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.
True, if you combine with SR rework, this would indeed become comedic as you take out a squad of orks, and imperials start to like you...
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.
According to game logic, those squad of orks if left unchecked will more than likely cause supply disruption and lots of problems in the local system otherwise they wouldn't be able at all to penetrate the defensive fleet yes? orks multiply very fast and if left unchecked will very quickly become a serious problem. Typically imperium response is so slow but to the plantery governor you are preserving otherwise very needed resources.
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.
Based on experience - if there is some PDF left around, they generally should be capable to handle the ork invasion when it's strength is reduced. Say, SR 1 orks versus ~10'000 PDF troops. Bonus if they do get some fortifications, and your marine garrisons helping out.
But if PDF is 0, yeah, the player basically has no option but to wipe the invaders off the surface. The next turn, imperial control is restored and they rebuild the PDF.
And Imperial Guard fleets tend to be rare in terms of their rescue capabilities.
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.
Isn't it possible to cheese all of these dispo/planet dispo rewards, by leaving a squad on the planet and waiting for a lvl 1 enemy to pop up? I think there should be some kind of relation to the enemy power fought.
Also, population % from max should matter, perhaps.
I'm trying to think of a way to avoid this i guess cooldown after cleaning the planet will suffice. my old method of making whatever you save somehow your responsibility is kinda bad.
| function scr_battle_count(){ | ||
|
|
||
| // Check if the count is positive and a multiple of 6 | ||
| if (obj_controller.enemies_cleared_count > 0 && (obj_controller.enemies_cleared_count % 6 == 0)) { |
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.
Same here. If it doesn't take into account what power was fought, the reward for clearing 6 worlds with 1000 people and 1lvl enemy will give the same reward as clearing 6 worlds with 1 billion of people and 6lvl enemies.
Maybe no one even asked you to help them, and the world has 1 billion defenders. Why do they care?
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.
Actually, there is a mechanic where governors ask for help, isn't there? I haven't seen the code for it, so not sure how it works.
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.
efficiency, the sooner the enemy is gone the better for everyone, besides extensive cleaning takes time while low priority for Astrates they are often far more effective at doing that. Disposition doesn't just mean governor but also to extend the population willing to cooperate. Your presence doing cleaning job is more than enough to reinforce the image of "His Angels".
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.
Tho i generally agree that it's better to be done through deed system. But in that case it's hard to avoid abusing since enemies grow all the time so the cycle of letting enemy get to high threat then killing them might happen.
Idk if i want to apply turn tracking system or you get the deed only through completely cleaning the planet.
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.
I mean, if we limit the deed system to require 100 deed points to get 1 faction disposition point, then we can set certain deed point acquisitions per specific actions.
Like, 1 deed point per SR level of enemies destroyed, but you get 10 deed points for planet's control (amount can be tweaked further by planet type) being restored to imperium.
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.
100 per 1 dispo is bad ratio it means you can clean most of the game and barely get over 5, the biggest problem is tracking logic. How do you intent to make the game know that you cleared an actual enemy instead of artificial enemy by making them grow and abusing the system? that's why i was considering universal deed point based on different factions.
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.
How do you intent to make the game know that you cleared an actual enemy instead of artificial enemy by making them grow and abusing the system?
Make liberating planets reward much more points than simply destroying enemies.
Personally, I want to leave an inefficient farming capability for player.
So let's raise it to 1000 deed point limit then. Make liberating planets reward ~100 points.
While SR fighting rewards 1 deed point per SR level.
Do you still think it is bad?
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.
You could make deed point limits variable.
For example if your disposition is low (let's say 15), the limit could be lower - 160 deed points.
If disposition is high (let's say 50), the limit is higher - 510 points.
Which also addresses the farming issue to some extent.
Co-authored-by: EttyKitty <20323032+EttyKitty@users.noreply.github.com>
|
TL;DR from discord discussion - we now going to tie deed points or disposition earnings with "governor requests help" events. |
This system will now increase loyalty until i figure out the deed system
Purpose of changes
This change is intended to be the way to increase the loyalty by doing your job with potential to include deed tracking on a different rep
Describe the solution
Every 10 planets your loyalty will increase, and since i do not know how to increase marines loyalty it should do that as well.
Describe alternatives you've considered
Perhaps making it chance based, or increase the number of planets.
still in testing phase for now
Testing done
Gameplay and bunch of turns
Related links
None
Custom player notes entry
Use the PR title.