Neuer Kleidungsshop
Ich habe mich mit Mr.Frost bissel hingesetzt und haben uns gedacht wir machen mal ein ganz neues Shop-Menü, das auch nicht zu Schwer ist aber auch einfach zu verstehen ist.
Wir hoffen es gefällt euch.
1. Wir gehen in die fn_buyClothes.sqf und ersetzten alles mit dem hier (zu finden in core > shops > fn_buyClothes.sqf)
2. Wir gehen in die fn_clothingMenu.sqf und ersetzten alles mit dem hier (zu finden in core > shops > fn_clothingMenu.sqf)
3. Wir gehen in die fn_clothingFilter.sqf und ersetzten alles mit dem hier (zu finden in core > shops > fn_clothingFilter.sqf)
4. Wir gehen in die clothing.hpp und ersetzten alles mit dem hier (zu finden in core > dialoge > clothing.hpp)
5. Wir gehen in die common.hpp und ersetzten Life_RscTree mit dem hier (zu finden in core > dialoge > common.hpp > class Life_RscTree)
common.hpp
class life_RscTree {
access = 0; // Control access (0 - ReadAndWrite, 1 - ReadAndCreate, 2 - ReadOnly, 3 - ReadOnlyVerified)
idc = 890500; // Control identification (without it, the control won't be displayed)
type = 12; // Type is 12
style = ST_LEFT; // Style
default = 0; // Control selected by default (only one within a display can be used)
blinkingPeriod = 0; // Time in which control will fade out and back in. Use 0 to disable the effect.
x = 12 * GUI_GRID_CENTER_W + GUI_GRID_CENTER_X; // Horizontal coordinates
y = 3 * GUI_GRID_CENTER_H + GUI_GRID_CENTER_Y; // Vertical coordinates
w = 10 * GUI_GRID_CENTER_W; // Width
h = 3 * GUI_GRID_CENTER_H; // Height
colorBorder[] = {0,0,0,1}; // Frame color
colorBackground[] = {0.2,0.2,0.2,1}; // Fill color
colorSelect[] = {1,0.5,0,1}; // Selected item fill color (when multiselectEnabled is 0)
colorMarked[] = {1,0.5,0,0.5}; // Marked item fill color (when multiselectEnabled is 1)
colorMarkedSelected[] = {1,0.5,0,1}; // Selected item fill color (when multiselectEnabled is 1)
colorPicture[] = {1,1,1,1};
colorPictureSelected[] = {0,0,0,1};
colorPictureDisabled[] = {1,1,1,0.25};
colorPictureRight[] = {1,1,1,1};
colorPictureRightSelected[] = {0,0,0,1};
colorPictureRightDisabled[] = {1,1,1,0.25};
SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)";
font = "RobotoCondensed"; // Font from CfgFontFamilies
shadow = 1; // Shadow (0 - none, 1 - N/A, 2 - black outline)
colorText[] = {1,1,1,1}; // Text color
colorSelectText[] = {1,1,1,1}; // Selected text color (when multiselectEnabled is 0)
colorMarkedText[] = {1,1,1,1}; // Selected text color (when multiselectEnabled is 1)
tooltip = "CT_TREE"; // Tooltip text
tooltipColorShade[] = {0,0,0,1}; // Tooltip background color
tooltipColorText[] = {1,1,1,1}; // Tooltip text color
tooltipColorBox[] = {1,1,1,1}; // Tooltip frame color
multiselectEnabled = 0; // Allow selecting multiple items while holding Ctrl or Shift
expandOnDoubleclick = 0; // Expand/collapse item upon double-click
//hiddenTexture = "A3\ui_f\data\gui\rsccommon\rsctree\hiddenTexture_ca.paa"; // Expand icon
//expandedTexture = "A3\ui_f\data\gui\rsccommon\rsctree\expandedTexture_ca.paa"; // Collapse icon
maxHistoryDelay = 1; // Time since last keyboard type search to reset it
// Scrollbar configuration
class ScrollBar
{
width = 0; // width of ScrollBar
height = 0; // height of ScrollBar
scrollSpeed = 0.01; // scroll speed of ScrollBar
arrowEmpty = "\A3\ui_f\data\gui\cfg\scrollbar\arrowEmpty_ca.paa"; // Arrow
arrowFull = "\A3\ui_f\data\gui\cfg\scrollbar\arrowFull_ca.paa"; // Arrow when clicked on
border = "\A3\ui_f\data\gui\cfg\scrollbar\border_ca.paa"; // Slider background (stretched vertically)
thumb = "\A3\ui_f\data\gui\cfg\scrollbar\thumb_ca.paa"; // Dragging element (stretched vertically)
color[] = {1,1,1,1}; // Scrollbar color
};
colorDisabled[] = {0,0,0,0}; // Does nothing, but must be present, otherwise an error is shown
colorArrow[] = {0,0,0,0}; // Does nothing, but must be present, otherwise an error is shown
//onCanDestroy = "systemChat str ['onCanDestroy',_this]; true";
//onDestroy = "systemChat str ['onDestroy',_this]; false";
//onMouseEnter = "systemChat str ['onMouseEnter',_this]; false";
//onMouseExit = "systemChat str ['onMouseExit',_this]; false";
//onSetFocus = "systemChat str ['onSetFocus',_this]; false";
//onKillFocus = "systemChat str ['onKillFocus',_this]; false";
//onKeyDown = "systemChat str ['onKeyDown',_this]; false";
//onKeyUp = "systemChat str ['onKeyUp',_this]; false";
//onMouseButtonDown = "systemChat str ['onMouseButtonDown',_this]; false";
//onMouseButtonUp = "systemChat str ['onMouseButtonUp',_this]; false";
//onMouseButtonClick = "systemChat str ['onMouseButtonClick',_this]; false";
//onMouseButtonDblClick = "systemChat str ['onMouseButtonDblClick',_this]; false";
//onMouseZChanged = "systemChat str ['onMouseZChanged',_this]; false";
//onMouseMoving = "";
//onMouseHolding = "";
//onTreeSelChanged = "systemChat str ['onTreeSelChanged',_this]; false";
//onTreeLButtonDown = "systemChat str ['onTreeLButtonDown',_this]; false";
//onTreeDblClick = "systemChat str ['onTreeDblClick',_this]; false";
//onTreeExpanded = "systemChat str ['onTreeExpanded',_this]; false";
//onTreeCollapsed = "systemChat str ['onTreeCollapsed',_this]; false";
//onTreeMouseMove = "systemChat str ['onTreeMouseMove',_this]; false"; // Causing CTD
//onTreeMouseHold = "systemChat str ['onTreeMouseHold',_this]; false"; // Causing CTD
//onTreeMouseExit = "systemChat str ['onTreeMouseExit',_this]; false";
};
Alles anzeigen
6. Geht in eure Functions.hpp und sucht class clothingMenu {}; und fügt darunter class clothingSelection {}; ein
7. Begebt euch zu core > shops und erstellt eine neue Datei namens fn_clothingSelection.sqf und fügt folgenden Inhalt ein
8. Jetzt geht ihr in die config > Config_Colthing.hpp rein, jetzt wird es bissel kompliziert, und zwar ist der neue aufbaue so
Config_Colthing.hpp
/*
* Clothing classnames can be found here: https://community.bistudio.com/wiki/Arma_3_CfgWeapons_Equipment
* Backpacks/remaining classnames can be found here (TIP: Search page for "pack"): https://community.bistudio.com/wiki/Arma_3_CfgVehicles_EMPTY
*
*/
class Clothing {
class bruce {
title = "STR_Shops_C_Bruce";
conditions = "";
side = "civ";
class Catogary {
class bruce_Unfirorms {
displaname = "Uniform";
conditions = "";
colthing[] = {
{ "NONE", $STR_C_Remove_uniforms, 0, "" },
{ "U_C_Poloshirt_blue", "", 500, "" },
{ "U_C_Poloshirt_burgundy", "", 500, "" },
{ "U_C_Poloshirt_salmon", "", 500, "" },
{ "U_C_Poloshirt_redwhite", "", 500, "" },
{ "U_C_Poloshirt_stripped", "", 500, "" },
{ "U_C_Poloshirt_tricolour", "", 500, "" },
{ "U_C_Man_casual_5_F", "", 600, "" },
{ "U_C_Man_casual_4_F", "", 600, "" },
{ "U_C_Man_casual_6_F", "", 600, "" },
{ "U_C_Uniform_Scientist_02_formal_F", "", 600, "" },
{ "U_C_Man_casual_2_F", "", 700, "" },
{ "U_C_Man_casual_3_F", "", 700, "" },
{ "U_C_Man_casual_1_F", "", 700, "" },
{ "U_OrestesBody", "", 1000, "" },
{ "U_C_Uniform_Farmer_01_F", "", 1000, "" },
{ "U_C_Mechanic_01_F", "", 1000, "" },
{ "U_C_IDAP_Man_cargo_F", "", 2500, "" },
{ "U_C_IDAP_Man_Jeans_F", "", 2500, "" },
{ "U_C_IDAP_Man_casual_F", "", 2500, "" },
{ "U_C_IDAP_Man_shorts_F", "", 2500, "" },
{ "U_C_IDAP_Man_Tee_F", "", 2500, "" },
{ "U_C_IDAP_Man_TeeShorts_F", "", 2500, "" }
};
};
class bruce_Headgear {
displaname = "Kopfbedeckung";
conditions = "";
colthing[] = {
{ "NONE", $STR_C_Remove_headgear, 0, "" },
{ "H_Bandanna_blu", "", 150, "" },
{ "H_Bandanna_sand", "", 150, "" },
{ "H_Bandanna_gry", "", 150, "" },
{ "H_Bandanna_surfer_grn", "", 150, "" },
{ "H_Bandanna_surfer_blk", "", 150, "" },
{ "H_Bandanna_camo", "", 150, "" },
{ "H_Booniehat_mgrn", "", 250, "" },
{ "H_Booniehat_khk", "", 250, "" },
{ "H_Booniehat_oli", "", 250, "" },
{ "H_Booniehat_tan", "", 250, "" },
{ "H_Hat_grey", "", 300, "" },
{ "H_Hat_brown", "", 300, "" },
{ "H_Hat_tan", "", 300, "" },
{ "H_Hat_checker", "", 300, "" },
{ "H_Hat_camo", "", 300, "" },
{ "H_StrawHat", "", 350, "" },
{ "H_StrawHat_dark", "", 350, "" },
{ "H_Hat_Safari_olive_F", "", 400, "" },
{ "H_Hat_Safari_sand_F", "", 400, "" },
{ "H_Cap_Orange_IDAP_F", "", 500, "" },
{ "H_Cap_Black_IDAP_F", "", 500, "" },
{ "H_Cap_White_IDAP_F", "", 500, "" },
{ "H_Cap_grn_BI", "", 500, "" },
{ "H_Cap_blu", "", 500, "" },
{ "H_Cap_red", "", 500, "" },
{ "H_Cap_grn", "", 500, "" },
{ "H_Cap_tan", "", 500, "" },
{ "H_Cap_oli", "", 500, "" },
{ "H_Cap_blk", "", 500, "" },
{ "H_Cap_press", "", 500, "" },
{ "H_Cap_blk_CMMG", "", 500, "" },
{ "H_Cap_surfer", "", 500, "" },
{ "H_Construction_basic_yellow_F", "", 750, "" },
{ "H_Construction_headset_yellow_F", "", 750, "" },
{ "H_Construction_earprot_yellow_F", "", 750, "" }
};
};
class bruce_Glasses {
displaname = "Brillen";
conditions = "";
colthing[] = {
{ "NONE", $STR_C_Remove_goggles, 0, "" },
{ "G_Lady_Blue", "", 150, "" },
{ "G_Aviator", "", 250, "" },
{ "G_Spectacles", "", 250, "" },
{ "G_Spectacles_Tinted", "", 250, "" },
{ "G_Squares", "", 255, "" },
{ "G_EyeProtectors_F", "", 255, "" },
{ "G_Shades_Blue", "", 300, "" },
{ "G_Shades_Green", "", 300, "" },
{ "G_Shades_Red", "", 300, "" },
{ "G_Shades_Black", "", 300, "" }
};
};
class bruce_Vestes {
displaname = "Westen";
conditions = "";
colthing[] = {
{ "NONE", $STR_C_Remove_vests, 0, "" },
{ "V_Pocketed_coyote_F", "", 5000, "" },
{ "V_Pocketed_olive_F", "", 5000, "" },
{ "V_Pocketed_black_F", "", 5000, "" },
{ "V_Safety_yellow_F", "", 1500, "" }
};
};
class bruce_Backpakink {
displaname = "Rucksack";
conditions = "";
colthing[] = {
{ "NONE", $STR_C_Remove_backpacks, 0, "" },
{ "B_OutdoorPack_blk", "", 500, "" },
{ "B_AssaultPack_khk", "", 2000, "" },
{ "B_AssaultPack_dgtl", "", 2000, "" },
{ "B_AssaultPack_rgr", "", 2000, "" },
{ "B_AssaultPack_sgg", "", 2000, "" },
{ "B_AssaultPack_blk", "", 2000, "" },
{ "B_AssaultPack_cbr", "", 2000, "" },
{ "B_AssaultPack_mcamo", "", 2000, "" },
{ "B_AssaultPack_tna_f", "", 2000, "" }, //Apex DLC
{ "B_TacticalPack_oli", "", 2500, "" },
{ "B_Kitbag_mcamo", "", 3500, "" },
{ "B_Kitbag_sgg", "", 3500, "" },
{ "B_Kitbag_cbr", "", 3500, "" },
{ "B_FieldPack_blk", "", 5000, "" },
{ "B_FieldPack_ocamo", "", 5000, "" },
{ "B_FieldPack_oucamo", "", 5000, "" },
{ "B_FieldPack_ghex_f", "", 5000, "" }, //Apex DLC
{ "B_Bergen_sgg", "", 6500, "" },
{ "B_Bergen_mcamo", "", 6500, "" },
{ "B_Bergen_rgr", "", 6500, "" },
{ "B_Bergen_blk", "", 6500, "" },
{ "B_Carryall_ocamo", "", 7500, "" },
{ "B_Carryall_oucamo", "", 7500, "" },
{ "B_Carryall_mcamo", "", 7500, "" },
{ "B_Carryall_oli", "", 7500, "" },
{ "B_Carryall_khk", "", 7500, "" },
{ "B_Carryall_cbr", "", 7500, "" },
{ "B_Carryall_ghex_f", "", 7500, "" }, //Apex DLC
{ "B_Bergen_dgtl_f", "", 9500, "" }, //Apex DLC
{ "B_Bergen_tna_f", "", 9500, "" } //Apex DLC
};
};
};
};
};
Alles anzeigen
Jetzt nicht in Panik verfallen ich versuche es so gut wie möglich zu erklären.
Es gibt immer 5 Haupt class in diesen falle ist es bruce_Unfirorms | bruce_Headgear | bruce_Glasses | bruce_Vestes | bruce_Backpakink ihr müsst die nicht immer alle so benen haupt sache sie bleiben in dieser reinfolge.
1. bruce_Unfirorms
2. bruce_Headgear
3. bruce_Glasses
4. bruce_Vestes
5. bruce_Backpakink
Ich habe das ganze einfach nur so genannt weil es übersichtlicher ist und das die Classes nicht Doppelt vorkommen können das heißt so viel wie z.B bruce_Backpakink | bruce = Der Shop Class Name | _ | Backpakink = Der Name was dort drinn ist.
Fertig das wars schon ihr könnt sonst den rest so lassen also die Inits in eure NPC oder Obj.
Wenn jemand Fehler hat schreibt einfach hier drunter.
Wer weiß wie man etwas besser machen kann schreibt bitte denn volständigen Code drunter.
Den ich habe kein bock dann noch irgend wie rum zu basteln und rum zu raten wo er code rein kommt.
Gebt mir einfach die veränderte Datei und ich gucke ob so alles passt.
Zum Abschluss noch ein paar Bilder.
Viel Spaß damit
pssst: Mr.Frost und ich Arbeiten schon an einem ReWork vom Design und vom Aufbau, es kommt bald änliche Menus für den Waffen, Fahrzeug wie auch den V-Item Shop raus und noch viles mehr.