From 4f3582c7466a8274b92d7641f94d09880394f35d Mon Sep 17 00:00:00 2001 From: EttyKitty <20323032+EttyKitty@users.noreply.github.com> Date: Tue, 12 Nov 2024 08:42:10 +0300 Subject: [PATCH 1/2] fix: check with scr_has_disadv() and 4 to 8 loop increase --- objects/obj_controller/Create_0.gml | 2 +- scripts/scr_creation/scr_creation.gml | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/objects/obj_controller/Create_0.gml b/objects/obj_controller/Create_0.gml index d35758bb07..8fd2afa8a1 100644 --- a/objects/obj_controller/Create_0.gml +++ b/objects/obj_controller/Create_0.gml @@ -1444,7 +1444,7 @@ loyalty=100; loyalty_hidden=100;// Updated when inquisitors do an inspection // ** Sets up gene seed ** gene_seed=20; -if (string_count("Sieged",obj_ini.strin2)>0) then gene_seed=floor(random_range(250,400)); +if (scr_has_disadv("Sieged")) then gene_seed = floor(random_range(250, 400)); if (global.chapter_name=="Lamenters") then gene_seed=30; if (global.chapter_name=="Soul Drinkers") then gene_seed=60; diff --git a/scripts/scr_creation/scr_creation.gml b/scripts/scr_creation/scr_creation.gml index 5c392aaa72..b827689b76 100644 --- a/scripts/scr_creation/scr_creation.gml +++ b/scripts/scr_creation/scr_creation.gml @@ -79,31 +79,31 @@ function scr_creation(argument0) { } var ahuh,k;ahuh=0;k=0; - repeat(4){k+=1;if (adv[k]="Crafters") then ahuh=1;} + repeat(8){k+=1;if (adv[k]="Crafters") then ahuh=1;} if (ahuh=1) then disposition[3]+=2;ahuh=0;k=0; - repeat(4){k+=1;if (adv[k]="Tech-Brothers") then ahuh=1;} + repeat(8){k+=1;if (adv[k]="Tech-Brothers") then ahuh=1;} if (ahuh=1) then disposition[3]+=10;ahuh=0;k=0; - repeat(4){k+=1;if (adv[k]="Psyker Intolerant") then ahuh=1;} + repeat(8){k+=1;if (adv[k]="Psyker Intolerant") then ahuh=1;} if (ahuh=1) then disposition[4]+=5;ahuh=0;k=0; - repeat(4){k+=1;if (adv[k]="Daemon Binders") then ahuh=1;} + repeat(8){k+=1;if (adv[k]="Daemon Binders") then ahuh=1;} if (ahuh=1) then disposition[3]-=8;ahuh=0;k=0; - repeat(4){k+=1;if (adv[k]="Sieged") then ahuh=1;} + repeat(8){k+=1;if (adv[k]="Sieged") then ahuh=1;} if (ahuh=1) then disposition[6]+=5;ahuh=0;k=0; - repeat(4){k+=1;if (adv[k]="Suspicious") then ahuh=1;} + repeat(8){k+=1;if (adv[k]="Suspicious") then ahuh=1;} if (ahuh=1) then disposition[4]-=15;ahuh=0;k=0; - repeat(4){k+=1;if (adv[k]="Tech-Heresy") then ahuh=1;} + repeat(8){k+=1;if (adv[k]="Tech-Heresy") then ahuh=1;} if (ahuh=1) then disposition[3]-=8;ahuh=0;k=0; - repeat(4){k+=1;if (adv[k]="Psyker Abundance") then ahuh=1;} + repeat(8){k+=1;if (adv[k]="Psyker Abundance") then ahuh=1;} if (ahuh=1) then disposition[4]-=4;ahuh=0;k=0; - repeat(4){k+=1;if (dis[k]="Tolerant") then ahuh=1;} + repeat(8){k+=1;if (dis[k]="Tolerant") then ahuh=1;} if (ahuh=1){ disposition[1]-=5;disposition[2]-=5;disposition[4]-=5; disposition[3]-=5;disposition[5]-=5;disposition[6]-=5; From b316bd79372f1f21b70573cbd6c48c71c4cd8b0f Mon Sep 17 00:00:00 2001 From: EttyKitty <20323032+EttyKitty@users.noreply.github.com> Date: Tue, 12 Nov 2024 17:26:00 +0300 Subject: [PATCH 2/2] Update scripts/scr_creation/scr_creation.gml Co-authored-by: Nelsonh <81228864+OH296@users.noreply.github.com> --- scripts/scr_creation/scr_creation.gml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/scr_creation/scr_creation.gml b/scripts/scr_creation/scr_creation.gml index b827689b76..0d150b31e4 100644 --- a/scripts/scr_creation/scr_creation.gml +++ b/scripts/scr_creation/scr_creation.gml @@ -77,7 +77,7 @@ function scr_creation(argument0) { disposition[3]-=(6-cooperation); disposition[2]-=(6-cooperation)*2; } - + //TODO encode this logic into advantage/disadvantage structs to be more maintainable and less hardcoded var ahuh,k;ahuh=0;k=0; repeat(8){k+=1;if (adv[k]="Crafters") then ahuh=1;} if (ahuh=1) then disposition[3]+=2;ahuh=0;k=0;