Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add handheld maglite ML300L flashlight, clean up flashlight addon #7277

Merged
merged 26 commits into from
Dec 3, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
f84949e
fix typo in maglite p3d name
bux Nov 21, 2019
6de01d5
make ksf_1 name uniform
bux Nov 21, 2019
c6a31eb
make maglite_xl50 name uniform
bux Nov 21, 2019
89266d8
make mx_991 name uniform
bux Nov 21, 2019
5161452
Add Maglite ML300L
bux Nov 21, 2019
c28b5af
tab -> spaces
bux Nov 21, 2019
5e45e85
add maglite to config, add missing quotes
bux Nov 21, 2019
b615bc4
correct paths in p3ds
bux Nov 22, 2019
ff5159f
Add custom rtm for holding flashlight, move flashlight in p3d to bett…
bux Nov 24, 2019
82254b5
add HorribleGoat to authors
bux Nov 24, 2019
8714956
Merge remote-tracking branch 'origin' into maglite
commy2 Nov 30, 2019
776335b
improve the German translation
commy2 Nov 30, 2019
ef34ac7
fix formatting model.cfg
commy2 Nov 30, 2019
f8135b1
fix formatting material file
commy2 Nov 30, 2019
0c51662
add back LodNoShadow to resolution lods 1 and 2
bux Nov 30, 2019
8435497
fix vehicle config, add gwh
commy2 Nov 30, 2019
bd52ff1
Merge branch 'maglite' of https://github.com/acemod/ACE3 into maglite
commy2 Nov 30, 2019
0f10d7f
weapon config
commy2 Nov 30, 2019
77e9cee
sway and info box fixes
commy2 Nov 30, 2019
8e411bb
sway and info box fixes
commy2 Nov 30, 2019
8133a53
vastly reduced complexity of shadow meshes, fix warning with shadow lod
bux Dec 2, 2019
1230956
adjust light strength
bux Dec 2, 2019
6febaf3
fix recoil, remove magic reticle
commy2 Dec 3, 2019
9bbbdf7
Polish translation for Maglite ML300L
veteran29 Dec 3, 2019
cc05fed
Merge pull request #7291 from veteran29/patch-3
commy2 Dec 3, 2019
584d311
add blender animation file
bux Dec 3, 2019
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
1 change: 0 additions & 1 deletion addons/flashlights/CfgEventHandlers.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

class Extended_PostInit_EventHandlers {
class ADDON {
clientInit = QUOTE(call COMPILE_FILE(XEH_postInitClient));
Expand Down
56 changes: 35 additions & 21 deletions addons/flashlights/CfgVehicles.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,17 @@ class CfgVehicles {
};

class Item_Base_F;

class ACE_Flashlight_MX991Item: Item_Base_F {
scope = 2;
scopeCurator = 2;
displayName = CSTRING(MX991_DisplayName);
author = ECSTRING(common,ACETeam);
vehicleClass = "WeaponAccessories";
editorCategory = "EdCat_Equipment";
editorSubcategory = "EdSubcat_InventoryItems";
vehicleClass = "Items";

class TransportItems {
class ACE_Flashlight_MX991 {
name = "ACE_Flashlight_MX991";
count = 1;
};
MACRO_ADDITEM(ACE_Flashlight_MX991,1);
};
};

Expand All @@ -27,12 +26,12 @@ class CfgVehicles {
scopeCurator = 2;
displayName = CSTRING(KSF1_DisplayName);
author = ECSTRING(common,ACETeam);
vehicleClass = "WeaponAccessories";
editorCategory = "EdCat_Equipment";
editorSubcategory = "EdSubcat_InventoryItems";
vehicleClass = "Items";

class TransportItems {
class ACE_Flashlight_KSF1 {
name = "ACE_Flashlight_KSF1";
count = 1;
};
MACRO_ADDITEM(ACE_Flashlight_KSF1,1);
};
};

Expand All @@ -41,38 +40,52 @@ class CfgVehicles {
scopeCurator = 2;
displayName = CSTRING(XL50_DisplayName);
author = ECSTRING(common,ACETeam);
vehicleClass = "WeaponAccessories";
editorCategory = "EdCat_Equipment";
editorSubcategory = "EdSubcat_InventoryItems";
vehicleClass = "Items";

class TransportItems {
class ACE_Flashlight_XL50 {
name = "ACE_Flashlight_XL50";
count = 1;
};
MACRO_ADDITEM(ACE_Flashlight_XL50,1);
};
};

class NATO_Box_Base;
class EAST_Box_Base;
class IND_Box_Base;
class FIA_Box_Base_F;
class Pistol_Base_F;
class ACE_Item_Flashlight_Maglite_ML300L: Pistol_Base_F {
scope = 2;
scopeCurator = 2;
displayName = CSTRING(Maglite_ML300L_DisplayName);
author = ECSTRING(common,ACETeam);
editorCategory = "EdCat_Equipment";
editorSubcategory = "EdSubcat_InventoryItems";
vehicleClass = "Items";

class TransportItems {
MACRO_ADDITEM(ACE_Flashlight_Maglite_ML300L,1);
};
};

class NATO_Box_Base;
class Box_NATO_Support_F: NATO_Box_Base {
class TransportItems {
MACRO_ADDITEM(ACE_Flashlight_MX991,12);
};
};

class EAST_Box_Base;
class Box_East_Support_F: EAST_Box_Base {
class TransportItems {
MACRO_ADDITEM(ACE_Flashlight_KSF1,12);
};
};

class IND_Box_Base;
class Box_IND_Support_F: IND_Box_Base {
class TransportItems {
MACRO_ADDITEM(ACE_Flashlight_XL50,12);
};
};

class FIA_Box_Base_F;
class Box_FIA_Support_F: FIA_Box_Base_F {
class TransportItems {
MACRO_ADDITEM(ACE_Flashlight_MX991,12);
Expand All @@ -84,6 +97,7 @@ class CfgVehicles {
MACRO_ADDITEM(ACE_Flashlight_MX991,12);
MACRO_ADDITEM(ACE_Flashlight_KSF1,12);
MACRO_ADDITEM(ACE_Flashlight_XL50,12);
MACRO_ADDITEM(ACE_Flashlight_Maglite_ML300L,2);
};
};
};
};
92 changes: 80 additions & 12 deletions addons/flashlights/CfgWeapons.hpp
Original file line number Diff line number Diff line change
@@ -1,17 +1,81 @@
class CfgWeapons {
class Pistol;
class Pistol_Base_F: Pistol {
class WeaponSlotsInfo;
};

class ACE_Flashlight_Maglite_ML300L: Pistol_Base_F {
author = ECSTRING(common,ACETeam);
scope = 2;
displayName = CSTRING(Maglite_ML300L_DisplayName);
descriptionShort = CSTRING(Maglite_ML300L_Description);
model = QPATHTOF(data\maglite_ml300l.p3d);
picture = QPATHTOF(UI\maglite_ml300l_ca.paa);
cursor = "";
cursorAim = "";

// binarized rtm, animation in "extras/assets/maglite"
handAnim[] = {"OFP2_ManSkeleton", QPATHTOF(data\maglite_ml300l.rtm)};
recoil = "empty";
muzzlePos = "flash";
muzzleEnd = "flash dir";
magazines[] = {"FakeMagazine"}; // Required for the weapon info box to work correctly.
textureType = "default"; // empty texture
weaponInfoType = "RscWeaponEmpty";

class WeaponSlotsInfo: WeaponSlotsInfo {
holsterScale = 0; // Item does not fit a pistol holster, so hide it.
mass = 20;

class MuzzleSlot {};
class CowsSlot {};
};

inertia = 0.2;
dexterity = 1.8;

class FlashLight {
color[] = {180,180,190};
ambient[] = {0.9,0.81,0.7};
intensity = 85;
size = 1;
innerAngle = 5;
outerAngle = 80;
coneFadeCoef = 8;
position = "flash dir";
direction = "flash";
useFlare = 1;
flareSize = 0.8;
flareMaxDistance = 100;
dayLight = 1;

class Attenuation {
start = 0.25;
constant = 0;
linear = 0;
quadratic = 1;
hardLimitStart = 140;
hardLimitEnd = 150;
};

scale[] = {0};
};
};

class ACE_ItemCore;
class CBA_MiscItem_ItemInfo;

class ACE_Flashlight_MX991: ACE_ItemCore {
author = ECSTRING(common,ACETeam);
scope = 2;
displayName = CSTRING(MX991_DisplayName);
descriptionShort = CSTRING(MX991_Description);
model = QPATHTOF(data\MX_991.p3d);
picture = QPATHTOF(UI\mx991_ca.paa);
scope = 2;
model = QPATHTOF(data\mx_991.p3d);
picture = QPATHTOF(UI\mx_991_ca.paa);

class ItemInfo: CBA_MiscItem_ItemInfo {
mass = 1;
mass = 4;

class FlashLight {
ACE_Flashlight_Colour = "red";
ACE_Flashlight_Beam = QPATHTOF(UI\Flashlight_beam_red_ca.paa);
Expand All @@ -22,13 +86,15 @@ class CfgWeapons {

class ACE_Flashlight_KSF1: ACE_ItemCore {
author = ECSTRING(common,ACETeam);
scope = 2;
displayName = CSTRING(KSF1_DisplayName);
descriptionShort = CSTRING(KSF1_Description);
model = QPATHTOF(data\KSF_1.p3d);
picture = QPATHTOF(UI\ksf1_ca.paa);
scope = 2;
model = QPATHTOF(data\ksf_1.p3d);
picture = QPATHTOF(UI\ksf_1_ca.paa);

class ItemInfo: CBA_MiscItem_ItemInfo {
mass = 1;
mass = 4;

class FlashLight {
ACE_Flashlight_Colour = "red";
ACE_Flashlight_Beam = QPATHTOF(UI\Flashlight_beam_red_ca.paa);
Expand All @@ -39,13 +105,15 @@ class CfgWeapons {

class ACE_Flashlight_XL50: ACE_ItemCore {
author = ECSTRING(common,ACETeam);
scope = 2;
displayName = CSTRING(XL50_DisplayName);
descriptionShort = CSTRING(XL50_Description);
model = QPATHTOF(data\Maglight.p3d);
picture = QPATHTOF(UI\xl50_ca.paa);
scope = 2;
model = QPATHTOF(data\maglite_xl50.p3d);
picture = QPATHTOF(UI\maglite_xl50_ca.paa);

class ItemInfo: CBA_MiscItem_ItemInfo {
mass = 1;
mass = 3;

class FlashLight {
ACE_Flashlight_Colour = "white";
ACE_Flashlight_Beam = QPATHTOF(UI\Flashlight_beam_white_ca.paa);
Expand Down
File renamed without changes.
Binary file added addons/flashlights/UI/maglite_ml300l_ca.paa
Binary file not shown.
File renamed without changes.
16 changes: 13 additions & 3 deletions addons/flashlights/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,22 @@
class CfgPatches {
class ADDON {
name = COMPONENT_NAME;
units[] = {};
weapons[] = {"ACE_Flashlight_MX991", "ACE_Flashlight_KSF1", "ACE_Flashlight_XL50"};
units[] = {
"ACE_Flashlight_MX991Item",
"ACE_Flashlight_KSF1Item",
"ACE_Flashlight_XL50Item",
"ACE_Item_Flashlight_Maglite_ML300L"
};
weapons[] = {
"ACE_Flashlight_MX991",
"ACE_Flashlight_KSF1",
"ACE_Flashlight_XL50",
"ACE_Flashlight_Maglite_ML300L"
};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"ace_interaction"};
author = ECSTRING(common,ACETeam);
authors[] = {"voiper"};
authors[] = {"voiper","bux","HorribleGoat"};
url = ECSTRING(main,URL);
VERSION_CONFIG;
};
Expand Down
Binary file modified addons/flashlights/data/KSF_1.p3d
Binary file not shown.
Binary file modified addons/flashlights/data/MX_991.p3d
Binary file not shown.
Binary file removed addons/flashlights/data/Maglight.p3d
Binary file not shown.
4 changes: 2 additions & 2 deletions addons/flashlights/data/ksf_1.rvmat
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ PixelShaderID="Super";
VertexShaderID="Super";

class Stage1 {
texture="z\ace\addons\flashlights\data\KSF_1_nohq.paa";
texture="z\ace\addons\flashlights\data\textures\ksf_1_nohq.paa";
uvSource="tex";
class uvTransform {
aside[]={1,0,0};
Expand Down Expand Up @@ -48,7 +48,7 @@ class Stage4 {
};
};
class Stage5 {
texture="z\ace\addons\flashlights\data\KSF_1_smdi.paa";
texture="z\ace\addons\flashlights\data\textures\ksf_1_smdi.paa";
uvSource="tex";
class uvTransform {
aside[]={1,0,0};
Expand Down
Binary file added addons/flashlights/data/maglite_ml300l.p3d
Binary file not shown.
Binary file added addons/flashlights/data/maglite_ml300l.rtm
Binary file not shown.
80 changes: 80 additions & 0 deletions addons/flashlights/data/maglite_ml300l.rvmat
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
ambient[] = {1,1,1,1};
diffuse[] = {1,1,1,1};
forcedDiffuse[] = {0,0,0,0};
emmisive[] = {0,0,0,1};
specular[] = {0.6,0.6,0.6,1}; //amount of glossiness - the higher the number, the higher the glossiness
specularPower = 700; //area of glossiness - the higher the number, the smaller the area
PixelShaderID = "Super";
VertexShaderID = "Super";

class Stage1 {
texture = "z\ace\addons\flashlights\data\textures\maglite_ml300l_nohq.paa";
uvSource = "tex";

class uvTransform {
aside[] = {1,0,0};
up[] = {0,1,0};
dir[] = {0,0,1};
pos[] = {0,0,0};
};
};

class Stage2 {
texture = "#(argb,8,8,3)color(0.5,0.5,0.5,1,dt)";
uvSource = "tex";

class uvTransform {
aside[] = {1,0,0};
up[] = {0,1,0};
dir[] = {0,0,1};
pos[] = {0,0,0};
};
};

class Stage3 {
texture = "#(argb,8,8,3)color(0,0,0,0,mc)";
uvSource = "tex";

class uvTransform {
aside[] = {1,0,0};
up[] = {0,1,0};
dir[] = {0,0,1};
pos[] = {0,0,0};
};
};

class Stage4 {
texture = "z\ace\addons\flashlights\data\textures\maglite_ml300l_as.paa";
uvSource = "tex";

class uvTransform {
aside[] = {1,0,0};
up[] = {0,1,0};
dir[] = {0,0,1};
pos[] = {0,0,1};
};
};

class Stage5 {
texture = "z\ace\addons\flashlights\data\textures\maglite_ml300l_smdi.paa";
uvSource = "tex";

class uvTransform {
aside[] = {1,0,0};
up[] = {0,1,0};
dir[] = {0,0,1};
pos[] = {0,0,0};
};
};

class Stage6 {
texture = "#(ai,64,64,1)fresnel(4.7,1.2)";
uvSource = "tex";

class uvTransform {
aside[] = {1,0,0};
up[] = {0,1,0};
dir[] = {0,0,1};
pos[] = {0,0,0};
};
};
Binary file added addons/flashlights/data/maglite_xl50.p3d
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ PixelShaderID="Super";
VertexShaderID="Super";

class Stage1 {
texture="z\ace\addons\flashlights\data\Maglite_nohq.paa";
texture="z\ace\addons\flashlights\data\textures\maglite_xl50_nohq.paa";
uvSource="tex";
class uvTransform {
aside[]={1,0,0};
Expand Down Expand Up @@ -48,7 +48,7 @@ class Stage4 {
};
};
class Stage5 {
texture="z\ace\addons\flashlights\data\Maglite_smdi.paa";
texture="z\ace\addons\flashlights\data\textures\maglite_xl50_smdi.paa";
uvSource="tex";
class uvTransform {
aside[]={1,0,0};
Expand Down
Loading