Jump to content

[Discontinued] Emerald Interior Designer


Recommended Posts

@F507DMT: it's not as simple as it appears. Just to enable preview, I'd have to redesign dialog to add a button and add a dummy spawn.sqf file. Maybe in future, sorry. Thanks for the idea tho.

 

Update 1.1.1 out,guys, update your Spawn.sqf file, please refer to page 1

Link to comment
Share on other sites

Did something wrong then because its not working for me,

 

Host: DayZ.ST

 

Editing in database

//

trader_items, ID: 980, Classname: ItemEmerald, Type: 1, Group: Building Supplies, afile: trade_items

//

Traders_DATA, ID: 8000, Classname["ItemEmerald",1] , Stock: 5000, Buy: [2,"ItemGoldBar",1], Sell: [1,"ItemGoldBar",1] Tid: 678, Afile: trade_items

 

What have i done wrong?

Link to comment
Share on other sites

Did something wrong then because its not working for me,

 

Host: DayZ.ST

 

Editing in database

//

trader_items, ID: 980, Classname: ItemEmerald, Type: 1, Group: Building Supplies, afile: trade_items

//

Traders_DATA, ID: 8000, Classname["ItemEmerald",1] , Stock: 5000, Buy: [2,"ItemGoldBar",1], Sell: [1,"ItemGoldBar",1] Tid: 678, Afile: trade_items

 

What have i done wrong?

 

Although I prefer using HeidiSQL, just to be sure, here's screenshot of phpMyAdmin for dayz.st (CHERNO):

By the looks of it, you forgot the "order" part.

itememeralddb.png

 

Easiest and safest way to do this is probably simply cloning / copying an existing row and editing it

Link to comment
Share on other sites

now i use all gums, but have problem in 442 line:

player removeMagazine "ItemEmerald";

I pick up the desired stones?

 

how to write:

 

If  fnc_Pos_fired3 then player removeMagazine "ItemCitrine"; 

 

in spawn.sqf

   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;
 player removeMagazine "ItemCitrine"; // add this line
 };

and remove or comment out third line here:

PVDZE_obj_Publish = [dayz_characterID,_tmpbuilt,[_dir,_location],_classname];
publicVariableServer "PVDZE_obj_Publish";
//player removeMagazine "ItemEmerald"; // comment out or remove this line
Link to comment
Share on other sites

Hmm.. as soon as i include this mod in my description.ext i just get Wait for host when joining my server. What could be wrong?

Could be few things, missed a comma or semicolon

Or one of resources here are already defined somewhere else, all you need to do is simply delete that specific class from my defines.hpp

 

Login to your FTP root dir and check .RPT log file to see what causes it, no point in guessing

Link to comment
Share on other sites

Hmm.. as soon as i include this mod in my description.ext i just get Wait for host when joining my server. What could be wrong?

You was reading the whole threat ?

Maybe you defined a *.hpp class twice.

Most happenings are "RscTitle" and "RscPicture"

 

 

 

raymix

First of all, again thank you for this nice script, its awesome! Now i have 3 building systems at my server :P

But i have to say anything about the new remove function:

 

I´m really glad you figured out a way for this, i know it isnt easy. But:

The whole day i was trying to find a way to integrate to building and/or the remove funtion into the _modular building/remove function, sadly without success.

I have tried to build the interior objects with playerUID instead of objectID, doesnt work.... I tryed to merge your remove.sqf with the one for "TIE playerUID to all modular buildings" without success...

Perhaps in a few days i know more, but for now my knowledge is at the end :)

 

The main reason for trying these things was: If you build an interior obj. you can remove it now, BUT if you stand like 50 meters away and look at this object you always get the option for remove... It isnt great if you see the remove funtion "everytime" you move your mouse over the object, in many distance away too... you know what i mean ? I dont found any option to decrease the distance.. I tried the value "_dis = 10" without success...

 

Next thing is:

You can build interior stuff, can remove it, BUT after restart you dont have the remove option anymore, doesnt matter if you die or not.

Then you can only destroy these buildings with chainsaw (the best method i think) but not all of these buildings too... There are some objects wich you dont can destroy because your chainsaw dont hit them.... The chainsaw is hitting the ground or something else around, but the objects are dont being hitten.... Is like they are invisible for weapons... :/

 

Perhaps we can find a solution for these things ?

 

 

And a little hint for you:

In the categorie Chairs the object "MAP_ch_mod_h" you called twice ! In items.sqf and in variables.sqf.... Further you have listed a wrong object: ""MAP_Dhangar_bowrnskrin" in the same files. I have fixed it for myself, but i want to tell you just for info. :)

 

EDIT:

Ah, one thing i forgotten:

Any player is able to remove the interior stuff of all players. Seems to be setted up as _isWreck for all players, u know ? :)

Link to comment
Share on other sites

if u choose, then cancel, stoun disappears

need no like this:

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;
fordel = 1; // add this line
};
PVDZE_obj_Publish = [dayz_characterID,_tmpbuilt,[_dir,_location],_classname];
publicVariableServer "PVDZE_obj_Publish";
if (fordel == 1) then {player removeMagazine "ItemEmerald";};

i not test it, code looks right?

Link to comment
Share on other sites

Could be few things, missed a comma or semicolon

Or one of resources here are already defined somewhere else, all you need to do is simply delete that specific class from my defines.hpp

 

Login to your FTP root dir and check .RPT log file to see what causes it, no point in guessing

 

My RPT file says the following: ErrorMessage: File mpmissions\dayz_private_1.epoch.chernarus\interior\defines.hpp, line 21: .RscText: Member already defined

 

Line 21 is CT_XBUTTON. Is that possible?

Link to comment
Share on other sites

 

The main reason for trying these things was: If you build an interior obj. you can remove it now, BUT if you stand like 50 meters away and look at this object you always get the option for remove... It isnt great if you see the remove funtion "everytime" you move your mouse over the object, in many distance away too... you know what i mean ? I dont found any option to decrease the distance.. I tried the value "_dis = 10" without success...

 

Next thing is:

You can build interior stuff, can remove it, BUT after restart you dont have the remove option anymore, doesnt matter if you die or not.

Then you can only destroy these buildings with chainsaw (the best method i think) but not all of these buildings too... There are some objects wich you dont can destroy because your chainsaw dont hit them.... The chainsaw is hitting the ground or something else around, but the objects are dont being hitten.... Is like they are invisible for weapons... :/

 

Perhaps we can find a solution for these things ?

 

 

And a little hint for you:

In the categorie Chairs the object "MAP_ch_mod_h" you called twice ! In items.sqf and in variables.sqf.... Further you have listed a wrong object: ""MAP_Dhangar_bowrnskrin" in the same files. I have fixed it for myself, but i want to tell you just for info. :)

 

EDIT:

Ah, one thing i forgotten:

Any player is able to remove the interior stuff of all players. Seems to be setted up as _isWreck for all players, u know ? :)

 

1) you need to go into fn_selfactions and find out distance between object and player, then in IF statement, you change it to if (emeraldItem and dis > 10) then {,,,

which checks that if item is in array of emerald items list AND if distance to it is less than 10m, it will set that statement true

 

2) you can remove stuff after restart or death... go into first person and zoom in to an item while standing really close.

 

3) There are actually 2 objects different MAP_Dhangar_bowrnskrin objects, check the name carefully

 

4) only owner or tagged friend of owner of nearby plotpole can remove items (if its present). I suggest you to stick with that solution. If no plotpole nearby, anyone can remove them.

Link to comment
Share on other sites

if u choose, then cancel, stoun disappears

need no like this:

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;
fordel = 1; // add this line
};
PVDZE_obj_Publish = [dayz_characterID,_tmpbuilt,[_dir,_location],_classname];
publicVariableServer "PVDZE_obj_Publish";
if (fordel == 1) then {player removeMagazine "ItemEmerald";};

i not test it, code looks right?

 

It looks alright, but you might want to disable fordel by default, just to be safe.

Also since you are trying to treat it as a bool, then I guess to keep it clean, do it like:

fordel = false; // disable to be on safe side, so wrong item is not deleted, keep outside of function

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;
fordel = true; // add this line
};
PVDZE_obj_Publish = [dayz_characterID,_tmpbuilt,[_dir,_location],_classname];
publicVariableServer "PVDZE_obj_Publish";
if (fordel) then {player removeMagazine "ItemEmerald";};
Link to comment
Share on other sites

My RPT file says the following: ErrorMessage: File mpmissions\dayz_private_1.epoch.chernarus\interior\defines.hpp, line 21: .RscText: Member already defined

 

Line 21 is CT_XBUTTON. Is that possible?

 

Delete this part in defines.hpp

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;
   
};
Link to comment
Share on other sites

The main reason for trying these things was: If you build an interior obj. you can remove it now, BUT if you stand like 50 meters away and look at this object you always get the option for remove... It isnt great if you see the remove funtion "everytime" you move your mouse over the object, in many distance away too... you know what i mean ? I dont found any option to decrease the distance.. I tried the value "_dis = 10" without success...

 

lol, distance check was easier than I expected. First post updated, as well

in fn_selfActions.sqf

 

change

if((_isEmeraldItem) and _canDo) then { 

to

if((_isEmeraldItem and (player distance cursorTarget <= 2)) and _canDo) then {
Link to comment
Share on other sites

hehe, i see... this will be an updating threat so far :P

but i like your work ! :)

 

in a few minutes i will test the distance thing.

 

PlotPole i dont use, like i said a few posts earlier.

But is there no solution to build the interior´s with playerUID, so that only the constructor can remove them ?

That was, for what i was spending my last day :)

Link to comment
Share on other sites

Hello Raymix,

 

 Love this idea and trying to implement into my server on Dayz.St. I have followed all instructions. Had to remove a few defines including RscText, RscPicture and RscShortCutButton. Server loads fine but when i right click on an emerald nothing happens? I already have a custom folder and variable.sqf. Added the interior folder to my root of my mission. Put Extra_rsc in my custom folder. Deleted the defines i needed to get the server to start. No errors in RPT. Not sure what I am missing? Doesnt there need to be a add to Ui_selectslot?

Link to comment
Share on other sites

 

     1. extract ui_selectSlot.sqf from dayz_code.pbo to scripts\

     2. extract compiles.sqf from dayz_code.pbo to scripts\

     3. change in init.sqf:

 

​this:

​call compile preprocessFileLineNumbers "\z\addons\dayz_code\init\compiles.sqf"; //Compile regular functions

change to:

call compile preprocessFileLineNumbers "scripts\compiles.sqf"; //Compile regular functions

     4. in compiles.sqf:

 

this:

player_selectSlot = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\ui_selectSlot.sqf";

change to:

player_selectSlot = compile preprocessFileLineNumbers "scripts\ui_selectSlot.sqf";

 

A better alternative to extracting your compiles.sqf: 

Link to comment
Share on other sites

A better alternative to extracting your compiles.sqf: 

 

This is exactly how i do mine. Learned from Xrixes this method. :) Question still remains, does this script need anything else to make it work? Right Click an emerald and nothing happens.....

Link to comment
Share on other sites

Ok, just noticed this in the spawn.sqf......."Recommended to use alongside Maca's excellent 'right clicks' system: http://epochmod.com/...tions-to-items/"

 

I found this link http://epochmod.com/forum/index.php?/topic/4834-add-right-click-options-to-items/)...

 

But the post is gone... :(

 

 

Ok got it. Thanks to F507DMT's post about adding the right click option. Thanks.

Link to comment
Share on other sites

Quick question: My fn_selfactions is in my scripts folder. Will this cause an issue?

not at all! This script reuses your custom compiles and scripts instead of enforcing new paths and works with them, not against.

Link to comment
Share on other sites

Raymix,

 

Is it possible to make this script only available to admins or trusted players? The reason I ask is due to the remove option. I noticed I can remove Wells and Water Barrels etc around the map. I imagine anything that is default on the map in dayz that is on this list can be removed now. I am thinking I would like to make the script only available to certain people. Thoughts?

 

P.s. Love the script! Takes base building to a whole new level and furthers the enjoyment out of making a base/home for players! Thank you so much for your contribution to this community! You rock!!!!!

 

P.s.s Also, If i wanted to add more objects to the items list is it as easy as adding them to itemlist.sqf or is there more to it?

 

Zero

Link to comment
Share on other sites

Raymix,

 

Is it possible to make this script only available to admins or trusted players? The reason I ask is due to the remove option. I noticed I can remove Wells and Water Barrels etc around the map. I imagine anything that is default on the map in dayz that is on this list can be removed now. I am thinking I would like to make the script only available to certain people. Thoughts?

 

P.s. Love the script! Takes base building to a whole new level and furthers the enjoyment out of making a base/home for players! Thank you so much for your contribution to this community! You rock!!!!!

 

P.s.s Also, If i wanted to add more objects to the items list is it as easy as adding them to itemlist.sqf or is there more to it?

 

Zero

 

Hi, Zero, thanks for kind words

 

1) There are 2 solutions to that problem:

     a] if trusted only:

if((_isEmeraldItem and (player distance cursorTarget <= 2) and (getPlayerUID player) in ["123456789","987654321"]) and _canDo) then {

    b] add plotpole check to fn_selfActions, borrow code from remove.sqf so only objects near plotpole can be removed:

_findNearestPoles = nearestObjects[player, ["Plastic_Pole_EP1_DZ"], 30];
_findNearestPole = [];
{if (alive _x) then {_findNearestPole set [(count _findNearestPole),_x];};} foreach _findNearestPoles;

_IsNearPlot = count (_findNearestPole);

if((_isEmeraldItem and (player distance cursorTarget <= 2) and (_IsNearPlot >= 1) and _canDo) then {

Haven't tested, but you get the idea.

 

2) Thank you

3) It's easy. Go into 3D editor and spawn ton of items on ground you want to add. Save mission file and open it in my documents > arma 2 > your name > missions > mission.sqf for classnames

To add extra menu, you need to edit dialogs and extra_rc

To add to existing menus you need to edit, items.sqf and dayz_allowedObjects. Dont forget fn_Selfactions, too to be able to remove them

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
×
×
  • Create New...