Skip to content

Commit e968585

Browse files
committed
Merge remote-tracking branch 'origin/HH' into HH
2 parents 693db55 + 184d915 commit e968585

20 files changed

Lines changed: 286 additions & 85 deletions

File tree

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,5 @@ ChapterMaster.resource_order
1212

1313
tmp/
1414
stitch.config.json
15+
16+
objects/obj_garbage_collector/

ChapterMaster.yyp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1688,6 +1688,7 @@
16881688
{"id":{"name":"spr_weapon_flamer","path":"sprites/spr_weapon_flamer/spr_weapon_flamer.yy",},},
16891689
{"id":{"name":"spr_weapon_frcaxe","path":"sprites/spr_weapon_frcaxe/spr_weapon_frcaxe.yy",},},
16901690
{"id":{"name":"spr_weapon_frcstaff","path":"sprites/spr_weapon_frcstaff/spr_weapon_frcstaff.yy",},},
1691+
{"id":{"name":"spr_weapon_frcsword","path":"sprites/spr_weapon_frcsword/spr_weapon_frcsword.yy",},},
16911692
{"id":{"name":"spr_weapon_grav_cannon","path":"sprites/spr_weapon_grav_cannon/spr_weapon_grav_cannon.yy",},},
16921693
{"id":{"name":"spr_weapon_grav_gun","path":"sprites/spr_weapon_grav_gun/spr_weapon_grav_gun.yy",},},
16931694
{"id":{"name":"spr_weapon_grav_pistol","path":"sprites/spr_weapon_grav_pistol/spr_weapon_grav_pistol.yy",},},

objects/obj_garbage_collector/Step_0.gml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ if (gc_timer > 0) {
44
} else {
55

66

7-
gc_timer = 50000; // Default is every frame, so de-facto 1;
7+
gc_timer = 50; // Default is every frame, so de-facto 1;
88
gc_collect();
99

1010
wait_and_execute(0, function(){
@@ -22,4 +22,4 @@ if (gc_timer > 0) {
2222
}
2323
log_message(_gc_message);
2424
});
25-
}
25+
}

scripts/scr_culture_visuals/scr_culture_visuals.gml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2486,7 +2486,7 @@ base: {
24862486
},
24872487
variants: [
24882488
{
2489-
sprite: spr_weapon_powswo
2489+
sprite: spr_weapon_frcsword
24902490
}
24912491
]
24922492
},

scripts/scr_demand/scr_demand.gml

Lines changed: 55 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,53 @@
1+
function threat_plausibility(){
2+
var _threat = 20;
3+
var _good_imperium_position = diplomacy[eFACTION.Imperium] > 50 ? 1 : -1;
4+
var _relative_strength = floor(obj_controller/20);
5+
var _nature = "";
6+
}
7+
8+
function clear_inspections(){
9+
with(obj_en_fleet){
10+
if (owner = eFACTION.Inquisition) and (string_count("Inqis",trade_goods)>0){
11+
trade_goods="cancel_inspection";
12+
target=0;
13+
}
14+
}
15+
}
16+
17+
function inquis_use_inspection_pass(){
18+
if (inspection_passes>0){
19+
inspection_passes-=1;
20+
last_world_inspection=turn+25;
21+
last_fleet_inspection=turn+25;
22+
//obj_controller.liscensing=5;
23+
clear_inspections();
24+
diplo_text = "Very well i shall honour our previous agreements. (24 months leave of inspections)";
25+
}
26+
}
27+
28+
function inquis_demand_inspection_pass(){
29+
var resistance=10;
30+
var _worked = false;
31+
clear_diplo_choices();
32+
if (inspection_passes==0){
33+
rull=floor(random(10))+1;
34+
if (rull>resistance){
35+
_worked=true;
36+
last_world_inspection=turn+24;
37+
last_fleet_inspection=turn+24;
38+
//obj_controller.liscensing=5;
39+
clear_inspections();
40+
diplo_text = "Very well Chapter Master I Your service to the imperium is well known i have no doubt that you would not ask such of me without good reasoon. I shall forgoe my normal duties just this onece. \n do not becomne complacent Chapter Master i may not always be so generous";
41+
} else {
42+
var _diff = resistance - rull;
43+
diplomacy[eFACTION.Inquisition] -= 1;
44+
diplo_text = "Consider your request denied. If there is heresy or any wrong doing i shal see that is rooted out and made plain for all to see";;
45+
46+
}
47+
}
48+
49+
}
50+
151
function scr_demand(demand_type) {
252

353
// demand_type: button
@@ -73,28 +123,14 @@ function scr_demand(demand_type) {
73123
resistance=10;
74124

75125
if (demand_type=1){// Requisition
76-
rull=floor(random(10))+1;
77-
if (rull>resistance){requisition+=300;worked=true;}
78-
if (rull<=resistance){worked=false;}
79-
}
80-
if (demand_type=2) and (inspection_passes=0){
81126
rull=floor(random(10))+1;
82127
if (rull>resistance){
83-
worked=true;
84-
last_world_inspection=turn+12;
85-
last_fleet_inspection=turn+12;
86-
obj_controller.liscensing=5;
87-
with(obj_en_fleet){if (owner = eFACTION.Inquisition) and (string_count("Inqis",trade_goods)>0){trade_goods="cancel_inspection";target=0;}}
128+
requisition+=300;
129+
worked=true;
130+
}
131+
if (rull<=resistance){
132+
worked=false;
88133
}
89-
if (rull<=resistance){worked=false;}
90-
}
91-
if (demand_type=2) and (inspection_passes>0){
92-
inspection_passes-=1;
93-
worked=true;no_penalty=true;
94-
last_world_inspection=turn+12;
95-
last_fleet_inspection=turn+12;
96-
obj_controller.liscensing=5;
97-
with(obj_en_fleet){if (owner = eFACTION.Inquisition) and (string_count("Inqis",trade_goods)>0){trade_goods="cancel_inspection";target=0;}}
98134
}
99135
}
100136

scripts/scr_dialogue/scr_dialogue.gml

Lines changed: 47 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -478,6 +478,11 @@ function scr_dialogue(diplo_keyphrase) {
478478

479479
};
480480
}
481+
if (diplo_keyphrase=="Demand Method"){
482+
add_diplomacy_option({option_text:"Threaten", tooltip : "The plausibility will of your threat"});
483+
add_diplomacy_option({option_text:"Bribe"});
484+
add_diplomacy_option({option_text:"Plausible Excuse"});
485+
}
481486
// ** Chaos **
482487
if (diplomacy=10){
483488
if (diplo_keyphrase=="civilwar_begin"){
@@ -746,7 +751,10 @@ function scr_dialogue(diplo_keyphrase) {
746751
}
747752
add_diplomacy_option({option_text:"Demand Requisition"});
748753
add_diplomacy_option({option_text:"Demand Military Assistance"});
749-
add_diplomacy_option({option_text:"Cancel"});
754+
add_diplomacy_option({
755+
option_text:"Cancel",
756+
goto:"disagree"
757+
});
750758
}
751759
if (diplo_keyphrase=="propose_alliance") and (obj_controller.faction_gender[10]==1){
752760
var _found = false;
@@ -985,7 +993,10 @@ function scr_dialogue(diplo_keyphrase) {
985993
if (rela=="hostile") then diplo_text="Consider your next words carefully.";
986994
add_diplomacy_option({option_text:"Demand Requisition"});
987995
add_diplomacy_option({option_text:"Demand Military Assistance"});
988-
add_diplomacy_option({option_text:"Cancel"});
996+
add_diplomacy_option({
997+
option_text:"Cancel",
998+
goto:"disagree"
999+
});
9891000
}
9901001
if (string_count("assassination_angryish",diplo_keyphrase)>0){
9911002
var ta="",tb="",tc="";
@@ -1188,7 +1199,10 @@ function scr_dialogue(diplo_keyphrase) {
11881199
if (randoo!=1) then diplo_text="Certain queries may have to be answered by action.";
11891200
}
11901201
add_diplomacy_option({option_text:"Demand Requisition"});
1191-
add_diplomacy_option({option_text:"Cancel"});
1202+
add_diplomacy_option({
1203+
option_text:"Cancel",
1204+
goto:"disagree"
1205+
});
11921206
}
11931207
}
11941208
// ** Inquisition **
@@ -1435,12 +1449,26 @@ function scr_dialogue(diplo_keyphrase) {
14351449
if (rela=="friendly") then diplo_text="Remember whom you speak to, Chapter Master.";
14361450
if (rela=="neutral") then diplo_text=$"I, Inquisitor Lord {faction_leader[eFACTION.Inquisition]}, on behalf of the Inquisition, am awaiting your words.";
14371451
if (rela=="hostile") then diplo_text="Speak your next words very carefully, Astartes, for they may be your last.";
1438-
add_diplomacy_option({option_text:"Demand Requisition"});
1439-
add_diplomacy_option({option_text:"Skip Inspection"});
1440-
add_diplomacy_option({option_text:"Cancel"});
1452+
add_diplomacy_option({
1453+
option_text:"Demand Requisition"
1454+
});
1455+
1456+
1457+
add_diplomacy_option({
1458+
option_text:"Skip Inspection",
1459+
method : inquis_demand_inspection_pass,
1460+
});
1461+
14411462
if (inspection_passes>0){
1442-
add_diplomacy_option({option_text:"Skip Inspection ({inspection_passes} pass)"});
1463+
add_diplomacy_option({
1464+
option_text:"Skip Inspection (Use pass)",
1465+
method : inquis_use_inspection_pass
1466+
});
14431467
}
1468+
add_diplomacy_option({
1469+
option_text:"Cancel",
1470+
goto:"disagree"
1471+
});
14441472
}
14451473
if (diplo_keyphrase=="penitent_end"){
14461474
rando=choose(1,2);
@@ -1761,7 +1789,10 @@ function scr_dialogue(diplo_keyphrase) {
17611789
if (rela=="neutral") then diplo_text="What is the meaning of this?";
17621790
if (rela=="hostile") then diplo_text="“The Heretic and Blasphemer can offer no excuse for their crimes. Those who are pardoned merely live to further shroud Humanity from the Light of the Emperor with the Darkness of their souls.”";
17631791
add_diplomacy_option({option_text:"Demand Requisition"});
1764-
add_diplomacy_option({option_text:"Cancel"});
1792+
add_diplomacy_option({
1793+
option_text:"Cancel",
1794+
goto:"disagree"
1795+
});
17651796
}
17661797
if (diplo_keyphrase=="penitent_end"){
17671798
rando=choose(1,2);
@@ -2014,7 +2045,10 @@ function scr_dialogue(diplo_keyphrase) {
20142045
}
20152046
add_diplomacy_option({option_text:"Demand Requisition"});
20162047
add_diplomacy_option({option_text:"Demand Useful Information"});
2017-
add_diplomacy_option({option_text:"Cancel"});
2048+
add_diplomacy_option({
2049+
option_text:"Cancel",
2050+
goto:"disagree"
2051+
});
20182052
}
20192053
if (diplo_keyphrase=="mission1"){
20202054
diplo_text="The good that might come from simple acts of benevolence are oft underestimated. A token goodwill gesture can go far, ";
@@ -2497,7 +2531,10 @@ function scr_dialogue(diplo_keyphrase) {
24972531
diplo_text="Yeah? Wut?";
24982532
add_diplomacy_option({option_text:"Demand Requisition"});
24992533
add_diplomacy_option({option_text:"Demand Military Assistance"});
2500-
add_diplomacy_option({option_text:"Cancel"});
2534+
add_diplomacy_option({
2535+
option_text:"Cancel",
2536+
goto:"disagree"
2537+
});
25012538
}
25022539
}
25032540
// ** Tau **

scripts/scr_diplomacy_helpers/scr_diplomacy_helpers.gml

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -83,15 +83,15 @@ function basic_diplomacy_screen(){
8383

8484
var sw=1;
8585
for (var i=1;i<5;i++){
86-
if (string_width(string_hash_to_newline(_opt))*sw>530) then sw-=0.05;
86+
if (string_width(string_hash_to_newline(_opt.option_text))*sw>530) then sw-=0.05;
8787
}
88-
if (string_width(string_hash_to_newline(_opt))*sw<=530) and (sw=1){
89-
draw_text_transformed(xx+620,yy+696,string_hash_to_newline(_opt),sw,sw,0);
90-
draw_text_transformed(xx+620,yy+696+2,string_hash_to_newline(_opt),sw,sw,0);
88+
if (string_width(string_hash_to_newline(_opt.option_text))*sw<=530) and (sw=1){
89+
draw_text_transformed(xx+620,yy+696,string_hash_to_newline(_opt.option_text),sw,sw,0);
90+
draw_text_transformed(xx+620,yy+696+2,string_hash_to_newline(_opt.option_text),sw,sw,0);
9191
}
9292

93-
if (string_width(string_hash_to_newline(_opt))*sw>530){
94-
draw_text_ext_transformed(xx+620,yy+696-4,string_hash_to_newline(_opt),16,530/sw,sw,sw,0);
93+
if (string_width(string_hash_to_newline(_opt.option_text))*sw>530){
94+
draw_text_ext_transformed(xx+620,yy+696-4,string_hash_to_newline(_opt.option_text),16,530/sw,sw,sw,0);
9595
}
9696
if scr_hit(left,top,right,base){
9797
draw_set_alpha(0.2);
@@ -223,17 +223,16 @@ function draw_character_diplomacy(){
223223

224224
function evaluate_chosen_diplomacy_option(diplo_pressed){
225225
var _opt = diplo_option[diplo_pressed];
226-
if (_opt.goto != ""){
227-
scr_dialogue(_opt.goto);
228-
exit;
229-
}
230226

231227
var _pressed_option = _opt.key;
232228
if (struct_exists(_opt, "method")){
233229
if (is_callable(_opt.method)){
234230
script_execute(_opt.method);
235231
}
236232
}
233+
if (_opt.goto != ""){
234+
scr_dialogue(_opt.goto);
235+
}
237236
}
238237

239238
function scr_diplomacy_hit(selection, new_path, complex_path="none"){

scripts/scr_garrison/scr_garrison.gml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
function disposition_description_chart(dispo) {
22
if (global.cheat_debug) {
33
return $"{dispo}"
4-
} else if (dispo < -100) {
4+
} else if (dispo < -4000) {
5+
return "Ruled";
6+
}else if (dispo < -100) {
57
return "DEBUG: Numbers lower than -100 detected, this shouldn't happen!";
68
} else if (dispo <= 0) {
79
return "Extremely Hostile";
@@ -154,11 +156,15 @@ function GarrisonForce(planet_operatives, turn_end=false, type="garrison") const
154156
} else {report_string+="The garrison is comprised of a single _squad,"}
155157

156158
report_string+= $" with a total man count of {total_garrison}.#"
157-
if (system.p_owner[planet] != eFACTION.Player) {
159+
if (system.p_owner[planet] != eFACTION.Player && system.dispo[planet] >=-100) {
158160
var disposition = disposition_description_chart(system.dispo[planet]);
159161
report_string += $"Our Relationship with the Rulers of the planet is {disposition}#";
160-
} else if (system.dispo[planet] < -1000 && system.p_owner[planet] == eFACTION.Player) {
161-
report_string += $"Rule of the planet is going well";
162+
} else if (system.dispo[planet] < -1000) {
163+
if (system.p_owner[planet] == eFACTION.Player){
164+
report_string += $"Rule of the planet is going well";
165+
} else {
166+
report_string += $"Your rule of the the planet is being undermined by hostile forces";
167+
}
162168
} else {
163169
report_string += $"DEBUG: planet owner check failed";
164170
//report_string+=$"There is no clear chain of command on the planet we suspect the existence of Xenos or Heretic Forces"; // TODO LOW GARRISON_XENO // Readd when this actually gets implented

scripts/scr_inquisition_fleet_functions/scr_inquisition_fleet_functions.gml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ function base_inquis_fleet (){
1313
}
1414
}
1515

16+
1617
function hunt_player_serfs(){
1718
explode_script(obj_controller.temp[1008],"|");
1819
var tb=string(explode[0]);

scripts/scr_ork_fleet_functions/scr_ork_fleet_functions.gml

Lines changed: 21 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -203,36 +203,44 @@ function init_ork_waagh(overide = false){
203203
}
204204
}
205205

206+
var _waaagh_star_found = false;
206207
if (array_length(ork_waagh_activity)){
207208

208209
var _waaagh_star = array_random_element(ork_waagh_activity);
210+
_waaagh_star_found = true;
209211

210212
} else if (array_length(_any_ork_star) > 0) {
211213
var _waaagh_star = array_random_element(_any_ork_star);
212-
}
213-
var _pdata = new PlanetData(_waaagh_star[1], _waaagh_star[0]);
214-
var _boss = _pdata.add_feature(P_features.OrkWarboss);
215-
if (overide){
216-
_boss.player_hidden = false;
217-
scr_event_log("red","boss on {_pdata.name()}", _pdata.system.name);
214+
_waaagh_star_found = true;
218215
}
219216

220-
if (_pdata.planet_forces[eFACTION.Ork] < 4) {
221-
_pdata.add_forces(eFACTION.Ork, 2);
222-
}
217+
if (_waaagh_star_found){
218+
var _pdata = new PlanetData(_waaagh_star[1], _waaagh_star[0]);
219+
220+
var _boss = _pdata.add_feature(P_features.OrkWarboss);
221+
if (overide){
222+
_boss.player_hidden = false;
223+
scr_event_log("red",$"boss on {_pdata.name()}", _pdata.system.name);
224+
}
223225

226+
if (_pdata.planet_forces[eFACTION.Ork] < 4) {
227+
_pdata.add_forces(eFACTION.Ork, 2);
228+
}
229+
} else {
230+
out_of_system_warboss(true);
231+
}
224232
}
225233
}
226234

227-
function out_of_system_warboss(){
235+
function out_of_system_warboss(overide = false){
228236

229237
with (obj_controller){
230238
// More Testing
231239
// peace_check=2;
232240

233241
var did_so=false;
234242

235-
if (did_so=false)&& (faction_defeated[7]=1 || known[eFACTION.Ork]== 0 ) {
243+
if (did_so=false) && (faction_defeated[7]=1 || known[eFACTION.Ork] == 0 || overide) {
236244
known[eFACTION.Ork] = 0;
237245
var _warboss = new NewPlanetFeature(P_features.OrkWarboss);
238246
if (faction_defeated[7]=1){
@@ -318,10 +326,10 @@ function out_of_system_warboss(){
318326
instance_activate_object(obj_en_fleet);
319327

320328
var _ork_leader = obj_controller.faction_leader[eFACTION.Ork];
321-
var tix=$"Warboss {_ork_leader} leads a WAAAGH! into Sector "+string(obj_ini.sector_name)+".";
329+
var tix=$"Warboss {_ork_leader} leads a WAAAGH! into Sector {obj_ini.sector_name}.";
322330
scr_alert("red","lol",string(tix),starf.x,starf.y);
323331
scr_event_log("red",tix);
324-
scr_popup("WAAAAGH!",$"A WAAAGH! led by the Warboss {_ork_leader} has arrived in "+string(obj_ini.sector_name)+". With him is a massive Ork fleet. Numbering in the dozens of battleships, they carry with them countless greenskins. The forefront of the WAAAGH! is destined for the "+string(starf.name)+" system.","waaagh","");
332+
scr_popup("WAAAAGH!",$"A WAAAGH! led by the Warboss {_ork_leader} has arrived in {obj_ini.sector_name}. With him is a massive Ork fleet. Numbering in the dozens of battleships, they carry with them countless greenskins. The forefront of the WAAAGH! is destined for the {starf.name} system.","waaagh","");
325333
}
326334
}
327335
}

0 commit comments

Comments
 (0)