Jump to content

[Discontinued] Emerald Interior Designer


Recommended Posts

 

 

I have the following error message :

ErrorMessage: File mpmissions\__cur_mp.chernarus\interior\defines.hpp, line 70: .RscShortcutButton: Member already defined.

I have already tried it very often, but I think I always delete the wrong text in the "defines.hpp". Which part i have to delete from the "class RscShortcutButton" ? Can you edit this file for me without this class ?

// Control types
#define CT_STATIC           0
#define CT_BUTTON           1
#define CT_EDIT             2
#define CT_SLIDER           3
#define CT_COMBO            4
#define CT_LISTBOX          5
#define CT_TOOLBOX          6
#define CT_CHECKBOXES       7
#define CT_PROGRESS         8
#define CT_HTML             9
#define CT_STATIC_SKEW      10
#define CT_ACTIVETEXT       11
#define CT_TREE             12
#define CT_STRUCTURED_TEXT  13
#define CT_CONTEXT_MENU     14
#define CT_CONTROLS_GROUP   15
#define CT_SHORTCUTBUTTON   16
#define CT_BOX 				17
#define CT_XKEYDESC         40
#define CT_XBUTTON          41
#define CT_XLISTBOX         42
#define CT_XSLIDER          43
#define CT_XCOMBO           44
#define CT_ANIMATED_TEXTURE 45
#define CT_OBJECT           80
#define CT_OBJECT_ZOOM      81
#define CT_OBJECT_CONTAINER 82
#define CT_OBJECT_CONT_ANIM 83
#define CT_LINEBREAK        98
#define CT_USER             99
#define CT_MAP              100
#define CT_MAP_MAIN         101
#define CT_LISTNBOX         102

// Static styles
#define ST_POS            0x0F
#define ST_HPOS           0x03
#define ST_VPOS           0x0C
#define ST_LEFT           0x00
#define ST_RIGHT          0x01
#define ST_CENTER         0x02
#define ST_DOWN           0x04
#define ST_UP             0x08
#define ST_VCENTER        0x0C
#define ST_GROUP_BOX       96
#define ST_GROUP_BOX2      112
#define ST_ROUNDED_CORNER  ST_GROUP_BOX + ST_CENTER
#define ST_ROUNDED_CORNER2 ST_GROUP_BOX2 + ST_CENTER

#define ST_TYPE           0xF0
#define ST_SINGLE         0x00
#define ST_MULTI          0x10
#define ST_TITLE_BAR      0x20
#define ST_PICTURE        0x30
#define ST_FRAME          0x40
#define ST_BACKGROUND     0x50
#define ST_GROUP_BOX      0x60
#define ST_GROUP_BOX2     0x70
#define ST_HUD_BACKGROUND 0x80
#define ST_TILE_PICTURE   0x90
#define ST_WITH_RECT      0xA0
#define ST_LINE           0xB0

#define ST_SHADOW         0x100
#define ST_NO_RECT        0x200
#define ST_KEEP_ASPECT_RATIO  0x800

#define ST_TITLE          ST_TITLE_BAR + ST_CENTER

// Slider styles
#define SL_DIR            0x400
#define SL_VERT           0
#define SL_HORZ           0x400

#define SL_TEXTURES       0x10

// progress bar 
#define ST_VERTICAL       0x01
#define ST_HORIZONTAL     0

// Listbox styles
#define LB_TEXTURES       0x10
#define LB_MULTI          0x20

// Tree styles
#define TR_SHOWROOT       1
#define TR_AUTOCOLLAPSE   2

// MessageBox styles
#define MB_BUTTON_OK      1
#define MB_BUTTON_CANCEL  2
#define MB_BUTTON_USER    4


////////////////
//Base Classes//
////////////////

class RscText
{
    access = 0;
    idc = -1;
    type = CT_STATIC;
    style = ST_MULTI;
    linespacing = 1;
    colorBackground[] = {0,0,0,0};
    colorText[] = {1,1,1,.5};
    text = "";
    shadow = 2;
    font = "Bitstream";
    SizeEx = 0.02300;
    fixedWidth = 0;
    x = 0;
    y = 0;
    h = 0;
    w = 0;
   
};

class RscPicture
{
    access = 0;
    idc = -1;
    type = CT_STATIC;
    style = ST_PICTURE;
    colorBackground[] = {0,0,0,0};
    colorText[] = {1,1,1,1};
    font = "Bitstream";
    sizeEx = 0;
    lineSpacing = 0;
    text = "";
    fixedWidth = 0;
    shadow = 0;
    x = 0;
    y = 0;
    w = 0.2;
    h = 0.15;
};

class RscFrame
{
    type = CT_STATIC;
    idc = -1;
    style = ST_FRAME;
    shadow = 2;
    colorBackground[] = {1,1,1,1};
    colorText[] = {1,1,1,0.9};
    font = "Bitstream";
    sizeEx = 0.03;
    text = "";
};

class BOX
{ 
   type = CT_STATIC;
    idc = -1;
    style = ST_CENTER;
    shadow = 2;
    colorText[] = {1,1,1,1};
    font = "Bitstream";
    sizeEx = 0.02;
    colorBackground[] = { 0.2,0.2,0.2, 0.8 }; 
    text = ""; 

};

class RscCombo
{
	access = 0;
	type = 4;
	style = 0;
	colorSelect[] = {0.023529,0,0.0313725,1};
	colorText[] = {0.023529,0,0.0313725,1};
	colorBackground[] = {0.95,0.95,0.95,1};
	colorScrollbar[] = {0.023529,0,0.0313725,1};
	soundSelect[] = {"",0.1,1};
	soundExpand[] = {"",0.1,1};
	soundCollapse[] = {"",0.1,1};
	maxHistoryDelay = 1;
	class ScrollBar
	{
		color[] = {1,1,1,0.6};
		colorActive[] = {1,1,1,1};
		colorDisabled[] = {1,1,1,0.3};
		shadow = 0;
		thumb = "\ca\ui\data\ui_scrollbar_thumb_ca.paa";
		arrowFull = "\ca\ui\data\ui_arrow_top_active_ca.paa";
		arrowEmpty = "\ca\ui\data\ui_arrow_top_ca.paa";
		border = "\ca\ui\data\ui_border_scroll_ca.paa";
	};
	x = 0;
	y = 0;
	w = 0.12;
	h = 0.035;
	shadow = 0;
	colorSelectBackground[] = {0.8784,0.8471,0.651,1};
	arrowEmpty = "\ca\ui\data\ui_arrow_combo_ca.paa";
	arrowFull = "\ca\ui\data\ui_arrow_combo_active_ca.paa";
	wholeHeight = 0.45;
	color[] = {0,0,0,0.6};
	colorActive[] = {0,0,0,1};
	colorDisabled[] = {0,0,0,0.3};
	font = "Zeppelin32";
	sizeEx = 0.03921;
};

 

There you go

Link to comment
Share on other sites

Hello All,

after trying many many many things I finally got emerald interiors to work, my problem was the items were not writing to the database and they would disappear after building and saying the item was written to the database, I tried everything suggested here but nothing seemed to work. so I gave up for a bit and went back to searching for some nice scripts to add, well I came across a mod to the advanced base building that I was looking to install and found the following....

 

STEP 5 ( IF BUILDINGS DISAPPEAR AFTER BEING BUILT )
-------------------------------------------------------------------------
open dayz_server\compile\server_publishObject.sqf
find this line

if (!(_object isKindOf "Building")) exitWith {
deleteVehicle _object;
};

and change it to this

//if (!(_object isKindOf "Building")) exitWith {
// deleteVehicle _object;
//};

If your items are disappearing after server restart, find your variables.sqf
There is an array 'SafeObjects = ["blah","blah"]; Add the names of your objects to this array, save and compile. Your items should now not disappear!

 

(Thank you Falling Sheep and Opendayz,net)

 

So I searched for this in my publish objects and did not find the exact line (I am on epoch 1.0.4.2) but instead found the following line

 

_allowed = [_object, "Server"] call check_publishobject;
if (!_allowed) exitWith { deleteVehicle _object; };

 

I then changed this to

 

//_allowed = [_object, "Server"] call check_publishobject;
//if (!_allowed) exitWith { deleteVehicle _object; };

and guess what ladies and gentleman???

My emerald Interiors now works and is saving thru a restart.

 

I hope this helps some of you out there that may be getting frustrated with not getting this to work.
 

Link to comment
Share on other sites

So I tried adding this to my server the other day and before I added it I deleted class RscText before hand because I knew it would cause issues. But after I added it the server wouldn't start up and I had this error in my rpt.

ErrorMessage: File mpmissions\__cur_mp.panthera2\interior\defines.hpp, line 43: .RscPicture: Member already defined.

So I deleted class RscPicture from defines.hpp and It fixed the startup problem but the scripts not working. It doesn't show any signs of life in the rpt so I have no idea why its not working.

Link to comment
Share on other sites

 

So I tried adding this to my server the other day and before I added it I deleted class RscText before hand because I knew it would cause issues. But after I added it the server wouldn't start up and I had this error in my rpt.

ErrorMessage: File mpmissions\__cur_mp.panthera2\interior\defines.hpp, line 43: .RscPicture: Member already defined.

So I deleted class RscPicture from defines.hpp and It fixed the startup problem but the scripts not working. It doesn't show any signs of life in the rpt so I have no idea why its not working.

 

this script depends on maca's extra_rc

Link to comment
Share on other sites

Hi all,

 

 

Emerald mod its very cool! THX!
But i sinck need use all gemstons, use obsidian for office, topaz for  external objects.
1 stoune not good for economy and interest games

 

 

sorry for my English,

 

I have made some changes in this mod on my server and this is what they done :

- I have include all gems in extra_rc.hpp

- I have done some priority for all. One gem can done access to many category of class object.

- When you construct an object with a superior gem and have a minor gem in your inventory that can be use to pay the construct, the minor gem is delete in replacement.

 

here is interior/extra_rc.hpp :

class ExtraRc {
	class ItemEmerald {
        class PicFrame {
            text = "Picture Frame";
            script = "createDialog ""WGT_INTERIOR1"";";
        };
		class Chairs {
            text = "Chair";
            script = "createDialog ""WGT_INTERIOR2"";";
        };
		class Beds {
            text = "Bed";
            script = "createDialog ""WGT_INTERIOR3"";";
        };
		class Bath {
            text = "Bathroom";
            script = "createDialog ""WGT_INTERIOR4"";";
        };
		class Shelf {
            text = "Shelf";
            script = "createDialog ""WGT_INTERIOR5"";";
        };
		class Misce {
            text = "Misc";
            script = "createDialog ""WGT_INTERIOR6"";";
        };
		class Tablz {
            text = "Table";
            script = "createDialog ""WGT_INTERIOR7"";";
        };
		class extr {
            text = "Exterior";
            script = "createDialog ""WGT_INTERIOR8"";";
        };
    };
	class ItemRuby {
        class PicFrame {
            text = "Picture Frame";
            script = "createDialog ""WGT_INTERIOR1"";";
        };
		class Chairs {
            text = "Chair";
            script = "createDialog ""WGT_INTERIOR2"";";
        };
		class Beds {
            text = "Bed";
            script = "createDialog ""WGT_INTERIOR3"";";
        };
		class Bath {
            text = "Bathroom";
            script = "createDialog ""WGT_INTERIOR4"";";
        };
		class Shelf {
            text = "Shelf";
            script = "createDialog ""WGT_INTERIOR5"";";
        };
		class Misce {
            text = "Misc";
            script = "createDialog ""WGT_INTERIOR6"";";
        };
		class Tablz {
            text = "Table";
            script = "createDialog ""WGT_INTERIOR7"";";
        };
    };
	class ItemSapphire {
        class PicFrame {
            text = "Picture Frame";
            script = "createDialog ""WGT_INTERIOR1"";";
        };
		class Chairs {
            text = "Chair";
            script = "createDialog ""WGT_INTERIOR2"";";
        };
		class Beds {
            text = "Bed";
            script = "createDialog ""WGT_INTERIOR3"";";
        };
		class Bath {
            text = "Bathroom";
            script = "createDialog ""WGT_INTERIOR4"";";
        };
		class Shelf {
            text = "Shelf";
            script = "createDialog ""WGT_INTERIOR5"";";
        };
		class Misce {
            text = "Misc";
            script = "createDialog ""WGT_INTERIOR6"";";
        };
    };
	class ItemAmethyst {
        class PicFrame {
            text = "Picture Frame";
            script = "createDialog ""WGT_INTERIOR1"";";
        };
		class Beds {
            text = "Bed";
            script = "createDialog ""WGT_INTERIOR3"";";
        };
		class Bath {
            text = "Bathroom";
            script = "createDialog ""WGT_INTERIOR4"";";
        };
		class Shelf {
            text = "Shelf";
            script = "createDialog ""WGT_INTERIOR5"";";
        };
		class Misce {
            text = "Misc";
            script = "createDialog ""WGT_INTERIOR6"";";
        };
    };
	class ItemCitrine {
        class PicFrame {
            text = "Picture Frame";
            script = "createDialog ""WGT_INTERIOR1"";";
        };
		class Beds {
            text = "Bed";
            script = "createDialog ""WGT_INTERIOR3"";";
        };
		class Bath {
            text = "Bathroom";
            script = "createDialog ""WGT_INTERIOR4"";";
        };
		class Misce {
            text = "Misc";
            script = "createDialog ""WGT_INTERIOR6"";";
        };
    };
	class ItemTopaz {
        class PicFrame {
            text = "Picture Frame";
            script = "createDialog ""WGT_INTERIOR1"";";
        };
		class Bath {
            text = "Bathroom";
            script = "createDialog ""WGT_INTERIOR4"";";
        };
		class Misce {
            text = "Misc";
            script = "createDialog ""WGT_INTERIOR6"";";
        };
    };
	class ItemObsidian {
        class PicFrame {
            text = "Picture Frame";
            script = "createDialog ""WGT_INTERIOR1"";";
        };
		class Misce {
            text = "Misc";
            script = "createDialog ""WGT_INTERIOR6"";";
        };
    };
};

or add this in our custom/extra_rc.hpp

 

Here is the interior/spawn.sqf :

/*
DayZ Base Building
Made for DayZ Epoch please ask permission to use/edit/distrubute email [email protected].
 
 
Note: Edit the _classname variable below to be the correct classname of the item you want to build, and I suggest you name the file appropiately!
 
Recommended to use alongside Maca's excellent 'right clicks' system: http://epochmod.com/...tions-to-items/
 
Edits by Mike of http://www.petuniaserver.com/ - Original file & all kudos to the EPOCH devs! http://www.dayzepoch.com
*/
 
private ["_plotReq","_proceed","_location","_dir","_classname","_item","_hasrequireditem","_missing","_hastoolweapon","_cancel","_reason","_started","_finished","_animState","_isMedic","_dis","_sfx","_hasbuilditem","_tmpbuilt","_onLadder","_isWater","_require","_text","_offset","_IsNearPlot","_isOk","_location1","_location2","_counter","_limit","_proceed","_num_removed","_position","_object","_canBuildOnPlot","_friendlies","_nearestPole","_ownerID","_findNearestPoles","_findNearestPole","_distance","_classnametmp","_ghost","_isPole","_needText","_lockable","_zheightchanged","_rotate","_combination_1","_combination_2","_combination_3","_combination_4","_combination","_combination_1_Display","_combinationDisplay","_zheightdirection","_abort","_isNear","_need","_needNear","_vehicle","_inVehicle","_requireplot","_objHDiff","_isLandFireDZ","_isTankTrap","_itemgemsspawn"];

_plotReq = true; //Plotpole requirement to build enabled

 fnc_Pos_fired1 = {
disableSerialization;
_indexPic = lbCurSel 2667; // index of selection
_returnTextPic = lbText [2667, _indexPic]; // name of selection
hint format["BAR : [%1] \n [%2]",_indexPic,_returnTextPic];// display the value
classnameChange = _returnTextPic;
itemgems = "ItemObsidian"; // change made here to say what gem is use to pay
 };
 
  fnc_Pos_fired2 = {
disableSerialization;
_indexChair = lbCurSel 2668; // index of selection
_returnTextChair = lbText [2668, _indexChair]; // name of selection
 hint format["BAR : [%1] \n [%2]",_indexChair,_returnTextChair];// display the value
 classnameChange = _returnTextChair;
itemgems = "ItemSapphire"; // change made here to say what gem is use to pay
 };
 
   fnc_Pos_fired3 = {
disableSerialization;
_indexBed = lbCurSel 2669; // index of selection
_returnTextBed = lbText [2669, _indexBed]; // name of selection
 hint format["BAR : [%1] \n [%2]",_indexBed,_returnTextBed];// display the value
 classnameChange = _returnTextBed;
itemgems = "ItemCitrine"; // change made here to say what gem is use to pay
 };
 
   fnc_Pos_fired4 = {
disableSerialization;
_indexBath = lbCurSel 2670; // index of selection
_returnTextBath = lbText [2670, _indexBath]; // name of selection
 hint format["BAR : [%1] \n [%2]",_indexBath,_returnTextBath];// display the value
 classnameChange = _returnTextBath;
itemgems = "ItemTopaz"; // change made here to say what gem is use to pay
 };
 
   fnc_Pos_fired5 = {
disableSerialization;
_indexShelf = lbCurSel 2671; // index of selection
_returnTextShelf = lbText [2671, _indexShelf]; // name of selection
 hint format["BAR : [%1] \n [%2]",_indexShelf,_returnTextShelf];// display the value
 classnameChange = _returnTextShelf;
itemgems = "ItemAmethyst"; // change made here to say what gem is use to pay
 };
 
   fnc_Pos_fired6 = {
disableSerialization;
_indexMisc = lbCurSel 2672; // index of selection
_returnTextMisc = lbText [2672, _indexMisc]; // name of selection
 hint format["BAR : [%1] \n [%2]",_indexMisc,_returnTextMisc];// display the value
 classnameChange = _returnTextMisc;
itemgems = "ItemObsidian"; // change made here to say what gem is use to pay
 };
 
   fnc_Pos_fired7 = {
disableSerialization;
_indexTable = lbCurSel 2673; // index of selection
_returnTextTable = lbText [2673, _indexTable]; // name of selection
 hint format["BAR : [%1] \n [%2]",_indexTable,_returnTextTable];// display the value
 classnameChange = _returnTextTable;
itemgems = "ItemRuby"; // change made here to say what gem is use to pay
 };
 
    fnc_Pos_fired8 = {
disableSerialization;
_indexExt = lbCurSel 2674; // index of selection
_returnTextExt = lbText [2674, _indexExt]; // name of selection
 hint format["BAR : [%1] \n [%2]",_indexExt,_returnTextExt];// display the value
 classnameChange = _returnTextExt;
itemgems = "ItemEmerald"; // change made here to say what gem is use to pay
 };

_itemgemsspawn = itemgems; // _itemgemsspawn define in private on top
_classname = classnameChange;

if(DZE_ActionInProgress) exitWith { cutText [(localize "str_epoch_player_40") , "PLAIN DOWN"]; };
DZE_ActionInProgress = true;
 
_onLadder = (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "onLadder")) == 1;
_isWater =  dayz_isSwimming;
_cancel = false;
_reason = "";
_canBuildOnPlot = false;
 
_vehicle = vehicle player;
_inVehicle = (_vehicle != player);
 
DZE_Q = false;
DZE_Z = false;
 
DZE_Q_alt = false;
DZE_Z_alt = false;
 
DZE_Q_ctrl = false;
DZE_Z_ctrl = false;
 
DZE_5 = false;
DZE_4 = false;
DZE_6 = false;
 
DZE_cancelBuilding = false;
 
call gear_ui_init;
closeDialog 1;
 
if (_isWater) exitWith {DZE_ActionInProgress = false; cutText [localize "str_player_26", "PLAIN DOWN"];};
if (_inVehicle) exitWith {DZE_ActionInProgress = false; cutText [(localize "str_epoch_player_42"), "PLAIN DOWN"];};
if (_onLadder) exitWith {DZE_ActionInProgress = false; cutText [localize "str_player_21", "PLAIN DOWN"];};
if (player getVariable["combattimeout", 0] >= time) exitWith {DZE_ActionInProgress = false; cutText [(localize "str_epoch_player_43"), "PLAIN DOWN"];};
 
_item = _this;
 
// Need Near Requirements
_abort = false;
_distance = 3;
_reason = "";
 
 
if(_abort) exitWith {
cutText [format[(localize "str_epoch_player_135"),_reason,_distance], "PLAIN DOWN"];
DZE_ActionInProgress = false;
};
 
 
_classnametmp = _classname;
//_require =  getArray (configFile >> "cfgMagazines" >> _this >> "ItemActions" >> "Build" >> "require");
_text =  getText (configFile >> "CfgVehicles" >> _classname >> "displayName");
_ghost = getText (configFile >> "CfgVehicles" >> _classname >> "ghostpreview");
 
_lockable = 0;
 
_requireplot = DZE_requireplot;
if(isNumber (configFile >> "CfgVehicles" >> _classname >> "requireplot")) then {
_requireplot = getNumber(configFile >> "CfgVehicles" >> _classname >> "requireplot");
};
 
_isAllowedUnderGround = 1;
if(isNumber (configFile >> "CfgVehicles" >> _classname >> "nounderground")) then {
_isAllowedUnderGround = getNumber(configFile >> "CfgVehicles" >> _classname >> "nounderground");
};
 
_offset =  getArray (configFile >> "CfgVehicles" >> _classname >> "offset");
if((count _offset) <= 0) then {
_offset = [0,3.5,0]; //This is distance of object from player XYZ.. increase Y if you want an object to spawn further away from player
};
 
_isPole = (_classname == "Plastic_Pole_EP1_DZ");
_isLandFireDZ = (_classname == "Land_Fire_DZ");
 
_distance = DZE_PlotPole select 0;
_needText = localize "str_epoch_player_246";
 
if(_isPole) then {
_distance = DZE_PlotPole select 1;
};


_proceed = true;
// check for near plot
_findNearestPoles = nearestObjects[player, ["Plastic_Pole_EP1_DZ"], 30];
_findNearestPole = [];
{if (alive _x) then {_findNearestPole set [(count _findNearestPole),_x];};} foreach _findNearestPoles;

_IsNearPlot = count (_findNearestPole);

if(_IsNearPlot >= 1) then {
	_proceed = false;
	_plotReq = false;
	_nearestPole = _findNearestPole select 0;

	// Find owner
	_ownerID = _nearestPole getVariable["CharacterID","0"];
	
	// check if friendly to owner
	if(dayz_characterID != _ownerID) then {

		_friendlies		= player getVariable ["friendlyTo",[]];
		// check if friendly to owner
		if(!(_ownerID in _friendlies)) then {
			_proceed = false;
			} else {
			_proceed = true;
		};
		} else {
		_proceed = true;
	};
};
_missing = "";
 
_location = [0,0,0];
_isOk = true;
 
// get inital players position
_location1 = getPosATL player;
_dir = getDir player;
 
_object = createVehicle [_classname, _location, [], 0, "CAN_COLLIDE"];
 
_object attachTo [player,_offset];
 
_position = getPosATL _object;
 
cutText [(localize "str_epoch_player_45"), "PLAIN DOWN"];
 
_objHDiff = 0;

 
while {_isOk} do {
	 
	_zheightchanged = false;
	_zheightdirection = "";
	_rotate = false;
	 
	if (DZE_Q) then {
	DZE_Q = false;
	_zheightdirection = "up";
	_zheightchanged = true;
	};
	if (DZE_Z) then {
	DZE_Z = false;
	_zheightdirection = "down";
	_zheightchanged = true;
	};
	if (DZE_Q_alt) then {
	DZE_Q_alt = false;
	_zheightdirection = "up_alt";
	_zheightchanged = true;
	};
	if (DZE_Z_alt) then {
	DZE_Z_alt = false;
	_zheightdirection = "down_alt";
	_zheightchanged = true;
	};
	if (DZE_Q_ctrl) then {
	DZE_Q_ctrl = false;
	_zheightdirection = "up_ctrl";
	_zheightchanged = true;
	};
	if (DZE_Z_ctrl) then {
	DZE_Z_ctrl = false;
	_zheightdirection = "down_ctrl";
	_zheightchanged = true;
	};
	if (DZE_4) then {
	_rotate = true;
	DZE_4 = false;
	_dir = 180;
	};
	if (DZE_6) then {
	_rotate = true;
	DZE_6 = false;
	_dir = 0;
	};
	 
	if(_rotate) then {
	_object setDir _dir;
	_object setPosATL _position;
	//diag_log format["DEBUG Rotate BUILDING POS: %1", _position];
	};
	 
	if(_zheightchanged) then {
	detach _object;
	 
	_position = getPosATL _object;
	 
	if(_zheightdirection == "up") then {
	_position set [2,((_position select 2)+0.1)];
	_objHDiff = _objHDiff + 0.1;
	};
	if(_zheightdirection == "down") then {
	_position set [2,((_position select 2)-0.1)];
	_objHDiff = _objHDiff - 0.1;
	};
	 
	if(_zheightdirection == "up_alt") then {
	_position set [2,((_position select 2)+1)];
	_objHDiff = _objHDiff + 1;
	};
	if(_zheightdirection == "down_alt") then {
	_position set [2,((_position select 2)-1)];
	_objHDiff = _objHDiff - 1;
	};
	 
	if(_zheightdirection == "up_ctrl") then {
	_position set [2,((_position select 2)+0.01)];
	_objHDiff = _objHDiff + 0.01;
	};
	if(_zheightdirection == "down_ctrl") then {
	_position set [2,((_position select 2)-0.01)];
	_objHDiff = _objHDiff - 0.01;
	};
	 
	_object setDir (getDir _object);
	 
	if((_isAllowedUnderGround == 0) and ((_position select 2) < 0)) then {
	_position set [2,0];
	};
	 
	_object setPosATL _position;
	 
	//diag_log format["DEBUG Change BUILDING POS: %1", _position];
	 
	_object attachTo [player];
	 
	};
	 
	sleep 0.5;
	 
	_location2 = getPosATL player;
	 
	if(DZE_5) exitWith {
	_isOk = false;
	detach _object;
	_dir = getDir _object;
	_position = getPosATL _object;
	//diag_log format["DEBUG BUILDING POS: %1", _position];
	deleteVehicle _object;
	};
	 
	if(_location1 distance _location2 > 5) exitWith {
	_isOk = false;
	_cancel = true;
	_reason = "You've moved to far away from where you started building (within 5 meters)";
	detach _object;
	deleteVehicle _object;
	};
	 
	if(abs(_objHDiff) > 5) exitWith {
	_isOk = false;
	_cancel = true;
	_reason = "Cannot move up or down more than 5 meters";
	detach _object;
	deleteVehicle _object;
	};
	 
	if (player getVariable["combattimeout", 0] >= time) exitWith {
	_isOk = false;
	_cancel = true;
	_reason = (localize "str_epoch_player_43");
	detach _object;
	deleteVehicle _object;
	};
	 
	if (DZE_cancelBuilding) exitWith {
	_isOk = false;
	_cancel = true;
	_reason = "Création annulée.";
	detach _object;
	deleteVehicle _object;
	};
};
 
//No building on roads unless toggled
if (!DZE_BuildOnRoads) then {
if (isOnRoad _position) then { _cancel = true; _reason = "Cannot build on a road."; };
};
 
// No building in trader zones
if(!canbuild) then { _cancel = true; _reason = "Cannot build in a city."; };
 
if (!_proceed) then {_cancel = true; _reason = "Someone's plotpole nearby";};
if (_plotReq) then {_cancel = true; _reason = "Plotpole required to build here";};

if(!_cancel) then {
 
_classname = _classnametmp;
 
// Start Build
_tmpbuilt = createVehicle [_classname, _location, [], 0, "CAN_COLLIDE"];
 
_tmpbuilt setdir _dir;
 
// Get position based on object
_location = _position;
 
if((_isAllowedUnderGround == 0) and ((_location select 2) < 0)) then {
_location set [2,0];
};
 
_tmpbuilt setPosATL _location;
 
 
cutText [format[(localize "str_epoch_player_138"),_text], "PLAIN DOWN"];
 
_limit = 1;
 
if (DZE_StaticConstructionCount > 0) then {
_limit = DZE_StaticConstructionCount;
}
else {
if (isNumber (configFile >> "CfgVehicles" >> _classname >> "constructioncount")) then {
_limit = getNumber(configFile >> "CfgVehicles" >> _classname >> "constructioncount");
};
};
 
player playActionNow "Medic";
[player,"repair",0,false,10] call dayz_zombieSpeak;
[player,10,true,(getPosATL player)] spawn player_alertZombies;
sleep 3;
 
cutText [format[localize "str_build_01",_text], "PLAIN DOWN"];
 
if (_isPole) then {
[] spawn player_plotPreview;
};
 
_tmpbuilt setVariable ["OEMPos",_location,true];
 
_tmpbuilt setVariable ["CharacterID",dayz_characterID,true];
 
_charID = dayz_characterID;
_activatingPlayer = player;
 
PVDZE_obj_Publish = [dayz_characterID,_tmpbuilt,[_dir,_location],_classname];
publicVariableServer "PVDZE_obj_Publish";

// I know the code is prehaps not very good but that work
// Test to see if the gem to pay is in inventory else we try to pay with the superior
_removed=0;
while {_removed == 0} do {
_removed = ([player,_itemgemsspawn,1] call BIS_fnc_invRemove);
if((_itempierre == "ItemRuby") and (_removed == 0)) then {
    _itempierre = "ItemEmerald";
    };
if((_itempierre == "ItemSapphire") and (_removed == 0)) then {
    _itempierre = "ItemRuby";
    };
if((_itempierre == "ItemAmethyst") and (_removed == 0)) then {
    _itempierre = "ItemSapphire";
    };
if((_itempierre == "ItemCitrine") and (_removed == 0)) then {
    _itempierre = "ItemAmethyst";
    };
if((_itempierre == "ItemTopaz") and (_removed == 0)) then {
    _itempierre = "ItemCitrine";
    };
if((_itempierre == "ItemObsidian") and (_removed == 0)) then {
    _itempierre = "ItemTopaz";
    };
};

// just change text for on screen
if(_itemgemsspawn == "ItemObsidian") then {
	_itemgemsspawn = "Obsidian";
	};
if(_itemgemsspawn == "ItemTopaz") then {
	_itemgemsspawn = "Topaz";
	};
if(_itemgemsspawn == "ItemCitrine") then {
	_itemgemsspawn = "Citrine";
	};
if(_itemgemsspawn == "ItemAmethyst") then {
	_itemgemsspawn = "Amethyst";
	};
if(_itemgemsspawn == "ItemSapphire") then {
	_itemgemsspawn = "Sapphire";
	};
if(_itemgemsspawn == "ItemRuby") then {
	_itemgemsspawn = "Ruby";
	};
if(_itemgemsspawn == "ItemEmerald") then {
	_itemgemsspawn = "Emerald";
	};

cutText [format["%1 saved to database ! %2 delete from inventory !",_classname,_itemgemsspawn], "PLAIN DOWN",3];
player reveal _tmpbuilt;
DZE_ActionInProgress = false;
 
} else {
cutText [format[(localize "str_epoch_player_47"),_text,_reason], "PLAIN DOWN"];
DZE_ActionInProgress = false;
};
 
DZE_ActionInProgress = false;

I know prehaps that can be done differently but i don't know how ^^ and that work ^^

 

Well know i have a question :

I can remove an object when i have just spwn it. But i can't remove it in other time. This normal or not ?

I try some thing in fn_selfActions.sqf but nothing work.

I run my server on Linux and epoch 1.0.4.2a

Link to comment
Share on other sites

in interior/spawn.sqf :

 

find  :

"_objHDiff","_isLandFireDZ","_isTankTrap"

in same line after add :

,"_itemgemsspawn"

next find :

classnameChange = _returnTextPic;

add below :

itemgems = "ItemObsidian";

next find :

classnameChange = _returnTextChair;

add below :

itemgems = "ItemSapphire";

next find :

classnameChange = _returnTextBed;

add below :

itemgems = "ItemCitrine";

next find :

classnameChange = _returnTextBath;

add below :

itemgems = "ItemTopaz";

next find :

classnameChange = _returnTextShelf;

add below :

itemgems = "ItemAmethyst";

next find :

classnameChange = _returnTextMisc;

add below :

itemgems = "ItemObsidian";

next find :

classnameChange = _returnTextTable;

add below :

itemgems = "ItemRuby";

next find :

classnameChange = _returnTextExt;

add below :

itemgems = "ItemEmerald";

next find :

_classname = classnameChange;

add before :

_itemgemsspawn = itemgems;

next find :

player removeMagazine "ItemEmerald";
cutText [format["%1 saved to database!",_classname], "PLAIN DOWN",3];

replace this two line by :

_removed=0;
while {_removed == 0} do {
_removed = ([player,_itemgemsspawn,1] call BIS_fnc_invRemove);
if((_itempierre == "ItemRuby") and (_removed == 0)) then {
    _itempierre = "ItemEmerald";
    };
if((_itempierre == "ItemSapphire") and (_removed == 0)) then {
    _itempierre = "ItemRuby";
    };
if((_itempierre == "ItemAmethyst") and (_removed == 0)) then {
    _itempierre = "ItemSapphire";
    };
if((_itempierre == "ItemCitrine") and (_removed == 0)) then {
    _itempierre = "ItemAmethyst";
    };
if((_itempierre == "ItemTopaz") and (_removed == 0)) then {
    _itempierre = "ItemCitrine";
    };
if((_itempierre == "ItemObsidian") and (_removed == 0)) then {
    _itempierre = "ItemTopaz";
    };
};

if(_itemgemsspawn == "ItemObsidian") then {
	_itemgemsspawn = "Obsidian";
	};
if(_itemgemsspawn == "ItemTopaz") then {
	_itemgemsspawn = "Topaz";
	};
if(_itemgemsspawn == "ItemCitrine") then {
	_itemgemsspawn = "Citrine";
	};
if(_itemgemsspawn == "ItemAmethyst") then {
	_itemgemsspawn = "Amethyst";
	};
if(_itemgemsspawn == "ItemSapphire") then {
	_itemgemsspawn = "Sapphire";
	};
if(_itemgemsspawn == "ItemRuby") then {
	_itemgemsspawn = "Ruby";
	};
if(_itemgemsspawn == "ItemEmerald") then {
	_itemgemsspawn = "Emerald";
	};

cutText [format["%1 saved to database ! %2 delete from inventory !",_classname,_itemgemsspawn], "PLAIN DOWN",3];

that's all ^^ i do a little change in precedent post for extra_rc.hpp

Link to comment
Share on other sites

I was checking out  WGC's right click build mod ( see here ) and love the way hes able to use diff items requires and remove objects for cost but your context menus are whats need i was posting in there but he doesnt develop it anymore and wanted to combine the two , to make a full build mod that costs actual build supplies requires build tools and lets you build all the game objects .

 

SO is this too much to ask ? I would have a go at it myself as i posted in his thread but  none of this is my work and i really havent ever made any scripts my knowledge is limited so i thought i would ask.

 

Or if forced id have to do it myself if you dont mind me using some of your work as a basis ( if i could figure it out)

Link to comment
Share on other sites

I was checking out  WGC's right click build mod ( see here ) and love the way hes able to use diff items requires and remove objects for cost but your context menus are whats need i was posting in there but he doesnt develop it anymore and wanted to combine the two , to make a full build mod that costs actual build supplies requires build tools and lets you build all the game objects .

 

SO is this too much to ask ? I would have a go at it myself as i posted in his thread but  none of this is my work and i really havent ever made any scripts my knowledge is limited so i thought i would ask.

 

Or if forced id have to do it myself if you dont mind me using some of your work as a basis ( if i could figure it out)

It is possible, there are few ways you can also do it. I'd suggest looking at source code of epoch dayz_code pbo and check out how CfgVehicles was done and then add your own .hpp trough description.ext

But yea, feel free to do anything you want with it.

 

I will not continue developing emerald script, because I am currently working on a mod that will use custom designed models instead. There will be a sneak preview video next week.

Link to comment
Share on other sites

Raymix,

 

 After updating to the new Arma Build and DayZ Version, I noticed now getting this error in RPT. Any Thoughts?

Error in expression <arget];
};
} else {
player removeAction s_player_removeEmerald;
s_player_removeE>
  Error position: <s_player_removeEmerald;
s_player_removeE>
  Error Undefined variable in expression: s_player_removeemerald
File mpmissions\__CUR_MP.Chernarus\custom\fn_selfActions.sqf, line 1099

Zero

Link to comment
Share on other sites

Sorry, no clue, Zero. I won't be installing new patch to test either, until all game breaking bugs are sorted out.

But it's not necessary the line it reports, it could be something unrelated to error. The only way to fix it, I guess, is to look at changelog and see if code parameters got changed.

Link to comment
Share on other sites

Alright so I have seriously been trying to get this to work for a good 2 hours. I have followed all your instcructions and everything seems to be doing good except when I go to spawn it. Nothing shows up, Like at all, It says I can move it and I can "place" this invisible object and then it says "any is saved to database"

 

I even commented out this:

 

//_allowed = [_object, "Server"] call check_publishobject;
//if (!_allowed) exitWith { deleteVehicle _object; };

 

​Ive followed your instructions and read the whole damn thread

 

What can I do to get this to work? I am on Epoch Chernarus 

 

I am also using the newest infistar, Ive used the code you designated for infistar, Still no luck

Link to comment
Share on other sites

@patrick: there's a small bug that does it. First time you try to spawn object in, it's invisible, just cancel and try again. If objects are still deleted instantly after showing up, it is to do with allowedObjects in variables.sqf

If the object doesn't show up at all no matter what you do, then classname is not passed on for some reason. This script might also not work with newest beta patch.

Link to comment
Share on other sites

is this the correct way to add more items to my extra_rc

 

class ExtraRc {
    class ItemRadio {
        class Use {
            text = "Call Evac-Chopper";
            script = "execVM 'custom\JAEM\CallEvacChopper.sqf'";
        };
    };
 
     class ExtraRc {
class ItemEmerald {
        class PicFrame {
            text = "Picture Frame";
            script = "createDialog ""WGT_INTERIOR1"";";
        };
class Chairs {
            text = "Chair";
            script = "createDialog ""WGT_INTERIOR2"";";
        };
class Beds {
            text = "Bed";
            script = "createDialog ""WGT_INTERIOR3"";";
        };
class Bath {
            text = "Bathroom";
            script = "createDialog ""WGT_INTERIOR4"";";
        };
class Shelf {
            text = "Shelf";
            script = "createDialog ""WGT_INTERIOR5"";";
        };
class Misce {
            text = "Misc";
            script = "createDialog ""WGT_INTERIOR6"";";
        };
class Tablz {
            text = "Table";
            script = "createDialog ""WGT_INTERIOR7"";";
        };
class extr {
            text = "Exterior";
            script = "createDialog ""WGT_INTERIOR8"";";
        };
    };
}; 
 
 
thanks :)
Link to comment
Share on other sites

 

is this the correct way to add more items to my extra_rc

class ExtraRc {
    class ItemRadio {
        class Use {
            text = "Call Evac-Chopper";
            script = "execVM 'custom\JAEM\CallEvacChopper.sqf'";
        };
    };
    class ItemEmerald {
        class PicFrame {
            text = "Picture Frame";
            script = "createDialog ""WGT_INTERIOR1"";";
        };
        class Chairs {
            text = "Chair";
            script = "createDialog ""WGT_INTERIOR2"";";
        };
        class Beds {
            text = "Bed";
            script = "createDialog ""WGT_INTERIOR3"";";
        };
        class Bath {
            text = "Bathroom";
            script = "createDialog ""WGT_INTERIOR4"";";
        };
        class Shelf {
            text = "Shelf";
            script = "createDialog ""WGT_INTERIOR5"";";
        };
        class Misce {
            text = "Misc";
            script = "createDialog ""WGT_INTERIOR6"";";
        };
        class Tablz {
            text = "Table";
            script = "createDialog ""WGT_INTERIOR7"";";
        };
        class extr {
            text = "Exterior";
            script = "createDialog ""WGT_INTERIOR8"";";
        };
    };
}; 


Link to comment
Share on other sites

@Humpabry: each class name can be defined only once. You can think of  class ExtraRc as a main class and rest of items inside of its {} are kinda like sub-classes.

Just like Brockie posted above (thanks, man)

Link to comment
Share on other sites

server did not load and this is error message was just stuck on waiting for host

 

ErrorMessage: File mpmissions\DayZ_Epoch_16.Panthera2\interior\defines.hpp, line 21: .RscText: Member already defined.
22:43:52 NetServer::finishDestroyPlayer(1573636751): DESTROY immediately after CREATE, both cancelled
Link to comment
Share on other sites

 

server did not load and this is error message was just stuck on waiting for host

 

ErrorMessage: File mpmissions\DayZ_Epoch_16.Panthera2\interior\defines.hpp, line 21: .RscText: Member already defined.
22:43:52 NetServer::finishDestroyPlayer(1573636751): DESTROY immediately after CREATE, both cancelled

 

Hi, refer to first 2 pages of this topic, solution is there. You will need to delete class that you already have defined somewhere else

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
  • Advertisement
×
×
  • Create New...