RAMBO Posted December 14, 2013 Report Share Posted December 14, 2013 Just curious if it is possible to adjust the loot that is dropped off of ore veins. Any info would be appreciated ;) Link to comment Share on other sites More sharing options...
0 Axe Cop Posted December 14, 2013 Report Share Posted December 14, 2013 yes, is that a good answer? :P you can make it rain cows from the sky.. if you wanted to lol Link to comment Share on other sites More sharing options...
0 RAMBO Posted December 14, 2013 Author Report Share Posted December 14, 2013 Lol Axe, I suppose I should request advice as to where I should begin a search for adjusting said loot. Link to comment Share on other sites More sharing options...
0 Axe Cop Posted December 14, 2013 Report Share Posted December 14, 2013 I was just looking into the code, seems like the loot is hardcoded in the config file Doors.hpp (yeah veins are door lol...) class Land_iron_vein_wreck: ruins { scope = 1; model = "\z\addons\dayz_epoch\models\iron_vein_wreck.p3d"; displayName = "iron vein ruins"; removeoutput[] = {{"PartOre",{10,10}},{"PartOreSilver",{0,10}},{"PartOreGold",{0,5}}}; }; you can't change that file without a custom epoch client as far as i know, but you could change the script where it uses that value i think. looks like veins are "wrecks" so if you remove them it should be in the file "dayz_code\actions\remove.sqf" i have never actually found a vein in the game so i don't knwo how it works lol, maybe you can figure that out but in the remove.sqf _isWreckBuilding = _objType in DZE_isWreckBuilding; is true for veins i think, you can so a check for "isVein" and then customize the the output and ignore the loot from the original loot table. I hope you have some basic scripting knowledge than this should be pretty easy :) Redbeard Actual 1 Link to comment Share on other sites More sharing options...
0 RAMBO Posted December 14, 2013 Author Report Share Posted December 14, 2013 That's what I needed, thanks Axe ;) Link to comment Share on other sites More sharing options...
0 Redbeard Actual Posted June 10, 2015 Report Share Posted June 10, 2015 I was just looking into the code, seems like the loot is hardcoded in the config file Doors.hpp (yeah veins are door lol...) class Land_iron_vein_wreck: ruins { scope = 1; model = "\z\addons\dayz_epoch\models\iron_vein_wreck.p3d"; displayName = "iron vein ruins"; removeoutput[] = {{"PartOre",{10,10}},{"PartOreSilver",{0,10}},{"PartOreGold",{0,5}}}; }; you can't change that file without a custom epoch client as far as i know, but you could change the script where it uses that value i think. looks like veins are "wrecks" so if you remove them it should be in the file "dayz_code\actions\remove.sqf" i have never actually found a vein in the game so i don't knwo how it works lol, maybe you can figure that out but in the remove.sqf _isWreckBuilding = _objType in DZE_isWreckBuilding; is true for veins i think, you can so a check for "isVein" and then customize the the output and ignore the loot from the original loot table. I hope you have some basic scripting knowledge than this should be pretty easy :) Thanks for this hint, Axe. I have a better idea how this works now. So far, I changed my variables.sqf to separate the ore veins out of the DZE_isWreckBuilding array, into a DZE_isWrechVein array. I then changed the Remove.sqf like so: _selectedRemoveOutput = []; if(_isWreck) then { // Find one random part to give back _refundpart = ["PartEngine","PartGeneric","PartFueltank","PartWheel","PartGlass","ItemJerrycan"] call BIS_fnc_selectRandom; _selectedRemoveOutput set [count _selectedRemoveOutput,[_refundpart,1]]; } else { if(_isWreckVein) then { _selectedRemoveOutput = getArray (configFile >> "CfgVehicles" >> _objType >> "removeoutput"); } else { if(_isWreckBuilding) then { _selectedRemoveOutput = getArray (configFile >> "CfgVehicles" >> _objType >> "removeoutput"); } else { _selectedRemoveOutput = getArray (configFile >> "CfgVehicles" >> _objType >> "removeoutput"); _preventRefund = (_objectID == "0" && _objectUID == "0"); }; }; }; My question, is how do I properly populate the _selectedRemoveOutput = []; array With This information: removeoutput[] = {{"PartOre",{10,10}},{"PartOreSilver",{0,10}},{"PartOreGold",{0,5}}}; Link to comment Share on other sites More sharing options...
0 Redbeard Actual Posted June 10, 2015 Report Share Posted June 10, 2015 Don't listen to me. I failed. Link to comment Share on other sites More sharing options...
0 Redbeard Actual Posted June 11, 2015 Report Share Posted June 11, 2015 Okay, after a night of figuring this out, it can be done. It is actually easier to do, than it was to figure out. Go Figure!Changes must be made in several files. Remove.sqf, fn_selfActions.sqf, variables.sqf and description.ext. You must also add a file I duly named mining.hpp.Step 1: Create a new text file in your editor. Then copy and paste the following code into the new file. class Mining { class Land_iron_vein_wreck { removeoutput[] = {{"PartOre",{10,25}},{"PartOreSilver",{0,1}},{"PartOreGold",{0,5}}}; }; class Land_silver_vein_wreck { removeoutput[] = {{"PartOreSilver",{10,25}},{"PartOre",{0,1}},{"PartOreGold",{6,4}}}; }; class Land_gold_vein_wreck { removeoutput[] = {{"PartOreGold",{10,25}},{"PartOre",{0,1}},{"PartOreSilver",{6,4}}}; }; }; Now save this file as mining.hpp and move it into your mission folder. I have mine inside a custom folder.Step 2: Open your description.ext and add this line of code at the very bottom.#include "custom\mining.hpp" //Make sure to edit to the proper path to file. Save and close your description.extStep 3: Open your variables.sqf. (I assue you know what and where to find this. Most people have a custom file.)Look for this code: DZE_isWreckBuilding = ["Land_wreck_cinder","Land_wood_wreck_quarter","Land_wood_wreck_floor","Land_wood_wreck_third","Land_wood_wreck_frame","Land_iron_vein_wreck","Land_silver_vein_wreck","Land_gold_vein_wreck","Land_ammo_supply_wreck"]; Replace it with this code:DZE_isWreckVein = ["Land_iron_vein_wreck","Land_silver_vein_wreck","Land_gold_vein_wreck"]; DZE_isWreckBuilding = ["Land_wreck_cinder","Land_wood_wreck_quarter","Land_wood_wreck_floor","Land_wood_wreck_third","Land_wood_wreck_frame","Land_ammo_supply_wreck"]; Save and close your variables.sqf.Step 4: Open your fn_selfActions.sqf (If you don't have a custom one, you are gonna have to sort that out.)Find this code:_isWreck = _typeOfCursorTarget in DZE_isWreck; Add this Below it: _isWreckVein = _typeOfCursorTarget in DZE_isWreckVein; Find this code: //Allow player to delete objects if(_isDestructable || _isWreck || _isRemovable || _isWreckBuilding) then { if(_hasToolbox && "ItemCrowbar" in _itemsPlayer) then { _player_deleteBuild = true; }; }; Change it to: //Allow player to delete objects if(_isDestructable || _isWreck || _isRemovable || _isWreckBuilding || _isWreckVein) then { if(_hasToolbox && "ItemCrowbar" in _itemsPlayer) then { _player_deleteBuild = true; }; }; Save and close your fn_selfActions.sqfStep 5: Open your remove.sqfFind this code:_isWreck = _typeOfCursorTarget in DZE_isWreck; Add this Below it: _isWreckVein = _typeOfCursorTarget in DZE_isWreckVein; Find this code: _selectedRemoveOutput = []; if(_isWreck) then { // Find one random part to give back _refundpart = ["PartEngine","PartGeneric","PartFueltank","PartWheel","PartGlass","ItemJerrycan"] call BIS_fnc_selectRandom; _selectedRemoveOutput set [count _selectedRemoveOutput,[_refundpart,1]]; } else { if(_isWreckBuilding) then { _selectedRemoveOutput = getArray (configFile >> "CfgVehicles" >> _objType >> "removeoutput"); } else { _selectedRemoveOutput = getArray (configFile >> "CfgVehicles" >> _objType >> "removeoutput"); _preventRefund = (_objectID == "0" && _objectUID == "0"); }; }; Change it to this: _selectedRemoveOutput = []; if(_isWreck) then { // Find one random part to give back _refundpart = ["PartEngine","PartGeneric","PartFueltank","PartWheel","PartGlass","ItemJerrycan"] call BIS_fnc_selectRandom; _selectedRemoveOutput set [count _selectedRemoveOutput,[_refundpart,1]]; } else { if(_isWreckVein) then { _selectedRemoveOutput = getArray (missionConfigFile >> "Mining" >> _objType >> "removeoutput"); } else { if(_isWreckBuilding) then { _selectedRemoveOutput = getArray (configFile >> "CfgVehicles" >> _objType >> "removeoutput"); } else { _selectedRemoveOutput = getArray (configFile >> "CfgVehicles" >> _objType >> "removeoutput"); _preventRefund = (_objectID == "0" && _objectUID == "0"); }; }; }; Save and close your remove.sqf.You are now done with all my hard work!Now let me go over customizing the vein loot drops!Back to the mining.hpp. This code is where it is all done: class Mining { class Land_iron_vein_wreck { removeoutput[] = {{"PartOre",{10,25}},{"PartOreSilver",{0,1}},{"PartOreGold",{0,5}}}; }; class Land_silver_vein_wreck { removeoutput[] = {{"PartOreSilver",{10,25}},{"PartOre",{0,1}},{"PartOreGold",{6,4}}}; }; class Land_gold_vein_wreck { removeoutput[] = {{"PartOreGold",{10,25}},{"PartOre",{0,1}},{"PartOreSilver",{6,4}}}; }; }; A break down of how it works!In each class, you will have a line that looks like this:removeoutput[] = {{"PartOreGold",{10,25}},{"PartOre",{0,1}},{"PartOreSilver",{6,4}}}; This line is the array used to determine what is dropped when you de-construct an ore vein. removeoutput[] = { {"PartOreGold",{10,25}}, //Array Structure //{"Item to Drop",{AmountGuaranteedToDrop,AmountToRandomlyAddToGuaranteedDropAmount}}, {"PartOre",{0,1}}, {"PartOreSilver",{6,4}} }; You can even add to the array to add other possible drops like this:removeoutput[] = {{"PartOreGold",{10,25}},{"PartOre",{0,1}},{"PartOreSilver",{6,4}},{"ItemRuby",{6,4}}}; Please have fun using this! Link to comment Share on other sites More sharing options...
0 Buck0 Posted June 12, 2015 Report Share Posted June 12, 2015 Redbeard, did you come up with a way of globally removing the vein after its been salvaged by one person? Link to comment Share on other sites More sharing options...
0 seelenapparat Posted June 12, 2015 Report Share Posted June 12, 2015 thank you so much for figuring this out. tested it and it works. so nice! :) Link to comment Share on other sites More sharing options...
0 SchwEde Posted June 12, 2015 Report Share Posted June 12, 2015 Redbeard, did you come up with a way of globally removing the vein after its been salvaged by one person? i got this solved, by making the veins and crates indestructable and able to remove them in the not damaged state. Arma has some prblems with wrecks, for some reason Link to comment Share on other sites More sharing options...
0 Buck0 Posted June 12, 2015 Report Share Posted June 12, 2015 i got this solved, by making the veins and crates indestructable and able to remove them in the not damaged state. Arma has some prblems with wrecks, for some reason care to share? :P Link to comment Share on other sites More sharing options...
0 SchwEde Posted June 12, 2015 Report Share Posted June 12, 2015 sure will write tomorrow an howTo :) Buck0 1 Link to comment Share on other sites More sharing options...
0 SchwEde Posted June 13, 2015 Report Share Posted June 13, 2015 BUMP: Link to comment Share on other sites More sharing options...
0 rpg4e Posted January 17, 2016 Report Share Posted January 17, 2016 Ok, they are global removed, but got no output -..- in step 5 _isWreck = _typeOfCursorTarget in DZE_isWreck; there is no such line in remove.sqf only _isWreck = _objType in DZE_isWreck Link to comment Share on other sites More sharing options...
Question
RAMBO
Just curious if it is possible to adjust the loot that is dropped off of ore veins. Any info would be appreciated ;)
Link to comment
Share on other sites
14 answers to this question
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now