Jump to content
  • 0

What is the init.sqf command to point to new dayz_code files?


ZarX

Question

13 answers to this question

Recommended Posts

  • 0

Thanks I figured it was something like that but wasn't 100% sure.  :D

 

So example would be.

 

if (!isDedicated) then {

//Bulk Changes

[] execVM "dayz_code\traders\bulk.hpp"; ??

 

yeah, whenever i overwrite stuff i always keep the same paths so all i have to do is change that z\addons\ and everything else would be the same

Link to comment
Share on other sites

  • 0

But it goes under the if dedicated part correct?

 

I guess ? I dont know whats inside that hpp file...but my guess is its for the players.....is it just class definitions ?

Cause if it is (dont know if you can put anything else really in .hpp files) then it shouldnt be there.

Depending what you have inside, it should be at the top of your description.ext file or the bottom.

If you need some classes that are the top of the description.ext then you have to add it at the bottom....but like this...not with spawn:

#include "dayz_code\traders\bulk.hpp"
Link to comment
Share on other sites

  • 0

Yeah I was defining some new bulk items we wanted to add to our server. So where do I add these changes so it adds them? I'm a tad confused now.

 

 

I am getting this error now.

 

mpmissions\__cur_mp.napf\dayz_code\traders\bulk.hpp, line 0: .bulk: Undefined base class 'CA_Magazine'

Link to comment
Share on other sites

  • 0

Yeah I was defining some new bulk items we wanted to add to our server. So where do I add these changes so it adds them? I'm a tad confused now.

 

 

I am getting this error now.

 

mpmissions\__cur_mp.napf\dayz_code\traders\bulk.hpp, line 0: .bulk: Undefined base class 'CA_Magazine'

 

Well if you have any words like Class, model etc...then its a definition file...so you are good there in description.ext with the #include at the front....i would add it at the bottom of the file.

If you have stuff like   createvehicle, and basically normal arma engine commands....then it should be an .sqf....and you load it like the way you did before with execvm, or spawn or call

http://forums.bistudio.com/showthread.php?120188-call-execVM-and-spawn-which-and-when

This thread explains which and when to use them.

Link to comment
Share on other sites

  • 0

Well here is what I changed in the dayz_code bulk.hpp

 

 

class bulk: CA_Magazine {
scope = 2;
count = 1;
type = 256;
displayName = $STR_EPOCH_BULK_NAME;
model = "\z\addons\dayz_epoch\models\supply_crate.p3d";
picture = "\z\addons\dayz_epoch\pictures\equip_wooden_crate_ca.paa";
descriptionShort = $STR_EPOCH_BULK_DESC;
weight = 5;
};
class bulk_empty: bulk {
descriptionShort = $STR_EPOCH_BULK_DESC_EMPTY;
weight = 5;
class ItemActions {
class Crafting {
text = $STR_EPOCH_PLAYER_221;
script = ";['Crafting','CfgMagazines', _id] spawn player_craftItem;";
neednearby[] = {};
requiretools[] = {"ItemToolbox"};
output[] = {{"bulk_ItemSodaCoke",1}};
input[] = {{"bulk_empty",1},{"ItemSodaCoke",6}};
};
class Crafting1 {
text = $STR_EPOCH_PLAYER_222;
script = ";['Crafting1','CfgMagazines', _id] spawn player_craftItem;";
neednearby[] = {};
requiretools[] = {"ItemToolbox"};
output[] = {{"bulk_ItemSodaPepsi",1}};
input[] = {{"bulk_empty",1},{"ItemSodaPepsi",6}};
};
 
class Crafting2 {
text = $STR_EPOCH_PLAYER_223;
script = ";['Crafting2','CfgMagazines', _id] spawn player_craftItem;";
neednearby[] = {};
requiretools[] = {"ItemToolbox"};
output[] = {{"bulk_PartGenericHalf",1}};
input[] = {{"bulk_empty",1},{"PartGeneric",6}};
};
class Crafting3 {
text = $STR_EPOCH_PLAYER_224;
script = ";['Crafting3','CfgMagazines', _id] spawn player_craftItem;";
neednearby[] = {};
requiretools[] = {"ItemToolbox"};
output[] = {{"bulk_ItemTankTrapHalf",1}};
input[] = {{"bulk_empty",1},{"ItemTankTrap",6}};
};
class Crafting4 {
text = $STR_EPOCH_PLAYER_225;
script = ";['Crafting4','CfgMagazines', _id] spawn player_craftItem;";
neednearby[] = {};
requiretools[] = {"ItemToolbox"};
output[] = {{"bulk_ItemWireHalf",1}};
input[] = {{"bulk_empty",1},{"ItemWire",6}};
};
class Crafting5 {
text = $STR_EPOCH_PLAYER_226;
script = ";['Crafting5','CfgMagazines', _id] spawn player_craftItem;";
neednearby[] = {};
requiretools[] = {"ItemToolbox"};
output[] = {{"bulk_FoodbaconCooked",1}};
input[] = {{"bulk_empty",1},{"FoodbaconCooked",6}};
};
};
};
 
class bulk_ItemSodaCoke: bulk {
descriptionShort = $STR_EPOCH_BULK_DESC_SODACOKE_HALF;
class ItemActions {
class CreateMags {
text = $STR_EPOCH_PLAYER_209;
script = "spawn player_loadCrate;";
output[] = {"ItemSodaCoke",6,"magazine"};
};
class Crafting {
text = $STR_EPOCH_PLAYER_221;
script = ";['Crafting','CfgMagazines', _id] spawn player_craftItem;";
neednearby[] = {};
requiretools[] = {"ItemToolbox"};
output[] = {{"bulk_ItemSodaCokeFull",1}};
input[] = {{"bulk_ItemSodaCoke",1},{"ItemSodaCoke",6}};
};
};
};
class bulk_ItemSodaCokeFull: bulk {
descriptionShort = $STR_EPOCH_BULK_DESC_SODACOKE_FULL;
class ItemActions {
class CreateMags {
text = $STR_EPOCH_PLAYER_209;
script = "spawn player_loadCrate;";
output[] = {"ItemSodaCoke",12,"magazine"};
};
};
};
 
class bulk_ItemSodaPepsi: bulk {
descriptionShort = $STR_EPOCH_BULK_DESC_SODAPEPSI_HALF;
class ItemActions {
class CreateMags {
text = $STR_EPOCH_PLAYER_209;
script = "spawn player_loadCrate;";
output[] = {"ItemSodaPepsi",6,"magazine"};
};
class Crafting {
text = $STR_EPOCH_PLAYER_222;
script = ";['Crafting','CfgMagazines', _id] spawn player_craftItem;";
neednearby[] = {};
requiretools[] = {"ItemToolbox"};
output[] = {{"bulk_ItemSodaPepsiFull",1}};
input[] = {{"bulk_ItemSodaPepsi",1},{"ItemSodaPepsi",6}};
};
};
};
class bulk_ItemSodaPepsiFull: bulk {
descriptionShort = $STR_EPOCH_BULK_DESC_SODAPEPSI_FULL;
class ItemActions {
class CreateMags {
text = $STR_EPOCH_PLAYER_209;
script = "spawn player_loadCrate;";
output[] = {"ItemSodaPepsi",12,"magazine"};
};
};
};
 
class bulk_FoodbaconCooked: bulk {
descriptionShort = $STR_EPOCH_BULK_DESC_BACON_HALF;
class ItemActions {
class CreateMags {
text = $STR_EPOCH_PLAYER_209;
script = "spawn player_loadCrate;";
output[] = {"FoodbaconCooked",6,"magazine"};
};
class Crafting {
text = $STR_EPOCH_PLAYER_227;
script = ";['Crafting','CfgMagazines', _id] spawn player_craftItem;";
neednearby[] = {};
requiretools[] = {"ItemToolbox"};
output[] = {{"bulk_FoodbaconCookedFull",1}};
input[] = {{"bulk_FoodbaconCooked",1},{"FoodbaconCooked",6}};
};
};
};
class bulk_FoodbaconCookedFull: bulk {
descriptionshort = $STR_EPOCH_BULK_DESC_BACON_FULL;
class ItemActions {
class CreateMags {
text = $STR_EPOCH_PLAYER_209;
script = "spawn player_loadCrate;";
output[] = {"FoodbaconCooked",12,"magazine"};
};
};
};
 
// Ammo
class bulk_17Rnd_9x19_glock17: bulk {
descriptionShort = $STR_EPOCH_BULK_DESC_G17;
class ItemActions {
class CreateMags {
text = $STR_EPOCH_PLAYER_209;
script = "spawn player_loadCrate;";
output[] = {"17Rnd_9x19_glock17",12,"magazine"};
};
};
};
class bulk_15Rnd_9x19_M9SD: bulk {
descriptionShort = $STR_EPOCH_BULK_DESC_M9SD;
class ItemActions {
class CreateMags {
text = $STR_EPOCH_PLAYER_209;
script = "spawn player_loadCrate;";
output[] = {"15Rnd_9x19_M9SD",12,"magazine"};
};
};
};
class bulk_30Rnd_9x19_MP5SD: bulk {
descriptionShort = $STR_EPOCH_BULK_DESC_MP5SD;
class ItemActions {
class CreateMags {
text = $STR_EPOCH_PLAYER_209;
script = "spawn player_loadCrate;";
output[] = {"30Rnd_9x19_MP5SD",12,"magazine"};
};
};
};
class bulk_30Rnd_556x45_StanagSD: bulk {
descriptionShort = $STR_EPOCH_BULK_DESC_STANAGSD;
class ItemActions {
class CreateMags {
text = $STR_EPOCH_PLAYER_209;
script = "spawn player_loadCrate;";
output[] = {"30Rnd_556x45_StanagSD",12,"magazine"};
};
};
};
 
class bulk_ItemSandbag: bulk {
descriptionShort = $STR_EPOCH_BULK_DESC_SANDBAG;
class ItemActions {
class CreateMags {
text = $STR_EPOCH_PLAYER_209;
script = "spawn player_loadCrate;";
output[] = {"ItemSandbag",12,"magazine"};
};
};
};
 
class bulk_ItemTankTrap: bulk {
descriptionShort = $STR_EPOCH_BULK_DESC_TANKTRAP_FULL;
weight = 25;
class ItemActions {
class CreateMags {
text = $STR_EPOCH_PLAYER_209;
script = "spawn player_loadCrate;";
output[] = {"ItemTankTrap",12,"magazine"};
};
};
};
class bulk_ItemTankTrapHalf: bulk {
descriptionShort = $STR_EPOCH_BULK_DESC_TANKTRAP_HALF;
weight = 12.5;
class ItemActions {
class CreateMags {
text = $STR_EPOCH_PLAYER_209;
script = "spawn player_loadCrate;";
output[] = {"ItemTankTrap",6,"magazine"};
};
class Crafting {
text = $STR_EPOCH_PLAYER_224;
script = ";['Crafting','CfgMagazines', _id] spawn player_craftItem;";
neednearby[] = {};
requiretools[] = {"ItemToolbox"};
output[] = {{"bulk_ItemTankTrap",1}};
input[] = {{"bulk_ItemTankTrapHalf",1},{"ItemTankTrap",6}};
};
};
};
 
class bulk_ItemWire: bulk {
descriptionShort = $STR_EPOCH_BULK_DESC_WIREKIT_FULL;
weight = 25;
class ItemActions {
class CreateMags {
text = $STR_EPOCH_PLAYER_209;
script = "spawn player_loadCrate;";
output[] = {"ItemWire",12,"magazine"};
};
};
};
class bulk_ItemWireHalf: bulk {
descriptionShort = $STR_EPOCH_BULK_DESC_WIREKIT_HALF;
weight = 12.5;
class ItemActions {
class CreateMags {
text = $STR_EPOCH_PLAYER_209;
script = "spawn player_loadCrate;";
output[] = {"ItemWire",6,"magazine"};
};
class Crafting {
text = $STR_EPOCH_PLAYER_225;
script = ";['Crafting','CfgMagazines', _id] spawn player_craftItem;";
neednearby[] = {};
requiretools[] = {"ItemToolbox"};
output[] = {{"bulk_ItemWire",1}};
input[] = {{"bulk_ItemWireHalf",1},{"ItemWire",6}};
};
};
};
 
class bulk_PartGeneric: bulk {
descriptionShort = $STR_EPOCH_BULK_DESC_GENERIC_FULL;
weight = 60;
class ItemActions {
class CreateMags {
text = $STR_EPOCH_PLAYER_209;
script = "spawn player_loadCrate;";
output[] = {"PartGeneric",12,"magazine"};
};
};
};
class bulk_PartGenericHalf: bulk {
descriptionShort = $STR_EPOCH_BULK_DESC_GENERIC_HALF;
weight = 30;
class ItemActions {
class CreateMags {
text = $STR_EPOCH_PLAYER_209;
script = "spawn player_loadCrate;";
output[] = {"PartGeneric",6,"magazine"};
};
class Crafting {
text = $STR_EPOCH_PLAYER_223;
script = ";['Crafting','CfgMagazines', _id] spawn player_craftItem;";
neednearby[] = {};
requiretools[] = {"ItemToolbox"};
output[] = {{"bulk_PartGeneric",1}};
input[] = {{"bulk_PartGenericHalf",1},{"PartGeneric",6}};
};
};
};
 
class bulk_PartEngine: bulk {
descriptionShort = $STR_EPOCH_BULK_DESC_ENGINE_FULL;
weight = 60;
class ItemActions {
class CreateMags {
text = $STR_EPOCH_PLAYER_209;
script = "spawn player_loadCrate;";
output[] = {"PartEngine",10,"magazine"};
};
};
};
 
class bulk_PartWheel: bulk {
descriptionShort = $STR_EPOCH_BULK_DESC_WHEEL_FULL;
weight = 60;
class ItemActions {
class CreateMags {
text = $STR_EPOCH_PLAYER_209;
script = "spawn player_loadCrate;";
output[] = {"PartWheel",10,"magazine"};
};
};
};
 
class bulk_PartVRotor: bulk {
descriptionShort = $STR_EPOCH_BULK_DESC_MAINROTOR_FULL;
weight = 60;
class ItemActions {
class CreateMags {
text = $STR_EPOCH_PLAYER_209;
script = "spawn player_loadCrate;";
output[] = {"PartVRotor",10,"magazine"};
};
};
};
 
class bulk_PartFueltank: bulk {
descriptionShort = $STR_EPOCH_BULK_DESC_FUELTANK_FULL;
weight = 60;
class ItemActions {
class CreateMags {
text = $STR_EPOCH_PLAYER_209;
script = "spawn player_loadCrate;";
output[] = {"PartFueltank",10,"magazine"};
};
};
};
 
class bulk_PartGlass: bulk {
descriptionShort = $STR_EPOCH_BULK_DESC_GLASS_FULL;
weight = 60;
class ItemActions {
class CreateMags {
text = $STR_EPOCH_PLAYER_209;
script = "spawn player_loadCrate;";
output[] = {"PartGLass",10,"magazine"};
};
};
};
 
class bulk_FoodSteakCooked: bulk {
descriptionShort = $STR_EPOCH_BULK_DESC_STEAK_FULL;
weight = 60;
class ItemActions {
class CreateMags {
text = $STR_EPOCH_PLAYER_209;
script = "spawn player_loadCrate;";
output[] = {"FoodSteakCooked",12,"magazine"};
};
};
};
 
class bulk_CinderBlocks: bulk {
descriptionShort = $STR_EPOCH_BULK_DESC_CINDERBLOCKS_FULL;
weight = 60;
class ItemActions {
class CreateMags {
text = $STR_EPOCH_PLAYER_209;
script = "spawn player_loadCrate;";
output[] = {"CinderBlocks",10,"magazine"};
};
};
};
 
class bulk_MortarBucket: bulk {
descriptionShort = $STR_EPOCH_BULK_DESC_MORTARBUCKET_FULL;
weight = 60;
class ItemActions {
class CreateMags {
text = $STR_EPOCH_PLAYER_209;
script = "spawn player_loadCrate;";
output[] = {"MortarBucket",10,"magazine"};
};
};
};
 
class bulk_20rnd_762x51_B_SCAR: bulk {
descriptionShort = $STR_EPOCH_BULK_DESC_20RND_MK17_FULL;
weight = 60;
class ItemActions {
class CreateMags {
text = $STR_EPOCH_PLAYER_209;
script = "spawn player_loadCrate;";
output[] = {"20rnd_762x51_B_SCAR",10,"magazine"};
};
};
};
 
class bulk_20rnd_762x51_SB_SCAR: bulk {
descriptionShort = $STR_EPOCH_BULK_DESC_20RND_MK17SD_FULL;
weight = 60;
class ItemActions {
class CreateMags {
text = $STR_EPOCH_PLAYER_209;
script = "spawn player_loadCrate;";
output[] = {"20rnd_762x51_SB_SCAR",10,"magazine"};
};
};
};
Link to comment
Share on other sites

  • 0

add < > tags (the button) next time please :P

But yeah thats a typical hpp file...should be there in description.ext.

I got my overwrites at the bottom as well like this:

#include "overwrites\CfgBuildingLoot\CfgBuildingLoot.hpp"

Btw...i tried to do something similar myself and failed miserably...good luck with it :)

Link to comment
Share on other sites

  • 0
On 4/27/2014 at 6:41 AM, ZarX said:

Like what would be the code I use for my server to point to like new bulk.hpp?

My guess is you would find where bulk.hpp is being called from!

Like inside compiles.sqf there are files being called from dayz_code

Here are a few

    fnc_usec_unconscious = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fn_unconscious.sqf";
    player_temp_calculation    = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fn_temperatur.sqf";
    player_animalCheck = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_animalCheck.sqf";
    player_spawnCheck = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_spawnCheck.sqf";
    player_dumpBackpack = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_dumpBackpack.sqf";

if you wanted a custom player_animalCheck.sqf then you would make a folder like "custom" in your mission folder to put your custom file inside then you would go to where player_animalCheck.sqf if being called from this case it is in compiles.sqf then you find it and change the file path to your new location.

    fnc_usec_unconscious = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fn_unconscious.sqf";
    player_temp_calculation    = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fn_temperatur.sqf";
    player_animalCheck = compile preprocessFileLineNumbers "custom\player_animalCheck.sqf";
    player_spawnCheck = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_spawnCheck.sqf";
    player_dumpBackpack = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_dumpBackpack.sqf";

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...