Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 2 additions & 0 deletions ChapterMaster.yyp
Original file line number Diff line number Diff line change
Expand Up @@ -837,6 +837,7 @@
{"id":{"name":"scr_image","path":"scripts/scr_image/scr_image.yy",},},
{"id":{"name":"scr_imperial_manage_fleet_functions","path":"scripts/scr_imperial_manage_fleet_functions/scr_imperial_manage_fleet_functions.yy",},},
{"id":{"name":"scr_imperial_navy_functions","path":"scripts/scr_imperial_navy_functions/scr_imperial_navy_functions.yy",},},
{"id":{"name":"scr_imperium_mission","path":"scripts/scr_imperium_mission/scr_imperium_mission.yy",},},
{"id":{"name":"scr_income","path":"scripts/scr_income/scr_income.yy",},},
{"id":{"name":"scr_ini_ship_cleanup","path":"scripts/scr_ini_ship_cleanup/scr_ini_ship_cleanup.yy",},},
{"id":{"name":"scr_initialize_custom","path":"scripts/scr_initialize_custom/scr_initialize_custom.yy",},},
Expand Down Expand Up @@ -918,6 +919,7 @@
{"id":{"name":"scr_ship_count","path":"scripts/scr_ship_count/scr_ship_count.yy",},},
{"id":{"name":"scr_ship_occupants","path":"scripts/scr_ship_occupants/scr_ship_occupants.yy",},},
{"id":{"name":"scr_shoot","path":"scripts/scr_shoot/scr_shoot.yy",},},
{"id":{"name":"scr_sob_mission","path":"scripts/scr_sob_mission/scr_sob_mission.yy",},},
{"id":{"name":"scr_special_view","path":"scripts/scr_special_view/scr_special_view.yy",},},
{"id":{"name":"scr_specialist_point_handler","path":"scripts/scr_specialist_point_handler/scr_specialist_point_handler.yy",},},
{"id":{"name":"scr_specialist_points","path":"scripts/scr_specialist_points/scr_specialist_points.yy",},},
Expand Down
4 changes: 2 additions & 2 deletions datafiles/main/version.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"build_date": "2026-01-30",
"version": "v0.11.05.08",
"build_date": "2026-02-05",
"version": "v0.11.05.09",
"commit_hash": "unknown hash"
}
63 changes: 63 additions & 0 deletions scripts/scr_imperium_mission/scr_imperium_mission.gml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
/*
Mission flow:
scr_random_event -> rolls rng for inquis mission
scr_inquisition_mission -> rolls rng and tests suitable planets for which mission
mission_inquisition_<mission_name> -> logic and mechanics for spawning the mission and triggering the popup
scr_popup -> displays the panel with mission details and Accept/Refuse buttons
obj_popup.Step0 -> find `mission_is_go` section and add necessary event logic for when the player accepts
scr_mission_functions > mission_name_key -> need to update this so that missions display in the mission log


Helpers:
scr_mission_eta -> given the xy of a _star where the mission is, calculate how long you should have to complete the mission
Todo? maybe add a disposition influence here so that angy inquisitor gives you less spare time and vice versa
scr_star_has_planet_with_feature -> given the id of a _star and a `P_features` enum value, check if any planet on that _star has the desired feature
star_has_planet_with_forces -> given the id of a _star, and a faction, returns whether or not there are forces present there and in sufficient number
*/


/// @param {Enum.EVENT} event
function scr_imperium_mission(event){
function mission_investigate_registry(){
var stars = scr_get_stars();
var _valid_stars = array_filter_ext(stars,
function(_star,index){
if (scr_star_has_planet_with_feature(_star, P_features.Ancient_Ruins)){
var fleet = instance_nearest(_star.x,_star.y,obj_p_fleet);
if (fleet == undefined || point_distance(_star.x,_star.y,fleet.x,fleet.y)>=160){
return true;
}
return false;
}
return false;
});

if (array_length(_valid_stars) == 0){
log_error("RE: Investigate Registry, couldn't find a _star");
exit;
}

var _star = array_random_element(_valid_stars);
var planet = scr_get_planet_with_feature(_star, P_features.Ancient_Ruins);
if (planet == -1){
log_error("RE: Investigate Registry, couldn't pick a planet");
exit;
}


var eta = infinity;
with(obj_p_fleet){
if (action!=""){
continue;
}
eta = min(eta, scr_mission_eta(_star.x,_star.y,1));
}
eta = min(max(3,eta),100);

var text=$"You overhear the Sector Governor instructions regarding {string(_star.name)} {scr_roman(planet)}";
text+=$" It seems there are numerous registry mismatches regarding taxes and other data. We could investigate this ourselves, by landing marines there.";
text += $" You have {string(eta)} months until Imperium completes own investigation.";
scr_popup("Registry Investigation",text,"imperium",$"recon|{string(_star.name)}|{string(planet)}|{string(eta)}|");

}
}
13 changes: 13 additions & 0 deletions scripts/scr_imperium_mission/scr_imperium_mission.yy

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

28 changes: 27 additions & 1 deletion scripts/scr_random_event/scr_random_event.gml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ function scr_random_event(execute_now) {
EVENT.strange_building, // Not sure if techmarine in the mood for building is a good thing
EVENT.sororitas, // This requires checks for renegade or traitor
EVENT.rogue_trader,
EVENT.imperium_mission, // Good event as it is an opportunity with no loss risk
EVENT.sisters_mission, // Same as imperium mission
];
}
else if(player_luck == luck.neutral){
Expand Down Expand Up @@ -121,6 +123,18 @@ function scr_random_event(execute_now) {
events_total -= 1;
}
break;
case EVENT.imperium_mission:
if (known[eFACTION.Imperium]==0 || obj_controller.disposition[1] < 0 || obj_controller.faction_status[eFACTION.Imperium] == "War") {
events_share[i] -= 1;
events_total -= 1;
}
break;
case EVENT.sob_mission:
if (known[eFACTION.Ecclesiarchy]==0 || obj_controller.disposition[5] < 0 || obj_controller.faction_status[eFACTION.Ecclesiarchy] == "War") {
events_share[i] -= 1;
events_total -= 1;
}
break;
case EVENT.mechanicus_mission:
if (known[eFACTION.Mechanicus] == 0 || obj_controller.disposition[3] < 50 || obj_controller.faction_status[eFACTION.Mechanicus] == "War") {
events_share[i] -= 1;
Expand Down Expand Up @@ -357,7 +371,19 @@ function scr_random_event(execute_now) {
evented = spawn_mechanicus_mission();

}


else if (chosen_event == EVENT.imperium_mission) {
scr_imperium_mission(chosen_event);
_evented = true;

}

else if (chosen_event == EVENT.sisters_mission) {
scr_sob_mission(chosen_event);
_evented = true;

}

else if (chosen_event == EVENT.inquisition_planet || chosen_event == EVENT.inquisition_mission) {
scr_inquisition_mission(chosen_event);
_evented = true;
Expand Down
63 changes: 63 additions & 0 deletions scripts/scr_sob_mission/scr_sob_mission.gml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
/*
Mission flow:
scr_random_event -> rolls rng for inquis mission
scr_inquisition_mission -> rolls rng and tests suitable planets for which mission
mission_inquisition_<mission_name> -> logic and mechanics for spawning the mission and triggering the popup
scr_popup -> displays the panel with mission details and Accept/Refuse buttons
obj_popup.Step0 -> find `mission_is_go` section and add necessary event logic for when the player accepts
scr_mission_functions > mission_name_key -> need to update this so that missions display in the mission log


Helpers:
scr_mission_eta -> given the xy of a _star where the mission is, calculate how long you should have to complete the mission
Todo? maybe add a disposition influence here so that angy inquisitor gives you less spare time and vice versa
scr_star_has_planet_with_feature -> given the id of a _star and a `P_features` enum value, check if any planet on that _star has the desired feature
star_has_planet_with_forces -> given the id of a _star, and a faction, returns whether or not there are forces present there and in sufficient number
*/


/// @param {Enum.EVENT} event
function scr_sob_mission(event){
function mission_investigate_priest(){
var stars = scr_get_stars();
var _valid_stars = array_filter_ext(stars,
function(_star,index){
if (scr_star_has_planet_with_feature(_star, P_features.Ancient_Ruins)){
var fleet = instance_nearest(_star.x,_star.y,obj_p_fleet);
if (fleet == undefined || point_distance(_star.x,_star.y,fleet.x,fleet.y)>=160){
return true;
}
return false;
}
return false;
});

if (array_length(_valid_stars) == 0){
log_error("RE: Investigate Priest, couldn't find a _star");
exit;
}

var _star = array_random_element(_valid_stars);
var planet = scr_get_planet_with_feature(_star, P_features.Ancient_Ruins);
if (planet == -1){
log_error("RE: Investigate Priest, couldn't pick a planet");
exit;
}


var eta = infinity;
with(obj_p_fleet){
if (action!=""){
continue;
}
eta = min(eta, scr_mission_eta(_star.x,_star.y,1));
}
eta = min(max(3,eta),100);

var text=$"You overhear the Ecclesiarchy instructions regarding {string(_star.name)} {scr_roman(planet)}";
text+=$" It seems one of the priests there is behaving strangely. We could investigate this ourselves, by landing marines there.";
text += $" You have {string(eta)} months until Ecclesiarchy completes own investigation.";
scr_popup("Priest Investigation",text,"ecclesiarchy",$"recon|{string(_star.name)}|{string(planet)}|{string(eta)}|");

}
}
13 changes: 13 additions & 0 deletions scripts/scr_sob_mission/scr_sob_mission.yy

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