Vampurica / DZMS-DayZMissionSystem

A logic and useability rewrite of the DayZChernarus Mission System
17 stars 22 forks source link

Missions Vehicles Exploding #32

Closed kflo01 closed 10 years ago

kflo01 commented 10 years ago

Hey its Kflo01 from opendayz.net

I have updated to the latest DZMS and mission vehicles explode when players get intot them.

mudzereli commented 10 years ago

Are you using Epoch?

If so, are you using a custom map like Tavi/Panthera/etc?

kflo01 commented 10 years ago

No, I am using Overwatch.

kflo01 commented 10 years ago

I didnt mean to close

Vampurica commented 10 years ago

Can you look into what the object moniter is for Overwatch @mudzereli ? I thought it was the vanilla line but I guess I was wrong.

AmberHelios commented 10 years ago

yeah its dayz_serverObjectMonitor

how about forcing the object monitor every time you set up a vehicle

DZMSgetObjMon = {
    private ["_objectMonitor"];
    _objectMonitor = switch (true) do {
        case ((isNil "PVDZE_serverObjectMonitor") && {(!isNil "dayz_serverObjectMonitor")}): {dayz_serverObjectMonitor};
        case (!isNil "PVDZE_serverObjectMonitor"): {PVDZE_serverObjectMonitor};
        case default {[]};
    };

    _objectMonitor
}

and then you can do your protects like

DZMSSetupVehicle = {
    private ["_object","_objectID","_ranFuel","_objectMonitor"];
    _object = _this select 0;
    _objectMonitor = [] call DZMSgetObjMon;
    _objectMonitor set [count _objectMonitor,_object];
    _objectID = str(round(random 999999));
    _object setVariable ["ObjectID", _objectID, true];
    _object setVariable ["ObjectUID", _objectID, true];

    waitUntil {(!isNull _object)};

    clearWeaponCargoGlobal _object;
    clearMagazineCargoGlobal _object;

    _ranFuel = random 1;
    if (_ranFuel < .1) then {_ranFuel = .1;};
    _object setFuel _ranFuel;
    _object setvelocity [0,0,1];
    _object setDir (round(random 360));

    //If saving vehicles to the database is disabled, lets warn players it will disappear
    if (!(DZMSSaveVehicles)) then {
        _object addEventHandler ["GetIn",{
            _nil = [nil,(_this select 2),"loc",rTITLETEXT,"Warning: This vehicle will disappear on server restart!","PLAIN DOWN",5] call RE;
        }];
    };

    true
};

//Prevents an object being cleaned up by the server anti-hack
DZMSProtectObj = {
    private ["_object","_objectID","_objectMonitor"];
    _object = _this select 0;
    _objectMonitor = [] call DZMSgetObjMon;
    _objectMonitor set [count _objectMonitor,_object];
    _objectID = str(round(random 999999));
    _object setVariable ["ObjectID", _objectID, true];
    _object setVariable ["ObjectUID", _objectID, true];

    if (_object isKindOf "ReammoBox") then {
        // PermaLoot on top of ObjID because that "arma logic"
        _object setVariable ["permaLoot",true];
    };

    if (!((typeOf _object) in ["USVehicleBox","USLaunchersBox","AmmoBoxSmall_556","AmmoBoxSmall_762","MedBox0","USBasicWeaponsBox","USBasicAmmunitionBox","RULaunchersBox"]) || DZMSSceneryDespawnLoot) then {
        _object setVariable["DZMSCleanup",true];
    };
    true
};

maybe

mudzereli commented 10 years ago

This may work but I have had problems before bringing public variables to local scope .

I think it doesn't bring a reference to the array but rather a new array with the same elements.

I am not 100% sure though. Have you tested this out?

Might be able to do it by using call compile and the string for the objectmonitor publicvariable though.

mudzereli commented 10 years ago

the way functions work with how they return objects -- this may actually work instead of call compile + string but need to test.

DZMSgetObjMon = {
    switch (true) do {
        case ((isNil "PVDZE_serverObjectMonitor") && {(!isNil "dayz_serverObjectMonitor")}): {dayz_serverObjectMonitor};
        case (!isNil "PVDZE_serverObjectMonitor"): {PVDZE_serverObjectMonitor};
        case default {[]};
    };
}
AmberHelios commented 10 years ago

no i haven't tested it my servers run vanilla mod or epoch atm, suppose i could setup a test server on one of my boxes and give it a quick go see if i can replicate the first issue

mudzereli commented 10 years ago

No worries. I was just wondering if you had tried it since I had problems with a similar scenario before. I do agree with the use of a function call to get the proper monitor though.

kflo01 commented 10 years ago

Sorry I am a bit lost in this thread. What excatly do I need to change in my overwatch files to get this to work? I keep telling my players so vehicles may be booby trapped, not too sure how long they will keep beliving it. LOL.

AmberHelios commented 10 years ago

just knocking up a overwatch server to test and ill get back to you :)

AmberHelios commented 10 years ago

im having no issues with overwatch 0.25 with the default files, with the mission vehicles,

any chance you can send me a copy of your mission and server files,

you can pm me,

http://mustygaming.com/Forum/index.php?/user/12-amberhelios/ http://forums.dayzgame.com/index.php?/user/104827-amberhelios/

if you want

and ill run your files on my server and see if i cant sort out why it no likey

Vampurica commented 10 years ago

My guess is that the cause is database connection lag when its trying to save both vehicles.

Fixes could be either changing DZMSSaveToHive.sqf to a compiled function so it runs inline, or declare a variable and have the script check for the variable at start, and nil it at the end.

mudzereli commented 10 years ago

I won't be able to personally install OW and check till this weekend but it sounds like the problem might just be a problem specific to @kflo01.

@kflo01, if you haven't gotten in touch with Amber and you still want some help just let me know an email I can contact you at and I can check your setup.

Otherwise I'll try to duplicate it this weekend.

kflo01 commented 10 years ago

Hey Vampire I do still want help just been swamped with work then have a funeral. today I am home 5:00pm EST. Maybe you can hop on my Teamspeak server and we can work on it a bit........I am still telling players its booby trapped lol. Funny thing is even if I get in a vehicle in god mode I die. thats one hell of a explosion. 192.95.54.193 that is the IP of my TS. [RD] Kflo01 is the name. Let me kow if that works. I am sure its just a line or 2 of code that needs to be replaced or edited.

On Wed, Mar 5, 2014 at 9:51 AM, mudzereli notifications@github.com wrote:

I won't be able to personally install OW and check till this weekend but it sounds like the problem might just be a problem specific to @kflo01https://github.com/kflo01.

@kflo01 https://github.com/kflo01, if you haven't gotten in touch with Amber and you still want some help just let me know an email I can contact you at and I can check your setup.

Otherwise I'll try to duplicate it this weekend.

Reply to this email directly or view it on GitHubhttps://github.com/SMVampire/DZMS-DayZMissionSystem/issues/32#issuecomment-36749214 .

"Willpower is trying very hard not to do something you want to do very much." - John Ortberg

mudzereli commented 10 years ago

Hey I'm not Vampire but I do work on the code so I can help. Can you please send me a copy of your server files? dayz@mudzereli.com It will be faster for me to check if there are any issues there first than installing OW. Also, a copy of the server's RPT log would be helpful as well -- specifically, after someone has been killed by a vehicle.

kflo01 commented 10 years ago

Ok no problem which excat files do you need sent I will .zip them up for you and mail them over

On Wed, Mar 5, 2014 at 10:01 AM, mudzereli notifications@github.com wrote:

Hey I'm not Vampire but I do work on the code so I can help. Can you please send me a copy of your server files? mudz@charter.net It will be faster for me to check if there are any issues there first than installing OW.

Reply to this email directly or view it on GitHubhttps://github.com/SMVampire/DZMS-DayZMissionSystem/issues/32#issuecomment-36750275 .

"Willpower is trying very hard not to do something you want to do very much." - John Ortberg

mudzereli commented 10 years ago

i need the dayz_server.pbo and the arma2oaserver.RPT files

kflo01 commented 10 years ago

Attached using Google drive. Let me know what you see arma2oaserver.RPThttps://docs.google.com/file/d/0B4y1zST-O1R0Vk9QakRSV25Bd1U/edit?usp=drive_web

dayz_server.pbohttps://docs.google.com/file/d/0B4y1zST-O1R0WVJJN28zTmdWVGs/edit?usp=drive_web

On Wed, Mar 5, 2014 at 10:03 AM, mudzereli notifications@github.com wrote:

i need the _dayzserver.pbo and the arma2oaserver.RPT files

Reply to this email directly or view it on GitHubhttps://github.com/SMVampire/DZMS-DayZMissionSystem/issues/32#issuecomment-36750637 .

"Willpower is trying very hard not to do something you want to do very much." - John Ortberg

mudzereli commented 10 years ago

You have 2 different mission plugins installed. The original Chernarus Mission system and now this one. I would not recommend running both at the same time. Try running it with only the DZMS mission system and see if you still have problems.

kflo01 commented 10 years ago

I orginally took out the Chernarus Mission system and was running just DZMS. Still was happening. Running both still happen. On the Chernarus Mission system it didnt happen....only DZMS....thing is doesnt happen on all DZMS missions. Just some of them. Werid.

On Wed, Mar 5, 2014 at 11:53 AM, mudzereli notifications@github.com wrote:

You have 2 different mission plugins installed. The original Chernarus Mission system and now this one. I would not recommend running both at the same time. Try running it with only the DZMS mission system and see if you still have problems.

Reply to this email directly or view it on GitHubhttps://github.com/SMVampire/DZMS-DayZMissionSystem/issues/32#issuecomment-36764786 .

"Willpower is trying very hard not to do something you want to do very much." - John Ortberg

AmberHelios commented 10 years ago

you need to run the latest overwatch files your currently running out of date ones there was an issue with 2 server cleanups running with the files you have

you have a few errors in your rpt that you should take a look at busses_coast.sqf

_unit addMagazine "";
_unit addMagazine "";

these lines need the correct variable adding ei _unit_2

CfgTownGeneratorDefault.sqf

class SouthernAirport {

position[] = {4909,2399}; size = 360;

    .

    .

    class Object2 {
        type = "Rubbish1";
        position[] = {4913.85, 2455.53, 0};
        direction = 247;
        onFire = 0;
    };

    .

remove the fullstops

and it looks like you have some corrupt data in the hive causing some issues too
7:07:24 Error in expression <],["wheel_2_2_steering",0],["motor",0],["sklo predni > 7:07:24 Error position: <"sklo predni > 7:07:24 Error Missing "" 7:07:24 Error in expression <],["wheel_2_2_steering",0],["motor",0],["sklo predni > 7:07:24 Error position: <"sklo predni >

kflo01 commented 10 years ago

the busses_coast.sqf is a guy in a taxi driving back and forth in chenro CfgTownGeneratorDefault.sqf is something I did last night trying to remove trash but keep certain buildings in the game but it didnt work I can just delete the call compile in my init.sqf for that. PRoblem with the missions vehilces was well before that.

But this:

7:07:24 Error in expression <],["wheel_2_2_steering",0],["motor",0],["sklo predni > 7:07:24 Error position: <"sklo predni > 7:07:24 Error Missing "" 7:07:24 Error in expression <],["wheel_2_2_steering",0],["motor",0],["sklo predni > 7:07:24 Error position: <"sklo predni >

I have no idea what that is, whats causing it or how to fix it.

On Wed, Mar 5, 2014 at 12:06 PM, AmberHelios notifications@github.comwrote:

you need to run the latest overwatch files your currently running out of date ones there was an issue with 2 server cleanups running with the files you have

you have a few errors in your rpt that you should take a look at busses_coast.sqf

_unit addMagazine ""; _unit addMagazine "";

these lines need the correct variable adding ei _unit_2

CfgTownGeneratorDefault.sqf

class SouthernAirport {

position[] = {4909,2399}; size = 360;

.

.

class Object2 {
    type = "Rubbish1";
    position[] = {4913.85, 2455.53, 0};
    direction = 247;
    onFire = 0;
};

.

remove the fullstops

and it looks like you have some corrupt data in the hive causing some issues too

7:07:24 Error in expression <],["wheel_2_2_steering",0],["motor",0],["sklo predni > 7:07:24 Error position: <"sklo predni > 7:07:24 Error Missing "" 7:07:24 Error in expression <],["wheel_2_2_steering",0],["motor",0],["sklo predni > 7:07:24 Error position: <"sklo predni >

Reply to this email directly or view it on GitHubhttps://github.com/SMVampire/DZMS-DayZMissionSystem/issues/32#issuecomment-36766477 .

"Willpower is trying very hard not to do something you want to do very much." - John Ortberg

AmberHelios commented 10 years ago

no they wont cause the issues with the missions was just letting you know of the other errors you were getting. and how to fix them search for ],["wheel_2_2_steering",0],["motor",0],["sklo predni in your database and either remove or edit the entry.

the problem you having with the missions is out of date server files

you are also having errors from your DZAI you are missing the DZAI\spawn_functions\veh_destroyed.sqf

also having errors with the animated helicrash site

    [""m8_compact"", "weapon"],
    [""M60A4_EP1"", "weapon"],
    [""vil_Groza_SC"", "weapon"],

remove the double quotes from the classnames

kflo01 commented 10 years ago

Damn gotcha on the crash names for the heli I have to find that veh_destroyed Not sure how I lost that file. How do I update my server files to fix the missions? I dont want to update all of them jus tthe ones needed to resolve the issue.

On Wed, Mar 5, 2014 at 12:29 PM, AmberHelios notifications@github.comwrote:

no they wont cause the issues with the missions was just letting you know of the other errors you were getting. and how to fix them search for

],["wheel_2_2_steering",0],["motor",0],["sklo predni in your database and either remove or edit the entry.

the problem you having with the missions is out of date server files

you are also having errors from your DZAI you are missing the DZAI\spawn_functions\veh_destroyed.sqf

also having errors with the animated helicrash site

[""m8_compact"", "weapon"],
[""M60A4_EP1"", "weapon"],
[""vil_Groza_SC"", "weapon"],

remove the double quotes from the classnames

Reply to this email directly or view it on GitHubhttps://github.com/SMVampire/DZMS-DayZMissionSystem/issues/32#issuecomment-36769006 .

"Willpower is trying very hard not to do something you want to do very much." - John Ortberg

kflo01 commented 10 years ago

Found this http://opendayz.net/threads/veh_destroyed-sqf-not-fou.18721/

to fix the one problem with DZAI

On Wed, Mar 5, 2014 at 1:00 PM, Kenny Graves kenny.graves@gmail.com wrote:

Damn gotcha on the crash names for the heli I have to find that veh_destroyed Not sure how I lost that file. How do I update my server files to fix the missions? I dont want to update all of them jus tthe ones needed to resolve the issue.

On Wed, Mar 5, 2014 at 12:29 PM, AmberHelios notifications@github.comwrote:

no they wont cause the issues with the missions was just letting you know of the other errors you were getting. and how to fix them search for

],["wheel_2_2_steering",0],["motor",0],["sklo predni in your database and either remove or edit the entry.

the problem you having with the missions is out of date server files

you are also having errors from your DZAI you are missing the DZAI\spawn_functions\veh_destroyed.sqf

also having errors with the animated helicrash site

[""m8_compact"", "weapon"],
[""M60A4_EP1"", "weapon"],
[""vil_Groza_SC"", "weapon"],

remove the double quotes from the classnames

Reply to this email directly or view it on GitHubhttps://github.com/SMVampire/DZMS-DayZMissionSystem/issues/32#issuecomment-36769006 .

"Willpower is trying very hard not to do something you want to do very much." - John Ortberg

"Willpower is trying very hard not to do something you want to do very much." - John Ortberg

kflo01 commented 10 years ago

Ok fixed all the errors besides the one in the database the hive error. Not sure how those fixes will affect performance but they are fixed.

On Wed, Mar 5, 2014 at 1:11 PM, Kenny Graves kenny.graves@gmail.com wrote:

Found this http://opendayz.net/threads/veh_destroyed-sqf-not-fou.18721/

to fix the one problem with DZAI

On Wed, Mar 5, 2014 at 1:00 PM, Kenny Graves kenny.graves@gmail.comwrote:

Damn gotcha on the crash names for the heli I have to find that veh_destroyed Not sure how I lost that file. How do I update my server files to fix the missions? I dont want to update all of them jus tthe ones needed to resolve the issue.

On Wed, Mar 5, 2014 at 12:29 PM, AmberHelios notifications@github.comwrote:

no they wont cause the issues with the missions was just letting you know of the other errors you were getting. and how to fix them search for

],["wheel_2_2_steering",0],["motor",0],["sklo predni in your database and either remove or edit the entry.

the problem you having with the missions is out of date server files

you are also having errors from your DZAI you are missing the DZAI\spawn_functions\veh_destroyed.sqf

also having errors with the animated helicrash site

[""m8_compact"", "weapon"],
[""M60A4_EP1"", "weapon"],
[""vil_Groza_SC"", "weapon"],

remove the double quotes from the classnames

Reply to this email directly or view it on GitHubhttps://github.com/SMVampire/DZMS-DayZMissionSystem/issues/32#issuecomment-36769006 .

"Willpower is trying very hard not to do something you want to do very much." - John Ortberg

"Willpower is trying very hard not to do something you want to do very much." - John Ortberg

"Willpower is trying very hard not to do something you want to do very much." - John Ortberg