Skip to content
Draft
Show file tree
Hide file tree
Changes from 43 commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
55fec8e
Create scr_battle_count.gml
Frost-bit-jpg Mar 27, 2025
417e4bd
Create scr_battle_count.yy
Frost-bit-jpg Mar 27, 2025
4e7cc4d
Merge branch 'Adeptus-Dominus:main' into scr_battle_count
Frost-bit-jpg Mar 27, 2025
2532464
Update ChapterMaster.yyp
Frost-bit-jpg Mar 27, 2025
b52591b
Update Alarm_5.gml
Frost-bit-jpg Mar 27, 2025
e7f5175
Update scr_enemy_ai_a.gml
Frost-bit-jpg Mar 27, 2025
f9e4bc2
Update scr_battle_count.gml
Frost-bit-jpg Mar 27, 2025
7f6ff0d
Update scr_battle_count.gml
Frost-bit-jpg Mar 27, 2025
d93abb2
Update scr_battle_count.gml
Frost-bit-jpg Mar 27, 2025
fb55269
Update scr_enemy_ai_a.gml
Frost-bit-jpg Mar 27, 2025
a233b7d
Update scr_enemy_ai_a.gml
Frost-bit-jpg Mar 27, 2025
03d4573
Update scr_enemy_ai_a.gml
Frost-bit-jpg Mar 27, 2025
c5411af
Update Alarm_5.gml
Frost-bit-jpg Mar 27, 2025
8c32358
Update scr_battle_count.gml
Frost-bit-jpg Mar 27, 2025
f6c1228
Update scr_enemy_ai_a.gml
Frost-bit-jpg Mar 27, 2025
d48bb6a
Update Create_0.gml
Frost-bit-jpg Mar 27, 2025
c4f1acb
Update scr_load_controller.gml
Frost-bit-jpg Mar 27, 2025
fbde5da
Update scr_save_controller.gml
Frost-bit-jpg Mar 27, 2025
80c2456
Update scripts/scr_enemy_ai_a/scr_enemy_ai_a.gml
Frost-bit-jpg Mar 27, 2025
605af3c
Update scripts/scr_battle_count/scr_battle_count.gml
Frost-bit-jpg Mar 27, 2025
8a5f5d9
Merge branch 'main' into scr_battle_count
Frost-bit-jpg Mar 28, 2025
ff1bab5
Update scripts/scr_battle_count/scr_battle_count.gml
Frost-bit-jpg Mar 28, 2025
2729420
Update scr_battle_count.gml
Frost-bit-jpg Mar 28, 2025
05d18eb
Update scr_battle_count.gml
Frost-bit-jpg Mar 28, 2025
b6c7cd0
Update scr_battle_count.gml
Frost-bit-jpg Mar 28, 2025
00e0d51
Update scripts/scr_battle_count/scr_battle_count.gml
Frost-bit-jpg Mar 28, 2025
85bf01a
Update scripts/scr_enemy_ai_a/scr_enemy_ai_a.gml
Frost-bit-jpg Mar 28, 2025
18793de
fix: failed to check demonworlds as hostile
Frost-bit-jpg Mar 28, 2025
4312395
fix: scr_battle_count metadata
MCPO-Spartan-117 Mar 28, 2025
b300e25
fix: Proper comment
MCPO-Spartan-117 Mar 28, 2025
01aaa7a
fix: Remove diff symbols from bot
MCPO-Spartan-117 Mar 28, 2025
25b40e8
fix: Format and fix for loop
MCPO-Spartan-117 Mar 28, 2025
e398fb7
fix: Proper colors
MCPO-Spartan-117 Mar 28, 2025
2b8f6ab
refactor: Array and struct for readability and maintenance
MCPO-Spartan-117 Mar 28, 2025
9c47283
style: Auto changes
MCPO-Spartan-117 Mar 28, 2025
0b345ed
refactor: Use elses and some formatting
MCPO-Spartan-117 Mar 28, 2025
826bd9c
Merge pull request #2 from MCPO-Spartan-117/scr_battle_count
Frost-bit-jpg Mar 28, 2025
0df49ad
Update scripts/scr_battle_count/scr_battle_count.gml
OH296 Mar 28, 2025
869907b
Update scripts/scr_battle_count/scr_battle_count.gml
Frost-bit-jpg Mar 29, 2025
66738db
Merge branch 'main' into scr_battle_count
Frost-bit-jpg Mar 29, 2025
627d8d6
Merge branch 'main' into scr_battle_count
Frost-bit-jpg Mar 30, 2025
4b3ae9e
Merge branch 'main' into scr_battle_count
Frost-bit-jpg Mar 31, 2025
a8951d5
Merge branch 'main' into scr_battle_count
Frost-bit-jpg Apr 2, 2025
c655f4a
Revert "refactor: Use elses and some formatting"
MCPO-Spartan-117 Apr 2, 2025
63ee714
Revert "fix: failed to check demonworlds as hostile"
MCPO-Spartan-117 Apr 2, 2025
ea571a5
Merge pull request #7 from MCPO-Spartan-117/scr_battle_count
Frost-bit-jpg Apr 2, 2025
d4a15f6
Merge branch 'main' into scr_battle_count
Frost-bit-jpg Apr 12, 2025
fae1b8e
Update scripts/scr_load_controller/scr_load_controller.gml
Frost-bit-jpg Apr 12, 2025
14c4b91
Merge branch 'main' into scr_battle_count
Frost-bit-jpg May 11, 2025
a5de627
Merge branch 'main' into scr_battle_count
Frost-bit-jpg May 16, 2025
262bd45
Update scr_battle_count.gml
Frost-bit-jpg May 16, 2025
8aa0d3e
Update scr_battle_count.gml
Frost-bit-jpg May 16, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions ChapterMaster.yyp
Original file line number Diff line number Diff line change
Expand Up @@ -672,6 +672,7 @@
{"id":{"name":"scr_arti_descr","path":"scripts/scr_arti_descr/scr_arti_descr.yy",},},
{"id":{"name":"scr_audience","path":"scripts/scr_audience/scr_audience.yy",},},
{"id":{"name":"scr_battle_allies","path":"scripts/scr_battle_allies/scr_battle_allies.yy",},},
{"id":{"name":"scr_battle_count","path":"scripts/scr_battle_count/scr_battle_count.yy",},},
{"id":{"name":"scr_battle_roster","path":"scripts/scr_battle_roster/scr_battle_roster.yy",},},
{"id":{"name":"scr_battle_sort","path":"scripts/scr_battle_sort/scr_battle_sort.yy",},},
{"id":{"name":"scr_bionics_count","path":"scripts/scr_bionics_count/scr_bionics_count.yy",},},
Expand Down
1 change: 1 addition & 0 deletions objects/obj_controller/Create_0.gml
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@ obj_controller.restart_strength=0;
obj_controller.restart_cooperation=0;
obj_controller.restart_purity=0;
obj_controller.restart_stability=0;
obj_controller.enemies_cleared_count = 0;
Comment thread
Frost-bit-jpg marked this conversation as resolved.

// ** Sets default equipement for roles **
// 100 is defaults, 101 is the allowable starting equipment
Expand Down
2 changes: 2 additions & 0 deletions objects/obj_ncombat/Alarm_5.gml
Original file line number Diff line number Diff line change
Expand Up @@ -490,6 +490,8 @@ if (defeat=0) and (reduce_power=true){
p_owner[battle_planet] = eFACTION.Imperium
}
dispo[battle_planet] += 10;
obj_controller.enemies_cleared_count += 1;
scr_battle_count();
scr_event_log("", $"{who_cleansed} cleansed from {planet_string}", name);
scr_alert("green", "owner", $"{who_cleansed} cleansed from {planet_string}. Control returned to {who_return}", x, y);
if (dispo[battle_planet] >= 101) then p_owner[battle_planet] = 1;
Expand Down
44 changes: 44 additions & 0 deletions scripts/scr_battle_count/scr_battle_count.gml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
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)) {
Copy link
Copy Markdown
Collaborator

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?

Copy link
Copy Markdown
Collaborator

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.

Copy link
Copy Markdown
Contributor Author

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".

Copy link
Copy Markdown
Contributor Author

@Frost-bit-jpg Frost-bit-jpg Apr 12, 2025

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.

Copy link
Copy Markdown
Collaborator

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.

Copy link
Copy Markdown
Contributor Author

@Frost-bit-jpg Frost-bit-jpg Apr 12, 2025

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.

Copy link
Copy Markdown
Collaborator

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?

Copy link
Copy Markdown
Collaborator

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.


// --- ACTION TO PERFORM EVERY 6 CLEARS ---

// --- Randomly Choose Flavor Text ---
var _text_array = [
{
alert : "Word of your Chapter's tireless defence of the Sector reaches influential ears within the Imperium.",
log : "Imperial Factions note the Chapter's continued effectiveness in purging threats."
},
{
alert : "The efficiency of your recent purges has not gone unnoticed. Certain Imperial factions mark your Chapter's progress.",
log : "Imperial elements acknowledge the Chapter's effectiveness against sector threats."
},
{
alert : "Data-slate communiques confirm receipt of your operational summaries. Standard commendations issued.",
log : "Administratum logs successful anti-xenos/heretic operations by the Chapter."
},
{
alert : "Your Chapter's righteous fury against the enemies of Man strengthens the faith of nearby Imperial worlds.",
log : "Tales of the Chapter's victories inspire piety and bolster relations with the faithful."
},
{
alert : "Your Chapter continues its duties effectively.",
log : "Chapter effectiveness noted by Imperial factions."
}
]
var _text_choice = array_random_element(_text_array);
// Alert doesn't seem to work, probably because of UI
scr_alert(c_blue, "reward", $"{_text_choice.alert}");
scr_event_log(c_blue, $"{_text_choice.log}");

// --- Apply disposition bonuses
#macro FACT_DISPO obj_controller.disposition
FACT_DISPO[eFACTION.Imperium] = clamp(FACT_DISPO[eFACTION.Imperium] + 8, -92, 100);
FACT_DISPO[eFACTION.Mechanicus] = clamp(FACT_DISPO[eFACTION.Mechanicus] + 5, -95, 100);
FACT_DISPO[eFACTION.Ecclesiarchy] = clamp(FACT_DISPO[eFACTION.Ecclesiarchy] + 6, -94, 100);
FACT_DISPO[eFACTION.Inquisition] = clamp(FACT_DISPO[eFACTION.Inquisition] + 4, -96, 100);
// --- END ACTION TO PERFORM ---
}
}
Comment thread
Frost-bit-jpg marked this conversation as resolved.
13 changes: 13 additions & 0 deletions scripts/scr_battle_count/scr_battle_count.yy

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

99 changes: 46 additions & 53 deletions scripts/scr_destroy_planet/scr_destroy_planet.gml
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,10 @@ function scr_destroy_planet(destruction_method) {
}

// Relation penalties here, if applicable
if (you.p_type[baid]="Daemon"){
if (you.p_type[baid] == "Daemon") {
obj_controller.disposition[eFACTION.Imperium] += 5;
obj_controller.disposition[eFACTION.Mechanicus] += 5;
obj_controller.disposition[4]+=5;

obj_controller.disposition[5]+=5;
var o=0;
if (scr_has_adv("Reverent Guardians")) then o=500;
Expand All @@ -90,10 +91,8 @@ function scr_destroy_planet(destruction_method) {
obj_controller.penitent_current+=1500;
obj_controller.penitent_turn=0;
obj_controller.penitent_turnly=0;}
}

//TODO a shitload of helper functions to make this sort of stuff easier
if ((you.p_owner[baid]=3) or (you.p_first[baid]=3)) and (obj_controller.faction_status[eFACTION.Mechanicus]!="War"){
//TODO a shitload of helper functions to make this sort of stuff easier
} else if ((you.p_owner[baid] == eFACTION.Mechanicus || you.p_first[baid] == eFACTION.Mechanicus) && obj_controller.faction_status[eFACTION.Mechanicus] != "War") {
obj_controller.loyalty-=50;
obj_controller.loyalty_hidden-=50;
obj_controller.disposition[eFACTION.Imperium]-=50;
Expand Down Expand Up @@ -129,8 +128,7 @@ function scr_destroy_planet(destruction_method) {
obj_controller.audien_topic[obj_controller.audiences]="declare_war";}
}

}
if (enemy9=5) and (obj_controller.faction_status[eFACTION.Ecclesiarchy]!="War"){
} else if (enemy9 == eFACTION.Ecclesiarchy && obj_controller.faction_status[eFACTION.Ecclesiarchy] != "War") {
obj_controller.loyalty-=50;
obj_controller.loyalty_hidden-=50;
obj_controller.disposition[eFACTION.Imperium]-=50;
Expand All @@ -153,51 +151,46 @@ function scr_destroy_planet(destruction_method) {
obj_controller.audiences+=1;
obj_controller.audien[obj_controller.audiences]=2;
obj_controller.audien_topic[obj_controller.audiences]="declare_war";
}



if (you.p_tyranids[baid]<5){
if (you.p_first[baid]=2) and (you.p_type[baid]="Hive") and (planet_feature_bool(you.p_feature[baid], P_features.Daemonic_Incursion)==0) and (obj_controller.faction_status[eFACTION.Imperium]!="War"){
obj_controller.loyalty-=50;
obj_controller.loyalty_hidden-=50;
obj_controller.disposition[eFACTION.Imperium]-=60;
obj_controller.disposition[3]-=30;
obj_controller.disposition[4]-=40;
obj_controller.disposition[5]-=40;

obj_controller.faction_status[eFACTION.Imperium]="War";
obj_controller.faction_status[eFACTION.Mechanicus]="War";
obj_controller.faction_status[eFACTION.Inquisition]="War";
obj_controller.faction_status[eFACTION.Ecclesiarchy]="War";

obj_controller.audiences+=1;
obj_controller.audien[obj_controller.audiences]=2;
obj_controller.audien_topic[obj_controller.audiences]="declare_war";
if (obj_controller.known[eFACTION.Inquisition]>1){
obj_controller.audiences+=1;
obj_controller.audien[obj_controller.audiences]=4;
obj_controller.audien_topic[obj_controller.audiences]="declare_war";}
if (obj_controller.known[eFACTION.Ecclesiarchy]>1){
obj_controller.audiences+=1;
obj_controller.audien[obj_controller.audiences]=5;
obj_controller.audien_topic[obj_controller.audiences]="declare_war";}
if (obj_controller.known[eFACTION.Mechanicus]>1){
obj_controller.audiences+=1;
obj_controller.audien[obj_controller.audiences]=3;
obj_controller.audien_topic[obj_controller.audiences]="declare_war";}

if (planet_feature_bool(you.p_feature[baid], P_features.Sororitas_Cathedral)==1) then obj_controller.disposition[5]-=30;
}
if (you.p_owner[baid]=2) and ((you.p_type[baid]="Temperate") or (you.p_type[baid]="Temperate")) and (planet_feature_bool(you.p_feature[baid], P_features.Daemonic_Incursion)==0){
obj_controller.loyalty-=30;
obj_controller.loyalty_hidden-=30;
obj_controller.disposition[eFACTION.Imperium]-=30;
obj_controller.disposition[3]-=15;
obj_controller.disposition[4]-=30;
obj_controller.disposition[5]-=30;
}
}
} else if (obj_controller.faction_status[eFACTION.Imperium] != "War" && planet_feature_bool(you.p_feature[baid], P_features.Daemonic_Incursion) == 0 && you.p_tyranids[baid] < 5) {
if (you.p_first[baid] == eFACTION.Imperium && you.p_type[baid] == "Hive") {
obj_controller.loyalty -= 50;
obj_controller.loyalty_hidden -= 50;
obj_controller.disposition[eFACTION.Imperium]-=60;
obj_controller.disposition[eFACTION.Mechanicus] -= 30;
obj_controller.disposition[eFACTION.Inquisition] -= 40;
obj_controller.disposition[eFACTION.Ecclesiarchy] -= 40;

obj_controller.faction_status[eFACTION.Imperium] = "War";
obj_controller.faction_status[eFACTION.Mechanicus] = "War";
obj_controller.faction_status[eFACTION.Inquisition] = "War";
obj_controller.faction_status[eFACTION.Ecclesiarchy] = "War";

obj_controller.audiences += 1;
obj_controller.audien[obj_controller.audiences] = 2;
obj_controller.audien_topic[obj_controller.audiences] = "declare_war";
if (obj_controller.known[eFACTION.Inquisition] > 1){
obj_controller.audiences += 1;
obj_controller.audien[obj_controller.audiences] = 4;
obj_controller.audien_topic[obj_controller.audiences] = "declare_war";}
if (obj_controller.known[eFACTION.Ecclesiarchy] > 1){
obj_controller.audiences += 1;
obj_controller.audien[obj_controller.audiences] = 5;
obj_controller.audien_topic[obj_controller.audiences] = "declare_war";}
if (obj_controller.known[eFACTION.Mechanicus] > 1){
obj_controller.audiences += 1;
obj_controller.audien[obj_controller.audiences] = 3;
obj_controller.audien_topic[obj_controller.audiences] = "declare_war";}

if (planet_feature_bool(you.p_feature[baid], P_features.Sororitas_Cathedral) == 1) { obj_controller.disposition[5] -= 30; }
} else if (you.p_owner[baid] == eFACTION.Imperium && (you.p_type[baid] == "Temperate" || you.p_type[baid] == "Desert")) {
obj_controller.loyalty -= 30;
obj_controller.loyalty_hidden -= 30;
obj_controller.disposition[eFACTION.Imperium] -= 30;
obj_controller.disposition[eFACTION.Mechanicus] -= 15;
obj_controller.disposition[eFACTION.Inquisition] -= 30;
obj_controller.disposition[eFACTION.Ecclesiarchy] -= 30;
}
}

// Planet changes here
//TODO make a plane_reset function
Expand Down
Loading