DayZ 1.8 deployable items not saving & TrapTripwireGrenade not crafting

Fentus

Member
1.) DayZ 1.8 `deployable` items are not saving in the database is this all I need to do?
Code:
insert into deployable (class_name) values ('DomeTentStorage');
insert into deployable (class_name) values ('CamoNet_DZ');
insert into deployable (class_name) values ('Trap_Cans');
insert into deployable (class_name) values ('TrapTripwireFlare');
insert into deployable (class_name) values ('TrapBearTrapSmoke');
insert into deployable (class_name) values ('TrapTripwireGrenade');
insert into deployable (class_name) values ('TrapTripwireSmoke');
insert into deployable (class_name) values ('TrapBearTrapFlare');
2.) I can't craft the "TrapTripwireGrenade" I've looked over the code (to see if they made a mistake) and I don't see why I can't craft it, anyideas? (I can craft other items FYI)

Thanks!
 
1.) DayZ 1.8 `deployable` items are not saving in the database is this all I need to do?
Code:
insert into deployable (class_name) values ('DomeTentStorage');
insert into deployable (class_name) values ('CamoNet_DZ');
insert into deployable (class_name) values ('Trap_Cans');
insert into deployable (class_name) values ('TrapTripwireFlare');
insert into deployable (class_name) values ('TrapBearTrapSmoke');
insert into deployable (class_name) values ('TrapTripwireGrenade');
insert into deployable (class_name) values ('TrapTripwireSmoke');
insert into deployable (class_name) values ('TrapBearTrapFlare');

Seems this works but now when ever you set off a trap it stay in game even threw a restart.
A set off trap has a `inventory`='[false]'
A live trap has a `inventory`='[true]'

Dose anyone know where I should run a script to remove the trap form the game?
 
I tried this:
1.) Follow this tutorial [Tutorial] Custom Loot Tables and Adjusting Spawn Rates (this dose work on 1.8)
1.) Move the "dayz_code/traps" folder to "dayz_mission\Fixes\traps"
2.) Changed This in the "compiles.sqf" :
Code:
call compile preprocessFileLineNumbers "\z\addons\dayz_code\traps\init.sqf";
to this:
Code:
call compile preprocessFileLineNumbers "Fixes\traps\init.sqf";
then I changed the "Fixes/traps/init.sqf" to this:
Code:
// functions
setup_trap = compile preprocessFileLineNumbers "Fixes\traps\functions\setup.sqf";
arm_trap = compile preprocessFileLineNumbers "Fixes\traps\functions\arm.sqf";
disarm_trap = compile preprocessFileLineNumbers "Fixes\traps\functions\disarm.sqf";
remove_trap = compile preprocessFileLineNumbers "Fixes\traps\functions\remove.sqf";
trigger_trap = compile preprocessFileLineNumbers "Fixes\traps\functions\trigger.sqf";
 
// traps
beartrap = compile preprocessFileLineNumbers "Fixes\traps\beartrap.sqf";
beartrapflare = compile preprocessFileLineNumbers "Fixes\traps\beartrapflare.sqf";
beartrapsmoke = compile preprocessFileLineNumbers "Fixes\traps\beartrapsmoke.sqf";
tripcans = compile preprocessFileLineNumbers "Fixes\traps\tripcans.sqf";
tripflare = compile preprocessFileLineNumbers "Fixes\traps\tripflare.sqf";
tripgrenade = compile preprocessFileLineNumbers "Fixes\traps\tripgrenade.sqf";
tripsmoke = compile preprocessFileLineNumbers "Fixes\traps\tripsmoke.sqf";
then I changed the "Fixes/traps/functions/trigger.sqf" to this:
I think this also need a database call to remove the item there! Other wise it will redeploy upon a server restart! (this would have to be in the "remove.sqf")
Code:
_trap = _this select 0;
 
if (getNumber (configFile >> "CfgVehicles" >> typeOf _trap >> "singleUse") > 0) then {
    [_trap] call remove_trap;
} else {
    //[_trap] call disarm_trap;
    [_trap] call remove_trap;
};

Should this not remove the object no matter how it was triggered? Any help will be welcome!

All I am trying to achieve is when a trap is triggered and explodes it needs to be remove from the game. (I believe they should be 1 time use!)
 
I haven't tested these new features yet, but as far as i understand from your post, you can run this during your reboot process.
Code:
delete from DBNAME.instance_deployable where inventory = "[false]";

1.) DayZ 1.8 `deployable` items are not saving in the database is this all I need to do?
have you tried latest db_migrate.pl?
i did 1.8 clean install on my server and these columuns are automatically created in my deployable table.
 
I haven't tested these new features yet, but as far as i understand from your post, you can run this during your reboot process.
Code:
delete from DBNAME.instance_deployable where inventory = "[false]";


have you tried latest db_migrate.pl?
i did 1.8 clean install on my server and these columuns are automatically created in my deployable table.

No I have not, where can I get this? I did run that sql query I posted above.
 
latest reality build contains it
https://github.com/thevisad/DayZ-Private-master

and finally i understand what you're trying.I checked dayz_code/Configs/CfgVehicles/Traps.hpp and figured out that

BearTrap_DZ,Trap_Cans,TrapTripwireFlare,TrapTripwireGrenade,TrapTripwireSmoke
are set to singleUse = 0;
YES they are configured as reusable!!??
whereas you cannnot use them twice...
TrapBearTrapSmoke,TrapBearTrapFlare
are set to singleUse = 1;
 
latest reality build contains it
https://github.com/thevisad/DayZ-Private-master

and finally i understand what you're trying.I checked dayz_code/Configs/CfgVehicles/Traps.hpp and figured out that

BearTrap_DZ,Trap_Cans,TrapTripwireFlare,TrapTripwireGrenade,TrapTripwireSmoke
are set to singleUse = 0;
YES they are configured as reusable!!??
whereas you cannnot use them twice...
TrapBearTrapSmoke,TrapBearTrapFlare
are set to singleUse = 1;


Woot Ill add this to my mission and set them to 0 use think that will work?
 
Should I only have to do this?
1.) Add this line to the "description.ext"
Code:
#include "Traps.hpp"
and then ofc add the file "Traps.hpp" in the dayz_mission folder? Tried it and no luck.
 
Should I only have to do this?
1.) Add this line to the "description.ext"
Code:
#include "Traps.hpp"
and then ofc add the file "Traps.hpp" in the dayz_mission folder? Tried it and no luck.


I get this error:
Code:
ErrorMessage: File mpmissions\__cur_mp.chernarus\Traps.hpp, line 0: .TrapItems: Undefined base class 'NonStrategic'

Traps.hpp is called in CfgVehicles.hpp and CfgVehicles.hpp is called in config.cpp
Should I call CfgVehicles.hpp in the description.ext then change the Traps.hpp there?
 
well yes the base config file dayz_code/Configs/CfgVehicles.hpp also includes dayz_code/Configs/CfgVehicles/Traps.hpp
so you need to reproduce these structures in your mission file or you'll get some undefined things. its bit complicated but not so difficult.
give me some time and I'll write the how-to. though I'm currently tweaking other scripts so i cannot test it myself now and perhaps it will contains some mistake
 
well yes the base config file dayz_code/Configs/CfgVehicles.hpp also includes dayz_code/Configs/CfgVehicles/Traps.hpp
so you need to reproduce these structures in your mission file or you'll get some undefined things. its bit complicated but not so difficult.
give me some time and I'll write the how-to. though I'm currently tweaking other scripts so i cannot test it myself now and perhaps it will contains some mistake

I got it working!
I added "CfgVehicles.hpp" and the entire "CfgVehicles" folder to the dayz_mission folder then added CfgVehicles.hpp to the description.ext file. (testing traps now)
 
ah, that's exactly what i wanted to explain.
now you can modify every variable in these config files! please tell me how it works out!
 
ah, that's exactly what i wanted to explain.
now you can modify every variable in these config files! please tell me how it works out!


So I tested both singleUse = 1 and singleUse = 0 both dont delete it from the server! Ahh my brain hurts!
 
writing #include in description.ext only makes them "usable" i guess(im not sure and it already beyond me)
have you changed your trigger.sqf in your mission file
Code:
_trap = _this select 0;
if (getNumber (configFile >> "CfgVehicles" >> typeOf _trap >> "singleUse") > 0) then {
[_trap] call remove_trap;
} else {
//[_trap] call disarm_trap;
[_trap] call remove_trap;
};
into like this?
Code:
_trap = _this select 0;
if (getNumber (missionConfigfile >> "CfgVehicles" >> typeOf _trap >> "singleUse") > 0) then {
[_trap] call remove_trap;
} else {
//[_trap] call disarm_trap;
[_trap] call remove_trap;
};
i dont know what this means:p but instructed on the thread you mentioned
 
writing #include in description.ext only makes them "usable" i guess(im not sure and it already beyond me)
have you changed your trigger.sqf in your mission file
Code:
_trap = _this select 0;

if (getNumber (configFile >> "CfgVehicles" >> typeOf _trap >> "singleUse") > 0) then {
[_trap] call remove_trap;
} else {
//[_trap] call disarm_trap;
[_trap] call remove_trap;
};
into like this?
Code:
_trap = _this select 0;

if (getNumber (missionConfigfile >> "CfgVehicles" >> typeOf _trap >> "singleUse") > 0) then {
[_trap] call remove_trap;
} else {
//[_trap] call disarm_trap;
[_trap] call remove_trap;
};



Trying now that looks promising !
 
writing #include in description.ext only makes them "usable" i guess(im not sure and it already beyond me)
have you changed your trigger.sqf in your mission file
Code:
_trap = _this select 0;
if (getNumber (configFile >> "CfgVehicles" >> typeOf _trap >> "singleUse") > 0) then {
[_trap] call remove_trap;
} else {
//[_trap] call disarm_trap;
[_trap] call remove_trap;
};
into like this?
Code:
_trap = _this select 0;
if (getNumber (missionConfigfile >> "CfgVehicles" >> typeOf _trap >> "singleUse") > 0) then {
[_trap] call remove_trap;
} else {
//[_trap] call disarm_trap;
[_trap] call remove_trap;
};
i dont know what this means:p but instructed on the thread you mentioned
Not working, sad face!

Now I did try this... It works but... It dose NO DMG!
Code:
private ["_id", "_uid"];
_trap = _this select 0;
 
_id = _trap getVariable ["ObjectID", "0"];
_uid = _trap getVariable ["ObjectUID", "0"];
 
PVDZ_obj_Delete = [_id,_uid];
publicVariableServer "PVDZ_obj_Delete";
deleteVehicle _trap;
 
Can there be a delay between the last 2 lines? so it can blow up do damage then get deleted? Or would this delete other things like smoke gernades and make these traps useless :C This is annoying lol!

Could put a delay of 2 mins between last 2 lines?
And remove the take / pick up function?
?????

Only problem is are these threaded and will a sleep time mess it all up if they are not separately threaded...!?! Lol

Even if I could hide the object until a server restart could delete the objects would be fine, I just need everything to work then delete in real time, and never allow more then 1 use.
 
Dose not work dose not hide this.
Code:
private ["_id", "_uid"];
_trap = _this select 0;
 
_id = _trap getVariable ["ObjectID", "0"];
_uid = _trap getVariable ["ObjectUID", "0"];
 
PVDZ_obj_Delete = [_id,_uid];
publicVariableServer "PVDZ_obj_Delete";
 
hideObject _trap;
 
OMG this dose work...

remove.sqf
Code:
private ["_id", "_uid"];
_trap = _this select 0;
 
_id = _trap getVariable ["ObjectID", "0"];
_uid = _trap getVariable ["ObjectUID", "0"];
 
PVDZ_obj_Delete = [_id,_uid];
publicVariableServer "PVDZ_obj_Delete";
 
sleep 120;
 
deleteVehicle _trap;
trigger.sqf
Code:
_trap = _this select 0;
 
[_trap] call remove_trap;

To top it off it deletes form the database and you can't pick it up after its exploded! These are the only changes you need to make!
 
Back
Top