diff --git a/ChapterMaster.yyp b/ChapterMaster.yyp index 2ddcb0e55..02a8506ad 100644 --- a/ChapterMaster.yyp +++ b/ChapterMaster.yyp @@ -173,7 +173,6 @@ {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"daemon7.png","CopyToMask":-1,"filePath":"datafiles/images/diplomacy",}, {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"daemon8.png","CopyToMask":-1,"filePath":"datafiles/images/diplomacy",}, {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"daemon9.png","CopyToMask":-1,"filePath":"datafiles/images/diplomacy",}, - {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"diplomacy_icons.png","CopyToMask":-1,"filePath":"datafiles/images/diplomacy",}, {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"diplomacy10.png","CopyToMask":-1,"filePath":"datafiles/images/diplomacy",}, {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"diplomacy11.png","CopyToMask":-1,"filePath":"datafiles/images/diplomacy",}, {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"diplomacy12.png","CopyToMask":-1,"filePath":"datafiles/images/diplomacy",}, @@ -184,6 +183,7 @@ {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"diplomacy6.png","CopyToMask":-1,"filePath":"datafiles/images/diplomacy",}, {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"diplomacy7.png","CopyToMask":-1,"filePath":"datafiles/images/diplomacy",}, {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"diplomacy8.png","CopyToMask":-1,"filePath":"datafiles/images/diplomacy",}, + {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"diplomacy_icons.png","CopyToMask":-1,"filePath":"datafiles/images/diplomacy",}, {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"instructions.txt","CopyToMask":9223372036854775807,"filePath":"datafiles/images/diplomacy",}, {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"symbol1.png","CopyToMask":-1,"filePath":"datafiles/images/diplomacy",}, {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"symbol2.png","CopyToMask":-1,"filePath":"datafiles/images/diplomacy",}, @@ -396,10 +396,10 @@ {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"eldar.json","CopyToMask":-1,"filePath":"datafiles/main/names",}, {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"genestealercult.json","CopyToMask":-1,"filePath":"datafiles/main/names",}, {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"hulk.json","CopyToMask":-1,"filePath":"datafiles/main/names",}, - {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"imperial_ship.json","CopyToMask":-1,"filePath":"datafiles/main/names",}, {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"imperial.json","CopyToMask":-1,"filePath":"datafiles/main/names",}, - {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"ork_ship.json","CopyToMask":-1,"filePath":"datafiles/main/names",}, + {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"imperial_ship.json","CopyToMask":-1,"filePath":"datafiles/main/names",}, {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"ork.json","CopyToMask":-1,"filePath":"datafiles/main/names",}, + {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"ork_ship.json","CopyToMask":-1,"filePath":"datafiles/main/names",}, {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"sector.json","CopyToMask":-1,"filePath":"datafiles/main/names",}, {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"space_marine.json","CopyToMask":-1,"filePath":"datafiles/main/names",}, {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"star.json","CopyToMask":-1,"filePath":"datafiles/main/names",}, @@ -1443,6 +1443,6 @@ ], "templateType": null, "TextureGroups": [ - {"resourceType":"GMTextureGroup","resourceVersion":"1.3","name":"Default","autocrop":true,"border":2,"compressFormat":"bz2","directory":"","groupParent":null,"isScaled":false,"loadType":"default","mipsToGenerate":0,"targets":-1,}, + {"resourceType":"GMTextureGroup","resourceVersion":"1.3","name":"Default","autocrop":true,"border":2,"compressFormat":"bz2","customOptions":"","directory":"","groupParent":null,"isScaled":false,"loadType":"default","mipsToGenerate":0,"targets":-1,}, ], } \ No newline at end of file diff --git a/datafiles/main/chapters/1.JSON b/datafiles/main/chapters/1.JSON index 48f5d9fac..91a2d319b 100644 --- a/datafiles/main/chapters/1.JSON +++ b/datafiles/main/chapters/1.JSON @@ -193,7 +193,6 @@ "ninth": 0, "tenth": 0 }, - // * Not working yet "extra_vehicles": { "rhino": 0, "whirlwind": 0, diff --git a/datafiles/main/chapters/template.JSON b/datafiles/main/chapters/template.JSON index 3cc5b002b..264f516c8 100644 --- a/datafiles/main/chapters/template.JSON +++ b/datafiles/main/chapters/template.JSON @@ -196,6 +196,9 @@ "ninth": 0, "tenth": 0 }, + /** + * All vehicles are added to the 10th company at the start of the game + */ "extra_vehicles": { "rhino": 0, "whirlwind": 0, diff --git a/scripts/scr_initialize_custom/scr_initialize_custom.gml b/scripts/scr_initialize_custom/scr_initialize_custom.gml index d0276d595..a5488af39 100644 --- a/scripts/scr_initialize_custom/scr_initialize_custom.gml +++ b/scripts/scr_initialize_custom/scr_initialize_custom.gml @@ -3202,6 +3202,75 @@ function scr_initialize_custom() { scr_add_item(e_name, e_qty); } } + if(struct_exists(obj_creation, "extra_vehicles")){ + var _slot = 1; + while(obj_ini.veh_role[10][_slot] != ""){ // try not to overwrite existing vehicles + _slot++; + if(_slot > 500){ // no crash pls + break; + } + } + if (_slot < 500){ + if(struct_exists(obj_creation.extra_vehicles, "rhino")){ + if(real(obj_creation.extra_vehicles.rhino) > 0){ + repeat(real(obj_creation.extra_vehicles.rhino)){ + add_veh_to_company("Rhino", 10, _slot, "Storm Bolter","HK Missile","","","Dozer Blades"); + _slot++; + man_size += 10; + } + } + } + if(struct_exists(obj_creation.extra_vehicles, "whirlwind")){ + if(real(obj_creation.extra_vehicles.whirlwind) > 0){ + repeat(real(obj_creation.extra_vehicles.whirlwind)){ + add_veh_to_company("Whirlwind", 10, _slot, "Whirlwind Missiles", "HK Missile", "","",""); + _slot++; + man_size += 10; + } + } + } + if(struct_exists(obj_creation.extra_vehicles, "predator")){ + if(real(obj_creation.extra_vehicles.predator) > 0){ + repeat(real(obj_creation.extra_vehicles.predator)){ + if (!floor(_slot % 2) == 1) { + add_veh_to_company("Predator", 10, _slot, "Twin Linked Lascannon Turret", "Lascannon Sponsons", "HK Missile", "","Searchlight"); + } + if (floor(_slot % 2) == 1) { + add_veh_to_company("Predator", 10, _slot, "Autocannon Turret", "Heavy Bolter Sponsons", "Storm Bolter", "","Dozer Blades"); + } + man_size += 10; + _slot++; + } + } + } + if(struct_exists(obj_creation.extra_vehicles, "land_raider")){ + if(real(obj_creation.extra_vehicles.land_raider) > 0){ + repeat(real(obj_creation.extra_vehicles.land_raider)){ + if (floor(_slot % 4) == 1) || (floor(_slot % 4) == 2) { + add_veh_to_company("Land Raider", 10, _slot, "Twin Linked Heavy Bolter Mount", "Twin Linked Lascannon Sponsons", "HK Missile", "Heavy Armour", "Searchlight") + } + if (floor(_slot % 4) == 3) { + add_veh_to_company("Land Raider", 10, _slot, "Twin Linked Assault Cannon Mount", "Hurricane Bolter Sponsons", "Storm Bolter", "Heavy Armour", "Frag Assault Launchers") + } + if (floor(_slot % 4) == 0) { + add_veh_to_company("Land Raider", 10, _slot, "Twin Linked Assault Cannon Mount", "Flamestorm Cannon Sponsons", "Storm Bolter", "Heavy Armour", "Frag Assault Launchers") + } + _slot++; + man_size += 10; + } + } + } + if(struct_exists(obj_creation.extra_vehicles, "land_speeder")){ + if(real(obj_creation.extra_vehicles.land_speeder) > 0){ + repeat(real(obj_creation.extra_vehicles.land_speeder)){ + add_veh_to_company("Land Speeder", 10, _slot, "Heavy Bolter", "", "","",""); + _slot++; + man_size += 10; + } + } + } + } + } if(scr_has_disadv("Sieged")){ scr_add_item("Narthecium", 4);