Merge pull request #397 from EpochModTeam/experimental

Release 0.3.4
This commit is contained in:
vbawol 2015-10-14 10:09:04 -05:00
commit b0b3361dad
166 changed files with 5831 additions and 1185 deletions

View File

@ -1,7 +1,43 @@
Client:
[Fixed] Client fps lag when first joining the server.
[Added] Fishing Pole and ocean fishing, also added crafting recipes to allow cooking fish.
[Added] Workbench storage device added and used as a nearby crafting requirement for most Kit based crafting options.
[Added] New secure storage device: The Epoch Safe.
[Added] Totally new crafting system and UI by Raymix.
[Added] Epoch variant of the unarmed Strider vehicle. (I_MRAP_03_EPOCH)
[Added] Broad Sword Melee weapon that can chop down trees and mine rocks.
[Added] Halloween Clown mask and re-added to loot tables: Wolf/Pumpkin masks as well as Meeps Candy.
[Fixed] Unable to remove lit fireplace.
[Fixed] Group members unable to lock a Lockbox or Safe that was placed by the group leader.
[Fixed] Shadow artifact at top of Jammer.
[Fixed] Reduce client fps lag when first joining the server by preloading objects before exiting loading screen.
[Fixed] Being unable to remove a solar generator.
[Fixed] Angry Pumpkin mask was incorrectly visible in first person.
[Fixed] Issue with Headless clients being treated as players. @dayzai/Face
[Changed] Removed debug hint text for 3d rotation of objects as it was not needed.
[Changed] Re-enable Move button, this system will stay and be refined in the next few patches.
**Improved Dog AI Dog Brain by Axeman**
[FIXED] Dog not taming due to var reset in wrong place / BIS animal update.
[UPDATED] Dog text format updated.
[UPDATED] Dog whine, instead of bark, when alerting of other nearby players (When player crouched).
[UPDATED] Dog prey kills now use animal looting system. i.e. Dog will loot dead animals, and other objects, then will fetch loot.
[UPDATED] Attached weapon (loot) holder is now dropped if dog finds a new one. Needs update.
[ADDED] New Quiet dog bark and whine.
[UPDATED] Make dog sounds global and use quieter sounds to alert player once dog is tamed. Untamed dog or when attacking is still loud.
[UPDATED] Add occasional quiet dog whine when other players in the area.
[UPDATED] General Dog timeout tweaks to compensate for Arma Animals 'doing their own thing'
Server:
[Added] Example "Epoch Event" Code to provide an example on how to broadcast a message to all players using BE.
[Added] 'CfgTraderLimits' config can control stock limit per trader per item. Default is 100 per item class per trader.
[Added] storedVehicleLimit variable in CfgEpochServer can now control the total max allowed vehicles on traders. Default limit is 20.
[Fixed] Logging to the database was not working due to missing function.
[Fixed] Issue when trading vehicles that caused the trader data to save data to the wrong slot.
[Fixed] Added missing prices for female vests.
[Fixed] Error Generic error in expression in EPOCH_server_repairVehicle.
[Changed] Reworked secure data storage system to be more reliable. (NOTE: This may cause issues with existing lockboxes spawn on the ground with incorrect orientation.)
[Changed] Base building maintain option now also maintains storage devices.
[Changed] Moved vehicle spawn config that controls how many vehicles can spawn at different location types to settings pbo. See new vehicleSpawnTypes array in the (WorldName).hpp config.
[Changed] Use new sort command instead of BIS_fncSortBy.
[Changed] Use new worldSize command as default if maps worldSize setting in CfgEpoch does not exist.
[Info] Removed old .bikey and added new one for 0340.
[Info] The source code for the a3_epoch_server.pbo is now on the GitHub.

View File

@ -49,6 +49,7 @@ allowedVehiclesList[] = {
{"B_Heli_Light_01_EPOCH",2},
{"B_SDV_01_EPOCH",2},
{"B_MRAP_01_EPOCH",3},
{"I_MRAP_03_EPOCH", 3},
{"B_Truck_01_transport_EPOCH",1},
{"B_Truck_01_covered_EPOCH",2},
{"B_Truck_01_mover_EPOCH",1},

Binary file not shown.

View File

@ -1 +1 @@
5 "" !"B_Parachute" !"B_AssaultPack_(cbr|dgtl|khk|mcamo|ocamo|rgr|sgg)" !"B_Carryall_(cbr|khk|mcamo|ocamo|oli|oucamo)" !"B_FieldPack_(blk|cbr|khk|ocamo|oli|oucamo)" !"B_Kitbag_(cbr|mcamo|rgr|sgg)" !"B_TacticalPack_(blk|mcamo|ocamo|oli|rgr)" !"smallbackpack_(red|green|teal|pink|)_epoch" !"(O|I|B)_UAV_01_backpack_F"
5 "" !"B_Parachute" !"B_AssaultPack_(cbr|dgtl|khk|mcamo|ocamo|rgr|sgg|blk)" !"B_Carryall_(cbr|khk|mcamo|ocamo|oli|oucamo)" !"B_FieldPack_(blk|cbr|khk|ocamo|oli|oucamo)" !"B_Kitbag_(cbr|mcamo|rgr|sgg)" !"B_TacticalPack_(blk|mcamo|ocamo|oli|rgr)" !"smallbackpack_(red|green|teal|pink|)_epoch" !"(O|I|B)_UAV_01_backpack_F"

View File

@ -1 +1 @@
5 "" !="(Binocular|Rangefinder|Hatchet|CrudeHatchet|WoodClub|Melee(Sledge|Maul)|ChainSaw|MultiGun|Rollins_F|Plunger)" !="(ruger_pistol|speargun|1911_pistol|akm|m14|M14Grn|m16|m16Red|m107|m107Tan|m249|m249Tan|m4a3|sr25|l85a2|l85a2_(pink|ugl))_epoch" !="SMG_(01|02)_F" !="hgun_(PDW2000|ACPC2|Rook40|P07|Pistol_heavy_0[1-2]|Pistol_Signal)_F" !="LMG_(Mk200|Zafir)_F" !="srifle_(EBR|GM6|LRR|DMR_01)_F" !="arifle_(Katiba|Katiba_C|Katiba_GL|SDAR|TRG21|TRG20|TRG21_GL|Mk20|Mk20C|Mk20C_plain|Mk20_GL|Mk20_plain|Mk20_GL_plain)_F" !="arifle_(MXC|MX|MX_GL|MXM|MXM_Black|MX_GL_Black|MX_Black|MXC_Black|MX_SW|MX_SW_Black)_F" !="srifle_DMR_0[2-6](_(camo|sniper|khaki|tan|multicam|woodland|spotter|blk|hex|olive)_|_)F" !="MMG_0[1-2]_(hex|tan|camo|black|sand)_F"
5 "" !="(Binocular|Rangefinder|Hatchet|CrudeHatchet|WoodClub|Melee(Sledge|Maul|Rod|Sword)|ChainSaw|MultiGun|Rollins_F|Plunger)" !="(ruger_pistol|speargun|1911_pistol|akm|m14|M14Grn|m16|m16Red|m107|m107Tan|m249|m249Tan|m4a3|sr25|l85a2|l85a2_(pink|ugl))_epoch" !="SMG_(01|02)_F" !="hgun_(PDW2000|ACPC2|Rook40|P07|Pistol_heavy_0[1-2]|Pistol_Signal)_F" !="LMG_(Mk200|Zafir)_F" !="srifle_(EBR|GM6|LRR|DMR_01)_F" !="arifle_(Katiba|Katiba_C|Katiba_GL|SDAR|TRG21|TRG20|TRG21_GL|Mk20|Mk20C|Mk20C_plain|Mk20_GL|Mk20_plain|Mk20_GL_plain)_F" !="arifle_(MXC|MX|MX_GL|MXM|MXM_Black|MX_GL_Black|MX_Black|MXC_Black|MX_SW|MX_SW_Black)_F" !="srifle_DMR_0[2-6](_(camo|sniper|khaki|tan|multicam|woodland|spotter|blk|hex|olive)_|_)F" !="MMG_0[1-2]_(hex|tan|camo|black|sand)_F"

View File

@ -1 +1 @@
5 "" !WeaponHolderSimulated !Shot !"(LockBox|FirePlace|PlotPole|Jack|SolarGen)_EPOCH" !"Jack_SIM_EPOCH" !"LockBox_Ghost_EPOCH" !"CinderWallHalf_Ghost_EPOCH" !"(Tipi|StorageShelf|Wood(Floor|LargeWall|Stairs|Ramp|Ladder|Tower)_Ghost_EPOCH" !"Foundation_Ghost_EPOCH" !"Land_Cages_F" !"Epoch_Sapper_F"
5 "" !WeaponHolderSimulated !Shot !"(Safe|LockBox|FirePlace|PlotPole|Jack|SolarGen)_EPOCH" !"Jack_SIM_EPOCH" !"LockBox_Ghost_EPOCH" !"CinderWallHalf_Ghost_EPOCH" !"(Tipi|Workbench|StorageShelf|Wood(Floor|LargeWall|Stairs|Ramp|Ladder|Tower)_Ghost_EPOCH" !"Foundation_Ghost_EPOCH" !"Land_Cages_F" !"Epoch_Sapper_F"

View File

@ -1,3 +1,3 @@
5 "" !="I_UAV_01_F" !="(I|B|O)_UAV_AI" !"_EPOCH" !="B_65x39_Minigun_Caseless_Red_splash" !="B_762x51_Minigun_Tracer_Yellow_splash" !="B_(Swing|Stick)" !"^SmokeShell" !"^G_40mm_" !"^F_40mm_" !"Sub_F_" !"^F_Signal_" !="mini_Grenade" !="GrenadeHand" !="LaserTarget(C|W|E)" !"^Chemlight_" !="(ClaymoreDirectionalMine|DemoCharge|SatchelCharge)_Remote_Ammo" !="SLAMDirectionalMine_Wire_Ammo" !="(CMflare_Chaff|Sapper_Charge|SapperB_Charge|ATMine_Range)_Ammo" !="APERS(TripMine_Wire|BoundingMine_Range|Mine_Range)_Ammo" !="Epoch_(Sapper|SapperB|Cloak)_F" !="GreatWhite_F" !="groundWeaponHolder" !="WeaponHolderSimulated" !="Epoch_(Male|Female)_F" !"Supply[0-9]" !"Steerable_Parachute_F" !="Epoch_Female_CamoRed_F" !="Land_Cages_F" !="(O|I|B)_UAV_01_backpack_F" !="I_(helipilot|helicrew)_F"
5 "_EPOCH" !="(SapperHead|Jack|SolarGen)_SIM_EPOCH" !="Wood(Floor|LargeWall|Stairs|Ramp|Foundation|Ladder|Tower)_EPOCH" !="(Tipi|StorageShelf|CinderWallHalf|Foundation|Wood(Floor|LargeWall|Stairs|Ramp|Foundation|Ladder|Tower))_Ghost_EPOCH" !="(Tipi|StorageShelf|LockBox|FirePlace|FirePlaceOn|PlotPole|SolarGen|Jack|Freezer|Tarp|CinderWallHalf)_EPOCH" !="I_(Soldier[1-3]|Soldier)_EPOCH" !="(Bed|locker|Filing|Chair|ChairRed|wardrobe|cooker|Couch|Table|Pelican|Fridge|Shelf|ToolRack|Shoebox|Bunk|Rabbit|Cabinet)_EPOCH" !="(Sheep|Goat|Snake|Snake2|Hen|Cock|Fin|Alsatian)_random_EPOCH" !="(LockBox|CinderWall|CinderWallGarage|CinderWallHalf|PlotPole|Tipi|StorageShelf|Fireplace)_SIM_EPOCH" !="Wood(Floor|LargeWall|LargeWallCor|LargeWallDoor|LargeWallDoorL|LargeWallDoorway|Stairs|Stairs2|Ramp|Ladder|Tower)_SIM_EPOCH" !="(WoodFoundation|Foundation)_EPOCH" !="WoodWall[1-4](_SIM|_Ghost|)_EPOCH"
5 "_EPOCH" !="(SapperHead|Jack|SolarGen)_SIM_EPOCH" !="Wood(Floor|LargeWall|Stairs|Ramp|Foundation|Ladder|Tower)_EPOCH" !="(Tipi|Workbench|StorageShelf|CinderWallHalf|Foundation|Wood(Floor|LargeWall|Stairs|Ramp|Foundation|Ladder|Tower))_Ghost_EPOCH" !="(Tipi|StorageShelf|Safe|LockBox|FirePlace|FirePlaceOn|PlotPole|SolarGen|Jack|Freezer|Tarp|CinderWallHalf|Bobber)_EPOCH" !="I_(Soldier[1-3]|Soldier)_EPOCH" !="(Bed|locker|Filing|Chair|ChairRed|wardrobe|cooker|Couch|Table|Pelican|Fridge|Shelf|ToolRack|Shoebox|Bunk|Rabbit|Cabinet)_EPOCH" !="(Sheep|Goat|Snake|Snake2|Hen|Cock|Fin|Alsatian)_random_EPOCH" !="(Safe|Workbench|LockBox|CinderWall|CinderWallGarage|CinderWallHalf|PlotPole|Tipi|StorageShelf|Fireplace)_SIM_EPOCH" !="Wood(Floor|LargeWall|LargeWallCor|LargeWallDoor|LargeWallDoorL|LargeWallDoorway|Stairs|Stairs2|Ramp|Ladder|Tower)_SIM_EPOCH" !="(WoodFoundation|Foundation)_EPOCH" !="WoodWall[1-4](_SIM|_Ghost|)_EPOCH"
5 SeaGull

View File

@ -1 +1 @@
1 "" !="Land_MPS_EPOCH" !="SapperHead_SIM_EPOCH" !="Epoch_Sapper_F" !="Epoch_Cloak_F" !="LockBox_EPOCH" !="Rabbit_EPOCH" !="(Sheep|Goat|Snake|Snake2|Hen|Cock)_random_EPOCH" !="LockBox_(Ghost|SIM)_EPOCH" !="CinderWallHalf_(Ghost|SIM)_EPOCH" !="CinderWall_SIM_EPOCH" !="Wood(Floor|LargeWall|LargeWallCor|LargeWallDoor|LargeWallDoorway|Stairs|Stairs2|Ramp|Ladder|Tower)_(Ghost|SIM)_EPOCH" !="Foundation_Ghost_EPOCH" !="Foundation_EPOCH" !="WoodWall[1-4](_SIM|_Ghost|)_EPOCH"
1 "" !="Land_MPS_EPOCH" !="SapperHead_SIM_EPOCH" !="Epoch_Sapper_F" !="Epoch_Cloak_F" !="(Safe|LockBox|Bobber)_EPOCH" !="Rabbit_EPOCH" !="(Sheep|Goat|Snake|Snake2|Hen|Cock)_random_EPOCH" !="LockBox_(Ghost|SIM)_EPOCH" !="CinderWallHalf_(Ghost|SIM)_EPOCH" !="CinderWall_SIM_EPOCH" !="Wood(Floor|LargeWall|LargeWallCor|LargeWallDoor|LargeWallDoorway|Stairs|Stairs2|Ramp|Ladder|Tower)_(Ghost|SIM)_EPOCH" !="Foundation_Ghost_EPOCH" !="Foundation_EPOCH" !="WoodWall[1-4](_SIM|_Ghost|)_EPOCH"

View File

@ -14,7 +14,7 @@
7 attachTo !="EP_light attachTo [player];" !="_bomb attachTo [_unit, [0,0,0],\"Pelvis\"];" !="_dogHolder attachTo [_dog, [-0.2,1.2,0.7]];" !="EPOCH_target attachTo[player];" !="_sapperSmoke attachTo [_sapper,[0,0,-0.4]];"" !="_cage attachTo [_cage2,[0,1.3,0]];"
7 enableCollisionWith
7 hideObject !="_dogHolder hideobject true;" !="_dogHolder hideobject false;"
7 setvelocity !="setVelocityTarget" !="_bolt setPosATL _pos;\n_bolt setVelocity [0, 0, -10];" !="EPOCH_target setvelocitytransformation" !="_currentTarget setVelocity [0,0,-0.01];" !="_head setVelocity [\n(sin _dir * _speed), \n(cos _dir * _speed)" !="_vel = velocity this; _dir = getDir player; this setVelocity[(_vel select 0)+(sin _dir * 2),(_vel select 1)+(cos _dir * 2),(_vel select 2)];" !="_head setVelocity [random 2,random 2,10];"
7 setvelocity !="setVelocityTarget" !="_bolt setPosATL _pos;\n_bolt setVelocity [0, 0, -10];" !="EPOCH_target setvelocitytransformation" !="_currentTarget setVelocity [0,0,-0.01];" !="_head setVelocity [\n(sin _dir * _speed), \n(cos _dir * _speed)" !="_vel = velocity this; _dir = getDir player; this setVelocity[(_vel select 0)+(sin _dir * 2),(_vel select 1)+(cos _dir * 2),(_vel select 2)];" !="_head setVelocity [random 2,random 2,10];" !="_bobber setVelocity [0,-1,-1];" !="_bobber setVelocity [0,-1,-10];"
7 assignAs !="assignAsCargo" !="_unit assignAsGunner _axeCopter;" !="_driver assignAsDriver _axeCopter;" !="axeVIP assignAsDriver vehicle axeVIP;"
7 assignAsCargo !="_x assignAsCargo axeGeneralsBoat;" !="axeVIP assignAsCargo vehicle player;" !="axeVIP assignAsCargo vehicle axeVIP;"
7 allowDamage !="_unit allowDamage false;" !="_unit allowDamage true;" !="player allowDamage true;" !="vehicle player allowDamage true;" !="player allowDamage false;"
@ -22,7 +22,7 @@
7 onMapSingleClick !="onMapSingleClick '';"
7 addMagazine !"addMagazineCargo" !="player addMagazine _craftItem;" !="player addMagazine \"jerrycanE_epoch\";" !="player addMagazine \"emptyjar_epoch\";" !="player addMagazine \"jerrycan_epoch\";" !="player addMagazine \"Hatchet_swing\";" !="player addMagazine [(_x select 0),(_x select 1)]" !="player addMagazine _x;" !="if !(player canAdd (_x select 0)) exitWith {};\nplayer addMagazine[_x select 0, _x select 1];"
7 addMagazineCargo !"_dogHolder addMagazineCargo [\"RabbitCarcass_EPOCH\", 1]" !"_dogHolder addMagazineCargo [\"Pelt_EPOCH\", 1]" !"_dogHolder addMagazineCargo [\"Venom_EPOCH\", 1]" !"_dogHolder addMagazineCargo [\"SnakeCarcass_EPOCH\", 1]" !"_dogHolder addMagazineCargo [\"ChickenCarcass_EPOCH\", 1]" !="_acceptHolder addMagazineCargo [_wAmmo, 1] ;"
7 addItem !="player addItem _craftItem;" !="player addItem _x;" !="_plyr addItemToVest _missionItem;" !="axeVIP addItemToVest _item;" !="_plyr addItemToVest _missionItem;"
7 addItem !="player addItem _item;" !="player addItem _craftItem;" !="player addItem _x;" !="_plyr addItemToVest _missionItem;" !="axeVIP addItemToVest _item;" !="_plyr addItemToVest _missionItem;" !="EPOCH_fnc_addItemOverflow"
7 addBackPack
7 removeAllWeapons !="removeAllWeapons axeGeneral;"
7 removeAllItems
@ -34,7 +34,8 @@
7 createUnit !="_unit = _grp createUnit[(_arrUnits select _i), _pos, [], 0, \"FORM\"];" !="_driver = _grp createUnit[\"I_UAV_AI\", position _unit, [], 0, \"CAN_COLLIDE\"];" !="axeGeneral = grpVIPGeneral createUnit ["I_officer_F", axeGeneralPos, [], 1, "CAN_COLLIDE"];"
7 createAgent !="_unit = createAgent[_unitClass, _targetPos, [], 256, \"FORM\"];" !="_unit = createAgent [_unitClass, _targetPos, [], 120, \"FORM\"];" !="_animal = createAgent[_randomAIClass, _animalPos, [], 5, \"NONE\"];" !="_unit = createAgent [\"Epoch_Cloak_F\", _pos, [], 0, \"CAN_COLLIDE\"];" !="_unit = createAgent [\"Epoch_Sapper_F\", _targetPos, [], 180, \"FORM\"];" !="_sapper = createAgent ["Epoch_Sapper_F", getPos _cage2, [], 0, "FORM"];"
7 createTeam
7 createDialog !="createDialog \"QuickUpgrade\";" !="createDialog \"QuickTake\";" !="createDialog \"InteractBank\";" !="createdialog \"SelectGender\";" !="_handled = createdialog _dialog;" !="if !(createdialog \"InteractItem\") exitWith {};" !="createDialog \"TapOut\";" !="if !(createdialog \"Trade\") exitWith {};" !="_ok = createdialog \"Interact\";" !="_ok = createdialog \"TradeNPCMenu\";" !="createDialog \"Epoch_myGroup\";" !="createDialog (if ((Epoch_my_GroupUID == \"\") && (Epoch_my_Group isEqualTo [])) then {\"EPOCH_createGrp\"} else {\"Epoch_myGroup\"});" !="createDialog \"GroupRequests\";" !="_ok = createdialog \"MissionSelect\";" !="createDialog 'Skaronator_AdminMenu';"
7 createDialog !="createDialog \"rmx_craftingUI\";" !="createDialog \"QuickUpgrade\";" !="createDialog \"QuickTake\";" !="createDialog \"InteractBank\";" !="createdialog \"SelectGender\";" !="_handled = createdialog _dialog;" !="if !(createdialog \"InteractItem\") exitWith {};" !="createDialog \"TapOut\";" !="if !(createdialog \"Trade\") exitWith {};" !="_ok = createdialog \"Interact\";" !="_ok = createdialog \"TradeNPCMenu\";" !="createDialog \"Epoch_myGroup\";" !="createDialog (if ((Epoch_my_GroupUID == \"\") && (Epoch_my_Group isEqualTo [])) then {\"EPOCH_createGrp\"} else {\"Epoch_myGroup\"});" !="createDialog \"GroupRequests\";" !="_ok = createdialog \"MissionSelect\";" !="createDialog 'Skaronator_AdminMenu';"
7 createDisplay !="createDisplay \"rmx_dynamenu\";" !="_parent createdisplay _displayClass;"
7 deleteMarker
7 setMarker
7 createMarker
@ -48,8 +49,8 @@
7 addMPEventHandler
7 addEventHandler !"displayAddEventHandler" !"ctrlAddEventHandler" !"FiredNear" !"EpeContactStart" !"InventoryClosed" !"GetOut" !"InventoryOpened" !"local" !"Respawn" !"Put" !"Take" !"Fired" !"Killed" !" [\"PostReset\",{BIS_EnginePPReset = true;} ];" !"_logic addeventhandler [\n\"local\""
7 displayAddEventHandler !"[_display] call _fnc_animate;" !"tVersion select 4) == \"Development\") then" !"_display displayaddeventhandler\n[\n\"mousemoving\"," !"(findDisplay 46) displayAddEventHandler [\"KeyDown\",\"true\"];" !"(findDisplay 46) displayAddEventHandler [\"KeyDown\",\"_this call EPOCH_KeyDown\"];" !="_addCase = _display46 displayAddEventHandler ['KeyDown',{_this call EPOCH_KeyDown;}];" !"_display displayaddeventhandler [\"unload\",\"uinamespace setvariable ['BIS_fnc_guiMess" !="findDisplay -1337 displayAddEventHandler ['Unload'" !="_display displayaddeventhandler [\"keydown\",\"with uinamespace do {['keyDown'"
7 ctrlAddEventHandler !"rCfg >> \"refreshDelay\");" !" [\n\"draw\"," !" [\"buttonclick\"," !="(uiNamespace getVariable 'ESP_map') ctrlAddEventHandler['Draw', '_esp_targets = EPOCH_ESPMAP_TARGETS;" !="ctrlAddEventHandler ['MouseButtonDown'" !="(_display displayctrl _idc) ctrlAddEventHandler [\"LBSelChanged\","
7 removeAllEventHandlers !="ctrlRemoveAllEventHandlers" !="_vehicle removeAllEventHandlers \"GetOut\";" !="_sapper removeAllEventHandlers \"Hit\";\n_sapper removeAllEventHandlers \"FiredNear\";" !="_display46 displayRemoveAllEventHandlers 'KeyDown';"
7 ctrlAddEventHandler !"rCfg >> \"refreshDelay\");" !" [\n\"draw\"," !" [\"buttonclick\"," !="(uiNamespace getVariable 'ESP_map') ctrlAddEventHandler['Draw', '_esp_targets = EPOCH_ESPMAP_TARGETS;" !="ctrlAddEventHandler ['MouseButtonDown'" !="(_display displayctrl _idc) ctrlAddEventHandler [\"LBSelChanged\"," !="_ctrl ctrlSetEventHandler [\"mouseEnter\", (format [\"_c = _this select 0;" !="_ctrl ctrlSetEventHandler [\"mouseExit\", (format [\"_c = _this select 0;" !="_ctrl ctrlSetEventHandler [\"mouseButtonDown\", (format [\"call %1;\",(_buttonSettings select _e select 2)])];"
7 removeAllEventHandlers !="ctrlRemoveAllEventHandlers" !="_vehicle removeAllEventHandlers \"GetOut\";" !="_sapper removeAllEventHandlers \"Hit\";\n_sapper removeAllEventHandlers \"FiredNear\";" !="_unit removeAllEventHandlers \"Hit\";\n_unit removeAllEventHandlers \"FiredNear\";" !="_display46 displayRemoveAllEventHandlers 'KeyDown';"
7 removeAllMissionEventHandlers
7 ctrlRemoveAllEventHandlers !="(uiNamespace getVariable 'ESP_map') ctrlRemoveAllEventHandlers 'Draw';" !="ctrlAddEventHandler ['MouseButtonDown'"
7 removeEventHandler !="displayRemoveEventHandler" !="player removeEventHandler ['Fired', 0];" !"_currentTarget removeEventHandler[\"EpeContactStart\", _onContactEH]" !" [_adminVar,objnull];\npublicvariable _adminVar;\nplayer removeeventhandler [\"respawn\",_respawn];" !="_plyr removeEventHandler [\"FiredNear\", _smokeEH];" !="player removeEventHandler [_ehKey, 0];"
@ -58,15 +59,14 @@
7 remoteControl !"fn_moduleRemoteControl.sqf" !="\"BIS_fnc_moduleRemoteControl"\"
7 drawIcon3D !="drawIcon3D[\"\x\addons\a3_epoch_code\Data\Member.paa\",_color,_pos,1,1,0,_text,1,0.025,\"PuristaMedium\"];\n}forEach EPOCH_ESP_TARGETS;" !"drawIcon3D[format[\"\x\addons\a3_epoch_code\Data\UI\loading_bar_%1.paa\",_stability],_color,(getPosATL EPOCH_stabilityTarget),5,5,0,\"\",1,0.05,\"PuristaMedium\"];" !"drawIcon3D[format[\"\x\addons\a3_epoch_code\Data\UI\loading_bar_%1.paa\",_num],_color,_pos,4,4,0,\"\",1,0.05,\"PuristaMedium\"];" !"EPOCH_drawIcon3dStability" !"EPOCH_drawIcon3d" !"if (_condition) then {\ndrawIcon3D [_icon, _color, _position, _sizeX, _sizeY, _angle, _text," !="drawIcon3D [\"\A3\UI_F_MP_Mark\Data\Tasks\Misc\background.paa\""
7 drawLine3D !"{\nfor [{_i = 1}, {_i < count _x}, {_i = _i + 1}] do {\ndrawLine3D [_x select (_i - 1), _x select _i, ((BIS_tracedShooter getVari"
7 ctrlCreate !="_ListGroup = _display ctrlCreate [\"RscControlsGroupNoHScrollbars\""
7 ctrlDelete !="ctrlDelete _ListGroup;"
7 ctrlCreate !="_ctrl = _display ctrlCreate [\"RscProgress\",_idc + 1];" !="_display ctrlCreate [\"rmx_rscControlsGroup\"" !="_ListGroup = _display ctrlCreate [\"RscControlsGroupNoHScrollbars\"" !="_ctrl = _display ctrlCreate [_x,call _getIDC];" !="_mainGrp = _display ctrlCreate [\"Epoch_main_config_group\",_value];" !="_ctrlGrp = _display ctrlCreate [\"RscControlsGroupNoScrollbars\",call epoch_getIDC];"
7 ctrlDelete !="ctrlDelete _ListGroup;" !="ctrlDelete (rmx_var_crafting_ctrl_GROUP select 0);" !="ctrlDelete _mainGrp;" !="_x call epoch_getIDC;\nctrlDelete _x;"
7 ctrlClassName
7 ctrlModel
7 ctrlModelDirection
7 ctrlModelSide
7 ctrlModelUp
7 ctrlSetDirection
7 ctrlSetModel
7 deleteVehicleCrew !"fn_deleteVehicleCrew.sqf" !="\"BIS_fnc_deleteVehicleCrew"\"
7 loadFile
7 selectPlayer !="selectPlayer _playerObject;"

View File

@ -1 +1 @@
5 "" !="Epoch_(Male|Female)_F" !="SapperHead_SIM_EPOCH" !="(Tipi|StorageShelf|LockBox|FirePlace|FirePlaceOn|PlotPole|SolarGen)_EPOCH" !="(Bed|locker|Filing|Chair|ChairRed|wardrobe|cooker|Couch|Table|Pelican|Fridge|Shelf|ToolRack|Rabbit|Cabinet)_EPOCH" !="(Sheep|Goat|Snake|Hen|Cock|Fin|Alsatian)_random_EPOCH" !="(LockBox|CinderWallHalf|CinderWall|Fireplace|SolarGen)_SIM_EPOCH" !="Wood(Floor|LargeWall|LargeWallCor|LargeWallDoor|LargeWallDoorway|Stairs|Stairs2|Ramp)_SIM_EPOCH" !="(Foundation|Wood(Foundation|Ladder|Tower))_Ghost_EPOCH" !="Foundation_EPOCH" !="WoodFoundation_EPOCH" !="WoodWall[1-4](_SIM|_Ghost|)_EPOCH"
5 "" !="Epoch_(Male|Female)_F" !="SapperHead_SIM_EPOCH" !="(Tipi|Workbench|StorageShelf|Safe|LockBox|FirePlace|FirePlaceOn|PlotPole|SolarGen)_EPOCH" !="(Bed|locker|Filing|Chair|ChairRed|wardrobe|cooker|Couch|Table|Pelican|Fridge|Shelf|ToolRack|Rabbit|Cabinet)_EPOCH" !="(Sheep|Goat|Snake|Hen|Cock|Fin|Alsatian)_random_EPOCH" !="(Safe|LockBox|CinderWallHalf|CinderWall|Fireplace|SolarGen)_SIM_EPOCH" !="Wood(Floor|LargeWall|LargeWallCor|LargeWallDoor|LargeWallDoorway|Stairs|Stairs2|Ramp)_SIM_EPOCH" !="(Foundation|Wood(Foundation|Ladder|Tower))_Ghost_EPOCH" !="Foundation_EPOCH" !="WoodFoundation_EPOCH" !="WoodWall[1-4](_SIM|_Ghost|)_EPOCH"

View File

@ -13,7 +13,7 @@ requiredBuild = 131696;
// WHITELIST FILE TYPES
allowedLoadFileExtensions[] = {:};
allowedPreprocessFileExtensions[] = {"sqf"};
allowedHTMLLoadExtensions[] = {:};
allowedHTMLLoadExtensions[] = {"html"};
// WELCOME MESSAGE ("message of the day")
// It can be several lines, separated by comma
@ -31,7 +31,7 @@ maxPlayers = 50; // Maximum amount of players. Civilians and watchers, beholder
// VOTING
voteMissionPlayers = 200; // Prevents Votes.
voteThreshold = 2; // Prevents Votes.
// DISALLOW VOTING since 1.39
// DISALLOW VOTING since 1.39
allowedVoteCmds[] = {};
allowedVotedAdminCmds[] = {};
@ -64,4 +64,3 @@ doubleIdDetected = "";
onUnsignedData = "kick (_this select 0)"; // unsigned data detected
onHackedData = "kick (_this select 0)"; //"ban (_this select 0)"; // tampering of the signature detected
onDifferentData = "kick (_this select 0)";

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,702 @@
/*%FSM<COMPILE "F:\Program Files (x86)\Bohemia Interactive\Tools\FSM Editor Personal Edition\scriptedFSM.cfg, construct">*/
/*%FSM<HEAD>*/
/*
item0[] = {"construct",0,250,-316.429199,-195.383255,-226.429291,-145.383362,0.000000,"construct"};
item1[] = {"_",8,218,62.332706,-185.990021,114.284866,-157.584717,0.000000,""};
item2[] = {"instinct",2,250,165.295456,-196.723892,255.295410,-146.723892,0.000000,"instinct"};
item3[] = {"no_decision",4,218,366.525970,-123.699348,456.525940,-73.699387,10.000000,"no decision"};
item4[] = {"action",2,250,164.446381,121.731827,254.446365,171.731903,0.000000,"action"};
item5[] = {"dispose",4,218,37.004036,-291.823761,127.004257,-241.823792,90.000000,"dispose"};
item6[] = {"_",8,218,182.964218,311.201538,234.916306,339.606750,0.000000,""};
item7[] = {"reset_vars",2,250,-57.248745,-196.860123,32.751255,-146.860138,0.000000,"reset vars"};
item8[] = {"_",8,218,-150.031967,-184.788101,-98.079796,-156.382797,0.000000,""};
item9[] = {"complete",4,218,-57.972878,-94.263466,32.027390,-44.263451,100.000000,"complete"};
item10[] = {"move",4,218,286.028778,192.150543,376.028778,242.150604,20.000000,"move"};
item11[] = {"end",1,250,-241.719803,14.907898,-151.719772,64.907913,0.000000,"end"};
item12[] = {"dispose",4,218,-59.072083,14.028580,30.927921,64.028580,95.000000,"dispose"};
item13[] = {"do_move",2,250,286.331848,300.982452,376.331848,350.982452,0.000000,"do move"};
item14[] = {"near_building",4,218,674.880554,-143.328430,764.880676,-93.328377,80.000000,"near building"};
item15[] = {"instinct_done",4,218,165.528030,-96.910675,255.527969,-46.910683,100.000000,"instinct done"};
item16[] = {"move",4,218,266.138367,-295.030945,356.138367,-245.030884,50.000000,"move"};
item17[] = {"wait_action",4,218,373.527924,50.001488,463.527740,100.001457,110.000000,"wait action"};
item18[] = {"checking_status",2,250,611.751343,-31.961807,701.751221,18.038223,0.000000,"checking status"};
item19[] = {"see_target",4,4314,553.701416,-144.674866,643.701538,-94.674820,90.000000,"see target"};
item20[] = {"checked",4,218,612.020508,61.020790,702.020386,111.020844,10.000000,"checked"};
item21[] = {"done",4,218,476.283447,-31.286667,566.283386,18.713348,100.000000,"done"};
item22[] = {"construct_smash",4,218,165.596268,-331.217682,255.596191,-281.217590,60.000000,"construct smash"};
item23[] = {"return",2,250,360.850586,-30.593140,450.850647,19.406860,0.000000,"return"};
item24[] = {"to_action",4,218,277.703308,21.529037,367.703308,71.529037,10.000000,"to action"};
item25[] = {"to_instinct",4,218,287.631317,-100.089363,377.631317,-50.089355,5.000000,"to instinct"};
item26[] = {"smash",4,218,-81.683311,146.820755,8.316697,196.820755,30.000000,"smash"};
item27[] = {"interrupt",4,218,58.118843,-94.064064,148.118866,-44.064060,90.000000,"interrupt"};
item28[] = {"construct_smash",2,250,-82.893753,370.386627,7.106274,420.386658,0.000000,"construct smash"};
item29[] = {"wander",4,218,320.950836,-243.494019,410.950836,-193.494019,40.000000,"wander"};
item30[] = {"wander",4,218,370.444092,167.573929,460.444061,217.573975,30.000000,"wander"};
item31[] = {"do_wander",2,250,370.747131,376.849396,460.747131,426.849396,0.000000,"do wander"};
item32[] = {"health_check",4,218,726.020203,-74.284813,816.020264,-24.284767,70.000000,"health check"};
item33[] = {"____FAKE____",9,1320,0.000000,0.000000,0.000000,0.000000,0.000000,"____FAKE____"};
link0[] = {0,8};
link1[] = {1,2};
link2[] = {2,3};
link3[] = {2,5};
link4[] = {2,15};
link5[] = {2,16};
link6[] = {2,29};
link7[] = {3,18};
link8[] = {4,9};
link9[] = {4,10};
link10[] = {4,12};
link11[] = {4,17};
link12[] = {4,26};
link13[] = {4,27};
link14[] = {4,30};
link15[] = {5,2};
link16[] = {6,4};
link17[] = {7,1};
link18[] = {8,7};
link19[] = {9,7};
link20[] = {10,13};
link21[] = {12,11};
link22[] = {13,6};
link23[] = {14,18};
link24[] = {15,4};
link25[] = {16,2};
link26[] = {17,18};
link27[] = {18,14};
link28[] = {18,19};
link29[] = {18,20};
link30[] = {18,21};
link31[] = {18,32};
link32[] = {19,18};
link33[] = {20,18};
link34[] = {21,23};
link35[] = {22,2};
link36[] = {23,24};
link37[] = {23,25};
link38[] = {24,4};
link39[] = {25,2};
link40[] = {26,28};
link41[] = {27,7};
link42[] = {28,6};
link43[] = {29,2};
link44[] = {30,31};
link45[] = {31,6};
link46[] = {32,18};
link47[] = {33,22};
globals[] = {0.000000,0,0,0,16777215,640,480,1,169,6316128,1,73.118919,857.202637,468.231750,-240.399475,1008,911,1};
window[] = {2,-1,-1,-1,-1,725,200,1225,200,3,1026};
*//*%FSM</HEAD>*/
class FSM
{
fsmName = "construct";
class States
{
/*%FSM<STATE "construct">*/
class construct
{
name = "construct";
init = /*%FSM<STATEINIT""">*/"_construct = _this select 0;" \n
"_trgt = player;" \n
"" \n
"//_construct setBehaviour ""COMBAT"";" \n
"" \n
"_constructNames=[""Rocky"",""Miner"",""Plate""];" \n
"_constructName = _constructNames select (floor(random count _constructNames));" \n
"" \n
"_entsArr = [""Epoch_Male_F"",""Epoch_Female_F"",""Epoch_Sapper_F"",""Fin_random_EPOCH"",""Alsatian_Random_EPOCH"",""Epoch_cloak_F"",""b_survivor_F"",""Epoch_Female_Camo_F""];" \n
"_plyArr = [""Epoch_Male_F"",""Epoch_Female_F"",""b_survivor_F"",""Epoch_Female_Camo_F""];" \n
"_trgtArr = [""Epoch_Male_F"",""Epoch_Female_F"",""b_survivor_F"",""Epoch_Female_Camo_F""];" \n
"_vehArray = [""Car""];" \n
"_tRange = 20;" \n
"_sRange = 150;" \n
"_vRange = 50;" \n
"_maxTravelTime = 480;" \n
"_trgtZ = 0;" \n
"_t = diag_tickTime;" \n
"_u = _t;" \n
"" \n
"_dirTo = 0;" \n
"_lDist = 0;" \n
"_checkEntry = """";" \n
"" \n
"_constructPos=[0,0,0];" \n
"_trgtPos=[0,0,0];" \n
"_hidePos = [0,0,0];" \n
"_nrPlyrs = [];" \n
"" \n
"_nrBuild = nearestBuilding _construct;" \n
"_buildBash = false;" \n
"_doSmash = false;" \n
"_doWander = false;" \n
"" \n
"//Behaviour" \n
"_fearTrigger = 12;" \n
"_angerTrigger = 24;" \n
"_lAnger = 0;" \n
"_lFear = 0;" \n
"_lBrave = 0;" \n
"" \n
"//construct Vars" \n
"" \n
"_doMove = false;" \n
"_sanityCheckDone = false;" \n
"_canSee = false;" \n
"_nrTrgts = [];" \n
"" \n
"_sanityCheck = 0;" \n
"" \n
"" \n
"_doHide = false;" \n
"_doAttack = false;" \n
"_firedNear = 0;" \n
"" \n
"_lootVar = 0;" \n
"" \n
"" \n
"//DEBUG" \n
"_doDebug = false;" \n
"_count = 0;" \n
"_debugDo = ""INIT"";" \n
"_mkrName = """";" \n
"_dWait = 0;" \n
"_strDebug = """";" \n
"_constructFeels = ""STARTING"";" \n
"axeCount = 0;" \n
"_strMoveTo = """";" \n
"" \n
"" \n
"" \n
"" \n
"" \n
"" \n
"" \n
"" \n
""/*%FSM</STATEINIT""">*/;
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
class Links
{
/*%FSM<LINK "_">*/
class _
{
priority = 0.000000;
to="reset_vars";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/""/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
};
};
/*%FSM</STATE>*/
/*%FSM<STATE "instinct">*/
class instinct
{
name = "instinct";
init = /*%FSM<STATEINIT""">*/"_t = diag_tickTime;" \n
"" \n
"if(_doDebug)then{" \n
"systemChat format [""Instinct:%1 | D:%2 | M:%3 | S:%4"",diag_tickTime,_decisionMade,_doMove,_canSee];" \n
"};" \n
"" \n
"" \n
"" \n
""/*%FSM</STATEINIT""">*/;
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
class Links
{
/*%FSM<LINK "instinct_done">*/
class instinct_done
{
priority = 100.000000;
to="action";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"_decisionMade;"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/"_t = diag_tickTime;" \n
""/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
/*%FSM<LINK "dispose">*/
class dispose
{
priority = 90.000000;
to="instinct";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"((_trgt distance _construct) > (_sRange * 4)) || !(alive _construct);"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/"_doDispose = true;" \n
"_decisionMade = true;" \n
"_actionDone = false;"/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
/*%FSM<LINK "move">*/
class move
{
priority = 50.000000;
to="instinct";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"_canSee"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/"_doMove = true;" \n
"_decisionMade = true;"/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
/*%FSM<LINK "wander">*/
class wander
{
priority = 40.000000;
to="instinct";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"!_canSee"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/"_doWander = true;" \n
"_decisionMade = true;"/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
/*%FSM<LINK "no_decision">*/
class no_decision
{
priority = 10.000000;
to="checking_status";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"!_decisionMade && diag_tickTime - _t > 3;"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/"_checkEntry = ""instinct"";" \n
"_sanityCheck = 100;"/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
};
};
/*%FSM</STATE>*/
/*%FSM<STATE "action">*/
class action
{
name = "action";
init = /*%FSM<STATEINIT""">*/"" \n
"" \n
"if(_doDebug)then{" \n
"systemChat format [""Action:%1 | %2"",diag_tickTime,_debugDo];" \n
"};"/*%FSM</STATEINIT""">*/;
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
class Links
{
/*%FSM<LINK "wait_action">*/
class wait_action
{
priority = 110.000000;
to="checking_status";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"diag_tickTime > _u + 4;"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/"_checkEntry = ""action"";" \n
"_sanityCheck = 100;"/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
/*%FSM<LINK "complete">*/
class complete
{
priority = 100.000000;
to="reset_vars";
precondition = /*%FSM<CONDPRECONDITION""">*/"if(_doDebug)then{" \n
"" \n
"hint format [""CONSTRUCT\n%1\nMove:%2\nSmash:%3\nWait:%4"",_debugDo,_doMove,_doSmash,_sWait];" \n
"};"/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"_actionDone && ((call compile _criteria) || (diag_tickTime > (_t + _sWait)));"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/"" \n
"if(!isNil ""_criteriaMetAction"")then{" \n
"call _criteriaMetAction;" \n
"};" \n
"" \n
"if(_doDebug)then{" \n
"hint format [""CONSTRUCT\n%1\nMove:%2\nSmash:%3\nWait:%4"",_debugDo,_doMove,_doSmash,_sWait];" \n
"systemChat format [""Complete:%1"",diag_tickTime];" \n
"};" \n
"" \n
""/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
/*%FSM<LINK "dispose">*/
class dispose
{
priority = 95.000000;
to="end";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"(_doDispose || !(alive _construct)) && (diag_tickTime - _t) > 120;"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/"if(_doDebug)then{" \n
"_debugDo = ""Dispose"";" \n
"hint format [""CONSTRUCT\n%1\nAlive: %2"",_debugDo, alive _construct];" \n
"};"/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
/*%FSM<LINK "interrupt">*/
class interrupt
{
priority = 90.000000;
to="reset_vars";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"(_allowInterrupt && (call compile _interruptReason));"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
/*%FSM<LINK "smash">*/
class smash
{
priority = 30.000000;
to="construct_smash";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"_doSmash;"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/"_doSmash = false;"/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
/*%FSM<LINK "wander">*/
class wander
{
priority = 30.000000;
to="do_wander";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"_doWander;"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/"_doWander = false;"/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
/*%FSM<LINK "move">*/
class move
{
priority = 20.000000;
to="do_move";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"_doMove;"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/"_doMove = false;"/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
};
};
/*%FSM</STATE>*/
/*%FSM<STATE "reset_vars">*/
class reset_vars
{
name = "reset_vars";
init = /*%FSM<STATEINIT""">*/"//Default Vars" \n
"_rnd = 0;" \n
"_actionDone = false;" \n
"_decisionMade = false;" \n
"_sWait = 0;" \n
"_doDispose = false;" \n
"_chooseTarget = false;" \n
"_criteria = Nil;" \n
"_criteriaMet = false;" \n
"_allowInterrupt = false;" \n
"_interruptReason = ""(false)"";" \n
"" \n
"_moveTo = [0,0,0];" \n
"" \n
"//Brain Vars" \n
"_override = false;" \n
"_criteria =""(false)"";" \n
"_criteriaMetAction = nil;" \n
"" \n
"//Feeling Vars" \n
"_nrTrgts = [];" \n
"_isThreatened = false;" \n
"_isSafe = false;" \n
"_feelingDone = false;" \n
"" \n
"" \n
"//construct Vars" \n
"" \n
"" \n
"" \n
"" \n
""/*%FSM</STATEINIT""">*/;
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
class Links
{
/*%FSM<LINK "_">*/
class _
{
priority = 0.000000;
to="instinct";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/""/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
};
};
/*%FSM</STATE>*/
/*%FSM<STATE "end">*/
class end
{
name = "end";
init = /*%FSM<STATEINIT""">*/"deleteVehicle _construct;" \n
"" \n
"if(_doDebug)then{" \n
"axeDo = Format[""Dispose | Alive:%1 | Distance: %2"",alive _construct,player distance _construct];" \n
"};"/*%FSM</STATEINIT""">*/;
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
class Links
{
};
};
/*%FSM</STATE>*/
/*%FSM<STATE "do_move">*/
class do_move
{
name = "do_move";
init = /*%FSM<STATEINIT""">*/"_construct forceSpeed 5;" \n
"_constructPos = getPos _construct;" \n
"" \n
"_moveTo = getPos _trgt;" \n
"_construct doMove _moveTo;" \n
"" \n
"_sWait = ((_construct distance _moveTo) / 2) min 18;" \n
"_actionDone = true;" \n
"_t = diag_tickTime;" \n
"_criteria = ""((_construct distance _moveTo)< 6)"";" \n
"" \n
"" \n
"//Session Vars" \n
"" \n
"" \n
"if(_doDebug)then{" \n
"_debugDo = ""Move"";" \n
"};"/*%FSM</STATEINIT""">*/;
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
class Links
{
/*%FSM<LINK "_">*/
class _
{
priority = 0.000000;
to="action";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/""/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
};
};
/*%FSM</STATE>*/
/*%FSM<STATE "checking_status">*/
class checking_status
{
name = "checking_status";
init = /*%FSM<STATEINIT""">*/""/*%FSM</STATEINIT""">*/;
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
class Links
{
/*%FSM<LINK "done">*/
class done
{
priority = 100.000000;
to="return";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"_sanityCheck < 1;"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
/*%FSM<LINK "see_target">*/
class see_target
{
priority = 90.000000;
to="checking_status";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"_sanityCheck > 90;"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/"_canSee = false;" \n
"_nrTrgts = (getPosATL _construct) nearEntities [_trgtArr, _sRange];" \n
"if(count _nrTrgts >0)then{" \n
"{" \n
"if(alive _x)then{" \n
"if(!lineIntersects [aimPos _construct, aimPos _x, _construct, _x]) exitWith {_canSee = true;_trgt = _x};" \n
"};" \n
"}forEach _nrTrgts;" \n
"};" \n
"if(_doDebug)then{" \n
"systemChat format [""SEE:%1 | %2"",_canSee,_trgt];" \n
"};" \n
"_sanityCheck = 90;" \n
""/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
/*%FSM<LINK "near_building">*/
class near_building
{
priority = 80.000000;
to="checking_status";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"_sanityCheck > 80;"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/"_buildBash = false;" \n
"_nrBuild = nearestBuilding _construct;" \n
"" \n
"if((_nrBuild distance _construct)< 16)then{" \n
"_buildBash = true;" \n
"_nrBuild setdamage 1;" \n
"};" \n
"" \n
"" \n
"_sanityCheck = 80;" \n
""/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
/*%FSM<LINK "health_check">*/
class health_check
{
priority = 70.000000;
to="checking_status";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"_sanityCheck > 70;"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/"if(damage _construct > 0.4)then{" \n
"_construct setDamage 0;" \n
"};" \n
"" \n
"" \n
"_sanityCheck = 70;"/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
/*%FSM<LINK "checked">*/
class checked
{
priority = 10.000000;
to="checking_status";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"_sanityCheck > 10;"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/"_sanityCheck = 0 ;" \n
"" \n
"" \n
""/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
};
};
/*%FSM</STATE>*/
/*%FSM<STATE "return">*/
class return
{
name = "return";
init = /*%FSM<STATEINIT""">*/"" \n
"_u = diag_tickTime;" \n
"" \n
"if(_doDebug)then{" \n
"systemChat format [""RETURN:%1 | %2"",diag_tickTime,_checkEntry];" \n
"};"/*%FSM</STATEINIT""">*/;
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
class Links
{
/*%FSM<LINK "to_action">*/
class to_action
{
priority = 10.000000;
to="action";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"_checkEntry == ""action"";"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/"_checkEntry = """";" \n
""/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
/*%FSM<LINK "to_instinct">*/
class to_instinct
{
priority = 5.000000;
to="instinct";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"_checkEntry == ""instinct"";"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/"_checkEntry = """";" \n
""/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
};
};
/*%FSM</STATE>*/
/*%FSM<STATE "construct_smash">*/
class construct_smash
{
name = "construct_smash";
init = /*%FSM<STATEINIT""">*/"_nrBuild setdamage 1;" \n
"" \n
"" \n
"" \n
"_sWait = 1.5;" \n
"_actionDone = true;" \n
"_t = diag_tickTime;" \n
"_criteria = ""(false)"";" \n
"" \n
"" \n
"if(_doDebug)then{" \n
"_debugDo = format[""Smash | Dir:%1"",_nrBuild];" \n
"};"/*%FSM</STATEINIT""">*/;
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
class Links
{
/*%FSM<LINK "_">*/
class _
{
priority = 0.000000;
to="action";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/""/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
};
};
/*%FSM</STATE>*/
/*%FSM<STATE "do_wander">*/
class do_wander
{
name = "do_wander";
init = /*%FSM<STATEINIT""">*/"_constructPos = getPos _construct;" \n
"_constructMoveTo = [_constructPos,18,80,5,0,5,0] call BIS_fnc_findSafePos;" \n
"_construct doMove _constructMoveTo;" \n
"_construct forceSpeed 3;" \n
"" \n
"_sWait = ((_construct distance _moveTo) / 2) min 18;" \n
"_actionDone = true;" \n
"_t = diag_tickTime;" \n
"_criteria = ""((_construct distance _moveTo)< 6)"";" \n
"" \n
"" \n
"//Session Vars" \n
"" \n
"" \n
"if(_doDebug)then{" \n
"_debugDo = ""Wander"";" \n
"};"/*%FSM</STATEINIT""">*/;
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
class Links
{
/*%FSM<LINK "_">*/
class _
{
priority = 0.000000;
to="action";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/""/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
};
};
/*%FSM</STATE>*/
/*%FSM<STATE "____FAKE____">*/
class ____FAKE____
{
name = "____FAKE____";
init = /*%FSM<STATEINIT""">*/""/*%FSM</STATEINIT""">*/;
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
class Links
{
/*%FSM<LINK "construct_smash">*/
class construct_smash
{
priority = 60.000000;
to="instinct";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"_buildBash;"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/"_doSmash = true;" \n
"_decisionMade = true;"/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
};
};
/*%FSM</STATE>*/
};
initState="construct";
finalStates[] =
{
"end"
};
};
/*%FSM</COMPILE>*/

View File

@ -1,62 +1,67 @@
/*%FSM<COMPILE "C:\Program Files (x86)\Bohemia Interactive\Tools\FSM Editor Personal Edition\scriptedFSM.cfg, dog">*/
/*%FSM<HEAD>*/
/*
item0[] = {"dog_init",0,4346,-308.811646,-174.618637,-218.811722,-124.618736,0.000000,"dog" \n "init"};
item1[] = {"_",8,218,99.301392,-164.592987,151.253540,-136.187683,0.000000,""};
item2[] = {"decision",2,250,208.563339,-220.761597,298.563293,-170.761597,0.000000,"decision"};
item3[] = {"decision_made",4,218,45.078499,-26.190031,135.078552,23.809971,100.000000,"decision made"};
item4[] = {"action",2,250,45.978439,130.034073,135.978394,180.034134,0.000000,"action"};
item5[] = {"sit",4,218,213.642075,-401.053680,303.642059,-351.053680,75.000000,"sit"};
item6[] = {"dispose",4,218,106.293663,-345.154877,196.293686,-295.154907,80.000000,"dispose"};
item7[] = {"",7,210,591.173462,637.283325,599.173462,645.283325,0.000000,""};
item8[] = {"reset_vars",2,250,-57.248745,-175.970840,32.751255,-125.970863,0.000000,"reset vars"};
item9[] = {"_",8,218,-150.031967,-163.898819,-98.079796,-135.493515,0.000000,""};
item10[] = {"complete",4,218,-57.303970,-27.236908,32.696198,22.763115,10.000000,"complete"};
item11[] = {"Wait_120sec",4,218,599.501099,34.548668,689.501099,84.548660,0.000000,"Wait" \n "120sec"};
item12[] = {"end",1,250,599.472717,-87.843658,689.472839,-37.843731,0.000000,"end"};
item13[] = {"dispose",4,218,222.476715,3.262041,312.476715,53.262005,80.000000,"dispose"};
item14[] = {"sit",4,218,-111.822372,281.911530,-21.822369,331.911530,0.000000,"sit"};
item15[] = {"do_stay",2,250,-311.604431,441.158081,-221.604416,491.158081,0.000000,"do stay"};
item16[] = {"look_at",4,218,441.281158,-269.172302,531.281128,-221.575928,30.000000,"look at"};
item17[] = {"look_at",4,218,142.862396,305.132690,232.862579,355.132629,0.000000,"look at"};
item18[] = {"look_at_player",2,250,183.029541,439.919250,273.029846,489.919220,0.000000,"look at player"};
item19[] = {"no_decision",4,218,0.928818,-278.012878,90.928802,-228.012848,100.000000,"no decision"};
item20[] = {"track_wander",4,218,376.743683,-166.765533,466.743683,-116.765511,10.000000,"track wander"};
item21[] = {"follow",4,218,383.032623,-365.181488,473.032501,-315.181610,50.000000,"follow"};
item22[] = {"attack",4,218,438.592499,-326.404816,528.592773,-276.404724,40.000000,"attack"};
item23[] = {"see_food",4,218,333.484619,-399.399414,423.484528,-349.399353,60.000000,"see food"};
item24[] = {"attack",4,218,282.915100,218.351776,372.915100,268.351807,0.000000,"attack"};
item25[] = {"see_food",4,218,235.523438,248.096436,325.523621,298.096375,0.000000,"see food"};
item26[] = {"follow",4,218,43.211121,366.529541,133.210968,416.529510,0.000000,"follow"};
item27[] = {"do_attack",2,250,475.892395,443.436249,565.892395,493.436249,0.000000,"do attack"};
item28[] = {"move_to_food",2,250,378.591339,441.849182,468.591644,491.849152,0.000000,"move to food"};
item29[] = {"do_follow",2,250,-12.356815,438.900574,77.643143,488.900665,0.000000,"do follow"};
item30[] = {"hide",4,218,408.775177,-216.764954,498.775146,-166.765060,20.000000,"hide"};
item31[] = {"hide",4,218,93.460350,337.900269,183.460388,387.900208,0.000000,"hide"};
item32[] = {"do_hide",2,250,86.508911,440.972290,176.508820,490.972443,0.000000,"do hide"};
item33[] = {"eat",4,218,269.500305,-432.050049,359.500397,-382.050049,70.000000,"eat"};
item34[] = {"eat",4,218,189.995667,276.664276,279.995605,326.664307,0.000000,"eat"};
item35[] = {"do_eat",2,250,280.691498,440.967438,370.691589,490.967438,0.000000,"do eat"};
item36[] = {"alert",4,218,332.989319,-116.810501,422.989319,-66.810547,5.000000,"alert"};
item37[] = {"alert",4,218,-11.409309,336.534821,78.590752,386.534729,0.000000,"alert"};
item38[] = {"do_alert",2,250,-110.595520,440.943939,-20.595509,490.944031,0.000000,"do alert"};
item39[] = {"play",4,218,159.478867,-373.192657,249.478699,-323.192596,78.000000,"play"};
item40[] = {"play",4,218,-61.277840,309.296783,28.722137,359.296478,0.000000,"play"};
item41[] = {"do_play",2,250,-210.527878,441.384155,-120.528084,491.383759,0.000000,"do play"};
item42[] = {"mourn",4,218,52.084259,-312.505798,142.084351,-262.505737,90.000000,"mourn"};
item43[] = {"mourn",4,218,270.790802,67.418800,360.790863,117.418747,0.000000,"mourn"};
item44[] = {"do_mourn",2,250,448.517395,67.609764,538.517212,117.609756,0.000000,"do mourn"};
item45[] = {"wander",4,218,-214.253967,224.673553,-124.253967,274.673584,0.000000,"wander"};
item46[] = {"_",8,218,568.164734,141.965942,620.116821,170.371155,5.000000,""};
item47[] = {"track",4,218,-160.918762,254.950806,-70.918755,304.950806,0.000000,"track"};
item48[] = {"do_track",2,250,-409.868256,438.978760,-319.868225,488.978760,0.000000,"do track"};
item49[] = {"",7,210,-67.774078,635.077393,-59.774075,643.077393,0.000000,""};
item50[] = {"do_wander",2,250,-506.306610,440.399109,-416.306580,490.399109,0.000000,"do wander"};
item51[] = {"kill_prey",4,218,-265.259827,194.049530,-175.259766,244.049530,0.000000,"kill prey"};
item52[] = {"do_kill",2,250,-604.120972,440.934174,-514.120972,490.934174,0.000000,"do kill"};
item53[] = {"clean_up",2,250,448.864868,3.913227,538.864990,53.913231,0.000000,"clean up"};
link0[] = {0,9};
link1[] = {1,2};
item0[] = {"dog",0,250,-350.000000,-125.000000,-250.000000,-75.000000,0.000000,"dog"};
item1[] = {"_",8,218,675.000000,150.000000,775.000000,200.000000,0.000000,""};
item2[] = {"decision",2,250,50.000000,-125.000000,150.000000,-75.000000,0.000000,"decision"};
item3[] = {"decision_made",4,218,50.000000,0.000000,150.000000,50.000000,100.000000,"decision made"};
item4[] = {"action",2,250,50.000000,150.000000,150.000000,200.000000,0.000000,"action"};
item5[] = {"sit",4,218,-200.000000,-425.000000,-100.000000,-375.000000,75.000000,"sit"};
item6[] = {"dispose",4,218,-200.000000,-350.000000,-100.000000,-300.000000,80.000000,"dispose"};
item7[] = {"",7,210,721.000000,621.000000,729.000000,629.000000,0.000000,""};
item8[] = {"reset_vars",2,250,-200.000000,0.000000,-100.000000,50.000000,0.000000,"reset vars"};
item9[] = {"_",8,218,-200.000000,-125.000000,-100.000000,-75.000000,0.000000,""};
item10[] = {"complete",4,218,-200.000000,150.000000,-100.000000,200.000000,10.000000,"complete"};
item11[] = {"Wait_120sec",4,218,675.000000,50.000000,775.000000,100.000000,0.000000,"Wait" \n "120sec"};
item12[] = {"end",1,250,675.000000,-125.000000,775.000000,-75.000000,0.000000,"end"};
item13[] = {"dispose",4,218,275.000000,0.000000,375.000000,50.000000,80.000000,"dispose"};
item14[] = {"sit",4,218,-325.000000,300.000000,-225.000000,350.000000,0.000000,"sit"};
item15[] = {"do_stay",2,250,-325.000000,450.000000,-225.000000,500.000000,0.000000,"do stay"};
item16[] = {"look_at",4,218,425.000000,-350.000000,525.000000,-300.000000,30.000000,"look at"};
item17[] = {"look_at",4,218,200.000000,350.000000,300.000000,400.000000,0.000000,"look at"};
item18[] = {"look_at_player",2,250,200.000000,450.000000,300.000000,500.000000,0.000000,"look at player"};
item19[] = {"no_decision",4,218,-200.000000,-200.000000,-100.000000,-150.000000,100.000000,"no decision"};
item20[] = {"track_wander",4,218,425.000000,-200.000000,525.000000,-150.000000,10.000000,"track wander"};
item21[] = {"follow",4,218,175.000000,-425.000000,275.000000,-375.000000,50.000000,"follow"};
item22[] = {"attack",4,218,425.000000,-425.000000,525.000000,-375.000000,40.000000,"attack"};
item23[] = {"see_food",4,218,50.000000,-425.000000,150.000000,-375.000000,60.000000,"see food"};
item24[] = {"attack",4,218,500.000000,275.000000,600.000000,325.000000,0.000000,"attack"};
item25[] = {"see_food",4,218,400.000000,300.000000,500.000000,350.000000,0.000000,"see food"};
item26[] = {"follow",4,218,-25.000000,375.000000,75.000000,425.000000,0.000000,"follow"};
item27[] = {"do_attack",2,4346,500.000000,450.000000,600.000000,500.000000,0.000000,"do attack"};
item28[] = {"move_to_food",2,250,400.000000,450.000000,500.000000,500.000000,0.000000,"move to food"};
item29[] = {"do_follow",2,250,-25.000000,450.000000,75.000000,500.000000,0.000000,"do follow"};
item30[] = {"hide",4,218,425.000000,-275.000000,525.000000,-225.000000,20.000000,"hide"};
item31[] = {"hide",4,218,100.000000,375.000000,200.000000,425.000000,0.000000,"hide"};
item32[] = {"do_hide",2,250,100.000000,450.000000,200.000000,500.000000,0.000000,"do hide"};
item33[] = {"eat",4,218,-75.000000,-425.000000,25.000000,-375.000000,70.000000,"eat"};
item34[] = {"eat",4,218,300.000000,325.000000,400.000000,375.000000,0.000000,"eat"};
item35[] = {"do_eat",2,250,300.000000,450.000000,400.000000,500.000000,0.000000,"do eat"};
item36[] = {"alert",4,218,425.000000,-125.000000,525.000000,-75.000000,5.000000,"alert"};
item37[] = {"alert",4,218,-125.000000,350.000000,-25.000000,400.000000,0.000000,"alert"};
item38[] = {"do_alert",2,250,-125.000000,450.000000,-25.000000,500.000000,0.000000,"do alert"};
item39[] = {"play",4,218,300.000000,-425.000000,400.000000,-375.000000,45.000000,"play"};
item40[] = {"play",4,218,-225.000000,325.000000,-125.000000,375.000000,0.000000,"play"};
item41[] = {"do_play",2,250,-225.000000,450.000000,-125.000000,500.000000,0.000000,"do play"};
item42[] = {"mourn",4,218,-200.000000,-275.000000,-100.000000,-225.000000,90.000000,"mourn"};
item43[] = {"mourn",4,218,275.000000,75.000000,375.000000,125.000000,0.000000,"mourn"};
item44[] = {"do_mourn",2,250,425.000000,75.000000,525.000000,125.000000,0.000000,"do mourn"};
item45[] = {"wander",4,218,-525.000000,250.000000,-425.000000,300.000000,0.000000,"wander"};
item46[] = {"wait_for_loot",2,250,-750.000000,525.000000,-650.000000,575.000000,0.000000,"wait for loot"};
item47[] = {"track",4,218,-425.000000,275.000000,-325.000000,325.000000,0.000000,"track"};
item48[] = {"do_track",2,250,-425.000000,450.000000,-325.000000,500.000000,0.000000,"do track"};
item49[] = {"",7,210,20.999996,621.000000,29.000002,629.000000,0.000000,""};
item50[] = {"do_wander",2,250,-525.000000,450.000000,-425.000000,500.000000,0.000000,"do wander"};
item51[] = {"kill_prey",4,218,-625.000000,225.000000,-525.000000,275.000000,0.000000,"kill prey"};
item52[] = {"do_kill",2,250,-625.000000,450.000000,-525.000000,500.000000,0.000000,"do kill"};
item53[] = {"clean_up",2,250,425.000000,0.000000,525.000000,50.000000,0.000000,"clean up"};
item54[] = {"check",4,218,-625.000000,525.000000,-525.000000,575.000000,10.000000,"check"};
item55[] = {"_",8,218,-750.000000,450.000000,-650.000000,500.000000,0.000000,""};
item56[] = {"_",8,218,-350.000000,0.000000,-250.000000,50.000000,0.000000,""};
item57[] = {"found",4,218,-750.000000,600.000000,-650.000000,650.000000,20.000000,"found"};
item58[] = {"attach_loot",2,250,-625.000000,600.000000,-525.000000,650.000000,0.000000,"attach loot"};
link0[] = {0,56};
link1[] = {1,4};
link2[] = {2,3};
link3[] = {2,5};
link4[] = {2,6};
@ -89,9 +94,9 @@ link30[] = {4,47};
link31[] = {4,51};
link32[] = {5,2};
link33[] = {6,2};
link34[] = {7,46};
link35[] = {8,1};
link36[] = {9,8};
link34[] = {7,1};
link35[] = {8,9};
link36[] = {9,2};
link37[] = {10,8};
link38[] = {11,12};
link39[] = {13,53};
@ -127,26 +132,32 @@ link68[] = {42,2};
link69[] = {43,44};
link70[] = {44,11};
link71[] = {45,50};
link72[] = {46,4};
link73[] = {47,48};
link74[] = {48,49};
link75[] = {49,7};
link76[] = {50,49};
link77[] = {51,52};
link78[] = {52,49};
link79[] = {53,11};
globals[] = {0.000000,0,0,0,16777215,640,480,1,135,6316128,1,-294.824829,718.133667,557.528687,-469.195953,770,895,1};
window[] = {2,-1,-1,-1,-1,550,-1255,-230,25,3,788};
link72[] = {46,54};
link73[] = {46,57};
link74[] = {47,48};
link75[] = {48,49};
link76[] = {49,7};
link77[] = {50,49};
link78[] = {51,52};
link79[] = {52,55};
link80[] = {53,11};
link81[] = {54,46};
link82[] = {55,46};
link83[] = {56,8};
link84[] = {57,58};
link85[] = {58,49};
globals[] = {25.000000,1,0,0,16777215,640,480,1,143,6316128,1,-416.230286,740.374207,636.167480,-260.139587,942,730,1};
window[] = {2,-1,-1,-1,-1,629,104,1129,104,3,960};
*//*%FSM</HEAD>*/
class FSM
{
fsmName = "dog";
class States
{
/*%FSM<STATE "dog_init">*/
class dog_init
/*%FSM<STATE "dog">*/
class dog
{
name = "dog_init";
name = "dog";
init = /*%FSM<STATEINIT""">*/"_dog = _this select 0;" \n
"_plyr = player;" \n
"" \n
@ -170,6 +181,8 @@ class FSM
"_followSpeed = 8;" \n
"_forgive = 28;" \n
"_dogHolder = objNull;" \n
"_disposeAt = 1000;" \n
"_dogHolder = objNull;" \n
"" \n
"//Set Vars" \n
"_rnd = 0;" \n
@ -191,8 +204,8 @@ class FSM
"" \n
"//DEBUG" \n
"_doDebug = false;" \n
"//_count = 0;" \n
"//_debugDo = ""INIT"";" \n
"_count = 0;" \n
"_debugDo = ""INIT"";" \n
"//_hunger = 61;" \n
"" \n
"" \n
@ -210,7 +223,7 @@ class FSM
priority = 0.000000;
to="reset_vars";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/""/*%FSM</CONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"true"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
@ -246,9 +259,9 @@ class FSM
"_dogHolder hideobject false;" \n
"};" \n
"};"/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"!_decisionMade && (diag_tickTime - _t) > 6;"/*%FSM</CONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"!_decisionMade && (diag_tickTime - _t) > 1;"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/"_dogPos = getPosATL _dog;" \n
"_nrPlyrs = _dog nearEntities [_trgtArray, _trgtRange];" \n
"_nrPlyrs = _dogPos nearEntities [_trgtArray, _trgtRange];" \n
"_plyrDist = _dog distance _plyr;" \n
"_plyrPos = getPosATL player;" \n
"_plyrVar = _plyr getVariable [""dog"",""""];" \n
@ -296,23 +309,11 @@ class FSM
priority = 80.000000;
to="decision";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"(!alive _dog) || (_plyrDist > 1000) || (!alive _plyr);"/*%FSM</CONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"(!alive _dog) || (_plyrDist > _disposeAt) || (!alive _plyr);"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/"_doDispose = true;" \n
"_decisionMade = true;"/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
/*%FSM<LINK "play">*/
class play
{
priority = 78.000000;
to="decision";
precondition = /*%FSM<CONDPRECONDITION""">*/"_nrChases=_dogPos nearEntities [_dogChaseArray, 42];"/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"(_plyrDist < 42) && (count _nrChases > 0) && (_plyrVar == _dogName);"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/"_nrChase = _nrChases select 0;" \n
"_doPlay = true;" \n
"_decisionMade = true;"/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
/*%FSM<LINK "sit">*/
class sit
{
@ -362,6 +363,18 @@ class FSM
"_decisionMade = true;"/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
/*%FSM<LINK "play">*/
class play
{
priority = 45.000000;
to="decision";
precondition = /*%FSM<CONDPRECONDITION""">*/"_nrChases=_dogPos nearEntities [_dogChaseArray, 42];"/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"(_plyrDist < 42) && (count _nrChases > 0) && (_plyrVar == _dogName);"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/"_nrChase = _nrChases select 0;" \n
"_doPlay = true;" \n
"_decisionMade = true;"/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
/*%FSM<LINK "attack">*/
class attack
{
@ -592,7 +605,7 @@ class FSM
priority = 0.000000;
to="do_track";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"_doTrack;"/*%FSM</CONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"_doTrack"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/"_doTrack = false;"/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
@ -614,6 +627,15 @@ class FSM
{
name = "reset_vars";
init = /*%FSM<STATEINIT""">*/"//Default Vars" \n
"" \n
"_criteriaMetAction = nil;" \n
"_foodHolder = objNull;" \n
"_nrFood = """";" \n
"_foodPos = [0,0,0];" \n
"_nrChases=[];" \n
"_nrChase = objNull;" \n
"_chaseDist = 0;" \n
"_maxTravelTime = 8;" \n
"" \n
"_rnd = 0;" \n
"_actionDone = false;" \n
@ -650,20 +672,25 @@ class FSM
"};" \n
"};" \n
"" \n
"if (count _nrPlyrs > 1) then {" \n
"_nrOtherPlyrs = [];" \n
"{" \n
"if(_x != player)then{" \n
"_nrOtherPlyrs pushBack _x;" \n
"}; " \n
"} forEach _nrPlyrs;" \n
"" \n
"_countNrPlyrs = count _nrOtherPlyrs;" \n
"if (_countNrPlyrs > 1) then {" \n
"_maxTravelTime = _maxTravelTime * 2;" \n
"};" \n
"" \n
"_criteriaMetAction = nil;" \n
"_plyrStance = """";" \n
"_foodHolder = objNull;" \n
"_nrFood = """";" \n
"_foodPos = [0,0,0];" \n
"_plyrVar = _plyr getVariable [""dog"",""""];" \n
"_nrChases=[];" \n
"_nrChase = objNull;" \n
"_chaseDist = 0;" \n
"_maxTravelTime = 8;" \n
"//Dog whine warning of nearby players." \n
"if((random 100) < (_countNrPlyrs * 10))then{" \n
"[_dog, _plyr] say3D ""dog_cry"";" \n
"EPOCH_say3D_PVS = [player, _dog, 17,Epoch_personalToken];" \n
"publicVariableServer ""EPOCH_say3D_PVS"";" \n
"};" \n
"" \n
""/*%FSM</STATEINIT""">*/;
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
class Links
@ -674,7 +701,7 @@ class FSM
priority = 0.000000;
to="decision";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/""/*%FSM</CONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"true"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
@ -702,11 +729,12 @@ class FSM
"" \n
"if (floor(random 100)< 8) then {" \n
"[_dog, _plyr] say3D ""dog_cry"";" \n
"EPOCH_say3D_PVS = [player, _dog, 17,Epoch_personalToken];" \n
"publicVariableServer ""EPOCH_say3D_PVS"";" \n
"_hunger = _hunger + 2;" \n
"};" \n
"" \n
"_criteria = ""(false)"";" \n
"_criteriaMetAction = ""_dog forceSpeed 0"";" \n
"_sWait = 24;" \n
"_actionDone = true;" \n
"_t = diag_tickTime;" \n
@ -721,10 +749,10 @@ class FSM
/*%FSM<LINK "_">*/
class _
{
priority = 5.000000;
priority = 0.000000;
to="action";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/""/*%FSM</CONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"true"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
@ -739,7 +767,7 @@ class FSM
"_dirTo = [_dog, _plyrPos] call BIS_fnc_dirTo;" \n
"_posTo = [_dog, 2,_dirTo] call BIS_fnc_relPos;" \n
"_dog moveTo _posTo;" \n
"_criteria = ""(_dog distance _posTo < 1)"";" \n
"_criteria = ""(moveToCompleted _dog) || (_dog distance _posTo < 1.5)"";" \n
"_sWait = 4;" \n
"" \n
"}else{" \n
@ -761,6 +789,8 @@ class FSM
"" \n
"if (floor(random 100)<_dogNoise) then {" \n
"[_dog, _plyr] say3D ""dog_cry"";" \n
"EPOCH_say3D_PVS = [player, _dog, 17,Epoch_personalToken];" \n
"publicVariableServer ""EPOCH_say3D_PVS"";" \n
"};" \n
"" \n
"" \n
@ -774,10 +804,10 @@ class FSM
/*%FSM<LINK "_">*/
class _
{
priority = 5.000000;
priority = 0.000000;
to="action";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/""/*%FSM</CONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"true"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
@ -788,21 +818,19 @@ class FSM
class do_attack
{
name = "do_attack";
init = /*%FSM<STATEINIT""">*/"_dog forceSpeed 7;" \n
init = /*%FSM<STATEINIT""">*/"_dog forceSpeed 5;" \n
"_moveTo = _plyrPos;" \n
"" \n
"if (! surfaceIsWater _moveTo) then {" \n
"if !( surfaceIsWater _moveTo) then {" \n
"_dog moveTo _moveTo;" \n
"_criteria = ""(_dog distance _moveTo < 2)"";" \n
"_criteria = ""(moveToCompleted _dog) || (_dog distance _plyr < 1.5)"";" \n
"_sWait = 8;" \n
"}else{" \n
"_criteria = ""(true)"";" \n
"_sWait = 0;" \n
"};" \n
"" \n
"" \n
"" \n
"if (_dog distance _plyr < 3) then {" \n
"if (_dog distance _plyr < 1.5) then {" \n
"_plyPos = getPosATL _plyr;" \n
"" \n
"_dog call EPOCH_client_bitePlayer;" \n
@ -819,8 +847,10 @@ class FSM
"_actionDone = true;" \n
"_t = diag_tickTime;" \n
"" \n
"if (floor(random 100) < 32) then {" \n
"if (floor(random 100) < 6) then {" \n
"[_dog, _plyr] say3D ""dog_bark"";" \n
"EPOCH_say3D_PVS = [player, _dog, 2,Epoch_personalToken];" \n
"publicVariableServer ""EPOCH_say3D_PVS"";" \n
"};" \n
"" \n
"if (floor(random 100)<_forgive) then {" \n
@ -837,10 +867,10 @@ class FSM
/*%FSM<LINK "_">*/
class _
{
priority = 5.000000;
priority = 0.000000;
to="action";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/""/*%FSM</CONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"true"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
@ -852,9 +882,10 @@ class FSM
{
name = "move_to_food";
init = /*%FSM<STATEINIT""">*/"_dog forceSpeed 4;" \n
"_foodPos set [2,0];" \n
"_dog moveTo _foodPos;" \n
"" \n
"_criteria = ""(false)"";" \n
"_criteria = ""(moveToCompleted _dog) || (_dog distance _foodPos < 1.5)"";" \n
"_sWait = (_dog distance _foodPos) max 1;" \n
"_actionDone = true;" \n
"_t = diag_tickTime;" \n
@ -869,10 +900,10 @@ class FSM
/*%FSM<LINK "_">*/
class _
{
priority = 5.000000;
priority = 0.000000;
to="action";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/""/*%FSM</CONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"true"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
@ -888,7 +919,8 @@ class FSM
"" \n
"if (! surfaceIsWater _moveTo) then {" \n
"_dog moveTo _moveTo;" \n
"_criteria = ""(_dog distance _moveTo < 2)"";" \n
"_criteria = ""(moveToCompleted _dog) || (_dog distance _moveTo < 1.5) || (_dog distance _plyr < 1.5)"";" \n
"_criteriaMetAction = """";" \n
"_sWait = (_dog distance _moveTo) max _maxTravelTime;" \n
"}else{" \n
"_criteria = ""(true)"";" \n
@ -914,10 +946,10 @@ class FSM
/*%FSM<LINK "_">*/
class _
{
priority = 5.000000;
priority = 0.000000;
to="action";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/""/*%FSM</CONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"true"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
@ -943,9 +975,11 @@ class FSM
"" \n
"if (floor(random 100)<_dogNoise) then {" \n
"[_dog, _plyr] say3D ""dog_cry"";" \n
"EPOCH_say3D_PVS = [player, _dog, 17,Epoch_personalToken];" \n
"publicVariableServer ""EPOCH_say3D_PVS"";" \n
"};" \n
"" \n
"_criteria = ""(_dog distance _moveTo < 3)"";" \n
"_criteria = ""(moveToCompleted _dog) || (_dog distance _moveTo < 1.5)"";" \n
"_sWait = _maxTravelTime;" \n
"_actionDone = true;" \n
"_t = diag_tickTime;" \n
@ -961,10 +995,10 @@ class FSM
/*%FSM<LINK "_">*/
class _
{
priority = 5.000000;
priority = 0.000000;
to="action";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/""/*%FSM</CONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"true"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
@ -978,17 +1012,17 @@ class FSM
init = /*%FSM<STATEINIT""">*/"deleteVehicle _foodHolder;" \n
"" \n
"if (_plyrVar == _dogName) then {" \n
"titleText [format[""You have fed %1."",_dogName], ""PLAIN""];" \n
"_dt = [format[""<t size='0.8' shadow='0' color='#99ffffff'>You have fed %1</t>"",_dogName], 0, 1, 6, 2, 0, 1] spawn bis_fnc_dynamictext;" \n
"}else{" \n
"_plyr setVariable [""dog"", _dogName];" \n
"titleText [format[""You have tamed %1."",_dogName], ""PLAIN""];" \n
"_dt = [format[""<t size='0.8' shadow='0' color='#99ffffff'>You have tamed %1</t>"",_dogName], 0, 1, 6, 2, 0, 1] spawn bis_fnc_dynamictext;" \n
"};" \n
"_hunger = _hunger - 40;" \n
"" \n
"_sWait = 1;" \n
"_actionDone = true;" \n
"_t = diag_tickTime;" \n
"_criteria = ""(true)"";" \n
"_criteria = ""isNull _foodHolder"";" \n
"" \n
"" \n
"if (_doDebug) then {" \n
@ -1000,10 +1034,10 @@ class FSM
/*%FSM<LINK "_">*/
class _
{
priority = 5.000000;
priority = 0.000000;
to="action";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/""/*%FSM</CONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"true"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
@ -1016,7 +1050,9 @@ class FSM
name = "do_alert";
init = /*%FSM<STATEINIT""">*/"_dog forceSpeed 0;" \n
"if (floor(random 75)<_dogNoise) then {" \n
"[_dog, _plyr] say3D ""dog_bark"";" \n
"[_dog, _plyr] say3D ""dog_cry_quiet"";" \n
"EPOCH_say3D_PVS = [player, _dog, 17,Epoch_personalToken];" \n
"publicVariableServer ""EPOCH_say3D_PVS"";" \n
"};" \n
"" \n
"_dirTo = [_dog, getPos (_nrPlyrs select 1)] call BIS_fnc_dirTo;" \n
@ -1037,10 +1073,10 @@ class FSM
/*%FSM<LINK "_">*/
class _
{
priority = 5.000000;
priority = 0.000000;
to="action";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/""/*%FSM</CONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"true"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
@ -1055,6 +1091,8 @@ class FSM
"" \n
"if (_rnd < 42) then {" \n
"[_dog, _plyr] say3D ""dog_bark"";" \n
"EPOCH_say3D_PVS = [player, _dog, 18,Epoch_personalToken];" \n
"publicVariableServer ""EPOCH_say3D_PVS"";" \n
"};" \n
"" \n
"if (_rnd < 6) then {" \n
@ -1067,7 +1105,7 @@ class FSM
"" \n
"" \n
"" \n
"_criteria = ""(_dog distance _moveTo < 2)"";" \n
"_criteria = ""(moveToCompleted _dog) || (_dog distance _moveTo < 1.5)"";" \n
"_sWait = (_dog distance _moveTo) max 4;" \n
"_actionDone = true;" \n
"_t = diag_tickTime;" \n
@ -1091,10 +1129,10 @@ class FSM
/*%FSM<LINK "_">*/
class _
{
priority = 5.000000;
priority = 0.000000;
to="action";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/""/*%FSM</CONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"true"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
@ -1134,6 +1172,38 @@ class FSM
};
};
/*%FSM</STATE>*/
/*%FSM<STATE "wait_for_loot">*/
class wait_for_loot
{
name = "wait_for_loot";
init = /*%FSM<STATEINIT""">*/""/*%FSM</STATEINIT""">*/;
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
class Links
{
/*%FSM<LINK "found">*/
class found
{
priority = 20.000000;
to="attach_loot";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"!(isNull _dogHolder)"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
/*%FSM<LINK "check">*/
class check
{
priority = 10.000000;
to="wait_for_loot";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"(diag_tickTime - _l > 1) && count (nearestObjects [_dogPos, [""WeaponHolder""],3]) > 0"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/"_l = diag_tickTime;" \n
"_dogHolder = nearestObjects [_dogPos, [""WeaponHolder""], 3] select 0;"/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
};
};
/*%FSM</STATE>*/
/*%FSM<STATE "do_track">*/
class do_track
{
@ -1144,7 +1214,7 @@ class FSM
"" \n
"if (! surfaceIsWater _moveTo) then {" \n
"_dog moveTo _moveTo;" \n
"_criteria = ""(_dog distance _moveTo < 2)"";" \n
"_criteria = ""(moveToCompleted _dog) || (_dog distance _moveTo < 1.5)"";" \n
"_sWait = _plyrDist max _maxTravelTime;" \n
"}else{" \n
"_criteria = ""(true)"";" \n
@ -1155,15 +1225,21 @@ class FSM
"" \n
"if (_rnd< 12) then {" \n
"[_dog, _plyr] say3D ""dog_bark"";" \n
"EPOCH_say3D_PVS = [player, _dog, 2,Epoch_personalToken];" \n
"publicVariableServer ""EPOCH_say3D_PVS"";" \n
"};" \n
"" \n
"if (_rnd < 6) then {" \n
"_hunger = _hunger + 1;" \n
"[_dog, _plyr] say3D ""dog_cry"";" \n
"EPOCH_say3D_PVS = [player, _dog, 3,Epoch_personalToken];" \n
"publicVariableServer ""EPOCH_say3D_PVS"";" \n
"};" \n
"" \n
"if ((_hunger > 56) && (_rnd < 48)) then {" \n
"[_dog, _plyr] say3D ""dog_cry"";" \n
"EPOCH_say3D_PVS = [player, _dog, 2,Epoch_personalToken];" \n
"publicVariableServer ""EPOCH_say3D_PVS"";" \n
"};" \n
"" \n
"" \n
@ -1181,10 +1257,10 @@ class FSM
/*%FSM<LINK "_">*/
class _
{
priority = 5.000000;
priority = 0.000000;
to="action";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/""/*%FSM</CONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"true"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
@ -1201,7 +1277,7 @@ class FSM
"if (! surfaceIsWater _moveTo) then {" \n
"_dog forceSpeed 4;" \n
"_dog moveTo _moveTo;" \n
"_criteria = ""(_dog distance _moveTo < 2)"";" \n
"_criteria = ""(moveToCompleted _dog) || (_dog distance _moveTo < 1.5)"";" \n
"_sWait = floor (_dog distance _moveTo) max _maxTravelTime;" \n
"}else{" \n
"_criteria = ""(true)"";" \n
@ -1226,10 +1302,10 @@ class FSM
/*%FSM<LINK "_">*/
class _
{
priority = 5.000000;
priority = 0.000000;
to="action";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/""/*%FSM</CONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"true"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
@ -1240,31 +1316,28 @@ class FSM
class do_kill
{
name = "do_kill";
init = /*%FSM<STATEINIT""">*/"if (isNull _dogHolder) then {" \n
"_dogHolder = createVehicle [""WeaponHolderSimulated"", getPosATL _dog, [], 0, ""CAN_COLLIDE""];" \n
"_dogHolder attachTo [_dog, [-0.2,1.2,0.7]];" \n
"_dogHolder hideobject true;" \n
"};" \n
init = /*%FSM<STATEINIT""">*/"{" \n
" if !(alive _x) then {" \n
" if ((_x isKindOf ""Animal_Base_F"" && !(_x isKindOf ""Dog_Base_F"")) || (typeOf _x) in[""Epoch_Sapper_F"", ""Epoch_SapperB_F"", ""Epoch_Cloak_F"", ""I_UAV_01_F""]) then {" \n
" EPOCH_lootAnimal = [_x, player, Epoch_personalToken];" \n
" publicVariableServer ""EPOCH_lootAnimal"";" \n
" };" \n
" };" \n
"" \n
"}forEach nearestObjects[_dog, [], 2];" \n
"" \n
"if (typeOf _nrChase == ""Rabbit_EPOCH"") then {" \n
"_dogHolder addMagazineCargo [""RabbitCarcass_EPOCH"", 1] ;" \n
"_dogHolder addMagazineCargo [""Pelt_EPOCH"", 1] ;" \n
"};" \n
"_dogPos = getPosATL _dog;" \n
"_l = diag_tickTime;" \n
"" \n
"if (_nrChase isKindOf ""Snake_random_EPOCH"") then {" \n
"_dogHolder addMagazineCargo [""Venom_EPOCH"", 1] ;" \n
"_dogHolder addMagazineCargo [""SnakeCarcass_EPOCH"", 1] ;" \n
"};" \n
"" \n
"if (typeOf _nrChase in [""Hen_random_EPOCH"",""Cock_random_EPOCH""]) then {" \n
"_dogHolder addMagazineCargo [""ChickenCarcass_EPOCH"", 1] ;" \n
"//Drop existing loot holder - Update to manage loot" \n
"if!(isNull _dogHolder)then{" \n
"_dogHolder hideobject false;" \n
"detach _dogHolder;" \n
"};" \n
"_dogHolder = objNull;" \n
"" \n
"_hunger = _hunger - 4;" \n
"" \n
"deleteVehicle _nrChase;" \n
"" \n
"_criteria = ""(true)"";" \n
"_sWait = _maxTravelTime;" \n
"_actionDone = true;" \n
@ -1279,10 +1352,10 @@ class FSM
/*%FSM<LINK "_">*/
class _
{
priority = 5.000000;
to="action";
priority = 0.000000;
to="wait_for_loot";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/""/*%FSM</CONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"true"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
@ -1314,8 +1387,30 @@ class FSM
};
};
/*%FSM</STATE>*/
/*%FSM<STATE "attach_loot">*/
class attach_loot
{
name = "attach_loot";
init = /*%FSM<STATEINIT""">*/"_dogHolder attachTo [_dog, [-0.2,1.2,0.7]];" \n
"_dogHolder hideobject true;"/*%FSM</STATEINIT""">*/;
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
class Links
{
/*%FSM<LINK "_">*/
class _
{
priority = 0.000000;
to="action";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"true"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
};
};
/*%FSM</STATE>*/
};
initState="dog_init";
initState="dog";
finalStates[] =
{
"end"

View File

@ -528,12 +528,12 @@ class FSM
"" \n
" };" \n
"" \n
"deleteMarkerLocal _mkrName4;" \n
"_mkrName4 = format[""axeD%1"", _unit];" \n
"_mkr2 = createMarkerLocal [_mkrName4, _nextPos];" \n
"_mkrName4 setMarkerShapeLocal ""ICON"";" \n
"_mkrName4 setMarkerTypeLocal ""mil_dot"";" \n
"_mkrName4 setMarkerColorLocal ""COLORYELLOW"";" \n
"//deleteMarkerLocal _mkrName4;" \n
"//_mkrName4 = format[""axeD%1"", _unit];" \n
"//_mkr2 = createMarkerLocal [_mkrName4, _nextPos];" \n
"//_mkrName4 setMarkerShapeLocal ""ICON"";" \n
"//_mkrName4 setMarkerTypeLocal ""mil_dot"";" \n
"//_mkrName4 setMarkerColorLocal ""COLORYELLOW"";" \n
"};" \n
"" \n
"" \n

View File

@ -72,12 +72,12 @@ if (_class in ["Hatchet","CrudeHatchet"]) then {
player addMagazine "Hatchet_swing";
};
};
if (_class in ["MeleeSledge", "MeleeMaul"]) then {
if (_class in ["MeleeSledge","MeleeMaul","MeleeSword"]) then {
if !("sledge_swing" in _mags) then {
player addMagazine "sledge_swing";
};
};
if (_class in ["WoodClub","Plunger"]) then {
if (_class in ["WoodClub","Plunger","MeleeRod"]) then {
if !("stick_swing" in _mags) then {
player addMagazine "stick_swing";
};

View File

@ -96,7 +96,7 @@ switch _interactOption do {
_isOk = if (_isStorage == 1) then { EPOCH_StorageSlotsCount > 0 } else { EPOCH_BuildingSlotCount > 0 };
if (_buildClass == "LockBox_SIM_EPOCH") then {
if (_buildClass isKindOf "Secure_Storage_Temp") then {
_isOk = (EPOCH_StorageSlotsCount > 0 && EPOCH_BuildingSlotCount > 0);
};
if (isNil "EPOCH_simulSwap_Lock") then {

View File

@ -1,128 +0,0 @@
_craftItem = EPOCH_CraftItemData;
_abort = false;
_msg = "";
_craftedItemCount = 0;
// _craftingConfig = configfile >> "CfgCrafting" >> _craftItem;
_config = 'CfgCrafting' call EPOCH_returnConfig;
_craftingConfig = _config >> _craftItem;
if (isClass (_craftingConfig)) then {
_recipe = [] + getArray(_craftingConfig >> "recipe");
_nearby = [] + getArray(_craftingConfig >> "nearby");
//diag_log format["DEBUG craftitem: _nearby %1", _nearby];
_proceed = true;
// check nearby
{
_needType = _x select 0; // fire. alive, noclass
_needClasses = _x select 1; // ["ALL"]. ["filename.p3d"]
_needRange = _x select 2; // 3
_needCount = _x select 3; // 1
_needReason = _x select 4; // "Fire", "Water Source"
_nearObjects = nearestObjects[player, _needClasses, _needRange];
_nearbyCount = 0;
switch (_needType) do
{
case "fire": {_nearbyCount = {inflamed _x} count _nearObjects; };
case "alive": {_nearbyCount = {alive _x} count _nearObjects; };
case "noclass": {
{
_needName = _x;
_nearbyCount = {((str(_x) find _needName) != -1)} count nearestObjects[player, [], _needRange];
if (_nearbyCount > 0) exitWith{};
} foreach _needClasses;
};
};
if (_nearbyCount < _needCount)exitWith{
_proceed = false;
_msg = format["Need %1", _needReason];
};
} forEach _nearby;
if (_proceed) then {
_countIndex = lbCurSel 2100;
_craftCount = lbValue[2100, _countIndex];
//diag_log format["CRAFT COUNT: index %1 count %2", _countIndex, _craftCount];
closeDialog 0;
for "_r" from 1 to _craftCount do {
if (player canAdd _craftItem) then {
_recipeCount = 0;
_numRemoved = 0;
{
_recipeItem = _x;
_recipeQty = 1;
if (typeName _x == "ARRAY") then {
_recipeItem = _x select 0;
_recipeQty = _x select 1;
};
_recipeCount = _recipeCount + _recipeQty;
// TODO dry run before removing anything
if ([_recipeItem, "CfgWeapons"] call EPOCH_fnc_isAny) then {
_items = items player;
_currentCount = { _x == _recipeItem } count _items;
if (_currentCount >= _recipeQty) then {
for "_i" from 1 to _recipeQty do {
if (_recipeItem in _items) then {
player removeItem _recipeItem;
_numRemoved = _numRemoved + 1;
};
};
};
}
else {
_mags = magazines player;
_currentCount = { _x == _recipeItem } count _mags;
if (_currentCount >= _recipeQty) then {
for "_i" from 1 to _recipeQty do {
if (_recipeItem in _mags) then {
player removeMagazine _recipeItem;
_numRemoved = _numRemoved + 1;
};
};
};
};
} forEach _recipe;
if (_numRemoved == _recipeCount) then {
if (player canAdd _craftItem) then {
if ([_craftItem, "CfgWeapons"] call EPOCH_fnc_isAny) then {
player addItem _craftItem;
}
else {
player addMagazine _craftItem;
};
_craftedItemCount = _craftedItemCount + 1;
}
else {
_abort = true;
_msg = "Not enough space";
};
} else {
_abort = true;
_msg = "Incorrect item count";
};
} else {
_abort = true;
_msg = "Not enough space";
};
if (_abort) exitWith{};
};
};
if (_craftedItemCount > 0) then {
_dt = [format["<t size='0.8' shadow='0' color='#99ffffff'>Crafted %1 %2</t>",_craftedItemCount,_craftItem call EPOCH_itemDisplayName], 0, 1, 5, 2, 0, 1] spawn bis_fnc_dynamictext;
} else {
_dt = [format["<t size='0.8' shadow='0' color='#99ffffff'>%1</t>", _msg], 0, 1, 5, 2, 0, 1] spawn bis_fnc_dynamictext;
};
};

View File

@ -1,162 +0,0 @@
disableSerialization;
ctrlShow[1600, false];
ctrlShow[2100, false];
ctrlShow[1000, false];
ctrlShow[41008, true];
ctrlShow[42000, true];
_index = _this select 0;
EPOCH_CraftItemData = "";
_activeDisplay = findDisplay -15;
_data = EPOCH_InteractedItem select 1;
// _craftingConfig = configfile >> "CfgCrafting" >> (_data);
_config = 'CfgCrafting' call EPOCH_returnConfig;
_craftingConfig = _config >> _data;
if (isClass (_craftingConfig)) then {
_usedIn = getArray (_craftingConfig >> "usedIn");
_selectedRecipe = _usedIn select _index;
EPOCH_CraftItemData = _selectedRecipe;
_craftingConfig = _config >> _selectedRecipe;
if (isClass (_craftingConfig)) then {
_recipe = getArray(_craftingConfig >> "recipe");
_nearby = getArray(_craftingConfig >> "nearby");
_recipeItems = [1200,1201,1202,1203,1204,1205];
_recipeStatus = [42200,42201,42202,42203,42204,42205];
_recipetooltip = [43200,43201,43202,43203,43204,43205];
_recipeCounts = [41001,41002,41003,41004,41005,41006];
_recipeResources = [45202,45203,45204,45205,45206,45207];
_recipeResourcesbtn = [44202,44203,44204,44205,44206,44207];
{
ctrlShow[_x, false];
} forEach _recipeItems;
{
ctrlShow[_x, false];
} forEach _recipeStatus;
{
ctrlShow[_x, false];
} forEach _recipeCounts;
// check for nearby resources
_proceed = true;
// check nearby
{
_needType = _x select 0; // fire. alive, noclass
_needClasses = _x select 1; // ["ALL"]. ["filename.p3d"]
_needRange = _x select 2; // 3
_needCount = _x select 3; // 1
_needReason = _x select 4; // "Fire", "Water Source"
_needImage = _x select 5; // fire, fuel, water, electricity
_nearObjects = nearestObjects[player, _needClasses, _needRange];
_nearbyCount = 0;
switch (_needType) do
{
case "fire": {_nearbyCount = {inflamed _x} count _nearObjects; };
case "alive": {_nearbyCount = {alive _x} count _nearObjects; };
case "noclass": {
{
_needName = _x;
_nearbyCount = {((str(_x) find _needName) != -1)} count nearestObjects[player, [], _needRange];
if (_nearbyCount > 0) exitWith{};
} foreach _needClasses;
};
};
(_activeDisplay displayCtrl(_recipeResourcesbtn select _forEachIndex)) ctrlSetTooltip _needReason;
if (_nearbyCount < _needCount) then {
_proceed = false;
// display needed icons
_icon = format["\x\addons\a3_epoch_code\Data\UI\need_%1_ca.paa", _needImage];
//diag_log format["%1", _icon];
ctrlSetText[(_recipeResources select _forEachIndex), _icon];
} else {
// display needed icons
_icon = format["\x\addons\a3_epoch_code\Data\UI\has_%1_ca.paa", _needImage];
//diag_log format["%1", _icon];
ctrlSetText[(_recipeResources select _forEachIndex), _icon];
};
} forEach _nearby;
_recipeCount = 0;
_itemCount = 0;
_mags = magazines player;
_items = items player;
{
_recipeItem = _x;
_recipeQty = 1;
if (typeName _x == "ARRAY") then {
_recipeItem = _x select 0;
_recipeQty = _x select 1;
};
_recipeCount = _recipeCount + _recipeQty;
_index = _forEachIndex;
_recipePic = _recipeItem call EPOCH_itemPicture;
ctrlSetText [(_recipeItems select _index), _recipePic];
_actualCount = 0;
if (isClass(configfile >> "cfgweapons" >> _recipeItem)) then {
_actualCount = { _x == _recipeItem } count _items;
} else {
_actualCount = { _x == _recipeItem } count _mags;
};
ctrlSetText[(_recipeCounts select _index), format["%1/%2", _actualCount, _recipeQty]];
ctrlShow[(_recipeItems select _index), true];
ctrlShow[(_recipeStatus select _index), true];
ctrlShow[(_recipeCounts select _index), true];
(_activeDisplay displayCtrl (_recipetooltip select _index)) ctrlSetTooltip format["%1",(_recipeItem call EPOCH_itemDisplayName)];
if (_actualCount >= _recipeQty) then {
ctrlSetText [(_recipeStatus select _index), ""];
_itemCount = _itemCount + _recipeQty;
(_activeDisplay displayCtrl (_recipeCounts select _index)) ctrlSetTextColor[1, 1, 1, 1];
} else {
ctrlSetText [(_recipeStatus select _index), "\x\addons\a3_epoch_assets\ui\xicon.paa"];
(_activeDisplay displayCtrl (_recipeCounts select _index)) ctrlSetTextColor[1, 0, 0, 1];
};
} forEach _recipe;
if (_itemCount == _recipeCount && _proceed) then {
ctrlShow [1600, true];
ctrlShow [2100, true];
ctrlShow [1000, true];
for "_i" from 0 to 9 do {
_num = _i + 1;
_index = lbAdd[2100, str(_num)]; lbSetValue[2100, _index, _num];
};
lbSetCurSel[2100, 0];
};
//diag_log format["DEBUG: EPOCH_craftItem %1 index: %2",_selectedRecipe,_index];
};
//diag_log format["DEBUG: EPOCH_craftItem %1 index: %2",_selectedRecipe,_index];
};

View File

@ -0,0 +1,83 @@
// EPOCH fishing
private ["_bob","_fishes","_fish","_randomChance","_bobber","_nearByBobbers","_objects","_currentPos"];
_currentPos = player modelToWorld[0, 5 + (random 5), 0];
if (surfaceIsWater _currentPos) then {
_objects = lineIntersectsObjs[eyePos player, _currentPos, player, objNull, true, 2];
if (_objects isEqualTo []) then{
_nearByBobbers = nearestObjects [player,["Bobber_EPOCH"],12];
_nearByBobbersLocal = [];
{
if (local _x) then {
_nearByBobbersLocal pushBack _x
};
} forEach _nearByBobbers;
if (_nearByBobbersLocal isEqualTo []) then {
// Cast
_bobber = createVehicle ["Bobber_EPOCH",_currentPos, [], 0, "CAN_COLLIDE"];
EPOCH_TEMPOBJ_PVS = [_bobber];
publicVariableServer "EPOCH_TEMPOBJ_PVS";
_bobber setPosASL _currentPos;
_bobber setVariable ["EPOCH_bobberTime", diag_tickTime];
} else {
_bobber = _nearByBobbersLocal select 0;
// Reel in and delete Bobber
if !(isNull _bobber) then {
_castTime = _bobber getVariable ["EPOCH_bobberTime", diag_tickTime];
_diffTime = (diag_tickTime - _castTime) / 10;
// setTimer again to work with others bobbers and to prevent globalizing var
if (_diffTime == 0) then {
_bobber setVariable ["EPOCH_bobberTime", diag_tickTime];
} else {
// max out chance when fish on line within last 10 seconds
if ((diag_tickTime - (_bobber getVariable ["EPOCH_fishOnLine" , 0])) <= 10) then {
_diffTime = 100;
};
_bobber setVelocity [0,-1,-10];
// reel in bobber
deleteVehicle _bobber;
_randomChanceMax = (100 - _diffTime) max 1 min 99;
// RNG
_randomChance = random 100;
// PAY
if (_randomChance > _randomChanceMax) then {
// TEMP payout
_fishes = ["ItemTuna","ItemSeaBass","ItemSeaBass","ItemSeaBass","ItemTrout","ItemTrout","ItemTrout","ItemTrout","ItemTrout","ItemTrout"];
_fish = _fishes param [floor(random(count _fishes)),""];
if (_fish != "") then {
_fish call EPOCH_fnc_addItemOverflow;
_dt = ["<t size='0.8' shadow='0' color='#99ffffff'>Fish Caught</t>", 0, 1, 5, 2, 0, 1] spawn bis_fnc_dynamictext;
};
} else {
_dt = ["<t size='0.8' shadow='0' color='#99ffffff'>Fish Got Away</t>", 0, 1, 5, 2, 0, 1] spawn bis_fnc_dynamictext;
};
};
};
};
};
};

View File

@ -1,93 +0,0 @@
disableSerialization;
_text = "";
_data = "";
_pic = "";
if (typeName _this isEqualTo "BOOL" && count EPOCH_InteractedItem == 3) then {
_text = EPOCH_InteractedItem select 0;
_data = EPOCH_InteractedItem select 1;
_pic = EPOCH_InteractedItem select 2;
//diag_log "DEBUG: mode 1";
} else {
//diag_log "DEBUG: mode 2";
EPOCH_InteractedItem = [];
_control = _this select 0;
_index = _this select 1;
_text = _control lbText _index;
_data = _control lbData _index;
_pic = _control lbPicture _index;
if (_data == "") then {
_confData = "getText (_x >> 'displayName') == _text" configClasses(configFile >> "CfgWeapons");
if !(_confData isEqualTo[]) then {
_data = configName(_confData select 0);
};
};
EPOCH_InteractedItem = [_text,_data,_pic];
};
_craftingArray = [];
_craftingArrayNames = [];
// _craftingConfig = configfile >> "CfgCrafting" >> _data;
_config = 'CfgCrafting' call EPOCH_returnConfig;
_craftingConfig = _config >> _data;
if (isClass (_craftingConfig)) then {
_usedIn = [] + getArray (_craftingConfig >> "usedIn");
{
//diag_log format["DEBUG: %1",_x,(_x call EPOCH_itemPicture),(_x call EPOCH_itemDisplayName)];
_craftingArray pushBack (_x call EPOCH_itemPicture);
_craftingArrayNames pushBack (_x call EPOCH_itemDisplayName);
} forEach _usedIn;
};
//diag_log format["DEBUG: EPOCH_itemInteract %1 EPOCH_InteractedItem %2", _this, EPOCH_InteractedItem];
// diag_log format["DEBUG: _craftingArrayNames %1 _craftingArray %2", _craftingArrayNames, _craftingArray];
closeDialog 0;
if !(createdialog "InteractItem") exitWith {};
ctrlShow[1600, false];
ctrlShow[2100, false];
ctrlShow[1000, false];
ctrlShow[41008, false];
ctrlShow[42000, false];
_interactOption = 0;
_buttonTXT = "";
if (isClass (configfile >> "cfgweapons" >> _data)) then {
_type = getNumber (configfile >> "CfgWeapons" >> _data >> "type");
_interactOption = getNumber (configfile >> "CfgWeapons" >> _data >> "interactAction");
_buttonTXT = getText(configfile >> "CfgWeapons" >> _data >> "interactText");
} else {
_type = getNumber (configfile >> "CfgMagazines" >> _data >> "type");
_interactOption = getNumber (configfile >> "CfgMagazines" >> _data >> "interactAction");
_buttonTXT = getText(configfile >> "CfgMagazines" >> _data >> "interactText");
};
if (_buttonTXT == "") then {
_buttonTXT = "EXAMINE";
};
ctrlSetText [41201, _buttonTXT];
ctrlSetText [41200, _pic];
_craftingArrayCount = count _craftingArray;
_controls = [41202,41203,41204,41205,41206,41207];
_buttons = [1602,1603,1604,1605,1606,1607];
{
if (_craftingArrayCount >= (_forEachIndex+1)) then {
ctrlSetText [_x, (_craftingArray select _forEachIndex)];
((findDisplay -15) displayCtrl (_buttons select _forEachIndex)) ctrlSetTooltip (_craftingArrayNames select _forEachIndex);
ctrlShow [_buttons select _forEachIndex, true];
} else {
ctrlShow [_buttons select _forEachIndex, false];
};
}forEach _controls;

View File

@ -184,7 +184,7 @@ if (EPOCH_ESP_PLAYER || EPOCH_ESP_VEHICLES) then {
}
else {
_name = [];
{if (alive _x && isPlayer _x) then { _name pushBack(name _x) }} count crew vehicle _x;
{if (alive _x && isPlayer _x) then { _id = _name pushBack(name _x) }} count crew vehicle _x;
_text = format['%1 (%2m) - %3', _name, _distance, getText(configFile >> "CfgVehicles" >> typeOf vehicle _x >> "displayName")];
};
drawIcon3D['', [1, 0, 0, abs((_distance) / _viewDistance - 1)], _pos, 0.2, 0.2, 0, _text, 1, 0.03, "PuristaMedium"];

View File

@ -1,8 +1,7 @@
private [];
private ["_dt","_object","_objType","_dialog","_handled","_config","_upgrade","_remove"];
if !(isNil "EPOCH_simulSwap_Lock") exitWith{ false };
if !(isNull EPOCH_Target) exitWith{ false };
if (EPOCH_playerEnergy <= 0) exitWith{ _dt = ["<t size='0.8' shadow='0' color='#99ffffff'>Need energy</t>", 0, 1, 5, 2, 0, 1] spawn bis_fnc_dynamictext; false };
_object = _this;
@ -12,17 +11,9 @@ if ((player distance _object) > 9) exitWith { false };
_objType = typeOf _object;
_isFoundation = _object isKindOf "Constructions_foundation_F";
_isJammer = _object isKindOf "PlotPole_EPOCH";
_isStorage = _object isKindOf "Buildable_Storage";
if (!(_object isKindOf "ThingX") && !(_object isKindOf "Constructions_static_F") && !_isFoundation && !_isStorage && !_isJammer) exitWith{ false };
_dialog = "InteractBaseBuilding";
_handled = createdialog _dialog;
// disable actions if no upgrade options
_config = 'CfgBaseBuilding' call EPOCH_returnConfig;
_upgrade = getArray(_config >> _objType >> "upgradeBuilding");
@ -33,9 +24,8 @@ _remove = getArray(_config >> _objType >> "removeParts");
if (_remove isEqualTo[]) then{
ctrlEnable[2401, false];
};
// disable Move option if foundation or jammer
if (_isFoundation || _isJammer || _isStorage) then{
// disable Move option if not SIM
if !(_object isKindOf "ThingX") then{
ctrlEnable[2402, false];
};

View File

@ -3,7 +3,8 @@ if (EPOCH_playerCrypto > 0) then {
_buildingJammerRange = getNumber(_config >> "buildingJammerRange");
if (_buildingJammerRange == 0) then { _buildingJammerRange = 75; };
_maintainCount = {(damage _x) > 0} count nearestObjects[_this, ["Constructions_static_F", "Constructions_foundation_F"], _buildingJammerRange];
_maintainCount = {(damage _x) > 0} count nearestObjects[_this, ["Constructions_static_F","Constructions_foundation_F","Buildable_Storage","Secure_Storage_Proxy"], _buildingJammerRange];
if (EPOCH_playerCrypto < _maintainCount) then {
_maintainCount = EPOCH_playerCrypto;
};

View File

@ -0,0 +1,19 @@
// Epoch add item with overflow
private ["_wHPos","_wH","_nearByHolder","_item"];
_item = _this;
if (player canAdd _item) then {
player addItem _item;
} else {
_wH = objNull;
_nearByHolder = nearestObjects [position player,["groundWeaponHolder"],3];
if (_nearByHolder isEqualTo []) then {
_wHPos = player modelToWorld [0,1,0];
if (surfaceIsWater _wHPos) then {
_wHPos = ASLToATL _wHPos;
};
_wH = createVehicle ["groundWeaponHolder",_wHPos, [], 0, "CAN_COLLIDE"];
} else {
_wH = _nearByHolder select 0;
};
_wh addItemCargoGlobal [_item,1];
};

View File

@ -8,7 +8,7 @@ _magazine = _this select 5;
_projectile = _this select 6;
switch true do {
case (_ammo isKindOf "B_Test_45ACP_Ball"): {
case (_ammo isKindOf "B_EnergyPack"): {
// diag_log format["DEBUG AMMO: %1", _ammo];
if (!isNull cursorTarget) then {
_cursorTarget = cursorTarget;
@ -69,7 +69,7 @@ switch true do {
};
};
case (_ammo isKindOf "B_Hatchet"): {
case (_ammo isKindOf "B_Hatchet"): {
_gesture = ["GestureSwing0", "GestureSwing1", "GestureSwing2"] select (floor(random 3));
player playActionNow _gesture;
call EPOCH_chopWood;
@ -78,13 +78,19 @@ switch true do {
case (_ammo isKindOf "B_Swing" || _ammo isKindOf "B_Stick") : {
player playActionNow "SledgeSwing";
call EPOCH_mineRocks;
if (_weapon isEqualTo "MeleeSword") then {
call EPOCH_chopWood;
};
if (_weapon isEqualTo "MeleeRod") then {
call EPOCH_fish;
};
};
case (_ammo isKindOf "ChainSaw_Bullet"): {
call EPOCH_chopWood;
};
default {
default {
_droneChance = 2;
if !(EPOCH_nearestLocations isEqualTo[]) then{
_droneChance = _droneChance * 2;
@ -98,4 +104,4 @@ switch true do {
"I_UAV_01_F" call EPOCH_unitSpawnIncrease;
};
};
};
};

View File

@ -0,0 +1,33 @@
/*
Returns string if only one element in second param, otherwise returns array
_displayName = _item call epoch_itemData; // string
_pic = [_item,["Picture"]] call epoch_itemData; //string
_data = [_item,["picture","model","displayName"]] call epoch_itemData; //array
*/
private ["_item","_entries","_single","_arr","_return"];
_item = param [0,""];
_entries = param [1,["DisplayName"],[[]]];
_single = (count _entries) == 1;
_arr = [];
{
if ([_item, "CfgMagazines"] call EPOCH_fnc_isAny) then {
_arr pushBack (getText(configfile >> "CfgMagazines" >> _item >> _x));
} else {
if ([_item, "CfgWeapons"] call EPOCH_fnc_isAny) then {
_arr pushBack (getText(configfile >> "CfgWeapons" >> _item >> _x));
} else {
if ([_item, "CfgVehicles"] call EPOCH_fnc_isAny) then {
_arr pushBack (getText(configfile >> "CfgVehicles" >> _item >> _x));
};
};
};
} forEach _entries;
if (_arr isEqualTo []) then {_arr = [""]};
_return = if (_single) then {_arr select 0} else {_arr};
_return

View File

@ -34,8 +34,12 @@ if (_ctrl && _dikCode == 0x0C) then {
if (_dikCode == 0x01) then {
if !(isNull EPOCH_Target) then {
if !(_vehicle isKindOf "ThingX") then {
deleteVehicle EPOCH_Target;
_dt = ["<t size = '0.8' shadow = '0' color = '#99ffffff'>Build Canceled</t>", 0, 1, 5, 2, 0, 1] spawn bis_fnc_dynamictext;
} else {
EPOCH_Target = objNull;
};
_dt = ["<t size = '0.8' shadow = '0' color = '#99ffffff'>Build Canceled</t>", 0, 1, 5, 2, 0, 1] spawn bis_fnc_dynamictext;
};
if !(EPOCH_arr_interactedObjs isEqualTo[]) then {
@ -145,8 +149,8 @@ if (vehicle player == player) then {
case EPOCH_keysBuildMovBak: { EPOCH_Y_OFFSET = (EPOCH_Y_OFFSET - 0.1) max 2; _handled = true };
case EPOCH_keysBuildMovL: { EPOCH_X_OFFSET = (EPOCH_X_OFFSET + 0.1) min 5; _handled = true };
case EPOCH_keysBuildMovR: { EPOCH_X_OFFSET = (EPOCH_X_OFFSET - 0.1) max - 5; _handled = true };
case EPOCH_keysBuildRotL: { EPOCH_buildDirection = (EPOCH_buildDirection + 1) min 360; EPOCH_space = true; hintsilent str(EPOCH_buildDirection); _handled = true };
case EPOCH_keysBuildRotR: { EPOCH_buildDirection = (EPOCH_buildDirection - 1) max 0; EPOCH_space = true; hintsilent str(EPOCH_buildDirection); _handled = true };
case EPOCH_keysBuildRotL: { EPOCH_buildDirection = (EPOCH_buildDirection + 1) min 360; EPOCH_space = true; _handled = true };
case EPOCH_keysBuildRotR: { EPOCH_buildDirection = (EPOCH_buildDirection - 1) max 0; EPOCH_space = true; _handled = true };
case EPOCH_keysBuildIt: { cursorTarget call EPOCH_fnc_SelectTarget; _handled = true };
};
};
@ -228,8 +232,12 @@ if (vehicle player == player) then {
if (_dikCode in(actionKeys "Gear")) then {
if !(isNull EPOCH_Target) then {
if !(_vehicle isKindOf "ThingX") then {
deleteVehicle EPOCH_Target;
_dt = ["<t size = '0.8' shadow = '0' color = '#99ffffff'>Build Canceled</t>", 0, 1, 5, 2, 0, 1] spawn bis_fnc_dynamictext;
} else {
EPOCH_Target = objNull;
};
_dt = ["<t size = '0.8' shadow = '0' color = '#99ffffff'>Build Canceled</t>", 0, 1, 5, 2, 0, 1] spawn bis_fnc_dynamictext;
};
if (isTouchingGround player) then {
_handled = call EPOCH_lootTrash;

View File

@ -12,7 +12,7 @@ EPOCH_lastContainer = _this select 1;
waitUntil {!isNull findDisplay 602};
_display = (findDisplay 602);
{(_display displayCtrl _x) ctrlEnable false} forEach [-13,-14];
(_display displayCtrl -13) ctrlEnable false;
_totalArmor = 0;
_totalArmorMax = EPOCH_MAX_ARMOR select 3;

View File

@ -8,9 +8,6 @@ _text = _control lbText _index;
_data = _control lbData _index;
_pic = _control lbPicture _index;
_craftingArray = [];
_craftingArrayNames = [];
if (_data == "") then {
_confData = "getText (_x >> 'displayName') == _text" configClasses(configFile >> "CfgWeapons");
if !(_confData isEqualTo[]) then {
@ -18,17 +15,6 @@ if (_data == "") then {
};
};
_config = 'CfgCrafting' call EPOCH_returnConfig;
_craftingConfig = _config >> _data;
if (isClass (_craftingConfig)) then {
_usedIn = [] + getArray (_craftingConfig >> "usedIn");
{
_craftingArray pushBack (_x call EPOCH_itemPicture);
_craftingArrayNames pushBack (_x call EPOCH_itemDisplayName);
} forEach _usedIn;
};
EPOCH_InteractedItem = [_text,_data,_pic];
_interactOption = 0;
@ -55,8 +41,17 @@ if (_buttonTXT != "") then {
};
_useBtn = _display displayCtrl -14;
if !(_craftingArray isEqualTo []) then {
_useBtn ctrlEnable true;
_useBtn ctrlEnable true;
_config = 'CfgCrafting' call EPOCH_returnConfig;
_craftingConfig = _config >> _data;
if (isClass (_craftingConfig)) then {
_useBtn ctrlSetTextColor [0,1,0,1];
EPOCH_CraftingItem = EPOCH_InteractedItem select 0;
} else {
_useBtn ctrlEnable false;
_useBtn ctrlSetTextColor [1,0,0,1];
EPOCH_CraftingItem = "";
};
true

View File

@ -0,0 +1,25 @@
EPOCH_InteractedItem = [];
_control = _this select 0;
_index = _this select 1;
_text = _control lbText _index;
_data = _control lbData _index;
_pic = _control lbPicture _index;
if (_data == "") then {
_confData = "getText (_x >> 'displayName') == _text" configClasses(configFile >> "CfgWeapons");
if !(_confData isEqualTo[]) then {
_data = configName(_confData select 0);
};
};
EPOCH_InteractedItem = [_text,_data,_pic];
_config = 'CfgCrafting' call EPOCH_returnConfig;
_craftingConfig = _config >> _data;
if (isClass (_craftingConfig)) then {
(EPOCH_InteractedItem select 0) call EPOCH_crafting_load;
} else {
//TODO: eat, drink, build ... etc
};

View File

@ -0,0 +1,60 @@
private ["_keyMap","_args","_input","_return"];
params [["_args",0],["_input",0]];
_keyMap =
[
//["Name", "Variable name", Default value],
["Build: Mode 1", "EPOCH_keysBuildMode1", 2],
["Build: Mode 2", "EPOCH_keysBuildMode2", 3],
["Build: Direction", "EPOCH_keysBuildDir", 4],
//["Build: Static", "EPOCH_keysBuildStatic", 5],
["Build: Move UP", "EPOCH_keysBuildMovUp", 0xC9],
["Build: Move DOWN", "EPOCH_keysBuildMovDn", 0xD1],
["Build: Move FORWARD", "EPOCH_keysBuildMovFwd", 0xC7],
["Build: Move BACK", "EPOCH_keysBuildMovBak", 0xCF],
["Build: Move LEFT", "EPOCH_keysBuildMovL", 0xD2],
["Build: Move RIGHT", "EPOCH_keysBuildMovR", 0xD3],
["Build: Rotate LEFT", "EPOCH_keysBuildRotL", 0x12],
["Build: Rotate RIGHT", "EPOCH_keysBuildRotR", 0x10],
["Build: BUILD", "EPOCH_keysBuildIt", 0x39],
["Trade", "EPOCH_keysAcceptTrade", 0x14],
["Holster Weapon", "EPOCH_keysHolster", 35],
["Debug Monitor", "EPOCH_keysDebugMon", 41]
];
switch (_args) do {
case 0: //load variables
{
{
call compile format ["%1 = profileNamespace getVariable ['%1', %2]",_x select 1, _x select 2];
} forEach _keyMap;
_return = true;
};
case 1: //delete all profile namespace variables
{
{
profileNamespace setVariable [_x select 1, nil];
} forEach _keyMap;
_return = true;
};
case 2: //returns keymap to a caller for processing
{
_return = _keyMap;
};
case 3: //search by variable name and return element if exists (not tested)
{
_return =
{
_s = toLower(_x select 1) find toLower _input;
if (_s > -1) exitWith {_x};
[]
} forEach _keyMap;
};
};
_return

View File

@ -3,6 +3,7 @@ disableSerialization;
_EPOCH_1 = diag_tickTime;
_EPOCH_10 = diag_tickTime;
_EPOCH_15 = diag_tickTime;
_EPOCH_30 = diag_tickTime;
_EPOCH_60 = diag_tickTime;
_EPOCH_300 = diag_tickTime;
_EPOCH_600 = diag_tickTime;
@ -447,6 +448,30 @@ while {alive player} do {
};
};
if ((_tickTime - _EPOCH_30) > 30) then {
_EPOCH_30 = _tickTime;
_nearByBobbersLocal = [];
_nearByBobbers = player nearEntities[["Bobber_EPOCH"], 12];
{
if (local _x) then {
_nearByBobbersLocal pushBack _x
}
} forEach _nearByBobbers;
if !(_nearByBobbersLocal isEqualTo []) then {
if ((random 100) < 50) then {
_bobber = _nearByBobbersLocal select floor(random(count _nearByBobbers));
_bobber setVelocity [0,-1,-1];
_bobber setVariable ["EPOCH_fishOnLine" , diag_tickTime];
};
};
};
if ((_tickTime - _EPOCH_60) > 60) then {
_EPOCH_60 = _tickTime;

View File

@ -22,8 +22,8 @@ if !(isNull EPOCH_lastNPCtradeTarget) then {
// find item and get current qty
_qtyIndex = _itemClasses find _uiItem;
if (_qtyIndex != -1) then {
// TODO allow config here
if (_itemQtys select _qtyIndex >= 100) then {
_limit = ["CfgTraderLimits", _uiItem, 100] call EPOCH_fnc_returnConfigEntryV2;
if (_itemQtys select _qtyIndex >= _limit) then{
_stockLimit = true;
_allowAdd = false;
};

View File

@ -16,7 +16,7 @@ class CfgMods
hidePicture = 0;
hideName = 0;
action = "http://www.epochmod.com";
version = "0.3.3.1";
version = "0.3.4.0";
majorVersion = 0.3; //MUST BE A NUMBER!; Change this if we release a new major version, don't change if we push just push a hotfix
ArmAVersion = 150;
overview = "Open world survival mod set in the year 2035, Just two years after the mass extinction of billions of people. Those that remain are left with remnants of a once technological society. Try to survive, build, or explore your way through the harsh dynamic environment.";
@ -27,20 +27,20 @@ class Epoch
class Version
{
//Version System, Check if PBO Version is compatible with Code
A3_epoch_assets = "0.3.3.0";
A3_epoch_assets_1 = "0.3.3.0";
epoch_objects = "0.3.3.0";
A3_epoch_assets_3 = "0.3.3.0";
A3_epoch_config = "0.3.3.1";
A3_epoch_language = "0.3.3.0";
Underground_Epoch = "0.3.3.0";
A3_epoch_vehicles = "0.3.3.0";
a3_epoch_weapons = "0.3.3.0";
a2_epoch_weapons = "0.3.3.0";
a3_epoch_structures = "0.3.3.0";
A3_epoch_functions = "0.3.3.0";
A3_epoch_vehicles_1 = "0.3.3.0";
Enhanced_Epoch_AiASupport = "0.3.3.0";
A3_epoch_assets = "0.3.4.0";
A3_epoch_assets_1 = "0.3.4.0";
epoch_objects = "0.3.4.0";
A3_epoch_assets_3 = "0.3.4.0";
A3_epoch_config = "0.3.4.0";
A3_epoch_language = "0.3.4.0";
Underground_Epoch = "0.3.4.0";
A3_epoch_vehicles = "0.3.4.0";
a3_epoch_weapons = "0.3.4.0";
a2_epoch_weapons = "0.3.4.0";
a3_epoch_structures = "0.3.4.0";
A3_epoch_functions = "0.3.4.0";
A3_epoch_vehicles_1 = "0.3.4.0";
Enhanced_Epoch_AiASupport = "0.3.4.0";
};
};
@ -128,16 +128,14 @@ class CfgClientFunctions
class debugMonitor {};
class interact {};
class chopWood {};
class fish {};
class mineRocks {};
class UnisexCheck {};
class PutHandler {};
class niteLight {};
class LootIT {};
class supportCopter {};
class itemInteract {};
class consumeItem {};
class craftItemPreview {};
class craftItem {};
class unitSpawn {};
class antiWall {};
class onEachFrame {};
@ -191,6 +189,7 @@ class CfgClientFunctions
class clientRespawn {};
class clientRevive {};
class client_rejectPlayer {};
class clientKeyMap {};
};
class p2p_trading
@ -209,8 +208,10 @@ class CfgClientFunctions
class fnc_isInsideBuilding {};
class fnc_Weather {};
class fnc_findSafePos {};
class fnc_addItemOverflow {};
class pushCustomVar {};
class itemData {};
class itemPicture {};
class itemDisplayName {};
class SortArrayByDistance {};
@ -245,7 +246,8 @@ class CfgClientFunctions
class inventory {
class selectInventoryItem {};
class itemInteractV2 {};
class itemInteractClick {};
class itemInteractDblClick {};
class uniformArmorCalc {};
class gearArmorCalc {};
class factorArmor {};
@ -255,12 +257,45 @@ class CfgClientFunctions
};
class gui {
file = "\x\addons\a3_epoch_code\gui\scripts";
class onPause {};
class interactVehicle {};
class showStats {};
file = "\x\addons\a3_epoch_code\gui\scripts";
class onPause {};
class interactVehicle {};
class showStats {};
//class dynamicMenu {};
//class dynamicMenuCleanup {};
class 3DctrlPitchYaw {};
class 3DctrlSpin {};
class 3DctrlYaw {};
class InterruptConfig {};
class InterruptConfigActions {};
class gui3DCooldown {};
class gui3DWorldPos {};
class gui3DModelPos {};
class getIDC {};
};
class config {
file = "\x\addons\a3_epoch_code\gui\scripts\config";
class config_keymap {};
};
class gui_craft {
file = "\x\addons\a3_epoch_code\gui\scripts\craftingv2";
class crafting_animate {};
class crafting_ctrl_collector {};
class crafting_dev_toggle {};
class crafting_getConfig {};
class crafting_checkGear {};
class crafting_checkNearby {};
class crafting_checkResources {};
class crafting_craft {};
class crafting_progress {};
class crafting_load {};
class crafting_unload {};
class crafting_LB_click {};
class crafting_LB_defaults {};
class crafting_LB_doubleClick {};
class crafting_colorScheme {};
};
class group {
file = "\x\addons\a3_epoch_code\gui\scripts\group";
class Group_invitePlayer {};
@ -291,7 +326,13 @@ class CfgClientFunctions
class mission_refresh {};
class mission_description {};
};
class gui_postProcessing {
file = "\x\addons\a3_epoch_code\gui\scripts\post_process";
class postprocessCreate {};
class postprocessAdjust {};
class postprocessDestroy {};
};
};
};
#include "\A3\ui_f\hpp\defineCommonGrids.inc"
#include "\x\addons\a3_epoch_code\gui\Epoch_GUI_Config.hpp"

View File

@ -0,0 +1,297 @@
/*
The x and y coords of the child control are relative to the parent class, the height and width are not
If the height and / or width of the child control are greater than the parent control then scrollbars will be seen
This allows the creation of scrollable active text controls etc
The entire child class needs to be defined in the parents subclass class Controls {};
External parent classes:
RscControlsGroup
RscControlsGroupNoScrollbars
RscControlsGroupNoHScrollbars
http://ru.armacomref.wikia.com/wiki/Dialog_Control
*/
/** ---- TEMPLATE ----
Copy the array part of text below, from $[ to ]
Open GUI editor in game and press CTRL + O
That's it!
Note: IDCs for groups are automatically generated, but not for the controls inside groups!
Note: x and y from the output should be set to 0!
**/
/* #Xasyno
$[
1.063,
["interrupTemplate",[[0,0,1,1],0.025,0.04,"GUI_GRID"],0,0,0],
[2300,"EpochConfigTemplateGROUP",[1,"",["0.29375 * safezoneW + safezoneX","0.225 * safezoneH + safezoneY","0.4135 * safezoneW","0.4202 * safezoneH"],[-1,-1,-1,-1],[-1,-1,-1,-1],[-1,-1,-1,-1],"","-1"],[]]
]
*/
/** Inherit from this template if confused **/
class Epoch_main_config_template: RscControlsGroup
{
idc = -1;
x = 0; //keep x and y absolute
y = 0;
w = 40 * GUI_GRID_W;
h = 19.5 * GUI_GRID_H;
class controls {};
};
class Epoch_main_config_changelog: Epoch_main_config_template
{
w = 0.425 * safezoneW;
//onLoad = "((findDisplay 49) displayCtrl 71000) htmlLoad 'x\addons\a3_epoch_code\gui\changelog.html';";
onLoad = "((findDisplay 49) displayCtrl 71000) htmlLoad 'https://raw.githubusercontent.com/epochmodteam/epoch/test/changelog.html';";
class controls
{
class Epoch_main_config_html: RscHtml //https://community.bistudio.com/wiki/DialogControls-Text#CT_HTML.3D9
{
idc = 71000;
type = 9;
style = 0x00;
x = 0; //keep x and y absolute
y = 0;
w = 0.425 * safezoneW;
h = 1.4 * safezoneH;
filename = "changelog.html";
text="test";
colorText[] = {1,1,1,1.0};
colorBold[] = {0.76,0.5,0.07,0.8};
colorLink[] = {1,1,1,0.75};
colorLinkActive[] = {1,1,1,1.0};
colorBackground[] = {0.2,0.2,0.2,1};
colorPicture[] = {1, 1, 1, 1};
colorPictureBorder[] = {1, 0, 0, 1};
colorPictureLink[] = {0, 0, 1, 1};
colorPictureSelected[] = {0, 1, 0, 1};
sizeEx = "( ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)";
prevPage = "\A3\ui_f\data\gui\rsccommon\rschtml\arrow_left_ca.paa";
nextPage = "\A3\ui_f\data\gui\rsccommon\rschtml\arrow_right_ca.paa";
shadow = 2;
class H1
{
font = "PuristaMedium";
fontBold = "PuristaSemibold";
sizeEx = "( ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1.2)";
align = "left";
};
class H2
{
font = "PuristaMedium";
fontBold = "PuristaSemibold";
sizeEx = "( ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)";
align = "right";
};
class H3
{
font = "PuristaMedium";
fontBold = "PuristaSemibold";
sizeEx = "( ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)";
align = "left";
};
class H4
{
font = "PuristaMedium";
fontBold = "PuristaSemibold";
sizeEx = "( ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)";
align = "left";
};
class H5
{
font = "PuristaMedium";
fontBold = "PuristaSemibold";
sizeEx = "( ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)";
align = "left";
};
class H6
{
font = "PuristaMedium";
fontBold = "PuristaSemibold";
sizeEx = "( ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)";
align = "left";
};
class P
{
font = "PuristaMedium";
fontBold = "PuristaSemibold";
sizeEx = "( ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)";
align = "left";
};
};
};
};
/* #Tefyru
$[
1.063,
["asd",[[0,0,1,1],0.025,0.04,"GUI_GRID"],0,0,0],
[-2300,"EpochConfigKeyMap",[1,"",["0.29375 * safezoneW + safezoneX","0.225 * safezoneH + safezoneY","0.237183 * safezoneW","0.308 * safezoneH"],[-1,-1,-1,-1],[-1,-1,-1,-1],[-1,-1,-1,-1],"","-1"],[]],
[2200,"mainBG",[2300,"",["0 * safezoneW","1.63913e-008 * safezoneH","0.237183 * safezoneW","0.308 * safezoneH"],[-1,-1,-1,-1],[0.2,0.2,0.2,1],[-1,-1,-1,-1],"","-1"],[]],
[2201,"IGUIBack_2202",[2300,"",["0.123747 * safezoneW","0.022 * safezoneH","0.103171 * safezoneW","0.022 * safezoneH"],[-1,-1,-1,-1],[0.76,0.5,0.07,0.8],[-1,-1,-1,-1],"","-1"],["idc = 2202;"]],
[2202,"IGUIBack_2201",[2300,"",["0.0103125 * safezoneW","0.022 * safezoneH","0.103171 * safezoneW","0.022 * safezoneH"],[-1,-1,-1,-1],[0.76,0.5,0.07,0.8],[-1,-1,-1,-1],"","-1"],["idc = 2201;"]],
[1000,"RscText_1001",[2300,"Assign a key:",["0.125811 * safezoneW","0.0264 * safezoneH","0.0989998 * safezoneW","0.0154 * safezoneH"],[-1,-1,-1,-1],[-1,-1,-1,-1],[-1,-1,-1,-1],"","-1"],["idc = 1001;"]],
[1001,"RscText_1000",[2300,"Action:",["0.0123751 * safezoneW","0.0264 * safezoneH","0.0989997 * safezoneW","0.0154 * safezoneH"],[-1,-1,-1,-1],[-1,-1,-1,-1],[-1,-1,-1,-1],"","-1"],["idc = 1000;"]],
[1002,"RscListbox_1500: RscListBox",[2300,"",["0.0103125 * safezoneW","0.044 * safezoneH","0.103125 * safezoneW","0.242 * safezoneH"],[-1,-1,-1,-1],[0,0,0,0.5],[-1,-1,-1,-1],"","-1"],["idc = 1500;"]],
[1400,"RscEdit_1400",[2300,"",["0.124779 * safezoneW","0.154 * safezoneH","0.102093 * safezoneW","0.0242 * safezoneH"],[-1,-1,-1,-1],[-1,-1,-1,-1],[-1,-1,-1,-1],"","-1"],["idc = 1400;"]],
[1003,"RscText_1002",[2300,"New Key:",["0.125809 * safezoneW","0.1364 * safezoneH","0.0989998 * safezoneW","0.0154 * safezoneH"],[-1,-1,-1,-1],[0,0,0,0],[-1,-1,-1,-1],"","-1"],["idc = 1002;"]],
[1004,"RscText_1003",[2300,"Default:",["0.123747 * safezoneW","0.066 * safezoneH","0.103124 * safezoneW","0.022 * safezoneH"],[-1,-1,-1,-1],[0,0,0,0.5],[-1,-1,-1,-1],"","-1"],["idc = 1003;"]],
[1700,"",[2300,"Save",["0.12684 * safezoneW","0.198 * safezoneH","0.0464063 * safezoneW","0.0308 * safezoneH"],[-1,-1,-1,-1],[-1,-1,-1,-1],[-1,-1,-1,-1],"","-1"],[]],
[1701,"",[2300,"Reset",["0.17531 * safezoneW","0.198 * safezoneH","0.0484687 * safezoneW","0.0308 * safezoneH"],[-1,-1,-1,-1],[-1,-1,-1,-1],[-1,-1,-1,-1],"","-1"],[]],
[2400,"",[2300,"Reset all keys",["0.123747 * safezoneW","0.264 * safezoneH","0.103125 * safezoneW","0.022 * safezoneH"],[-1,-1,-1,-1],[-1,-1,-1,-1],[-1,-1,-1,-1],"","-1"],[]],
[1005,"",[2300,"Current:",["0.12375 * safezoneW","0.088 * safezoneH","0.103124 * safezoneW","0.022 * safezoneH"],[-1,-1,-1,-1],[0,0,0,0.5],[-1,-1,-1,-1],"","-1"],["idc = 1003;"]]
]
*/
class EpochConfigKeyMap: RscControlsGroupNoScrollbars
{
x = 0;
y = 0;
w = 0.237183 * safezoneW;
h = 0.308 * safezoneH;
onLoad = "'load' call Epoch_config_keymap;";
class controls
{
class rmx_eckm_BG: IGUIBack
{
idc = 78000;
x = 0 * safezoneW;
y = 0 * safezoneH;
w = 0.237183 * safezoneW;
h = 0.308 * safezoneH;
colorBackground[] = {0.2,0.2,0.2,1};
};
class rmx_eckm_BG_assign: IGUIBack
{
idc = 78001;
x = 0.123747 * safezoneW;
y = 0.022 * safezoneH;
w = 0.103171 * safezoneW;
h = 0.022 * safezoneH;
colorBackground[] = {0.76,0.5,0.07,0.8};
};
class rmx_eckm_BG_action: IGUIBack
{
idc = 78002;
x = 0.0103125 * safezoneW;
y = 0.022 * safezoneH;
w = 0.103171 * safezoneW;
h = 0.022 * safezoneH;
colorBackground[] = {0.76,0.5,0.07,0.8};
};
class rmx_eckm_txt_assign: RscText
{
idc = 78003;
text = "Assign a key:"; //--- ToDo: Localize;
x = 0.125811 * safezoneW;
y = 0.0264 * safezoneH;
w = 0.0989998 * safezoneW;
h = 0.0154 * safezoneH;
};
class rmx_eckm_txt_action: RscText
{
idc = 78004;
text = "Action:"; //--- ToDo: Localize;
x = 0.0123751 * safezoneW;
y = 0.0264 * safezoneH;
w = 0.0989997 * safezoneW;
h = 0.0154 * safezoneH;
};
class rmx_eckm_txt_nk: RscText
{
idc = 78005;
text = "New Key:"; //--- ToDo: Localize;
x = 0.125809 * safezoneW;
y = 0.1364 * safezoneH;
w = 0.0989998 * safezoneW;
h = 0.0154 * safezoneH;
colorBackground[] = {0,0,0,0};
};
class rmx_eckm_txt_default: RscText
{
idc = 78006;
text = "Default:"; //--- ToDo: Localize;
x = 0.123747 * safezoneW;
y = 0.066 * safezoneH;
w = 0.103124 * safezoneW;
h = 0.022 * safezoneH;
colorBackground[] = {0,0,0,0.5};
};
class rmx_eckm_txt_current: RscText
{
idc = 78007;
text = "Current:"; //--- ToDo: Localize;
x = 0.12375 * safezoneW;
y = 0.088 * safezoneH;
w = 0.103124 * safezoneW;
h = 0.022 * safezoneH;
colorBackground[] = {0,0,0,0.5};
};
class rmx_eckm_lb: RscListBox
{
idc = 78008;
x = 0.0103125 * safezoneW;
y = 0.044 * safezoneH;
w = 0.103125 * safezoneW;
h = 0.242 * safezoneH;
colorBackground[] = {0,0,0,0.5};
onLBSelChanged = "_this call Epoch_config_keymap;";
};
class rmx_eckm_edit: RscEdit
{
idc = 78009;
x = 0.124779 * safezoneW;
y = 0.154 * safezoneH;
w = 0.102093 * safezoneW;
h = 0.0242 * safezoneH;
onKeyUp = "_this call Epoch_config_keymap;";
};
class rmx_eckm_btn_save: RscShortcutButton
{
idc = 78010;
text = "Save"; //--- ToDo: Localize;
x = 0.12684 * safezoneW;
y = 0.198 * safezoneH;
w = 0.0464063 * safezoneW;
h = 0.0308 * safezoneH;
onMouseButtonClick = "_this call Epoch_config_keymap;";
};
class rmx_eckm_btn_reset: RscShortcutButton
{
idc = 78011;
text = "Reset"; //--- ToDo: Localize;
x = 0.17531 * safezoneW;
y = 0.198 * safezoneH;
w = 0.0484687 * safezoneW;
h = 0.0308 * safezoneH;
onMouseButtonClick = "_this call Epoch_config_keymap;";
};
class rmx_eckm_btn_resetall: RscButtonMenu
{
idc = 78012;
text = "Reset all keys"; //--- ToDo: Localize;
x = 0.123747 * safezoneW;
y = 0.264 * safezoneH;
w = 0.103125 * safezoneW;
h = 0.022 * safezoneH;
onMouseButtonClick = "_this call Epoch_config_keymap;";
};
};
};

View File

@ -10,6 +10,7 @@ class RscCombo;
class RscProgress;
class RscButton;
class RscButtonMenu;
class RscShortcutButton;
class RscObject;
class RscStandardDisplay;
class RscStructuredText;
@ -38,6 +39,14 @@ class IGUIBack;
class CA_Title;
class ScrollBar;
#include "Epoch_GUI_ClientConfigs.hpp"
#include "Epoch_GUI_rmx.hpp"
class RscTitles
{
#include "Epoch_RscTitles.hpp"
};
class RscCustomProgress : RscProgress
{
texture = "";
@ -78,162 +87,6 @@ class SKN_RscEdit
tooltipColorShade[] = { 0, 0, 0, 0.65 };
};
class RscTitles
{
class EpochGameUI
{
idd = -2;
duration = 999999;
onLoad = "uiNamespace setVariable ['EPOCH_EpochGameUI', _this select 0];";
class controls
{
class custom_picture: RscPicture
{
style = 48 + 0x800;
};
class icon1: custom_picture
{
idc = 21201;
text = "\x\addons\a3_epoch_code\Data\UI\thirst_ca.paa";
x = "10 * ( ((safezoneW / safezoneH) min 1.2) / 40) + (profilenamespace getvariable [""IGUI_GRID_WEAPON_X"", ((safezoneX + safezoneW) - (12.4 * ( ((safezoneW / safezoneH) min 1.2) / 40)) - 0.5 * ( ((safezoneW / safezoneH) min 1.2) / 40))])";
y = "0 * ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (profilenamespace getvariable [""IGUI_GRID_WEAPON_Y"", (safezoneY + 0.5 * ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25))])";
w = "2.5 * ( ((safezoneW / safezoneH) min 1.2) / 40)";
h = "2.5 * ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
};
class icon2: custom_picture
{
idc = 21202;
text = "\x\addons\a3_epoch_code\Data\UI\hunger_ca.paa";
x = "7.5 * ( ((safezoneW / safezoneH) min 1.2) / 40) + (profilenamespace getvariable [""IGUI_GRID_WEAPON_X"", ((safezoneX + safezoneW) - (12.4 * ( ((safezoneW / safezoneH) min 1.2) / 40)) - 0.5 * ( ((safezoneW / safezoneH) min 1.2) / 40))])";
y = "0 * ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (profilenamespace getvariable [""IGUI_GRID_WEAPON_Y"", (safezoneY + 0.5 * ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25))])";
w = "2.5 * ( ((safezoneW / safezoneH) min 1.2) / 40)";
h = "2.5 * ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
};
class icon3: custom_picture
{
idc = 21203;
text = "\x\addons\a3_epoch_code\Data\UI\broken_ca.paa";
x = "5 * ( ((safezoneW / safezoneH) min 1.2) / 40) + (profilenamespace getvariable [""IGUI_GRID_WEAPON_X"", ((safezoneX + safezoneW) - (12.4 * ( ((safezoneW / safezoneH) min 1.2) / 40)) - 0.5 * ( ((safezoneW / safezoneH) min 1.2) / 40))])";
y = "0 * ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (profilenamespace getvariable [""IGUI_GRID_WEAPON_Y"", (safezoneY + 0.5 * ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25))])";
w = "2.5 * ( ((safezoneW / safezoneH) min 1.2) / 40)";
h = "2.5 * ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
};
class icon4: custom_picture
{
idc = 21204;
text = "\x\addons\a3_epoch_code\Data\UI\oxygen_ca.paa";
x = "2.5 * ( ((safezoneW / safezoneH) min 1.2) / 40) + (profilenamespace getvariable [""IGUI_GRID_WEAPON_X"", ((safezoneX + safezoneW) - (12.4 * ( ((safezoneW / safezoneH) min 1.2) / 40)) - 0.5 * ( ((safezoneW / safezoneH) min 1.2) / 40))])";
y = "0 * ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (profilenamespace getvariable [""IGUI_GRID_WEAPON_Y"", (safezoneY + 0.5 * ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25))])";
w = "2.5 * ( ((safezoneW / safezoneH) min 1.2) / 40)";
h = "2.5 * ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
};
class icon5: custom_picture
{
idc = 21205;
text = "\x\addons\a3_epoch_code\Data\UI\hazzard_ca.paa";
x = "0 * ( ((safezoneW / safezoneH) min 1.2) / 40) + (profilenamespace getvariable [""IGUI_GRID_WEAPON_X"", ((safezoneX + safezoneW) - (12.4 * ( ((safezoneW / safezoneH) min 1.2) / 40)) - 0.5 * ( ((safezoneW / safezoneH) min 1.2) / 40))])";
y = "0 * ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (profilenamespace getvariable [""IGUI_GRID_WEAPON_Y"", (safezoneY + 0.5 * ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25))])";
w = "2.5 * ( ((safezoneW / safezoneH) min 1.2) / 40)";
h = "2.5 * ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
};
class icon6: custom_picture
{
idc = 21206;
text = "\x\addons\a3_epoch_code\Data\UI\bleeding_ca.paa";
x = "-2.5 * ( ((safezoneW / safezoneH) min 1.2) / 40) + (profilenamespace getvariable [""IGUI_GRID_WEAPON_X"", ((safezoneX + safezoneW) - (12.4 * ( ((safezoneW / safezoneH) min 1.2) / 40)) - 0.5 * ( ((safezoneW / safezoneH) min 1.2) / 40))])";
y = "0 * ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (profilenamespace getvariable [""IGUI_GRID_WEAPON_Y"", (safezoneY + 0.5 * ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25))])";
w = "2.5 * ( ((safezoneW / safezoneH) min 1.2) / 40)";
h = "2.5 * ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
};
};
};
class EpochGameUI2
{
idd = -3;
duration = 10;
onLoad = "uiNamespace setVariable ['EPOCH_EpochGameUI2', _this select 0];";
class controls
{
class custom_picture : RscPicture
{
style = 48 + 0x800;
};
class icon1 : custom_picture
{
idc = 21207;
text = "\x\addons\a3_epoch_code\Data\UI\cc_ca.paa";
x = "0 * ( ((safezoneW / safezoneH) min 1.2) / 40) + (profilenamespace getvariable [""IGUI_GRID_VEHICLE_X"", (safezoneX + 0.5 * ( ((safezoneW / safezoneH) min 1.2) / 40))])";
y = "-2.1 * ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 20) + (safezoneY + safezoneH - ( ((safezoneW / safezoneH) min 1.2) / 1.2)) + 18 * ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 20) - (1 * ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 20))";
w = "2.5 * ( ((safezoneW / safezoneH) min 1.2) / 40)";
h = "2.5 * ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
};
class RscCryptoText : RscText
{
idc = 21208;
text = "";
colorText[] = { 1, 1, 1, 0.5 };
shadow = 0;
sizeEx = 0.08;
x = "2.1 * ( ((safezoneW / safezoneH) min 1.2) / 40) + (profilenamespace getvariable [""IGUI_GRID_VEHICLE_X"", (safezoneX + 0.5 * ( ((safezoneW / safezoneH) min 1.2) / 40))])";
y = "-2.2 * ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 20) + (safezoneY + safezoneH - ( ((safezoneW / safezoneH) min 1.2) / 1.2)) + 18 * ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 20) - (1 * ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 20))";
w = "15 * ( ((safezoneW / safezoneH) min 1.2) / 40)";
h = "2.5 * ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
};
};
};
class EpochGameUI3
{
idd = -4;
duration = 10;
onLoad = "uiNamespace setVariable ['EPOCH_EpochGameUI3', _this select 0];";
class controls
{
class custom_picture : RscPicture
{
style = 48 + 0x800;
};
class icon1 : custom_picture
{
idc = 21209;
text = "\x\addons\a3_epoch_code\Data\UI\battery_ca.paa";
x = "0 * ( ((safezoneW / safezoneH) min 1.2) / 40) + (profilenamespace getvariable [""IGUI_GRID_VEHICLE_X"", (safezoneX + 0.5 * ( ((safezoneW / safezoneH) min 1.2) / 40))])";
y = "0 * ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 20) + (safezoneY + safezoneH - ( ((safezoneW / safezoneH) min 1.2) / 1.2)) + 18 * ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 20) - (1 * ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 20))";
w = "2.5 * ( ((safezoneW / safezoneH) min 1.2) / 40)";
h = "2.5 * ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
};
class RscEnergyText : RscText
{
idc = 21210;
text = "";
colorText[] = { 1, 1, 1, 0.5 };
shadow = 0;
sizeEx = 0.08;
x = "2.1 * ( ((safezoneW / safezoneH) min 1.2) / 40) + (profilenamespace getvariable [""IGUI_GRID_VEHICLE_X"", (safezoneX + 0.5 * ( ((safezoneW / safezoneH) min 1.2) / 40))])";
y = "-0.1 * ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 20) + (safezoneY + safezoneH - ( ((safezoneW / safezoneH) min 1.2) / 1.2)) + 18 * ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 20) - (1 * ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 20))";
w = "15 * ( ((safezoneW / safezoneH) min 1.2) / 40)";
h = "2.5 * ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
};
};
};
};
/*
class TradeRequest
{
@ -1679,7 +1532,6 @@ class InteractBaseBuilding
action = "closeDialog 0";
};
/*
class RscButtonMenu_2402 : RscButtonMenu
{
idc = 2402;
@ -1690,10 +1542,10 @@ class InteractBaseBuilding
h = 0.08;
action = "closeDialog 0; cursorTarget call EPOCH_fnc_SelectTargetBuild;";
};
*/
};
};
/*
class InteractItem
{
idd = -15;
@ -2256,7 +2108,7 @@ class InteractItem
};
};
*/
class Trade
{
idd = -1900;
@ -2546,6 +2398,7 @@ class RscDisplayInventory_DLCTemplate
};
};
};
class RscDisplayInventory
{
@ -3246,10 +3099,8 @@ class RscDisplayInventory
class UniformContainer : GroundContainer
{
onLBDblClick = "_this call EPOCH_itemInteract";
onLBSelChanged = "_this call EPOCH_itemInteractV2";
onLBDrag = "";
onLBSelChanged = "";
onLBSelChanged = "_this call EPOCH_itemInteractClick";
onLBDblClick = "_this call EPOCH_itemInteractDblClick";
idc = 633;
x = "15.1 * ( ((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)";
@ -3384,13 +3235,13 @@ class RscDisplayInventory
class EpochBtnBG : IGUIBack
{
idc = -10;
/*
x = 0.433468 * safezoneW + safezoneX;
y = 0.75872 * safezoneH + safezoneY;
w = 0.30231 * safezoneW;
h = 0.0337482 * safezoneH;
*/
//x = 0.433468 * safezoneW + safezoneX;
//y = 0.75872 * safezoneH + safezoneY;
//w = 0.30231 * safezoneW;
//h = 0.0337482 * safezoneH;
x = "14.5 * ( ((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)";
y = "23.9 * ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - ( ((safezoneW / safezoneH) min 1.2) / 1.2))/2)";
w = "24.5 * ( ((safezoneW / safezoneH) min 1.2) / 40)";
@ -3403,12 +3254,12 @@ class RscDisplayInventory
idc = -11;
text = "Group Menu";
onMouseButtonDown = "_this call EPOCH_Inventory_Group";
/*
x = 0.437079 * safezoneW + safezoneX;
y = 0.764 * safezoneH + safezoneY;
w = 0.0711741 * safezoneW;
h = 0.022 * safezoneH;
*/
//x = 0.437079 * safezoneW + safezoneX;
//y = 0.764 * safezoneH + safezoneY;
//w = 0.0711741 * safezoneW;
//h = 0.022 * safezoneH;
x = "33.2 * ( ((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)";
y = "24 * ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - ( ((safezoneW / safezoneH) min 1.2) / 1.2))/2)";
w = "6 * ( ((safezoneW / safezoneH) min 1.2) / 40)";
@ -3419,12 +3270,12 @@ class RscDisplayInventory
idc = -12;
text = "Requests";
onMouseButtonDown = "_this call EPOCH_Inventory_iGroup";
/*
x = 0.511347 * safezoneW + safezoneX;
y = 0.764 * safezoneH + safezoneY;
w = 0.0711741 * safezoneW;
h = 0.022 * safezoneH;
*/
//x = 0.511347 * safezoneW + safezoneX;
//y = 0.764 * safezoneH + safezoneY;
//w = 0.0711741 * safezoneW;
//h = 0.022 * safezoneH;
x = "27.0 * ( ((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)";
y = "24 * ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - ( ((safezoneW / safezoneH) min 1.2) / 1.2))/2)";
w = "6 * ( ((safezoneW / safezoneH) min 1.2) / 40)";
@ -3435,12 +3286,12 @@ class RscDisplayInventory
idc = -13;
text = "EXAMINE";
onMouseButtonDown = "call EPOCH_consumeItem";
/*
x = 0.585617 * safezoneW + safezoneX;
y = 0.764 * safezoneH + safezoneY;
w = 0.0711741 * safezoneW;
h = 0.022 * safezoneH;
*/
//x = 0.585617 * safezoneW + safezoneX;
//y = 0.764 * safezoneH + safezoneY;
//w = 0.0711741 * safezoneW;
//h = 0.022 * safezoneH;
x = "14.62 * ( ((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)";
y = "24 * ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - ( ((safezoneW / safezoneH) min 1.2) / 1.2))/2)";
w = "6 * ( ((safezoneW / safezoneH) min 1.2) / 40)";
@ -3450,13 +3301,13 @@ class RscDisplayInventory
{
idc = -14;
text = "CRAFT";
onMouseButtonDown = "true call EPOCH_itemInteract";
/*
x = 0.659883 * safezoneW + safezoneX;
y = 0.764 * safezoneH + safezoneY;
w = 0.0711741 * safezoneW;
h = 0.022 * safezoneH;
*/
onMouseButtonDown = "EPOCH_CraftingItem call EPOCH_crafting_load;";
//x = 0.659883 * safezoneW + safezoneX;
//y = 0.764 * safezoneH + safezoneY;
//w = 0.0711741 * safezoneW;
//h = 0.022 * safezoneH;
x = "20.8 * ( ((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)";
y = "24 * ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - ( ((safezoneW / safezoneH) min 1.2) / 1.2))/2)";
w = "6 * ( ((safezoneW / safezoneH) min 1.2) / 40)";
@ -3466,10 +3317,14 @@ class RscDisplayInventory
};
};
};
class RscDisplayInterrupt: RscStandardDisplay //convert to preprocessFileNumbers
{
onLoad = "[""onLoad"",_this,""RscDisplayInterrupt"",'GUI'] call (uinamespace getvariable 'BIS_fnc_initDisplay'); _this call EPOCH_InterruptConfig;";
};
class RscDisplayMPInterrupt: RscStandardDisplay
{
onLoad = "[""onLoad"",_this,""Epoch_onPause"",'Epoch'] call compile preprocessfilelinenumbers ""A3\ui_f\scripts\initDisplay.sqf"";[""onLoad"",_this,""RscDisplayMPInterrupt"",'Epoch'] call compile preprocessfilelinenumbers ""A3\ui_f\scripts\initDisplay.sqf""";
onLoad = "[""onLoad"",_this,""Epoch_onPause"",'Epoch'] call compile preprocessfilelinenumbers ""A3\ui_f\scripts\initDisplay.sqf"";[""onLoad"",_this,""RscDisplayMPInterrupt"",'Epoch'] call compile preprocessfilelinenumbers ""A3\ui_f\scripts\initDisplay.sqf"";_this call EPOCH_InterruptConfig;";
//onLoad = "[""onLoad"",_this,""RscDisplayMPInterrupt"",'GUI'] call compile preprocessfilelinenumbers ""A3\ui_f\scripts\initDisplay.sqf""";
onUnload = "[""onUnload"",_this,""RscDisplayMPInterrupt"",'Epoch'] call compile preprocessfilelinenumbers ""A3\ui_f\scripts\initDisplay.sqf""";
};

View File

@ -0,0 +1,623 @@
class rmx_dynamenu {
idd = 66600;
enableSimulation = 1;
movingEnable = 1;
onLoad = "setMousePosition [0.5, 0.5];";
class controls {};
};
class rmx_rscPicture: RscPicture {
idc = -1;
x = 0.425; y = 0.4; w = 0.15; h = 0.2;
text = "";
};
class rmx_rscObject
{
idd = 77770;
movingEnable = 0;
enableSimulation = 1;
class Objects
{
class randomItem //pref less polies for starting item
{
idc = 77771;
type = 82;
model = "\x\addons\a3_epoch_assets\models\logo.p3d";
scale = 1;
direction[] = {0, -0.35, -0.65};
up[] = {0, 0.65, -0.35};
x = 0.5;
y = 0.5;
z = 0.2;
xBack = 0.5;
yBack = 0.5;
zBack = 1.2;
inBack = 1;
enableZoom = 0;
zoomDuration = 0.001;
};
};
};
class rmx_rscControlsGroup: RscControlsGroup
{
idc = -1;
x = 0; y = 0; w = 0; h = 0;
colorBackground[] = {0,0,0,0};
class VScrollbar: VScrollbar
{
width = 0;
};
class HScrollbar: VScrollbar
{
height = 0;
};
class controls {};
};
class rmx_craftingUI {
idd = 77700;
enableSimulation = 1;
movingEnable = 1;
onUnload = "call EPOCH_crafting_unload;";
onLoad = "setMousePosition [0.5, 0.5];";
class Objects
{
class randomItem2 //pref less polies for starting item
{
idc = 77701;
type = 82;
model = "\x\addons\a3_epoch_assets\models\logo.p3d";
scale = 1;
direction[] = {0, -0.35, -0.65};
up[] = {0, 0.65, -0.35};
x = 0.8125;
y = 0.287782;
z = 1;
xBack = 0.8125;
yBack = 0.287782;
zBack = 1.2;
inBack = 1;
enableZoom = 0;
zoomDuration = 0.001;
};
};
class controls
{
//Developer menu (DISABLE ON RELEASE)
//background
class dev_backgrnd: IGUIBack
{
idc = 77703;
x = 0.710375 * safezoneW + safezoneX;
y = 0.224906 * safezoneH + safezoneY;
w = 0.0845625 * safezoneW;
h = 0.22001 * safezoneH;
colorBackground[] = {0,0,0,0.5};
onLoad = "(_this select 0) ctrlShow false";
};
//buttons
class dev_btn_pic: RscPicture
{
idc = 77702;
text = "x\addons\a3_epoch_code\Data\UI\dev_mode_off.paa";
x = 0.795;
y = -0.064;
w = 0.2;
h = 0.075;
onLoad = "(_this select 0) ctrlShow false";
onMouseButtonDown = "call EPOCH_crafting_dev_toggle;";
};
class dev_btn_set: RscButton
{
idc = 77704;
text = "Set"; //--- ToDo: Localize;
x = 0.770187 * safezoneW + safezoneX;
y = 0.2316 * safezoneH + safezoneY;
w = 0.020625 * safezoneW;
h = 0.022 * safezoneH;
onLoad = "(_this select 0) ctrlShow false";
};
class dev_btn_rpt: RscButton
{
idc = 77705;
text = "Export"; //--- ToDo: Localize;
x = 0.712437 * safezoneW + safezoneX;
y = 0.414171 * safezoneH + safezoneY;
w = 0.0804375 * safezoneW;
h = 0.022 * safezoneH;
onLoad = "(_this select 0) ctrlShow false";
};
class dev_btn_setPos: RscButton
{
idc = 77706;
onLoad = "(_this select 0) ctrlShow false";
text = "Set Position"; //--- ToDo: Localize;
x = 0.712575 * safezoneW + safezoneX;
y = 0.384407 * safezoneH + safezoneY;
w = 0.0804375 * safezoneW;
h = 0.022 * safezoneH;
};
class dev_btn_vectorPlus: RscButton
{
idc = 77707;
onLoad = "(_this select 0) ctrlShow false";
text = "+"; //--- ToDo: Localize;
x = 0.778437 * safezoneW + safezoneX;
y = 0.266721 * safezoneH + safezoneY;
w = 0.012375 * safezoneW;
h = 0.022 * safezoneH;
action = "rmx_var_3dCtrlSpin_Vector = rmx_var_3dCtrlSpin_Vector + 0.1; (rmx_var_crafting_ctrl_DEV select 10) ctrlSetText str rmx_var_3dCtrlSpin_Vector;";
};
class dev_btn_vectorMinus: RscButton
{
idc = 77708;
onLoad = "(_this select 0) ctrlShow false";
text = "-"; //--- ToDo: Localize;
x = 0.73925 * safezoneW + safezoneX;
y = 0.266721 * safezoneH + safezoneY;
w = 0.012375 * safezoneW;
h = 0.022 * safezoneH;
action = "rmx_var_3dCtrlSpin_Vector = rmx_var_3dCtrlSpin_Vector - 0.1; (rmx_var_crafting_ctrl_DEV select 10) ctrlSetText str rmx_var_3dCtrlSpin_Vector;";
};
//edit
class dev_edit_scale: RscEdit
{
idc = 77709;
text = "1"; //--- ToDo: Localize;
x = 0.743375 * safezoneW + safezoneX;
y = 0.2316 * safezoneH + safezoneY;
w = 0.02475 * safezoneW;
h = 0.022 * safezoneH;
onLoad = "(_this select 0) ctrlShow false";
};
class dev_edit_x: RscEdit
{
idc = 77710;
onLoad = "(_this select 0) ctrlShow false";
text = "0.123456"; //--- ToDo: Localize;
x = 0.748524 * safezoneW + safezoneX;
y = 0.2998 * safezoneH + safezoneY;
w = 0.0443435 * safezoneW;
h = 0.022 * safezoneH;
};
class dev_edit_z: RscEdit
{
idc = 77711;
onLoad = "(_this select 0) ctrlShow false";
text = "0.123456"; //--- ToDo: Localize;
x = 0.748948 * safezoneW + safezoneX;
y = 0.325807 * safezoneH + safezoneY;
w = 0.0443435 * safezoneW;
h = 0.022 * safezoneH;
};
class dev_edit_y: RscEdit
{
idc = 77712;
onLoad = "(_this select 0) ctrlShow false";
text = "0.123456"; //--- ToDo: Localize;
x = 0.749458 * safezoneW + safezoneX;
y = 0.352082 * safezoneH + safezoneY;
w = 0.0443435 * safezoneW;
h = 0.022 * safezoneH;
};
class dev_edit_vector: RscEdit
{
idc = 77713;
onLoad = "(_this select 0) ctrlShow false";
text = "0"; //--- ToDo: Localize;
x = 0.755234 * safezoneW + safezoneX;
y = 0.267601 * safezoneH + safezoneY;
w = 0.0195937 * safezoneW;
h = 0.022 * safezoneH;
};
//text
class dev_txt_scale: RscText
{
idc = 77714;
text = "Scale:"; //--- ToDo: Localize;
x = 0.712437 * safezoneW + safezoneX;
y = 0.2338 * safezoneH + safezoneY;
w = 0.028875 * safezoneW;
h = 0.0154 * safezoneH;
onLoad = "(_this select 0) ctrlShow false";
};
class dev_txt_X: RscText
{
idc = 77715;
onLoad = "(_this select 0) ctrlShow false";
text = "X:"; //--- ToDo: Localize;
x = 0.712703 * safezoneW + safezoneX;
y = 0.303578 * safezoneH + safezoneY;
w = 0.028875 * safezoneW;
h = 0.0154 * safezoneH;
};
class dev_txt_z: RscText
{
idc = 77716;
onLoad = "(_this select 0) ctrlShow false";
text = "Z:"; //--- ToDo: Localize;
x = 0.712543 * safezoneW + safezoneX;
y = 0.329511 * safezoneH + safezoneY;
w = 0.028875 * safezoneW;
h = 0.0154 * safezoneH;
};
class dev_txt_y: RscText
{
idc = 77717;
onLoad = "(_this select 0) ctrlShow false";
text = "Y:"; //--- ToDo: Localize;
x = 0.712564 * safezoneW + safezoneX;
y = 0.356482 * safezoneH + safezoneY;
w = 0.028875 * safezoneW;
h = 0.0154 * safezoneH;
};
class dev_txt_3D: RscText //3d preview red
{
idc = 77718;
text = "";
x = 0.6;
y = 0.04;
w = 0.4;
h = 0.44;
colorBackground[] = {1,0,0,0.3};
onLoad = "(_this select 0) ctrlShow false";
};
class dev_txt_Vector: RscText
{
idc = 77719;
onLoad = "(_this select 0) ctrlShow false";
text = "vUP:"; //--- ToDo: Localize;
x = 0.712437 * safezoneW + safezoneX;
y = 0.268921 * safezoneH + safezoneY;
w = 0.0226875 * safezoneW;
h = 0.0154 * safezoneH;
};
// ----------- MAIN GUI PART ----------- //
//background
class rmx_cUI_back: IGUIBack
{
idc = 77800;
x = 0;
y = 0;
w = 1;
h = 1;
colorBackground[] = {0,0,0,0.1};
onLoad = "_cl = _this select 0; _cl ctrlSetFade 1; _cl ctrlCommit 0; _cl ctrlSetFade 0; _cl ctrlCommit 1;";
};
//Buttons
class rmx_cUI_btn_craft: RscPicture
{
idc = 77801;
text = "\x\addons\a3_epoch_code\Data\UI\crafting\close.paa";
x = 0.9;
y = 0.92;
w = 0.1;
h = 0.08;
onLoad = "[(_this select 0),[1,0.92,0,0.08],[0.9,0.92,0.1,0.08]] call EPOCH_crafting_animate;";
onMouseButtonUp = "call epoch_crafting_craft;";
};
class rmx_cUI_btn_clear: RscButton
{
idc = 77802;
text = "X"; //--- ToDo: Localize;
x = 0.26;
y = 0.04;
w = 0.04;
h = 0.052;
onLoad = "[(_this select 0),[0.26,0.04,0,0],[0.26,0.04,0.04,0.052]] call EPOCH_crafting_animate;";
action = "(rmx_var_crafting_ctrl_Interact select 4) ctrlSetText ''; lbClear (rmx_var_crafting_ctrl_main select 1);";
};
//Progressbar
class rmx_cUI_pb: RscProgress
{
idc = 77803;
texture = "#(argb,8,8,3)color(1,1,1,1)";
textureExt = "";
colorBar[] = {1, 1, 1, 0.1};
colorExtBar[] = {1, 1, 1, 1};
colorFrame[] = {1, 1, 1, 1};
x = 0.6;
y = 0.92;
w = 0.3;
h = 0.08;
onLoad = "[(_this select 0),[0.6,0.92,0,0.08],[0.6,0.92,0.3,0.08]] call EPOCH_crafting_animate; (_this select 0) ctrlEnable true;";
onMouseMoving = "if (rmx_var_crafting_progressClicked && rmx_var_craftQTY != 0) then {_c = _this select 0; _p = ctrlPosition _c; _c progressSetPosition (linearConversion [_p select 0, (_p select 0)+ (_p select 2), (_this select 1), 0, 1, false]);};";
onMouseHolding = "if (rmx_var_crafting_progressClicked && rmx_var_craftQTY != 0) then {_c = _this select 0; _p = ctrlPosition _c; _c progressSetPosition (linearConversion [_p select 0, (_p select 0)+ (_p select 2), (_this select 1), 0, 1, false]);};";
onMouseButtonDown = "rmx_var_crafting_progressClicked = true;";
onMouseButtonUp = "rmx_var_crafting_progressClicked = false;";
};
//progressbar QTY
class rmx_cUI_txt_QTY: RscText
{
idc = 77804;
style = 0x02; //vcenter = 0x0c
text = "";
x = 0.6;
y = 0.92;
w = 0.3;
h = 0.08;
colorBackground[] = {0,0,0,0.2};
colorText[] = {1,0.6,0.01,1};
onLoad = "[(_this select 0),[0.6,0.92,0,0.08],[0.6,0.92,0.3,0.08]] call EPOCH_crafting_animate;";
};
//Progressbar + / -
class rmx_cUI_img_plus: RscPicture
{
idc = 77805;
text = "x\addons\a3_epoch_code\Data\UI\craftqty_arr_right.paa";
x = 0.84;
y = 0.92;
w = 0.06;
h = 0.08;
onLoad = "_c = _this select 0; _c ctrlSetFade 1; _c ctrlCommit 0; _c ctrlSetFade 0; _c ctrlCommit 1;";
};
class rmx_cUI_img_minus: RscPicture
{
idc = 77806;
text = "x\addons\a3_epoch_code\Data\UI\craftqty_arr_left.paa";
x = 0.6;
y = 0.92;
w = 0.06;
h = 0.08;
onLoad = "_c = _this select 0; _c ctrlSetFade 1; _c ctrlCommit 0; _c ctrlSetFade 0; _c ctrlCommit 1;";
};
//edit
class rmx_cUI_edit_searchField: RscEdit
{
idc = 77810;
text = ""; //--- ToDo: Localize;
x = 0.0025;
y = 0.04;
w = 0.2575;
h = 0.052;
colorBackground[] = {0,0,0,0.5};
onLoad = "[(_this select 0),[0.0025,0.04,0,0.052],[0.0025,0.04,0.2575,0.052]] call EPOCH_crafting_animate;";
};
//listboxes
class rmx_cUI_LB_recipes: RscListbox
{
idc = 77811;
x = 0;
y = 0.092;
w = 0.3;
h = 0.908;
onLoad = "[(_this select 0),[0,0.092,0.3,0],[0,0.092,0.3,0.908]] call EPOCH_crafting_animate;";
onLBSelChanged = "call EPOCH_crafting_LB_click;";
};
class rmx_cUI_LB_ingredients: RscListbox
{
idc = 77812;
x = 0.3;
y = 0.04;
w = 0.3;
h = 0.96;
onLoad = "[(_this select 0),[0.3,0.04,0.3,0],[0.3,0.04,0.3,0.96]] call EPOCH_crafting_animate;";
onLBDblClick = "call EPOCH_crafting_LB_doubleClick;";
};
//Structured Text
class rmx_cUI_st_description: RscStructuredText
{
idc = 77820;
text = "..............................."; //--- ToDo: Localize;
x = 0.6;
y = 0.524;
w = 0.4;
h = 0.392;
colorBackground[] = {0,0,0,0};
};
//Text
class rmx_cUI_txt_recipes: RscText
{
idc = 77840;
text = "Recipes"; //--- ToDo: Localize;
x = 0;
y = 0;
w = 0.3;
h = 0.04;
colorBackground[] = {0,0,0,0.8};
onLoad = "[(_this select 0),[0,0,0,0.04],[0,0,0.3,0.04]] call EPOCH_crafting_animate;";
};
class rmx_cUI_txt_ingredients: RscText
{
idc = 77841;
text = "Ingredients"; //--- ToDo: Localize;
x = 0.3;
y = 0;
w = 0.2975;
h = 0.04;
colorBackground[] = {0,0,0,0.8};
onLoad = "[(_this select 0),[0.3,0,0,0.04],[0.3,0,0.2975,0.04]] call EPOCH_crafting_animate;";
};
class rmx_cUI_txt_preview: RscText
{
idc = 77842;
text = "Preview"; //--- ToDo: Localize;
x = 0.6;
y = 0;
w = 0.3975;
h = 0.04;
colorBackground[] = {1,0.6,0.01,0.8};
onLoad = "[(_this select 0),[0.6,0,0,0.04],[0.6,0,0.3975,0.04]] call EPOCH_crafting_animate;";
};
class rmx_cUI_txt_resources: RscText
{
idc = 77843;
text = "Resources"; //--- ToDo: Localize;
x = 0.3;
y = 0.96;
w = 0.2975;
h = 0.04;
colorBackground[] = {0,0,0,0.8};
onLoad = "(_this select 0) ctrlShow false";
};
class rmx_cUI_txt_description: RscText
{
idc = 77844;
text = "Description"; //--- ToDo: Localize;
x = 0.6;
y = 0.48;
w = 0.3975;
h = 0.04;
colorBackground[] = {0,0,0,0.8};
onLoad = "[(_this select 0),[0.6,0.48,0,0.04],[0.6,0.48,0.3975,0.04]] call EPOCH_crafting_animate;";
};
//frames
class rmx_cUI_frame_recipes: RscFrame
{
idc = 77830;
x = 0;
y = 0;
w = 0.3;
h = 1;
};
class rmx_cUI_frame_craft: RscFrame
{
idc = 77831;
x = 0.3;
y = 0;
w = 0.3;
h = 1;
};
class rmx_cUI_frame_preview: RscFrame
{
idc = 77832;
x = 0.6;
y = 0;
w = 0.4;
h = 0.48;
};
class rmx_cUI_frame_resources: RscFrame
{
idc = 77833;
x = 0.3;
y = 0.92;
w = 0.3;
h = 0.08;
onLoad = "(_this select 0) ctrlShow false";
};
class rmx_cUI_frame_description: RscFrame
{
idc = 77834;
x = 0.6;
y = 0.48;
w = 0.4;
h = 0.44;
};
class rmx_cUI_frame_qty: RscFrame
{
idc = 77835;
x = 0.6;
y = 0.92;
w = 0.4;
h = 0.08;
};
};
};
class Epoch_main_config_group: RscControlsGroupNoScrollbars
{
idc = -1;
x = 17 * GUI_GRID_W + GUI_GRID_X;
y = 2.5 * GUI_GRID_H + GUI_GRID_Y;
w = 40 * GUI_GRID_W;
h = 19.5 * GUI_GRID_H;
class controls{};
};
class Epoch_main_config_title: RscText
{
idc = -1;
x = 17 * GUI_GRID_W + GUI_GRID_X;
y = 0.5 * GUI_GRID_H + GUI_GRID_Y;
w = 40 * GUI_GRID_W;
h = 1 * GUI_GRID_H;
text = "Epoch Configuration";
colorBackground[] = {0.76,0.5,0.07,0.8};
colorText[] = {1,1,1,1};
shadow = 1;
};
class Epoch_main_config_combo: RscCombo
{
idc = -1;
x = 17 * GUI_GRID_W + GUI_GRID_X;
y = 1.5 * GUI_GRID_H + GUI_GRID_Y;
w = 40 * GUI_GRID_W;
h = 1 * GUI_GRID_H;
colorSelect[] = {0.1,0.1,0.1,1};
colorText[] = {1,1,1,1.0};
colorBackground[] = {0.1,0.1,0.1,1};
colorSelectBackground[] = {0.76,0.5,0.07,1};
colorScrollbar[] = {1,0,0,1};
wholeHeight = 5 * GUI_GRID_CENTER_H;
colorActive[] = {1,0,0,1};
colorTextRight[] = {1,1,1,1};
colorSelectRight[] = {0,0,0,1};
colorSelect2Right[] = {0,0,0,1};
class ComboScrollBar: ScrollBar
{
width = 0; // width of ComboScrollBar
height = 0; // height of ComboScrollBar
scrollSpeed = 0.01; // scrollSpeed of ComboScrollBar
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};
};
onLBSelChanged = "_this call EPOCH_InterruptConfigActions;";
};

View File

@ -0,0 +1,178 @@
class EpochGameUI
{
idd = -2;
duration = 999999;
onLoad = "uiNamespace setVariable ['EPOCH_EpochGameUI', _this select 0];";
class controls
{
class custom_picture: RscPicture
{
style = 48 + 0x800;
};
class icon1: custom_picture
{
idc = 21201;
text = "\x\addons\a3_epoch_code\Data\UI\thirst_ca.paa";
x = "10 * ( ((safezoneW / safezoneH) min 1.2) / 40) + (profilenamespace getvariable [""IGUI_GRID_WEAPON_X"", ((safezoneX + safezoneW) - (12.4 * ( ((safezoneW / safezoneH) min 1.2) / 40)) - 0.5 * ( ((safezoneW / safezoneH) min 1.2) / 40))])";
y = "0 * ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (profilenamespace getvariable [""IGUI_GRID_WEAPON_Y"", (safezoneY + 0.5 * ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25))])";
w = "2.5 * ( ((safezoneW / safezoneH) min 1.2) / 40)";
h = "2.5 * ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
};
class icon2: custom_picture
{
idc = 21202;
text = "\x\addons\a3_epoch_code\Data\UI\hunger_ca.paa";
x = "7.5 * ( ((safezoneW / safezoneH) min 1.2) / 40) + (profilenamespace getvariable [""IGUI_GRID_WEAPON_X"", ((safezoneX + safezoneW) - (12.4 * ( ((safezoneW / safezoneH) min 1.2) / 40)) - 0.5 * ( ((safezoneW / safezoneH) min 1.2) / 40))])";
y = "0 * ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (profilenamespace getvariable [""IGUI_GRID_WEAPON_Y"", (safezoneY + 0.5 * ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25))])";
w = "2.5 * ( ((safezoneW / safezoneH) min 1.2) / 40)";
h = "2.5 * ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
};
class icon3: custom_picture
{
idc = 21203;
text = "\x\addons\a3_epoch_code\Data\UI\broken_ca.paa";
x = "5 * ( ((safezoneW / safezoneH) min 1.2) / 40) + (profilenamespace getvariable [""IGUI_GRID_WEAPON_X"", ((safezoneX + safezoneW) - (12.4 * ( ((safezoneW / safezoneH) min 1.2) / 40)) - 0.5 * ( ((safezoneW / safezoneH) min 1.2) / 40))])";
y = "0 * ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (profilenamespace getvariable [""IGUI_GRID_WEAPON_Y"", (safezoneY + 0.5 * ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25))])";
w = "2.5 * ( ((safezoneW / safezoneH) min 1.2) / 40)";
h = "2.5 * ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
};
class icon4: custom_picture
{
idc = 21204;
text = "\x\addons\a3_epoch_code\Data\UI\oxygen_ca.paa";
x = "2.5 * ( ((safezoneW / safezoneH) min 1.2) / 40) + (profilenamespace getvariable [""IGUI_GRID_WEAPON_X"", ((safezoneX + safezoneW) - (12.4 * ( ((safezoneW / safezoneH) min 1.2) / 40)) - 0.5 * ( ((safezoneW / safezoneH) min 1.2) / 40))])";
y = "0 * ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (profilenamespace getvariable [""IGUI_GRID_WEAPON_Y"", (safezoneY + 0.5 * ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25))])";
w = "2.5 * ( ((safezoneW / safezoneH) min 1.2) / 40)";
h = "2.5 * ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
};
class icon5: custom_picture
{
idc = 21205;
text = "\x\addons\a3_epoch_code\Data\UI\hazzard_ca.paa";
x = "0 * ( ((safezoneW / safezoneH) min 1.2) / 40) + (profilenamespace getvariable [""IGUI_GRID_WEAPON_X"", ((safezoneX + safezoneW) - (12.4 * ( ((safezoneW / safezoneH) min 1.2) / 40)) - 0.5 * ( ((safezoneW / safezoneH) min 1.2) / 40))])";
y = "0 * ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (profilenamespace getvariable [""IGUI_GRID_WEAPON_Y"", (safezoneY + 0.5 * ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25))])";
w = "2.5 * ( ((safezoneW / safezoneH) min 1.2) / 40)";
h = "2.5 * ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
};
class icon6: custom_picture
{
idc = 21206;
text = "\x\addons\a3_epoch_code\Data\UI\bleeding_ca.paa";
x = "-2.5 * ( ((safezoneW / safezoneH) min 1.2) / 40) + (profilenamespace getvariable [""IGUI_GRID_WEAPON_X"", ((safezoneX + safezoneW) - (12.4 * ( ((safezoneW / safezoneH) min 1.2) / 40)) - 0.5 * ( ((safezoneW / safezoneH) min 1.2) / 40))])";
y = "0 * ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (profilenamespace getvariable [""IGUI_GRID_WEAPON_Y"", (safezoneY + 0.5 * ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25))])";
w = "2.5 * ( ((safezoneW / safezoneH) min 1.2) / 40)";
h = "2.5 * ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
};
};
};
class EpochGameUI2
{
idd = -3;
duration = 10;
onLoad = "uiNamespace setVariable ['EPOCH_EpochGameUI2', _this select 0];";
class controls
{
class custom_picture : RscPicture
{
style = 48 + 0x800;
};
class icon1 : custom_picture
{
idc = 21207;
text = "\x\addons\a3_epoch_code\Data\UI\cc_ca.paa";
x = "0 * ( ((safezoneW / safezoneH) min 1.2) / 40) + (profilenamespace getvariable [""IGUI_GRID_VEHICLE_X"", (safezoneX + 0.5 * ( ((safezoneW / safezoneH) min 1.2) / 40))])";
y = "-2.1 * ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 20) + (safezoneY + safezoneH - ( ((safezoneW / safezoneH) min 1.2) / 1.2)) + 18 * ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 20) - (1 * ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 20))";
w = "2.5 * ( ((safezoneW / safezoneH) min 1.2) / 40)";
h = "2.5 * ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
};
class RscCryptoText : RscText
{
idc = 21208;
text = "";
colorText[] = { 1, 1, 1, 0.5 };
shadow = 0;
sizeEx = 0.08;
x = "2.1 * ( ((safezoneW / safezoneH) min 1.2) / 40) + (profilenamespace getvariable [""IGUI_GRID_VEHICLE_X"", (safezoneX + 0.5 * ( ((safezoneW / safezoneH) min 1.2) / 40))])";
y = "-2.2 * ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 20) + (safezoneY + safezoneH - ( ((safezoneW / safezoneH) min 1.2) / 1.2)) + 18 * ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 20) - (1 * ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 20))";
w = "15 * ( ((safezoneW / safezoneH) min 1.2) / 40)";
h = "2.5 * ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
};
};
};
class EpochGameUI3
{
idd = -4;
duration = 10;
onLoad = "uiNamespace setVariable ['EPOCH_EpochGameUI3', _this select 0];";
class controls
{
class custom_picture : RscPicture
{
style = 48 + 0x800;
};
class icon1 : custom_picture
{
idc = 21209;
text = "\x\addons\a3_epoch_code\Data\UI\battery_ca.paa";
x = "0 * ( ((safezoneW / safezoneH) min 1.2) / 40) + (profilenamespace getvariable [""IGUI_GRID_VEHICLE_X"", (safezoneX + 0.5 * ( ((safezoneW / safezoneH) min 1.2) / 40))])";
y = "0 * ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 20) + (safezoneY + safezoneH - ( ((safezoneW / safezoneH) min 1.2) / 1.2)) + 18 * ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 20) - (1 * ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 20))";
w = "2.5 * ( ((safezoneW / safezoneH) min 1.2) / 40)";
h = "2.5 * ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
};
class RscEnergyText : RscText
{
idc = 21210;
text = "";
colorText[] = { 1, 1, 1, 0.5 };
shadow = 0;
sizeEx = 0.08;
x = "2.1 * ( ((safezoneW / safezoneH) min 1.2) / 40) + (profilenamespace getvariable [""IGUI_GRID_VEHICLE_X"", (safezoneX + 0.5 * ( ((safezoneW / safezoneH) min 1.2) / 40))])";
y = "-0.1 * ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 20) + (safezoneY + safezoneH - ( ((safezoneW / safezoneH) min 1.2) / 1.2)) + 18 * ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 20) - (1 * ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 20))";
w = "15 * ( ((safezoneW / safezoneH) min 1.2) / 40)";
h = "2.5 * ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
};
};
};
class rmx_progressTest
{
idd = 10200;
duration = 999999;
fadein = 0.5;
fadeout = 0.5;
onLoad = "uiNamespace setVariable ['rmx_var_progressTestDisplay',_this select 0]";
class controls {};
};
class rmx_CraftingProgress
{
idd = 10100;
duration = 999999;
fadein = 0.2;
fadeout = 0.2;
onLoad = "uiNamespace setVariable ['rmx_var_CraftingProgressDisplay',_this select 0]";
class controls {};
};
class Default //use to delete title resources
{
idd = -1;
fadein = 0;
fadeout = 0;
duration = 0;
};

View File

@ -0,0 +1,20 @@
<html>
<head>
<meta http-equiv="Content-Type"
content="text/html; charset=windows-1250">
<meta name="GENERATOR" content="ofp">
<title>PageTitle</title>
</head>
<body>
<br>
<p align="center"><img src="\x\addons\a3_epoch_code\Data\EpochLogo.paa"" width="256" height="64"></p>
<br>
<p>Seems like Arma has very limited HTML features, no colors except for link, active link and bold text. Headings can have different fonts, see Epoch_GUI_ClientConfigs.hpp file for more info on this. </p>
<br>
<p>Depending on size of HTML, you might need to increase height of control to enable scrolling. You can do that in inside Epoch_main_config_html in before mentioned file. Height is calculated in percentages (42% = 0.42 * safezoneH) </p>
<br>
<p>TIP: Use filepatching to edit it live, file is reloaded when ESC is pressed</p>
</body>
</html>

View File

@ -0,0 +1,60 @@
<html>
<head>
<meta http-equiv="Content-Type"
content="text/html; charset=windows-1250">
<meta name="GENERATOR" content="ofp">
<title>PageTitle</title>
</head>
<body>
<br>
<p align="center"><img src="\x\addons\a3_epoch_code\Data\EpochLogo.paa" width="256" height="64"></p>
<h1>Epoch Mod 0.3.4</h1>
<p>Client:
[Added] Workbench storage device also added as a nearby crafting requirement for most Kit based crafting options.<br>
[Added] New secure storage device: The Epoch Safe.<br>
[Added] Totally new crafting system and UI by Raymix.<br>
[Added] Epoch variant of the unarmed Strider vehicle. (I_MRAP_03_EPOCH)<br>
[Added] Melee weapons: a Broad Sword and Fishing Pole.<br>
[Added] Halloween Clown mask and re-added to loot tables: Wolf/Pumpkin masks as well as Meeps Candy.<br>
[Fixed] Group members unable to lock a Lockbox or Safe that was placed by the group leader.<br>
[Fixed] Shadow artifact at top of Jammer.<br>
[Fixed] Reduce client fps lag when first joining the server by preloading objects before exiting loading screen.<br>
[Fixed] Being unable to remove a solar generator.<br>
[Changed] Removed debug hint text for 3d rotation of objects as it was not needed.<br>
[Changed] Re-enable Move button, this system will stay and be refined in the next few patches.<br>
**Improved Dog AI Dog Brain by Axeman**<br>
[FIXED] Dog not taming due to var reset in wrong place / BIS animal update.<br>
[UPDATED] Dog text format updated.<br>
[UPDATED] Dog whine, instead of bark, when alerting of other nearby players (When player crouched).<br>
[UPDATED] Dog prey kills now use animal looting system. i.e. Dog will loot dead animals, and other objects, then will fetch loot.<br>
[UPDATED] Attached weapon (loot) holder is now dropped if dog finds a new one. Needs update.<br>
[ADDED] New Quiet dog bark and whine.<br>
[UPDATED] Make dog sounds global and use quieter sounds to alert player once dog is tamed. Untamed dog or when attacking is still loud.<br>
[UPDATED] Add occasional quiet dog whine when other players in the area.<br>
[UPDATED] General Dog timeout tweaks to compensate for Arma Animals 'doing their own thing'<br>
</p>
<p>Server:
[Added] Example "Epoch Event" Code to provide an example on how to broadcast a message to all players using BE.<br>
[Added] 'CfgTraderLimits' config can control stock limit per trader per item. Default is 100 per item class per trader.<br>
[Added] storedVehicleLimit variable in CfgEpochServer can now control the total max allowed vehicles on traders. Default limit is 20.<br>
[Fixed] Issue with trading vehicles that caused the trader data not to save or to save to the wrong slot.<br>
[Fixed] Added missing prices for female vests.<br>
[Fixed] Error Generic error in expression in EPOCH_server_repairVehicle.<br>
[Changed] Base building maintain option now also maintains storage devices.<br>
[Changed] Moved vehicle spawn config that controls how many vehicles can spawn at different location types to settings pbo. See new vehicleSpawnTypes array in the (WorldName).hpp config.<br>
[Changed] Use new sort command instead of BIS_fncSortBy.<br>
[Changed] Use new worldSize command as default if maps worldSize setting in CfgEpoch does not exist.<br>
[Info] Removed old .bikey and added new one for 0340.<br>
[Info] The source code for the a3_epoch_server.pbo is now on the GitHub.<br>
</p>
</body>
</html>

View File

@ -0,0 +1,58 @@
#include "\A3\ui_f\hpp\defineCommonGrids.inc"
disableSerialization;
_display = param [0,displayNull];
//if (isNull _display) exitWith {false};
private ["_offset","_cfg","_configs","_idc","_getIDC","_mainCTRLS"];
_offset = if (isServer) then {40 * GUI_GRID_W + GUI_GRID_X;} else {
if (getNumber (missionConfigFile >> "enableDebugConsole") > 0) then {
40 * GUI_GRID_W + GUI_GRID_X;
} else {
17 * GUI_GRID_W + GUI_GRID_X;
};
};
_cfg = 'CfgEpochConfiguration' call EPOCH_returnConfig;
_configs = "true" configClasses _cfg;
_idc = -70000;
_getIDC = {_idc = _idc - 1; _idc};
Epoch_interrupt_controls = [];
if (isNil "Epoch_interrupt_index") then {Epoch_interrupt_index = 0};
{
_ctrl = _display ctrlCreate [_x,call _getIDC];
_ctrlPos = ctrlPosition _ctrl;
_ctrlPos set [0,_offset];
_ctrl ctrlSetPosition _ctrlPos;
_ctrl ctrlCommit 0;
Epoch_interrupt_controls set [_forEachIndex, _ctrl];
} forEach ["Epoch_main_config_combo","Epoch_main_config_group","Epoch_main_config_title"];
_lb = Epoch_interrupt_controls select 0;
_groupIDC = call _getIDC;
{
_name = getText (_x >> "name");
_color = getArray (_x >> "color");
_icon = getText (_x >> "icon");
_group = getText (_x >> "controlGroup"); //convert to actual hidden control
_idx = _lb lbAdd _name;
_lb lbSetColor [_idx, _color];
_lb lbSetPicture [_idx, _icon];
_lb lbSetData [_idx, _group];
_lb lbSetValue [_idx, _groupIDC];
} forEach _configs;
//display does not exist yet for whatever reason
[_lb] spawn {
waitUntil {!isNull findDisplay 49};
(_this select 0) lbSetCurSel Epoch_interrupt_index;
};
true

View File

@ -0,0 +1,34 @@
disableSerialization;
private ["_mainGrp","_display","_data","_value","_ctrl","_idx","_mainGrpPos","_group","_width","_pos"];
params ["_ctrl","_idx"];
_mainGrp = Epoch_interrupt_controls select 1;
_display = ctrlParent _mainGrp;
_data = _ctrl lbData _idx;
_value = _ctrl lbValue _idx;
Epoch_interrupt_index = _idx;
_mainGrpPos = ctrlPosition _mainGrp;
//_mainGrpPos set [0,Epoch_interrupt_offset]; //convert to global if having problems with x pos
ctrlDelete _mainGrp;
_mainGrp = _display ctrlCreate ["Epoch_main_config_group",_value];
_mainGrp ctrlSetPosition _mainGrpPos;
_mainGrp ctrlCommit 0;
_group = _display ctrlCreate [_data, _value + 1, _mainGrp];
_width = (ctrlPosition _group) select 2;
Epoch_interrupt_controls set [1, _mainGrp];
{
_pos = ctrlPosition _x;
_pos set [2,_width];
_x ctrlSetPosition _pos;
_x ctrlCommit 0;
} forEach Epoch_interrupt_controls;
ctrlSetFocus _mainGrp;
true

View File

@ -0,0 +1,25 @@
/*
Spins 3D dialog along X and Z axis following mouse input
Requires source control to read coords from and destination 3D control
Can be applied to 3D control itself, but not recommended, pref use transparent rscPicture (enable it).
_ctrl ctrlSetEventHandler ["MouseMoving", "[_this,control3D] call Epoch_3DctrlPitchYaw"];
*/
params ["_arr","_ctrl3D"];
disableSerialization;
_inX = (_arr select 2) * 720;
_inY = (_arr select 1) * 720;
_dirY = cos _inX;
_upY = -sin _inX;
_dirX = -(_dirY * sin _inY);
_dirY = _dirY * cos _inY;
_upX = -(_upY * sin _inY);
_upY = _upY * cos _inY;
_ctrl3D ctrlSetModelDirAndUp [[_dirX,_dirY,sin _inX],[_upX,_upY,cos _inX]];
true

View File

@ -0,0 +1,25 @@
/*
Spins a 3D dialog
[control] call epoch_3DctrlSpin;
*/
_this spawn {
disableSerialization;
params ["_ctrl3D"];
rmx_var_3dCtrlSpin = true;
_ctrlPos = ctrlPosition _ctrl3D;
if (isNil "rmx_var_3dCtrlSpin_Vector") then {rmx_var_3dCtrlSpin_Vector = 0;};
while {rmx_var_3dCtrlSpin} do {
for "_i" from 0 to 360 do {
_vector = (360 - _i) - 360;
_ctrl3D ctrlSetModelDirAndUp [[-(sin _vector),cos _vector,0],[cos _vector * rmx_var_3dCtrlSpin_Vector,sin _vector * rmx_var_3dCtrlSpin_Vector,1]];
if !(rmx_var_3dCtrlSpin) exitWith{};
uiSleep 0.01;
};
};
};
true

View File

@ -0,0 +1,17 @@
/*
Spins 3D dialog along Z axis following mouse input
Requires source control to read coords from and destination 3D control
Can be applied to 3D control itself, but not recommended, pref use transparent rscPicture (enable it).
_ctrl ctrlSetEventHandler ["MouseMoving", "[_this,control3D] call Epoch_3DctrlPitchYaw"];
*/
params ["_arr","_ctrl3D"];
disableSerialization;
_inX = (_arr select 2) * 180;
_inY = (_arr select 1) * 180;
_ctrl3D ctrlSetModelDirAndUp [[-(cos _inX * sin _inY),cos _inX * cos _inY,0],[0,0,1]];
true

View File

@ -0,0 +1,137 @@
#include <\x\Addons\rmx_init\defines.inc>
//TODO: read key press from global var (profileNamespace config)
//TODO: admin choice to use missionConfigFile
//TODO: (Ask team) suffix code to close dialog when button pressed
//TODO: unlimited categories
//TODO: functionize var Defines, do check before button action
//TODO: nil before closing display
//TODO: add commented out dialog version to display
//TODO: add cooldown
//TODO: prevent from opening and instantly close if known display is on
if !(isNil "rmx_var_dynamicMenuInProgress") exitWith {};
if !(isNil "rmx_var_dynamicMenuHOLD") exitWith {};
private ["_display","_cfg","_cat","_buttonSettings","_configs","_subclasses","_action","_entries","_img","_img2","_center","_defaultScaleX","_defaultScaleY","_distance","_scaleLargeX","_scaleLargeY","_scaleSmallX","_scaleSmallY","_scaleSelectedX","_scaleSelectedY","_points","_positions","_positions2","_positions3","_x","_y"];
disableSerialization;
rmx_var_dynamicMenuInProgress = true; //needed to suspend button spam, removed later
_display = (findDisplay 46) createDisplay "rmx_dynamenu";
_display displaySetEventHandler ["keyUp", "[false,_this select 1] call Epoch_dynamicMenuCleanup;"];
//TODO: config choice based on global variable or dynamic config update (slower)
_cfg = param [0,"cfgDynamicMenu" call EPOCH_returnConfig,[configFile]];
/** Variable Defines **/
{
call compile (format ["%1 = %2;",configName _x,getText _x]);
} count (configProperties [(_cfg >> "variableDefines"),"true",false]);
_cat = if (isClass _cfg >> "dynaButtons") then {
(_cfg >> "dynaButtons")
} else {
_cfg
};
/** Button configs **/
_buttonSettings = [];
_configs = "true" configClasses (_cat);
{
if (call compile (getText(_x >> "condition"))) then {
_subclasses = configProperties [_x, "isClass _x",true];
_action = if (_subclasses isEqualTo []) then {
compile (format ["%1",getText(_x >> "action")])
} else {
compile (format ["[true,57] call Epoch_dynamicMenuCleanup; %2",getText(_x >> "action")])
};
//diag_log _action;
_buttonSettings pushBack [
getText(_x >> "icon"),
getText(_x >> "tooltip"),
_action
];
};
} forEach _configs;
_entries = count _buttonSettings;
if (_entries <= 0) exitWith {rmx_var_tabmenu = true; rmx_var_dynamicMenuInProgress = nil;};
//Post processing
if (isNil "rmx_var_dynamenuPPHandle") then {
rmx_var_dynamenuPPHandle = ["dynamicBlur",10] call epoch_postProcessCreate;
[rmx_var_dynamenuPPHandle, 1, [1]] call epoch_postprocessAdjust;
};
_img = "#(rgb,8,8,3)color(0,0,0,0)";
_img2 = "x\addons\a3_epoch_code\Data\UI\buttons\dm_selection.paa";
//defaults don't edit
_center = 0.5;
_defaultScaleX = 0.4;
_defaultScaleY = 0.5;
_distance = 0.7 + _entries / 100;
//edit scaling here (divisor only, larger values produce smaller image)
_scaleLargeX = _defaultScaleX / (1.5 + _entries / 10); //anim invisible
_scaleLargeY = _defaultScaleY / (1.5 + _entries / 10);
_scaleSmallX = _defaultScaleX / (2.5 + _entries / 10); //icons
_scaleSmallY = _defaultScaleY / (2.5 + _entries / 10);
_scaleSelectedX = _defaultScaleX / (1.75 + _entries / 10); //anim selected
_scaleSelectedY = _defaultScaleY / (1.75 + _entries / 10);
_points = 360 / _entries;
_positions = [];
_positions2 = [];
_positions3 = [];
for "_p" from 0 to 360 step _points do {
_x = cos _p * (0.3 * _distance);
_y = sin _p * (0.4 * _distance);
_positions pushBack [_x + (_center - (_scaleLargeX / 2)),_y + (_center - (_scaleLargeY / 2)),_scaleLargeX,_scaleLargeY];
_positions2 pushBack [_x + (_center - (_scaleSmallX / 2)),_y + (_center - (_scaleSmallY / 2)),_scaleSmallX,_scaleSmallY];
_positions3 pushBack [_x + (_center - (_scaleSelectedX / 2)),_y + (_center - (_scaleSelectedY / 2)),_scaleSelectedX,_scaleSelectedY];
};
rmx_var_controls = [];
//_buttonSettings [icon,tooltip,action]
for "_e" from 0 to (_entries - 1) do {
private ["_ctrl","_ctrl2"];
_ctrl = _display ctrlCreate ["rmx_rscPicture",(66600 + _e)];
_ctrl ctrlSetText _img;
_ctrl ctrlSetPosition (_positions select _e);
_ctrl ctrlCommit 0.1;
_ctrl ctrlSetTooltip (_buttonSettings select _e select 1);
_ctrl ctrlSetTooltipColorBox [0, 0, 0, 0];
_ctrl ctrlSetTooltipColorShade [0, 0, 0, 0];
_ctrl ctrlSetEventHandler ["mouseEnter", (format ["_c = _this select 0; _c ctrlSetText '%1'; _c ctrlSetPosition %2; _c ctrlCommit 0.3;",_img2,(_positions3 select _e)])];
_ctrl ctrlSetEventHandler ["mouseExit", (format ["_c = _this select 0; _c ctrlSetText '%1'; _c ctrlSetPosition %2; _c ctrlCommit 0.3;",_img,(_positions select _e)])];
_ctrl ctrlSetEventHandler ["mouseButtonDown", (format ["call %1;",(_buttonSettings select _e select 2)])];
_ctrl ctrlEnable true;
_ctrl2 = _display ctrlCreate ["rmx_rscPicture",-(66600 + _e)];
_ctrl2 ctrlSetTooltip (_buttonSettings select _e select 1);
_ctrl2 ctrlSetTooltipColorBox [0, 0, 0, 0];
_ctrl2 ctrlSetTooltipColorShade [0, 0, 0, 0];
_ctrl2 ctrlSetText (_buttonSettings select _e select 0);
_ctrl2 ctrlSetPosition (_positions2 select _e);
_ctrl2 ctrlCommit 0.1;
rmx_var_controls pushBack _ctrl;
rmx_var_controls pushBack _ctrl2;
};
/** Variable Cleanup **/
{
call compile (format ["%1 = nil;",configName _x]);
} count (configProperties [(_cfg >> "variableDefines"),"true",false]);
rmx_var_dynamicMenuInProgress = nil;
true

View File

@ -0,0 +1,31 @@
_test = param [1,0];
if (_test != 57) exitWith {true}; //dirty fix, TODO: read values from epoch startup vars for key
_this spawn {
if !(isNil "rmx_var_dynamicMenuInProgress") exitWith {};
_args = param [0,false,[false]]; //true if redirected with category, false for full cleanup
if (_args) then {rmx_var_dynamicMenuHOLD = true;} else {rmx_var_dynamicMenuHOLD = nil; rmx_var_dynamicMenuCat = nil;};
disableSerialization;
private "_animSpeed";
_animSpeed = 0.1;
{
_x ctrlSetPosition [0.4625,0.45,0.075,0.1];
_x ctrlSetFade 1;
_x ctrlCommit _animSpeed;
} forEach rmx_var_controls;
[rmx_var_dynamenuPPHandle, _animSpeed, [0]] call epoch_postprocessAdjust;
uiSleep _animSpeed;
findDisplay 66600 closeDisplay 1;
rmx_var_controls = nil;
rmx_var_dynamenuPPHandle call epoch_postprocessDestroy;
rmx_var_dynamenuPPHandle = nil;
};
true

View File

@ -0,0 +1,19 @@
/*
Used to register and unregister IDC used in dynamic menus.
Pass the control to unregister or just call fnc to get a unique IDC
*/
private ["_in","_list","_out","_find"];
_in = param [0,controlNull,[controlNull]];
_list = uiNamespace getVariable ["rmx_var_uniqueIDC",[]];
if (ctrlIDC _in isEqualTo -1) then {
_out = -90000 - (count _list);
_list pushBack _out;
} else {
_find = _list find (ctrlIDC _in);
_list deleteAt _find;
_out = true;
};
uiNamespace setVariable ["rmx_var_uniqueIDC",_list];
_out

View File

@ -0,0 +1,104 @@
/*
Attach a cooldown to a 3D world space that will be visible on a UI
[_pos, _time, _distance, "myVariable"] call Epoch_gui3DCooldown;
Position is a world position
Time is time it takes for cooldown to do full animation
Distance (optional) is used to exit cooldown if distance from player is greater than this value, default 10m
Variable name is optional, but it allows you to remove cooldown externally:
should be a global boolean
must exist
must be true
*/
_this spawn {
private ["_error","_pos","_time","_distance","_bool","_display","_ctrlPos","_ctrlGrp","_ctrl","_partTime","_ct","_cl"];
disableSerialization;
params
[
["_pos", false, [[]], 3],
["_time", false, [0]],
["_distance", 10, [0]],
["_bool", "", [""]]
];
_error = "Wrong params, requires [position, time, distance (optional), variable name (bool, optional)]";
if (typeName _pos isEqualTo "BOOL") exitWith {hint _error};
if (typeName _time isEqualTo "BOOL") exitWith {hint _error};
_display = findDisplay 46;
_ctrlPos = [0.469062 * safezoneW + safezoneX, 0.445 * safezoneH + safezoneY, 0.061875 * safezoneW, 0.11 * safezoneH];
_ctrlGrp = _display ctrlCreate ["RscControlsGroupNoScrollbars",call epoch_getIDC];
_ctrlGrp ctrlSetPosition _ctrlPos;
_ctrlGrp ctrlCommit 0;
_id = call compile format
[
"
missionNamespace setVariable ['rmx_var_3DCD_temp%1',[_ctrlGrp, _distance, _pos]];
_id = addMissionEventHandler ['Draw3D',{
_arr = missionNamespace getVariable 'rmx_var_3DCD_temp%1';
_scale = linearConversion [0, (_arr select 1), player distance (_arr select 2), 0, 1, false];
(_arr select 0) ctrlSetPosition (worldToScreen (_arr select 2));
(_arr select 0) ctrlSetFade _scale;
(_arr select 0) ctrlCommit 0;
}];
[_id,'rmx_var_3DCD_temp%1']
"
,floor random 10000
];
_ctrl = [];
for "_i" from 0 to 9 do {
_ct = _display ctrlCreate ["RscPicture",call epoch_getIDC,_ctrlGrp];
_ct ctrlSetText format ["x\addons\a3_epoch_code\Data\UI\cooldown\%1.paa",_i];
_ct ctrlSetPosition [0.0375,0.05,(_ctrlPos select 2) / 2,(_ctrlPos select 3) / 2];
_ct ctrlSetFade 1;
_ct ctrlCommit 0;
_ctrl set [_i,_ct];
};
_ctrl2 = _display ctrlCreate ["RscText",call epoch_getIDC,_ctrlGrp];
_ctrl2 ctrlSetPosition [0.0375,0,_ctrlPos select 2,_ctrlPos select 3];
_ctrl2 ctrlCommit 0;
_partTime = _time / 10;
_continue = true;
_tock = diag_tickTime;
for "_i" from 0 to 9 do {
_cl = _ctrl select _i;
_cl ctrlSetFade 0;
_cl ctrlSetPosition [0,0,_ctrlPos select 2,_ctrlPos select 3];
_cl ctrlCommit _partTime;
_ctrl2 ctrlSetTextColor [1-(_i / 10),_i / 10,0,1];
_tick = diag_tickTime;
while {(diag_tickTime - _tick) < _partTime} do {
if !(missionNamespace getVariable [_bool, true]) exitWith {_continue = false};
if ((player distance _pos) > _distance) exitWith {_continue = false};
_ctrl2 ctrlSetText ([1 + _time - (diag_tickTime - _tock),"MM:SS"] call BIS_fnc_secondsToString);
};
if !(_continue) exitWith {};
};
removeMissionEventHandler ["Draw3D", _id select 0];
missionNamespace setVariable [_id select 1, nil];
{
_x call epoch_getIDC;
ctrlDelete _x;
} forEach _ctrl;
_ctrl2 call epoch_getIDC;
_ctrlGrp call epoch_getIDC;
ctrlDelete _ctrl2;
ctrlDelete _ctrlGrp;
};
true

View File

@ -0,0 +1,62 @@
/*
Attaches picture and text to model's local space and projects on UI.
[_object, _time, _image, _text, _objectSpace, _distance, _externalBool] call epoch_gui3dModelPos;
*/
#include "\A3\ui_f\hpp\defineCommonGrids.inc"
_this spawn {
private ["_obj","_loc","_time","_pic","_txt","_dst","_bool","_display","_ctrl","_imgParsed","_txtParsed","_id","_tick"];
disableSerialization;
params
[
["_obj", objNull, [objNull]],
["_time", 10, [0]],
["_pic", "#(argb,8,8,3)color(0,0,0,0)", [""]],
["_txt", "", [""]],
["_loc", [0,0,0], [[]]],
["_dst", 10, [0]],
["_bool", "", [""]]
];
if (_obj isEqualTo objNull) exitWith {hint "Wrong params, missing object"};
_display = findDisplay 46;
_ctrl = _display ctrlCreate ["RscStructuredText",call epoch_getIDC];
_ctrl ctrlSetPosition [10 * GUI_GRID_W + GUI_GRID_X,10 * GUI_GRID_H + GUI_GRID_Y,10 * GUI_GRID_W,10 * GUI_GRID_H];
_ctrl ctrlCommit 0;
_imgParsed = parseText format ["<t size='4' align = 'center'><img image='%1' /></t>",_pic];
_txtParsed = parseText format ["<t size='1.5' align = 'center' color='#FFFFFF'>%1</t>",_txt];
_ctrl ctrlSetStructuredText (composeText [_imgParsed, parseText "<br>", _txtParsed]);
_id = call compile format
[
"
missionNamespace setVariable ['rmx_var_3DMP_temp%1',[_ctrl, _dst, _obj, _loc]];
_id = addMissionEventHandler ['Draw3D',{
_arr = missionNamespace getVariable 'rmx_var_3DMP_temp%1';
_pos = worldToScreen ((_arr select 2) modelToWorld (_arr select 3));
(_arr select 0) ctrlSetPosition _pos;
(_arr select 0) ctrlCommit 0;
_scale = linearConversion [0, (_arr select 1), player distance ((_arr select 2) modelToWorld (_arr select 3)), 1, 0, false];
[(_arr select 0), _scale, 0] call BIS_fnc_ctrlSetScale;
}];
[_id,'rmx_var_3DMP_temp%1']
"
,floor random 10000
];
_tick = diag_tickTime;
while {(diag_tickTime - _tick) < _time} do {
if !(missionNamespace getVariable [_bool, true]) exitWith {};
if ((player distance (_obj modelToWorld _loc)) > _dst) exitWith {};
};
removeMissionEventHandler ["Draw3D", _id select 0];
missionNamespace setVariable [_id select 1, nil];
_ctrl call epoch_getIDC;
ctrlDelete _ctrl;
};
true

Some files were not shown because too many files have changed in this diff Show More