From b7a6af7ac74f594664619cedcb0fb344028c2d35 Mon Sep 17 00:00:00 2001 From: Blogaugis Date: Thu, 17 Oct 2024 21:04:00 +0300 Subject: [PATCH 01/12] Bombardment fixes Bombardment fixes: Should make some factions more resistant to bombardments, some less, more or less based on their behavior in the universe. Also flavor tweaks. --- scripts/scr_bomb_world/scr_bomb_world.gml | 90 ++++++++++++--------- scripts/scr_purge_world/scr_purge_world.gml | 20 ++--- 2 files changed, 64 insertions(+), 46 deletions(-) diff --git a/scripts/scr_bomb_world/scr_bomb_world.gml b/scripts/scr_bomb_world/scr_bomb_world.gml index 55a56edb0d..337314e27c 100644 --- a/scripts/scr_bomb_world/scr_bomb_world.gml +++ b/scripts/scr_bomb_world/scr_bomb_world.gml @@ -3,14 +3,14 @@ function scr_bomb_world(star_system, planet_number, bombard_target_faction, bomb var pop_before=0,pop_after=0,reduced_bombard_score=0,strength_reduction=0,txt2="",txt3="",txt4="",max_kill,overkill,roll,kill; var score_before=star_system.p_population[planet_number]; - var txt1="The heavens rumble and thunder as your ship"; + var txt1="Your cruiser and larger ship"; if (ships_selected>1) then txt1+="s"; - txt1+=" unload"; + txt1+=" position themselves over the target in close orbit, and unleash"; if (ships_selected=1) then txt1+="s"; - txt1+= $" annihilation upon {star_system.name} {scr_roman_numerals()[planet_number-1]}. Even from space the explosions can be seen, clapping across the planet's surface."; + txt1+= $" annihilation upon {star_system.name} {scr_roman_numerals()[planet_number-1]}. Even from the void, explosions can be seen, battering across the planet's surface."; if (star_system.p_large[planet_number]=0){ - kill=bombard_ment_power*15000000;// Population if normal + kill=bombard_ment_power*15000000;// Population if normal, we should consider making loses to be more percentage-wise, rather than flat, also in scr_purge_world }else if (star_system.p_large[planet_number]=1){ kill=bombard_ment_power*0.15;// Population if large } @@ -21,6 +21,12 @@ function scr_bomb_world(star_system, planet_number, bombard_target_faction, bomb pop_after=max(0,pop_before-kill); if (pop_after<=0) and (pop_before>0) then heres_after=0; + // We should also make the regular bombardment lower heresy, I'm gonna copy some bits of code from scr_purge_world + // heres_before=max(star.p_heresy[planet]+star.p_heresy_secret[planet],star.p_influence[planet][eFACTION.Tau]); + // sci1=0;sci2=0; + // if (pop_before>0) then sci1=(pop_after/pop_before)*100; + // if (sci1>0) then sci2=min((sci1*2),action_score*2); + // heres_after=heres_before-sci2; if (star_system.p_type[planet_number]!="Space Hulk"){ @@ -28,47 +34,54 @@ function scr_bomb_world(star_system, planet_number, bombard_target_faction, bomb switch(bombard_target_faction){ case 2: txt2="##The Imperial forces are suitably fortified; "; - break; + bombard_protection=2; + break; // I'm not sure about IG, maybe they should be left at 2, or, maybe they should be at 1, like the PDF case 2.5: if (star_system.p_owner[planet_number]<=5){ - txt2="##The PDF forces are suitably fortified; "; + txt2="##The PDF forces are poorly fortified; "; + bombard_protection=1; } else if (star_system.p_owner[planet_number]>5){ - txt2="##The renegade forces are moderately fortified;" ; + txt2="##The renegade forces are poorly fortified; "; + bombard_protection=1; } - break; + break; // I think PDF and renegades down there should be kind of poorly prepared for this case 3: - txt2="##The Mechanicus forces are suitably fortified; "; - bombard_protection=0; - break; + txt2="##The Mechanicus forces are well fortified; "; + bombard_protection=3; + break; // If we get to Admech, I think they should be pretty capable with the hi-tech goodies they have case 5: txt2="##The Ecclesiarchy forces are concentrated within their Cathedral; "; - break; + bombard_protection=1; + break; // Maybe we should make it 0? Though, Cathedral does have a roof at least case 6: txt2="##The Eldar forces are challenging to pin down; "; - bombard_protection=3; + bombard_protection=4; // Hi-tech faction break; case 7: - txt2="##The Ork forces are well dug in; "; - bombard_protection=2; + txt2="##The Ork forces are poorly dug in; "; + bombard_protection=1; // I think they shouldn't be so resistant to it, though, Ideally we might want to make them more capable, if warboss is present. break; case 8: - txt2="##The Tau forces are suitably fortified; "; + txt2="##The Tau forces are well fortified; "; + bombard_protection=3; // Hi-tech, but not as high as Eldar or Necrons break; case 9: txt2="##The Tyranid Swarm is a large target; "; - break; + bombard_protection=0; + break; // I suppose we should have this at 0 case 10: if (star_system.p_type[planet_number]="Daemon"){ - bombard_protection=3; + bombard_protection=3; // Kind of irrelevant if the bombardment will be nulled later either way txt2="##Reality warps and twists within the planet; "; } else { - txt2="##The Chaos forces are well dug in; "; + txt2="##The Chaos forces are suitably fortified; "; bombard_protection=2; } bombard_protection=2; break; case 13: - txt2="##The Necrons are well dug in; "; + txt2="##The Necrons are very well dug in; "; + bombard_protection=4; // They are a hi-tech faction, so bombing them should be difficult break; } @@ -78,10 +91,11 @@ function scr_bomb_world(star_system, planet_number, bombard_target_faction, bomb var i=reduced_bombard_score; roll=0; - if (bombard_protection==0){i=i*4;} - else if (bombard_protection==1){i=i*0.9;} - else if (bombard_protection==2){i=i*0.75;} - else if (bombard_protection==3){i=i*0.5;} + if (bombard_protection==0){i=i*4;} // No protection, Nids out in the open use this + else if (bombard_protection==1){i=i*0.9;} // Poor protection, PDF/Renegades, Sisters and Orks use it, + else if (bombard_protection==2){i=i*0.75;} // Competent protection - IG and standard chaos forces + else if (bombard_protection==3){i=i*0.5;} // Hi-tech, Admech and Tau, And Daemons kind of + else if (bombard_protection==4){i=i*0.34;} // Figured I add a level 4 to this, Ultra hi-tech, Necrons and Eldar for(var r=0;r<100;r++){ if (i < 1) then break; @@ -105,7 +119,11 @@ function scr_bomb_world(star_system, planet_number, bombard_target_faction, bomb }else if (strength_reduction==0){ txt2+=" no losses from the bombardment."; } - + // Okay, I can see this needs tweaks, just, how can I make it that it checks for 3 conditions, instead of just 2? + // Would this work: + // if (rel>0 && rel<=20 && (target_strength-strength_reduction)>0){ + // txt2+=" minor losses from the bombardment, decreasing "+string(strength_reduction)+" stages."; + // ? if (rel>0 && rel<=20){ txt2+=" minor losses from the bombardment, decreasing "+string(strength_reduction)+" stages."; }else if (rel>20 && rel<=40){ @@ -113,9 +131,9 @@ function scr_bomb_world(star_system, planet_number, bombard_target_faction, bomb }else if (rel>40 && rel<=60){ txt2+=" heavy losses from the bombardment, decreasing "+string(strength_reduction)+" stages."; }else if (rel>60 && (target_strength-strength_reduction)>0){ - txt2+=" extreme losses from the bombardment, decreasing "+string(strength_reduction)+" stages."; + txt2+=" devastating losses from the bombardment, decreasing "+string(strength_reduction)+" stages."; }else if ((target_strength-strength_reduction)<=0){ - txt2+=" devastating losses from the bombardment. They have been wiped clean from the planet."; + txt2+=" extreme losses from the bombardment. They have been wiped clean from the planet."; } // 135; ? @@ -125,11 +143,11 @@ function scr_bomb_world(star_system, planet_number, bombard_target_faction, bomb } if (strength_reduction>0){ - + // Faction 2.5 being renegades, interesting if (bombard_target_faction=2.5) and (star_system.p_owner[planet_number]=8){ var wib="",wob=0; - txt2="##The renegade forces are moderately fortified; "; + txt2="##The renegade forces are poorly fortified; "; wob=bombard_ment_power*5000000+choose(floor(random(100000)),floor(random(100000))*-1); @@ -140,8 +158,8 @@ function scr_bomb_world(star_system, planet_number, bombard_target_faction, bomb if (rel>0) and (rel<=20) then txt2+=" they suffer minor losses from the bombardment, "+string(scr_display_number(wob))+" purged."; if (rel>20) and (rel<=40) then txt2+=" they suffer moderate losses from the bombardment, "+string(scr_display_number(wob))+" purged."; if (rel>40) and (rel<=60) then txt2+=" they suffer heavy losses from the bombardment, "+string(scr_display_number(wob))+" purged."; - if (rel>60) and (star_system.p_pdf[planet_number]>0) then txt2+=" they suffer extreme losses from the bombardment, "+string(scr_display_number(wob))+" purged."; - if (wob>0) and (star_system.p_pdf[planet_number]=0) then txt2+=" they suffer devastating losses from the bombardment. They have been wiped clean from the planet."; + if (rel>60) and (star_system.p_pdf[planet_number]>0) then txt2+=" they suffer devastating losses from the bombardment, "+string(scr_display_number(wob))+" purged."; + if (wob>0) and (star_system.p_pdf[planet_number]=0) then txt2+=" they suffer extreme losses from the bombardment. They have been wiped clean from the planet."; } switch(bombard_target_faction){ @@ -171,13 +189,13 @@ function scr_bomb_world(star_system, planet_number, bombard_target_faction, bomb if (kill>0) then kill=min(star_system.p_population[planet_number],kill); - txt3=""; + txt3=""; // Life is the Emperor's currency. Spend it well if (pop_before>0) and (star_system.p_type[planet_number]!="Daemon"){ if (star_system.p_large[planet_number]==0){ pop_after=round(max(0,pop_after-kill)); - txt3="##It had a civilian population of "+string(scr_display_number(floor(pop_before)))+" and "+string(scr_display_number(floor(kill)))+" die over the duration of the bombardment."; + txt3="##It had Imperium subject population of "+string(scr_display_number(floor(pop_before)))+" and "+string(scr_display_number(floor(kill)))+" were annihilated over the duration of the bombardment."; }else if (star_system.p_large[planet_number]=1){ - txt3="##It had a civilian population of "+string(pop_before)+" billion and "+string(kill)+" billion die over the duration of the bombardment."; + txt3="##It had Imperium subject population of "+string(pop_before)+" billion and "+string(kill)+" billion were annihilated over the duration of the bombardment."; } } @@ -235,7 +253,7 @@ function scr_bomb_world(star_system, planet_number, bombard_target_faction, bomb var bombard_protection=1; txt1="Torpedoes and Bombardment Cannons rain hell upon the space hulk; "; - reduced_bombard_score=bombard_ment_power/1.25;// fraction of bombardment score + reduced_bombard_score=bombard_ment_power/1.25;// fraction of bombardment score, You know, maybe we should make SHs more vulnerable to bombardment? They are out in space, and can be targeted with other weapons strength_reduction=0;txt3=""; var rel;rel=0; @@ -247,7 +265,7 @@ function scr_bomb_world(star_system, planet_number, bombard_target_faction, bomb if (rel>20) and (rel<=40) then txt2="it suffers moderate damage from the bombardment, its integrity reduced by "+string(100-rel)+"%"; if (rel>40) and (rel<=60) then txt2="it suffers heavy damage from the bombardment, its integrity reduced by "+string(100-rel)+"%"; if (rel>60) and ((star_system.p_fortified[planet_number]-reduced_bombard_score)>0) then txt2="it suffers extensive damage from the bombardment, its integrity reduced by "+string(100-rel)+"%"; - if ((star_system.p_fortified[planet_number]-reduced_bombard_score)<=0) then txt2="it groans and crumbles apart before the onslaught. It is no more."; + if ((star_system.p_fortified[planet_number]-reduced_bombard_score)<=0) then txt2="it crumbles apart from the onslaught. It is no more."; // DO EET if (reduced_bombard_score>0) then star_system.p_fortified[planet_number]-=reduced_bombard_score; diff --git a/scripts/scr_purge_world/scr_purge_world.gml b/scripts/scr_purge_world/scr_purge_world.gml index 83ba756544..b96ac893d6 100644 --- a/scripts/scr_purge_world/scr_purge_world.gml +++ b/scripts/scr_purge_world/scr_purge_world.gml @@ -24,13 +24,13 @@ function scr_purge_world(star, planet, action_type, action_score) { if (action_type=1){// Bombardment - txt1="The heavens rumble and thunder as your ship"; + txt1="Your cruiser and larger ship"; if (ships_selected>1) then txt1+="s"; - txt1+=" unload"; + txt1+=" position themselves over the target in close orbit, and unleash"; if (ships_selected=1) then txt1+="s"; - txt1+=" annihilation upon "+string(star.name)+" "+string(planet)+". Even from space the explosions can be seen, clapping across the planet's surface."; + txt1+=" annihilation upon "+string(star.name)+" "+string(planet)+". Even from the void, explosions can be seen, battering across the planet's surface."; - if (star.p_large[planet]=0) then max_kill=action_score*15000000;// Population if normal + if (star.p_large[planet]=0) then max_kill=action_score*15000000;// Population if normal, as in scr_bomb_world, we should reconsider this formula if (star.p_large[planet]=1) then max_kill=action_score*0.015;// Population if large pop_before=star.p_population[planet]; @@ -54,8 +54,8 @@ function scr_purge_world(star, planet, action_type, action_score) { if (star.p_large[planet]=0) then pop_after=round(pop_after); if (pop_after<=0) and (pop_before>0) then heres_after=0; - if (star.p_large[planet]=0) then txt1+="##It had a population of "+string(scr_display_number(floor(pop_before)))+" and "+string(scr_display_number(floor(kill)))+" die over the duration of the bombardment.##Heresy has fallen down to "+string(max(0,heres_after))+"%."; - if (star.p_large[planet]=1) then txt1+="##it had a population of "+string(pop_before)+" billion and "+string(kill)+" billion die over the duration of the bombardment.##Heresy has fallen down to "+string(max(0,heres_after))+"%."; + if (star.p_large[planet]=0) then txt1+="##It had a population of "+string(scr_display_number(floor(pop_before)))+" and "+string(scr_display_number(floor(kill)))+" were purged over the duration of the bombardment.##Heresy has fallen down to "+string(max(0,heres_after))+"%."; + if (star.p_large[planet]=1) then txt1+="##it had a population of "+string(pop_before)+" billion and "+string(kill)+" billion were purged over the duration of the bombardment.##Heresy has fallen down to "+string(max(0,heres_after))+"%."; if (pop_after=0){ @@ -101,7 +101,7 @@ function scr_purge_world(star, planet, action_type, action_score) { scr_gov_disp(star.name,planet,choose(1,2,3)); } }else if (isquest=0){ - txt1="Your forces scour "+string(star.name)+" "+string(planet)+", burning homes and towns that reek of heresy. The screams and wails of the damned carry through the air."; + txt1="Timing their visits right, Your forces scour "+string(star.name)+" "+string(planet)+", burning down whatever the local heretic communities call their homes. Their screams were quickly extinguished by fire, turning whatever it was before, into ash."; if (star.p_large[planet]=0) then max_kill=action_score*12000;// Population if normal if (star.p_large[planet]=1) then max_kill=action_score*0.0000012;// Population if large @@ -139,8 +139,8 @@ function scr_purge_world(star, planet, action_type, action_score) { } if (star.p_large[planet]=0) then pop_after=round(pop_after); if (pop_after<=0) and (pop_before>0) then heres_after=0; - if (star.p_large[planet]=0) then txt1+="##The planet had a population of "+string(scr_display_number(floor(pop_before)))+" and "+string(scr_display_number(floor(kill)))+" die over the duration of the cleansing.##Heresy has fallen down to "+string(max(0,heres_after))+"%."; - if (star.p_large[planet]=1) then txt1+="##The planet had a population of "+string(pop_before)+" billion and "+string(scr_display_number(action_score*12000))+" die over the duration of the cleansing.##Heresy has fallen down to "+string(max(0,heres_after))+"%."; + if (star.p_large[planet]=0) then txt1+="##The planet had a population of "+string(scr_display_number(floor(pop_before)))+" and "+string(scr_display_number(floor(kill)))+" were purged over the duration of the cleansing.##Heresy has fallen down to "+string(max(0,heres_after))+"%."; + if (star.p_large[planet]=1) then txt1+="##The planet had a population of "+string(pop_before)+" billion and "+string(scr_display_number(action_score*12000))+" were purged over the duration of the cleansing.##Heresy has fallen down to "+string(max(0,heres_after))+"%."; } } @@ -166,7 +166,7 @@ function scr_purge_world(star, planet, action_type, action_score) { } } else if (isquest=0){ - txt1=$"Your marines move across {star.name} {scr_roman(planet)}, rooting out sources of corruption. Heretics are dragged from their lairs and executed in the streets."; + txt1=$"Your marines move across {star.name} {scr_roman(planet)}, searching for high profile targets. Once found, they are dragged outside from their lairs. Their execution would soon follow."; if (star.p_large[planet]=0) then max_kill=action_score*30;// Population if normal if (star.p_large[planet]=1) then max_kill=0;// Population if large From 23fcfdc68daeb6d8ccf5eead2f5d8bc631db0817 Mon Sep 17 00:00:00 2001 From: Blogaugis Date: Fri, 18 Oct 2024 14:05:05 +0300 Subject: [PATCH 02/12] Bombardment fixes2 Adds TODOs, and some commented out potentially useful code in the future. --- scripts/scr_bomb_world/scr_bomb_world.gml | 52 +++++++++++++++++---- scripts/scr_purge_world/scr_purge_world.gml | 2 +- 2 files changed, 44 insertions(+), 10 deletions(-) diff --git a/scripts/scr_bomb_world/scr_bomb_world.gml b/scripts/scr_bomb_world/scr_bomb_world.gml index 337314e27c..e90816a1ea 100644 --- a/scripts/scr_bomb_world/scr_bomb_world.gml +++ b/scripts/scr_bomb_world/scr_bomb_world.gml @@ -10,7 +10,7 @@ function scr_bomb_world(star_system, planet_number, bombard_target_faction, bomb txt1+= $" annihilation upon {star_system.name} {scr_roman_numerals()[planet_number-1]}. Even from the void, explosions can be seen, battering across the planet's surface."; if (star_system.p_large[planet_number]=0){ - kill=bombard_ment_power*15000000;// Population if normal, we should consider making loses to be more percentage-wise, rather than flat, also in scr_purge_world + kill=bombard_ment_power*15000000;// Population if normal, TODO consider making loses to be more percentage-wise, rather than flat, also in scr_purge_world }else if (star_system.p_large[planet_number]=1){ kill=bombard_ment_power*0.15;// Population if large } @@ -32,6 +32,10 @@ function scr_bomb_world(star_system, planet_number, bombard_target_faction, bomb if (star_system.p_type[planet_number]!="Space Hulk"){ var bombard_protection=1; switch(bombard_target_faction){ + // case 1: + // txt2="##The Space Marine forces are difficult to bombard; "; + // bombard_protection=3; + // break; case 2: txt2="##The Imperial forces are suitably fortified; "; bombard_protection=2; @@ -47,8 +51,12 @@ function scr_bomb_world(star_system, planet_number, bombard_target_faction, bomb break; // I think PDF and renegades down there should be kind of poorly prepared for this case 3: txt2="##The Mechanicus forces are well fortified; "; - bombard_protection=3; - break; // If we get to Admech, I think they should be pretty capable with the hi-tech goodies they have + bombard_protection=3; // If we get to Admech, I think they should be pretty capable with the hi-tech goodies they have + break; + // case 4: + // txt2="##The Inquisition forces are difficult to bombard; "; + // bombard_protection=3; + // break; case 5: txt2="##The Ecclesiarchy forces are concentrated within their Cathedral; "; bombard_protection=1; @@ -67,8 +75,8 @@ function scr_bomb_world(star_system, planet_number, bombard_target_faction, bomb break; case 9: txt2="##The Tyranid Swarm is a large target; "; - bombard_protection=0; - break; // I suppose we should have this at 0 + bombard_protection=0; // TODO add considerations when it is a cult, and when it is bioforms out in the open + break; case 10: if (star_system.p_type[planet_number]="Daemon"){ bombard_protection=3; // Kind of irrelevant if the bombardment will be nulled later either way @@ -79,8 +87,16 @@ function scr_bomb_world(star_system, planet_number, bombard_target_faction, bomb } bombard_protection=2; break; + // case 11: + // txt2="##The Chaos Space Marine forces are difficult to bombard; "; + // bombard_protection=3; + // break; + // case 12: + // txt2="##The Daemonic forces are incredibly difficult to bombard; "; + // bombard_protection=4; + // break; case 13: - txt2="##The Necrons are very well dug in; "; + txt2="##The Necron forces are incredibly difficult to bombard; "; bombard_protection=4; // They are a hi-tech faction, so bombing them should be difficult break; } @@ -163,6 +179,18 @@ function scr_bomb_world(star_system, planet_number, bombard_target_faction, bomb } switch(bombard_target_faction){ + // case 1: + // star_system.p_marines[planet_number]-=strength_reduction; + // break; + // case 2: + // star_system.p_ig[planet_number]-=strength_reduction; + // break; + // case 3: + // star_system.p_mechanicus[planet_number]-=strength_reduction; + // break; + // case 4: + // star_system.p_inquisition[planet_number]-=strength_reduction; + // break; case 5: star_system.p_sisters[planet_number]-=strength_reduction; break; @@ -181,6 +209,12 @@ function scr_bomb_world(star_system, planet_number, bombard_target_faction, bomb case 10: star_system.p_traitors[planet_number]-=strength_reduction; break; + // case 11: + // star_system.p_csm[planet_number]-=strength_reduction; + // break; + // case 12: + // star_system.p_demons[planet_number]-=strength_reduction; + // break; case 13: star_system.p_necrons[planet_number]-=strength_reduction; break; @@ -192,7 +226,7 @@ function scr_bomb_world(star_system, planet_number, bombard_target_faction, bomb txt3=""; // Life is the Emperor's currency. Spend it well if (pop_before>0) and (star_system.p_type[planet_number]!="Daemon"){ if (star_system.p_large[planet_number]==0){ - pop_after=round(max(0,pop_after-kill)); + pop_after=round(max(0,pop_after-kill)); // Potential TODO if alien planets will be implemented, add a check for planet ownership txt3="##It had Imperium subject population of "+string(scr_display_number(floor(pop_before)))+" and "+string(scr_display_number(floor(kill)))+" were annihilated over the duration of the bombardment."; }else if (star_system.p_large[planet_number]=1){ txt3="##It had Imperium subject population of "+string(pop_before)+" billion and "+string(kill)+" billion were annihilated over the duration of the bombardment."; @@ -253,7 +287,7 @@ function scr_bomb_world(star_system, planet_number, bombard_target_faction, bomb var bombard_protection=1; txt1="Torpedoes and Bombardment Cannons rain hell upon the space hulk; "; - reduced_bombard_score=bombard_ment_power/1.25;// fraction of bombardment score, You know, maybe we should make SHs more vulnerable to bombardment? They are out in space, and can be targeted with other weapons + reduced_bombard_score=bombard_ment_power/1.25;// fraction of bombardment score, TODO maybe we should make SHs more vulnerable to bombardment? They are out in space, and can be targeted with other weapons strength_reduction=0;txt3=""; var rel;rel=0; @@ -265,7 +299,7 @@ function scr_bomb_world(star_system, planet_number, bombard_target_faction, bomb if (rel>20) and (rel<=40) then txt2="it suffers moderate damage from the bombardment, its integrity reduced by "+string(100-rel)+"%"; if (rel>40) and (rel<=60) then txt2="it suffers heavy damage from the bombardment, its integrity reduced by "+string(100-rel)+"%"; if (rel>60) and ((star_system.p_fortified[planet_number]-reduced_bombard_score)>0) then txt2="it suffers extensive damage from the bombardment, its integrity reduced by "+string(100-rel)+"%"; - if ((star_system.p_fortified[planet_number]-reduced_bombard_score)<=0) then txt2="it crumbles apart from the onslaught. It is no more."; + if ((star_system.p_fortified[planet_number]-reduced_bombard_score)<=0) then txt2="it crumbles apart from the onslaught. It is no more."; // Potential TODO Consider adding salvage from the bombed wreckage // DO EET if (reduced_bombard_score>0) then star_system.p_fortified[planet_number]-=reduced_bombard_score; diff --git a/scripts/scr_purge_world/scr_purge_world.gml b/scripts/scr_purge_world/scr_purge_world.gml index b96ac893d6..609ddebc14 100644 --- a/scripts/scr_purge_world/scr_purge_world.gml +++ b/scripts/scr_purge_world/scr_purge_world.gml @@ -30,7 +30,7 @@ function scr_purge_world(star, planet, action_type, action_score) { if (ships_selected=1) then txt1+="s"; txt1+=" annihilation upon "+string(star.name)+" "+string(planet)+". Even from the void, explosions can be seen, battering across the planet's surface."; - if (star.p_large[planet]=0) then max_kill=action_score*15000000;// Population if normal, as in scr_bomb_world, we should reconsider this formula + if (star.p_large[planet]=0) then max_kill=action_score*15000000;// Population if normal, TODO as in scr_bomb_world, reconsider this formula if (star.p_large[planet]=1) then max_kill=action_score*0.015;// Population if large pop_before=star.p_population[planet]; From 101317cee70d8feba038afb250ed5b217422af4f Mon Sep 17 00:00:00 2001 From: Blogaugis Date: Fri, 25 Oct 2024 17:51:55 +0300 Subject: [PATCH 03/12] Bombardment TODOs Updated TODO comments. --- scripts/scr_bomb_world/scr_bomb_world.gml | 4 +++- scripts/scr_purge_world/scr_purge_world.gml | 8 ++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/scripts/scr_bomb_world/scr_bomb_world.gml b/scripts/scr_bomb_world/scr_bomb_world.gml index e90816a1ea..8211ef8dd0 100644 --- a/scripts/scr_bomb_world/scr_bomb_world.gml +++ b/scripts/scr_bomb_world/scr_bomb_world.gml @@ -3,7 +3,9 @@ function scr_bomb_world(star_system, planet_number, bombard_target_faction, bomb var pop_before=0,pop_after=0,reduced_bombard_score=0,strength_reduction=0,txt2="",txt3="",txt4="",max_kill,overkill,roll,kill; var score_before=star_system.p_population[planet_number]; - var txt1="Your cruiser and larger ship"; + // TODO - update descriptions below, once we get Surface to Orbit weaponry into the game + + var txt1="Your cruiser and larger ship"; // TODO - add more variation, for different planets, perhaps different ships, CMs positioning, planetary features and other factors if (ships_selected>1) then txt1+="s"; txt1+=" position themselves over the target in close orbit, and unleash"; if (ships_selected=1) then txt1+="s"; diff --git a/scripts/scr_purge_world/scr_purge_world.gml b/scripts/scr_purge_world/scr_purge_world.gml index 609ddebc14..4707365762 100644 --- a/scripts/scr_purge_world/scr_purge_world.gml +++ b/scripts/scr_purge_world/scr_purge_world.gml @@ -21,7 +21,7 @@ function scr_purge_world(star, planet, action_type, action_score) { - + // TODO - while I don't expect Surface to Orbit weapons retaliating against player's purge bombardment, it might still be worthwhile to consider possible situations if (action_type=1){// Bombardment txt1="Your cruiser and larger ship"; @@ -100,7 +100,7 @@ function scr_purge_world(star, planet, action_type, action_score) { scr_event_log("","Inquisition Mission Completed: The mutants of "+string(star.name)+" "+string(scr_roman(planet))+" have been cleansed by promethium."); scr_gov_disp(star.name,planet,choose(1,2,3)); } - }else if (isquest=0){ + }else if (isquest=0){ // TODO add more variation, with planets, features, marine equipment perhaps? txt1="Timing their visits right, Your forces scour "+string(star.name)+" "+string(planet)+", burning down whatever the local heretic communities call their homes. Their screams were quickly extinguished by fire, turning whatever it was before, into ash."; if (star.p_large[planet]=0) then max_kill=action_score*12000;// Population if normal @@ -165,7 +165,7 @@ function scr_purge_world(star, planet, action_type, action_score) { scr_gov_disp(star.name,planet,choose(1,2,3)); } } - else if (isquest=0){ + else if (isquest=0){ // TODO add more variation, with planets, features, possibly marine equipment txt1=$"Your marines move across {star.name} {scr_roman(planet)}, searching for high profile targets. Once found, they are dragged outside from their lairs. Their execution would soon follow."; if (star.p_large[planet]=0) then max_kill=action_score*30;// Population if normal @@ -219,7 +219,7 @@ function scr_purge_world(star, planet, action_type, action_score) { // Ambushers go! if (ambush=true) then chance=round(chance/2); - var txt,spec1,spec2;spec1=0;spec2=0; + var txt,spec1,spec2;spec1=0;spec2=0; // TODO consider making it a battle with Planetary governor's guards txt="Your Astartes descend upon the surface of "+string(star.name)+" "+string(scr_roman(planet))+" and plot the movements and schedule of the governor. "; txt+="Once the time is right their target is ambushed "+choose("in their home","in the streets","while driving","taking a piss")+" and tranquilized. "; From ed48677c62521b1ec28b327fcf7381fa4af4ef0e Mon Sep 17 00:00:00 2001 From: Blogaugis Date: Tue, 5 Nov 2024 20:52:48 +0200 Subject: [PATCH 04/12] Update scr_bomb_world.gml Fixes the possible error of bombardment overwriting protection. --- scripts/scr_bomb_world/scr_bomb_world.gml | 1 - 1 file changed, 1 deletion(-) diff --git a/scripts/scr_bomb_world/scr_bomb_world.gml b/scripts/scr_bomb_world/scr_bomb_world.gml index 8211ef8dd0..140ed7815e 100644 --- a/scripts/scr_bomb_world/scr_bomb_world.gml +++ b/scripts/scr_bomb_world/scr_bomb_world.gml @@ -87,7 +87,6 @@ function scr_bomb_world(star_system, planet_number, bombard_target_faction, bomb txt2="##The Chaos forces are suitably fortified; "; bombard_protection=2; } - bombard_protection=2; break; // case 11: // txt2="##The Chaos Space Marine forces are difficult to bombard; "; From 15261d883f20df1e76effc2bb545967e3862366f Mon Sep 17 00:00:00 2001 From: Blogaugis Date: Tue, 5 Nov 2024 21:04:26 +0200 Subject: [PATCH 05/12] Update scr_bomb_world.gml Replacing extreme losses with total annihilation. --- scripts/scr_bomb_world/scr_bomb_world.gml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/scr_bomb_world/scr_bomb_world.gml b/scripts/scr_bomb_world/scr_bomb_world.gml index 140ed7815e..f29ecd1c0f 100644 --- a/scripts/scr_bomb_world/scr_bomb_world.gml +++ b/scripts/scr_bomb_world/scr_bomb_world.gml @@ -150,7 +150,7 @@ function scr_bomb_world(star_system, planet_number, bombard_target_faction, bomb }else if (rel>60 && (target_strength-strength_reduction)>0){ txt2+=" devastating losses from the bombardment, decreasing "+string(strength_reduction)+" stages."; }else if ((target_strength-strength_reduction)<=0){ - txt2+=" extreme losses from the bombardment. They have been wiped clean from the planet."; + txt2+=" total annihilation from the bombardment. They have been wiped clean from the planet."; } // 135; ? @@ -176,7 +176,7 @@ function scr_bomb_world(star_system, planet_number, bombard_target_faction, bomb if (rel>20) and (rel<=40) then txt2+=" they suffer moderate losses from the bombardment, "+string(scr_display_number(wob))+" purged."; if (rel>40) and (rel<=60) then txt2+=" they suffer heavy losses from the bombardment, "+string(scr_display_number(wob))+" purged."; if (rel>60) and (star_system.p_pdf[planet_number]>0) then txt2+=" they suffer devastating losses from the bombardment, "+string(scr_display_number(wob))+" purged."; - if (wob>0) and (star_system.p_pdf[planet_number]=0) then txt2+=" they suffer extreme losses from the bombardment. They have been wiped clean from the planet."; + if (wob>0) and (star_system.p_pdf[planet_number]=0) then txt2+=" they suffer total annihilation from the bombardment. They have been wiped clean from the planet."; } switch(bombard_target_faction){ From 93aa28c0116ab090562d9ddd030e28b2a5502a63 Mon Sep 17 00:00:00 2001 From: Blogaugis Date: Tue, 5 Nov 2024 21:22:42 +0200 Subject: [PATCH 06/12] Update scr_bomb_world.gml Removal of excess word 'population'. --- scripts/scr_bomb_world/scr_bomb_world.gml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/scr_bomb_world/scr_bomb_world.gml b/scripts/scr_bomb_world/scr_bomb_world.gml index f29ecd1c0f..4259cba87f 100644 --- a/scripts/scr_bomb_world/scr_bomb_world.gml +++ b/scripts/scr_bomb_world/scr_bomb_world.gml @@ -228,9 +228,9 @@ function scr_bomb_world(star_system, planet_number, bombard_target_faction, bomb if (pop_before>0) and (star_system.p_type[planet_number]!="Daemon"){ if (star_system.p_large[planet_number]==0){ pop_after=round(max(0,pop_after-kill)); // Potential TODO if alien planets will be implemented, add a check for planet ownership - txt3="##It had Imperium subject population of "+string(scr_display_number(floor(pop_before)))+" and "+string(scr_display_number(floor(kill)))+" were annihilated over the duration of the bombardment."; + txt3="##It had "+string(scr_display_number(floor(pop_before)))+" Imperium subjects and "+string(scr_display_number(floor(kill)))+" were annihilated over the duration of the bombardment."; }else if (star_system.p_large[planet_number]=1){ - txt3="##It had Imperium subject population of "+string(pop_before)+" billion and "+string(kill)+" billion were annihilated over the duration of the bombardment."; + txt3="##It had "+string(pop_before)+" billion Imperium subjects and "+string(kill)+" billion were annihilated over the duration of the bombardment."; } } From ae1a14876b6f2c508efbc650628d236a54ca14ec Mon Sep 17 00:00:00 2001 From: EttyKitty <20323032+EttyKitty@users.noreply.github.com> Date: Wed, 6 Nov 2024 02:05:04 +0300 Subject: [PATCH 07/12] Hopefully, fix click cooldown issues --- objects/obj_drop_select/Draw_0.gml | 17 ++++++++++++----- objects/obj_star_select/Draw_64.gml | 13 +++---------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/objects/obj_drop_select/Draw_0.gml b/objects/obj_drop_select/Draw_0.gml index d80d1751a1..ce4f31a05a 100644 --- a/objects/obj_drop_select/Draw_0.gml +++ b/objects/obj_drop_select/Draw_0.gml @@ -527,11 +527,18 @@ if (menu=0) and (purge=1){ draw_set_halign(fa_center); draw_set_font(fnt_40k_30b); - draw_set_color(c_gray);draw_rectangle(xx+740,yy+558,xx+860,yy+585,0); - draw_set_color(0);draw_text_transformed(xx+800,yy+559,string_hash_to_newline("Cancel"),0.75,0.75,0); - if (scr_hit(xx+740,yy+558,xx+860,yy+585)=true){ - draw_set_alpha(0.2);draw_set_color(0);draw_rectangle(xx+740,yy+558,xx+860,yy+585,0);draw_set_alpha(1); - if (mouse_left>=1){obj_controller.cooldown=8000;instance_destroy();} + draw_set_color(c_gray); + draw_rectangle(xx + 740, yy + 558, xx + 860, yy + 585, 0); + draw_set_color(0); + draw_text_transformed(xx + 800, yy + 559, string_hash_to_newline("Cancel"), 0.75, 0.75, 0); + if (scr_hit(xx + 740, yy + 558, xx + 860, yy + 585)) { + draw_set_alpha(0.2); + draw_set_color(0); + draw_rectangle(xx + 740, yy + 558, xx + 860, yy + 585, 0); + draw_set_alpha(1); + if (scr_click_left()) { + instance_destroy(); + } } var hih,x5,y5,iy,r,nup; diff --git a/objects/obj_star_select/Draw_64.gml b/objects/obj_star_select/Draw_64.gml index 3976fa208c..fcc0a0bab0 100644 --- a/objects/obj_star_select/Draw_64.gml +++ b/objects/obj_star_select/Draw_64.gml @@ -38,7 +38,7 @@ if (loading=1){ } } var click_accepted = (!obj_controller.menu) and (!obj_controller.zoomed) and (!instance_exists(obj_bomb_select)) and (!instance_exists(obj_drop_select)) and (!obj_controller.cooldown); -if (device_mouse_check_button_pressed(0,mb_left)){ +if (scr_click_left()){ if (!obj_controller.menu) and (click_accepted){ var closes=0,sta1=0,sta2=0; var mouse_consts = return_mouse_consts(); @@ -393,7 +393,7 @@ if (obj_controller.selecting_planet!=0){ draw_set_color(0); draw_set_alpha(0.2); draw_rectangle(xx+481,yy+280,xx+716,yy+298,0); - if (obj_controller.cooldown<=0) and (obj_controller.mouse_left=1) and (obj_controller.requisition>=improve_cost){ + if (obj_controller.cooldown<=0) and (scr_click_left()) and (obj_controller.requisition>=improve_cost){ obj_controller.cooldown=8000; obj_controller.requisition-=improve_cost; target.p_fortified[current_planet]+=1; @@ -665,7 +665,6 @@ if (obj_controller.selecting_planet!=0){ obj_controller.temp[104]=string(scr_master_loc()); - obj_controller.cooldown=3000; obj_controller.menu=60; with(obj_star_select){instance_destroy();} }else if (current_button=="Raid"){ @@ -674,7 +673,6 @@ if (obj_controller.selecting_planet!=0){ obj_drop_select.planet_number = obj_controller.selecting_planet; obj_drop_select.sh_target=instance_nearest(x,y,obj_p_fleet); if (instance_nearest(x,y,obj_p_fleet).acted>1) then with(obj_drop_select){instance_destroy();} - obj_controller.cooldown=3000; }else if (current_button=="Attack"){ instance_create(x,y,obj_drop_select); obj_drop_select.p_target=target; @@ -685,7 +683,6 @@ if (obj_controller.selecting_planet!=0){ obj_drop_select.sh_target=instance_nearest(x,y,obj_p_fleet); if (instance_nearest(x,y,obj_p_fleet).acted>=2) then with(obj_drop_select){instance_destroy();} } - obj_controller.cooldown=3000; }else if (current_button=="Purge"){ instance_create(x,y,obj_drop_select); obj_drop_select.p_target=target; @@ -696,7 +693,6 @@ if (obj_controller.selecting_planet!=0){ obj_drop_select.sh_target=instance_nearest(x,y,obj_p_fleet); if (instance_nearest(x,y,obj_p_fleet).acted>0) then with(obj_drop_select){instance_destroy();} } - obj_controller.cooldown=3000; }else if (current_button=="Bombard"){ instance_create(x,y,obj_bomb_select); if (instance_exists(obj_bomb_select)){ @@ -705,11 +701,9 @@ if (obj_controller.selecting_planet!=0){ if (instance_nearest(x,y,obj_p_fleet).acted=0) then instance_create(target.x,target.y,obj_temp3); if (instance_nearest(x,y,obj_p_fleet).acted>0) then with(obj_bomb_select){instance_destroy();} } - obj_controller.cooldown=3000; }else if (current_button=="+Recruiting"){ if (obj_controller.recruiting_worlds_bought>0) and (target.p_owner[obj_controller.selecting_planet]<=5) and (obj_controller.faction_status[target.p_owner[obj_controller.selecting_planet]]!="War"){ if (planet_feature_bool(target.p_feature[obj_controller.selecting_planet],P_features.Recruiting_World)==0){ - obj_controller.cooldown=3000; obj_controller.recruiting_worlds_bought-=1; array_push(target.p_feature[obj_controller.selecting_planet] ,new NewPlanetFeature(P_features.Recruiting_World)) @@ -727,7 +721,6 @@ if (obj_controller.selecting_planet!=0){ } } }else if (current_button=="Cyclonic Torpedo"){ - obj_controller.cooldown=6000; scr_destroy_planet(2); } } @@ -779,7 +772,7 @@ if (target!=0){ if (debug){ var current_planet; - if (!scr_hit([36,174,337,455]) && mouse_check_button_pressed(mb_left)){ + if (!scr_hit([36,174,337,455]) && scr_click_left()){ debug=0; obj_controller.cooldown=8000; exit; From f49d3221fc3065bcf04ad8a77382221a0eb027a9 Mon Sep 17 00:00:00 2001 From: EttyKitty <20323032+EttyKitty@users.noreply.github.com> Date: Wed, 6 Nov 2024 02:05:46 +0300 Subject: [PATCH 08/12] More choose() and other minor text changes --- scripts/scr_bomb_world/scr_bomb_world.gml | 49 +++++++++++---------- scripts/scr_purge_world/scr_purge_world.gml | 22 +++++---- 2 files changed, 40 insertions(+), 31 deletions(-) diff --git a/scripts/scr_bomb_world/scr_bomb_world.gml b/scripts/scr_bomb_world/scr_bomb_world.gml index 5086fa1dac..804220919f 100644 --- a/scripts/scr_bomb_world/scr_bomb_world.gml +++ b/scripts/scr_bomb_world/scr_bomb_world.gml @@ -5,11 +5,11 @@ function scr_bomb_world(star_system, planet_number, bombard_target_faction, bomb // TODO - update descriptions below, once we get Surface to Orbit weaponry into the game - var txt1="Your cruiser and larger ship"; // TODO - add more variation, for different planets, perhaps different ships, CMs positioning, planetary features and other factors + var txt1=choose("Your cruiser and larger ship", "The heavens rumble and thunder as your ship"); // TODO - add more variation, for different planets, perhaps different ships, CMs positioning, planetary features and other factors if (ships_selected>1) then txt1+="s"; - txt1+=" position themselves over the target in close orbit, and unleash"; + txt1+=choose(" position themselves over the target in close orbit, and unleash", " unload"); if (ships_selected=1) then txt1+="s"; - txt1+= $" annihilation upon {planet_numeral_name(planet_number, star_system)}. Even from space the explosions can be seen , {choose("tearing ground", "hammering", "battering", "thundering")} across the planet's surface."; + txt1+= $" annihilation upon {planet_numeral_name(planet_number, star_system)}. Even from space the explosions can be seen, {choose("tearing ground", "hammering", "battering", "thundering")} across the planet's surface."; if (star_system.p_large[planet_number]=0){ kill=bombard_ment_power*15000000;// Population if normal, TODO consider making loses to be more percentage-wise, rather than flat, also in scr_purge_world @@ -141,17 +141,23 @@ function scr_bomb_world(star_system, planet_number, bombard_target_faction, bomb // if (rel>0 && rel<=20 && (target_strength-strength_reduction)>0){ // txt2+=" minor losses from the bombardment, decreasing "+string(strength_reduction)+" stages."; // ? - if (rel>0 && rel<=20){ - txt2+=" minor losses from the bombardment, decreasing "+string(strength_reduction)+" stages."; - }else if (rel>20 && rel<=40){ - txt2+=" moderate losses from the bombardment, decreasing "+string(strength_reduction)+" stages."; - }else if (rel>40 && rel<=60){ - txt2+=" heavy losses from the bombardment, decreasing "+string(strength_reduction)+" stages."; - }else if (rel>60 && (target_strength-strength_reduction)>0){ - txt2+=" devastating losses from the bombardment, decreasing "+string(strength_reduction)+" stages."; - }else if ((target_strength-strength_reduction)<=0){ - txt2+=" total annihilation from the bombardment. They have been wiped clean from the planet."; - } + if ((target_strength-strength_reduction)<=0){ + txt2+=" total annihilation from the bombardment and are wiped clean from the planet."; + } else { + var _losses_text = ""; + if (rel>0 && rel<=20) { + _losses_text = "minor losses"; + } else if (rel>20 && rel<=40) { + _losses_text = "moderate losses"; + } else if (rel>40 && rel<=60) { + _losses_text = "heavy losses"; + } else if (rel>60 && (target_strength-strength_reduction)>0) { + _losses_text = "devastating losses"; + } else { + _losses_text = "some losses"; + } + txt2 += $" {_losses_text} from the bombardment, having presence decreased by {strength_reduction}."; + } // 135; ? if (bombard_target_faction>=6){ @@ -176,7 +182,7 @@ function scr_bomb_world(star_system, planet_number, bombard_target_faction, bomb if (rel>20) and (rel<=40) then txt2+=" they suffer moderate losses from the bombardment, "+string(scr_display_number(wob))+" purged."; if (rel>40) and (rel<=60) then txt2+=" they suffer heavy losses from the bombardment, "+string(scr_display_number(wob))+" purged."; if (rel>60) and (star_system.p_pdf[planet_number]>0) then txt2+=" they suffer devastating losses from the bombardment, "+string(scr_display_number(wob))+" purged."; - if (wob>0) and (star_system.p_pdf[planet_number]=0) then txt2+=" they suffer total annihilation from the bombardment. They have been wiped clean from the planet."; + if (wob>0) and (star_system.p_pdf[planet_number]=0) then txt2+=" they suffer total annihilation from the bombardment and are wiped clean from the planet."; } switch(bombard_target_faction){ @@ -225,13 +231,10 @@ function scr_bomb_world(star_system, planet_number, bombard_target_faction, bomb if (kill>0) then kill=min(star_system.p_population[planet_number],kill); txt3=""; // Life is the Emperor's currency. Spend it well - if (pop_before>0) and (star_system.p_type[planet_number]!="Daemon"){ - if (star_system.p_large[planet_number]==0){ - pop_after=round(max(0,pop_after-kill)); // Potential TODO if alien planets will be implemented, add a check for planet ownership - txt3="##It had "+string(scr_display_number(floor(pop_before)))+" Imperium subjects and "+string(scr_display_number(floor(kill)))+" were annihilated over the duration of the bombardment."; - }else if (star_system.p_large[planet_number]=1){ - txt3="##It had "+string(pop_before)+" billion Imperium subjects and "+string(kill)+" billion were annihilated over the duration of the bombardment."; - } + if (pop_before > 0 && star_system.p_type[planet_number] != "Daemon") { + var _displayed_population = star_system.p_large[planet_number] == 1 ? $"{pop_before} billion" : scr_display_number(floor(pop_before)); + var _displayed_killed = star_system.p_large[planet_number] == 1 ? $"{kill} billion" : scr_display_number(floor(kill)); + txt3 += $"##The world had {_displayed_population} Imperium subjects. {_displayed_killed} died over the duration of the bombardment."; } @@ -271,7 +274,7 @@ function scr_bomb_world(star_system, planet_number, bombard_target_faction, bomb delete_features(star_system.p_feature[planet_number], P_features.Gene_Stealer_Cult); adjust_influence(eFACTION.Tyranids, -100, planet_number,star_system); } - pip.text+= "The xenos taint of the tyranids infecting the population has been completely eradicated with the planets cleansing"; + pip.text+= " The xenos taint of the tyranids infecting the population has been completely eradicated with the planets cleansing"; } if (bombard_target_faction=8) and (obj_controller.faction_status[eFACTION.Tau]!="War"){ obj_controller.audiences+=1; diff --git a/scripts/scr_purge_world/scr_purge_world.gml b/scripts/scr_purge_world/scr_purge_world.gml index 4707365762..fbe0e3b4a0 100644 --- a/scripts/scr_purge_world/scr_purge_world.gml +++ b/scripts/scr_purge_world/scr_purge_world.gml @@ -24,11 +24,11 @@ function scr_purge_world(star, planet, action_type, action_score) { // TODO - while I don't expect Surface to Orbit weapons retaliating against player's purge bombardment, it might still be worthwhile to consider possible situations if (action_type=1){// Bombardment - txt1="Your cruiser and larger ship"; + txt1=choose("Your cruiser and larger ship", "The heavens rumble and thunder as your ship"); if (ships_selected>1) then txt1+="s"; - txt1+=" position themselves over the target in close orbit, and unleash"; + txt1+=choose(" position themselves over the target in close orbit, and unleash", " unload"); if (ships_selected=1) then txt1+="s"; - txt1+=" annihilation upon "+string(star.name)+" "+string(planet)+". Even from the void, explosions can be seen, battering across the planet's surface."; + txt1+= $" annihilation upon {planet_numeral_name(planet, star)}. Even from space the explosions can be seen, {choose("tearing ground", "hammering", "battering", "thundering")} across the planet's surface."; if (star.p_large[planet]=0) then max_kill=action_score*15000000;// Population if normal, TODO as in scr_bomb_world, reconsider this formula if (star.p_large[planet]=1) then max_kill=action_score*0.015;// Population if large @@ -54,9 +54,9 @@ function scr_purge_world(star, planet, action_type, action_score) { if (star.p_large[planet]=0) then pop_after=round(pop_after); if (pop_after<=0) and (pop_before>0) then heres_after=0; - if (star.p_large[planet]=0) then txt1+="##It had a population of "+string(scr_display_number(floor(pop_before)))+" and "+string(scr_display_number(floor(kill)))+" were purged over the duration of the bombardment.##Heresy has fallen down to "+string(max(0,heres_after))+"%."; - if (star.p_large[planet]=1) then txt1+="##it had a population of "+string(pop_before)+" billion and "+string(kill)+" billion were purged over the duration of the bombardment.##Heresy has fallen down to "+string(max(0,heres_after))+"%."; - + var _displayed_population = star.p_large[planet] == 1 ? $"{pop_before} billion" : scr_display_number(floor(pop_before)); + var _displayed_killed = star.p_large[planet] == 1 ? $"{kill} billion" : scr_display_number(floor(kill)); + txt1 += $"##The world had {_displayed_population} Imperium subjects. {_displayed_killed} were purged over the duration of the bombardment.##Heresy has fallen down to {max(0, heres_after)}%."; if (pop_after=0){ if (star.p_owner[planet]=2) and (obj_controller.faction_status[2]!="War"){ @@ -101,7 +101,10 @@ function scr_purge_world(star, planet, action_type, action_score) { scr_gov_disp(star.name,planet,choose(1,2,3)); } }else if (isquest=0){ // TODO add more variation, with planets, features, marine equipment perhaps? - txt1="Timing their visits right, Your forces scour "+string(star.name)+" "+string(planet)+", burning down whatever the local heretic communities call their homes. Their screams were quickly extinguished by fire, turning whatever it was before, into ash."; + txt1=choose( + $"Timing their visits right, Your forces scour {star.name} {planet} burning down whatever the local heretic communities call their homes. Their screams were quickly extinguished by fire, turning whatever it was before, into ash.", + $"Your forces scour {star.name} {planet}, burning homes and towns that reek of heresy. The screams and wails of the damned carry through the air." + ); if (star.p_large[planet]=0) then max_kill=action_score*12000;// Population if normal if (star.p_large[planet]=1) then max_kill=action_score*0.0000012;// Population if large @@ -166,7 +169,10 @@ function scr_purge_world(star, planet, action_type, action_score) { } } else if (isquest=0){ // TODO add more variation, with planets, features, possibly marine equipment - txt1=$"Your marines move across {star.name} {scr_roman(planet)}, searching for high profile targets. Once found, they are dragged outside from their lairs. Their execution would soon follow."; + txt1=choose( + $"Your marines move across {star.name} {scr_roman(planet)}, searching for high profile targets. Once found, they are dragged outside from their lairs. Their execution would soon follow.", + $"Your marines move across {star.name} {scr_roman(planet)}, rooting out sources of corruption. Heretics are dragged from their lairs and executed in the streets." + ); if (star.p_large[planet]=0) then max_kill=action_score*30;// Population if normal if (star.p_large[planet]=1) then max_kill=0;// Population if large From dbdd4a6caa7a3faaae16a48c6873e3c4d7830c18 Mon Sep 17 00:00:00 2001 From: Blogaugis <105600180+Blogaugis@users.noreply.github.com> Date: Thu, 7 Nov 2024 14:00:33 +0200 Subject: [PATCH 09/12] Update scripts/scr_purge_world/scr_purge_world.gml Removing excess TODOs. Co-authored-by: Nelsonh <81228864+OH296@users.noreply.github.com> --- scripts/scr_purge_world/scr_purge_world.gml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/scr_purge_world/scr_purge_world.gml b/scripts/scr_purge_world/scr_purge_world.gml index fbe0e3b4a0..85b65ceecd 100644 --- a/scripts/scr_purge_world/scr_purge_world.gml +++ b/scripts/scr_purge_world/scr_purge_world.gml @@ -30,7 +30,7 @@ function scr_purge_world(star, planet, action_type, action_score) { if (ships_selected=1) then txt1+="s"; txt1+= $" annihilation upon {planet_numeral_name(planet, star)}. Even from space the explosions can be seen, {choose("tearing ground", "hammering", "battering", "thundering")} across the planet's surface."; - if (star.p_large[planet]=0) then max_kill=action_score*15000000;// Population if normal, TODO as in scr_bomb_world, reconsider this formula + if (star.p_large[planet]=0) then max_kill=action_score*15000000; if (star.p_large[planet]=1) then max_kill=action_score*0.015;// Population if large pop_before=star.p_population[planet]; From 47ae644a46b68e7b924064c82d998d50a2a86f0d Mon Sep 17 00:00:00 2001 From: Blogaugis <105600180+Blogaugis@users.noreply.github.com> Date: Thu, 7 Nov 2024 14:02:06 +0200 Subject: [PATCH 10/12] Update scripts/scr_purge_world/scr_purge_world.gml Implementing suggestion. Co-authored-by: Nelsonh <81228864+OH296@users.noreply.github.com> --- scripts/scr_purge_world/scr_purge_world.gml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/scr_purge_world/scr_purge_world.gml b/scripts/scr_purge_world/scr_purge_world.gml index 85b65ceecd..78ac2964c6 100644 --- a/scripts/scr_purge_world/scr_purge_world.gml +++ b/scripts/scr_purge_world/scr_purge_world.gml @@ -225,7 +225,7 @@ function scr_purge_world(star, planet, action_type, action_score) { // Ambushers go! if (ambush=true) then chance=round(chance/2); - var txt,spec1,spec2;spec1=0;spec2=0; // TODO consider making it a battle with Planetary governor's guards + var spec1=0,spec2=0,txt=""; // TODO consider making it a battle with Planetary governor's guards txt="Your Astartes descend upon the surface of "+string(star.name)+" "+string(scr_roman(planet))+" and plot the movements and schedule of the governor. "; txt+="Once the time is right their target is ambushed "+choose("in their home","in the streets","while driving","taking a piss")+" and tranquilized. "; From 5f8b71e315a4d3180737fc11fd095f0847884581 Mon Sep 17 00:00:00 2001 From: Blogaugis Date: Sun, 10 Nov 2024 11:09:52 +0200 Subject: [PATCH 11/12] Update scr_bomb_world.gml Revert the protection of orks to level 2. --- scripts/scr_bomb_world/scr_bomb_world.gml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/scr_bomb_world/scr_bomb_world.gml b/scripts/scr_bomb_world/scr_bomb_world.gml index 804220919f..7c27729f22 100644 --- a/scripts/scr_bomb_world/scr_bomb_world.gml +++ b/scripts/scr_bomb_world/scr_bomb_world.gml @@ -68,8 +68,8 @@ function scr_bomb_world(star_system, planet_number, bombard_target_faction, bomb bombard_protection=4; // Hi-tech faction break; case 7: - txt2="##The Ork forces are poorly dug in; "; - bombard_protection=1; // I think they shouldn't be so resistant to it, though, Ideally we might want to make them more capable, if warboss is present. + txt2="##The Ork forces, for brutal savages, are well dug in; "; // TODO spice up descriptions with variable levels of protection + bombard_protection=2; // TODO Make protection variable depending on leaders present break; case 8: txt2="##The Tau forces are well fortified; "; From 5d0293c957844b657cdc02b771c5f6686102f7d8 Mon Sep 17 00:00:00 2001 From: Blogaugis Date: Sun, 10 Nov 2024 12:51:40 +0200 Subject: [PATCH 12/12] Update scr_bomb_world.gml Comment fixes. --- scripts/scr_bomb_world/scr_bomb_world.gml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/scr_bomb_world/scr_bomb_world.gml b/scripts/scr_bomb_world/scr_bomb_world.gml index 7c27729f22..d66664e314 100644 --- a/scripts/scr_bomb_world/scr_bomb_world.gml +++ b/scripts/scr_bomb_world/scr_bomb_world.gml @@ -109,9 +109,9 @@ function scr_bomb_world(star_system, planet_number, bombard_target_faction, bomb roll=0; if (bombard_protection==0){i=i*4;} // No protection, Nids out in the open use this - else if (bombard_protection==1){i=i*0.9;} // Poor protection, PDF/Renegades, Sisters and Orks use it, - else if (bombard_protection==2){i=i*0.75;} // Competent protection - IG and standard chaos forces - else if (bombard_protection==3){i=i*0.5;} // Hi-tech, Admech and Tau, And Daemons kind of + else if (bombard_protection==1){i=i*0.9;} // Poor protection, PDF/Renegades and Ecclesiarchy use it, + else if (bombard_protection==2){i=i*0.75;} // Competent protection - IG, standard chaos forces and Orks + else if (bombard_protection==3){i=i*0.5;} // Hi-tech, Admech, Tau and Daemons kind of else if (bombard_protection==4){i=i*0.34;} // Figured I add a level 4 to this, Ultra hi-tech, Necrons and Eldar for(var r=0;r<100;r++){