Skip to content

Commit

Permalink
feat: Edits to robes, psy hood and daemon binders (#403)
Browse files Browse the repository at this point in the history
  • Loading branch information
EttyKitty authored Jan 12, 2025
1 parent cab5a2d commit 8574f40
Show file tree
Hide file tree
Showing 19 changed files with 49 additions and 69 deletions.
54 changes: 20 additions & 34 deletions scripts/scr_draw_unit_image/scr_draw_unit_image.gml
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,7 @@ function scr_draw_unit_image(_background=false){
var armour_sprite = spr_weapon_blank;
var complex_livery = false;
var back_equipment = BackType.None;
var psy_hood = 0;
var psy_hood = false;
var skull_mask = 0;
var servo_arm = 0;
var servo_harness = 0;
Expand Down Expand Up @@ -533,8 +533,8 @@ function scr_draw_unit_image(_background=false){
}
}

if (unit_gear="Psychic Hood"){
psy_hood=-50;
if (unit_gear == "Psychic Hood"){
psy_hood = true;
}

if (array_contains([UnitSpecialization.Chaplain, UnitSpecialization.WolfPriest], unit_specialization)) then skull_mask=-50;
Expand Down Expand Up @@ -833,72 +833,59 @@ function scr_draw_unit_image(_background=false){
unit_is_sniper = true;
}
}
if (psy_hood=-50) then psy_hood=0;
}else if (unit_armour=="MK3 Iron Armour"){
if (dev_trait>0) then dev_trait=13;
if (tech_brothers_trait>-5) then tech_brothers_trait=3;
armour_sprite=spr_mk3_colors;
if (psy_hood=-50) then psy_hood=5;
}else if (unit_armour=="MK4 Maximus"){
if (dev_trait>0) then dev_trait=13;
if (tech_brothers_trait>-5) then tech_brothers_trait=3;
armour_sprite=spr_mk4_colors;
if (psy_hood=-50) then psy_hood=6;
}else if (unit_armour=="MK5 Heresy"){
if (dev_trait>0) then dev_trait=13;
if (tech_brothers_trait>-5) then tech_brothers_trait=3;
armour_sprite=spr_mk5_colors;
if (psy_hood=-50) then psy_hood=6;
}else if (unit_armour=="MK6 Corvus"){
if (dev_trait>0) then dev_trait=13;
if (tech_brothers_trait>-5) then tech_brothers_trait=2;
armour_sprite=spr_beakie_colors;
if (psy_hood=-50) then psy_hood=3;
}else if (unit_armour=="MK7 Aquila" || unit_armour=="Power Armour"){
if (tech_brothers_trait>-5) then tech_brothers_trait=0;
if (dev_trait>0) then dev_trait=13;
armour_sprite=spr_mk7_colors;
if (psy_hood=-50) then psy_hood=1;
}else if (unit_armour=="MK8 Errant"){
if (dev_trait>0) then dev_trait=13;
if (tech_brothers_trait>-5) then tech_brothers_trait=0;
armour_sprite=spr_mk8_colors;
if (psy_hood=-50) then psy_hood=4;
}else if (unit_armour=="Tartaros"){
armour_sprite=spr_tartaros2_colors;
if (tech_brothers_trait>-5) then tech_brothers_trait=4;
if (psy_hood=-50) then psy_hood=8;
if (skull_mask==1) then skull_mask=3;
}
if (unit_armour=="Terminator Armour"){
armour_sprite=spr_terminator3_colors;
if (tech_brothers_trait>-5) then tech_brothers_trait=5;
if (psy_hood=-50) then psy_hood=9;
if (skull_mask==1) then skull_mask=2;
}else if (unit_armour=="Artificer Armour"){
if (dev_trait>0) then dev_trait=13;
if (tech_brothers_trait>-5) then tech_brothers_trait=1;
armour_sprite=spr_artificer_colors;
if (psy_hood=-50) then psy_hood=2;
}

if (armour_sprite=spr_weapon_blank) and (unit_armour!=""){
if (string_count("Power Armour",unit_armour)>0){
if (dev_trait>0) then dev_trait=13;
if (tech_brothers_trait>-5) then tech_brothers_trait=0;
armour_sprite=spr_mk7_colors;
if (psy_hood=-50) then psy_hood=1;
}
if (string_count("Artifi",unit_armour)>0){
if (dev_trait>0) then dev_trait=13;
if (tech_brothers_trait>-5) then tech_brothers_trait=1;
armour_sprite=spr_artificer_colors;
if (psy_hood=-50) then psy_hood=2;
}
if (string_count("Termi",unit_armour)>0){
if (tech_brothers_trait>-5) then tech_brothers_trait=5;
armour_sprite=spr_terminator3_colors;
if (psy_hood=-50) then psy_hood=9;
if (skull_mask==1) then skull_mask=2;
}
}
Expand Down Expand Up @@ -1470,25 +1457,17 @@ function scr_draw_unit_image(_background=false){
}

// Hood
if (psy_hood>0){
var yep=0;
if (psy_hood && armour_type != ArmourType.Terminator && !armour_bypass){
var psy_hood_offset_x = 0;
var psy_hood_offset_y = 0;
robes_hood_bypass = true;
if (scr_has_adv("Daemon Binders") && !modest_livery && psy_hood<7){
robes_bypass = true;
if (pauldron_trim=1){
draw_sprite(spr_gear_hood2,0,x_surface_offset-2,y_surface_offset-11);
draw_sprite(spr_binders_robes,0,x_surface_offset-2,y_surface_offset-11);
}
if (pauldron_trim==0){
draw_sprite(spr_gear_hood2,1,x_surface_offset-2,y_surface_offset-11);
draw_sprite(spr_binders_robes,1,x_surface_offset-2,y_surface_offset-11);
}
if (scr_has_adv("Daemon Binders") && !modest_livery){
var _index = pauldron_trim == 1 ? 0 : 1;
draw_sprite(spr_gear_hood2,_index,x_surface_offset+psy_hood_offset_x,y_surface_offset+psy_hood_offset_y);
} else {
if (unit_armour=="Terminator Armour") {
psy_hood_offset_y = -8;
}
// if (unit_armour=="Terminator Armour") {
// psy_hood_offset_y = -8;
// }
//if (obj_ini.main_color=obj_ini.secondary_color) then draw_sprite(spr_gear_hood1,hood,0,y_surface_offset);
//if (obj_ini.main_color!=obj_ini.secondary_color) then draw_sprite(spr_gear_hood3,hood,0,y_surface_offset);
draw_sprite(spr_psy_hood,2, x_surface_offset+psy_hood_offset_x, y_surface_offset+psy_hood_offset_y);
Expand Down Expand Up @@ -1705,10 +1684,17 @@ function scr_draw_unit_image(_background=false){
draw_sprite(spr_marine_cloth_hood,0,x_surface_offset+hood_offset_x,y_surface_offset+hood_offset_y);
}
if (struct_exists(body[$ "torso"],"robes") && !robes_bypass) {
if (body.torso.robes<2){
draw_sprite(spr_marine_robes,body.torso.robes,x_surface_offset+robe_offset_x,y_surface_offset+robe_offset_y);
if (body.torso.robes == 0){
draw_sprite(spr_marine_robes,0,x_surface_offset+robe_offset_x,y_surface_offset+robe_offset_y);
} else if (body.torso.robes == 1) {
if (scr_has_adv("Daemon Binders") && !modest_livery){
var _index = pauldron_trim == 1 ? 0 : 1;
draw_sprite(spr_binders_robes,_index,x_surface_offset+robe_offset_x,y_surface_offset+robe_offset_y);
} else {
draw_sprite(spr_marine_robes,1,x_surface_offset+robe_offset_x,y_surface_offset+robe_offset_y);
}
} else {
draw_sprite(spr_cloth_tabbard,body.torso.robes,x_surface_offset+robe_offset_x,y_surface_offset+robe_offset_y);
draw_sprite(spr_cloth_tabbard,0,x_surface_offset+robe_offset_x,y_surface_offset+robe_offset_y);
}
}
}
Expand Down
18 changes: 6 additions & 12 deletions scripts/scr_marine_struct/scr_marine_struct.gml
Original file line number Diff line number Diff line change
Expand Up @@ -887,20 +887,14 @@ function TTRPG_stats(faction, comp, mar, class = "marine", other_spawn_data={})
religion_sub_cult = "The Cult of Iron";
}

var _robe_chance = 5;
if (global.chapter_name == "Black Templars"){
if (irandom(14)==0){
body[$"torso"].robes =choose(0,0,0,1,1,2);
if (body[$"torso"].robes == 0 && irandom(1) == 0){
body[$"head"].hood = 1;
}
}
_robe_chance += 70;
}else if(global.chapter_name == "Dark Angels" || obj_ini.progenitor == ePROGENITOR.DARK_ANGELS){
body[$"torso"].robes = choose(0,0,0,1,2);
if (body[$"torso"].robes == 0 && irandom(1) == 0){
body[$"head"].hood = 1;
}
}else if(irandom(30)==0){
body.torso.robes =choose(0,1,2,2,2,2,2);
_robe_chance += 50;
}
if (irandom(100) <= _robe_chance) {
body.torso.robes = irandom(2);
if (body[$"torso"].robes == 0 && irandom(1) == 0){
body[$"head"].hood = 1;
}
Expand Down
Binary file modified sprites/spr_binders_robes/98625b1b-c315-421f-942a-61723f81b005.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified sprites/spr_binders_robes/ea737237-f34b-4a88-a92f-5d553e4e2b87.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
16 changes: 8 additions & 8 deletions sprites/spr_binders_robes/spr_binders_robes.yy

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

4 changes: 2 additions & 2 deletions sprites/spr_gear_hood1/spr_gear_hood1.yy

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

Binary file modified sprites/spr_gear_hood2/98625b1b-c315-421f-942a-61723f81b005.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified sprites/spr_gear_hood2/ea737237-f34b-4a88-a92f-5d553e4e2b87.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
18 changes: 9 additions & 9 deletions sprites/spr_gear_hood2/spr_gear_hood2.yy

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

4 changes: 2 additions & 2 deletions sprites/spr_gear_hood3/spr_gear_hood3.yy

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

4 changes: 2 additions & 2 deletions sprites/spr_purity_s/spr_purity_s.yy

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

0 comments on commit 8574f40

Please sign in to comment.