Jump to content
  • 0

kord gun, m2 and spotlights now kill.


IrishMob

Question

13 answers to this question

Recommended Posts

  • 0

Yep I just added a Kord, searchlight and Dushka static tripods to defend a AI static base and they kill you on use. 

 

I have the Sarge AI parachute west fix in place, but I still get killed and the items deleted. I was going to add the admin tools fix to the server object file but the line in the new file is completely different to old one and includes "locked" so I am not sure if I should remove it. 

 

The "Killed a Hacker" line is apart of the server clean up and so has nothing to do with anti hacks or battleye. Although should you fire the weapon without modifying battleyes create vehicle it would kick you. 

 

Any help appreciated. 

Link to comment
Share on other sites

  • 0

This is because you have not set the servercleanup.fsm to ignore those objects just like it ignores a parachute. you need to edit that file. If you read the code you will realize that it checks all vehicles (yes parachute is a vehicle, even your player is considered a 'vehicle' to arma2) for its ID, if it doesn't have one like a DB object it deletes it and sets the damage of the player to 1 to kill them, and then sends to your RPT the "killing a hacker blah blah blah" dialogue.

 

So to fix, just include the objects you wish it to ignore to stop it from killing the player.

Link to comment
Share on other sites

  • 0

I may be wrong but I was under the impression the parachute bit of code applied to all vehicles spawning in since it protects Sarge ground and air vehicles.

 

How and where would be add the class names as there are quite a few from the crashed Huey with door gun used in BBC(?) dead castle to Kords, Dushkas, M2's etc etc. In addition to stop them from being deleted would we add something into the safe objects list or just use something like 

 

init="this setVariable [""Sarge"",1,true]";

 

 

No I don't know what the above really does but apparently if added to the vehicle code in the mission file it prevents mission vehicles being deleted. Totally confused since they were working in the past. 

Link to comment
Share on other sites

  • 0

The parachute only applies to the parachute, if you read the code its saying delete any object that is not like a parachute, not listed as safe, etc etc. As for "sarge" he set it up so that his variable applies to all his AI, so when adding his snippet of code, it will ignore anything tied to that variable. If someone is not using sarge's AI that wouldn't help them. It would be better add the objects as an allowed object so it would be considered safe.

 

Replacing to the old server clean up wont help, that section is basically the same. You can it, but be very careful doing so and check your server RPT for errors. Because if you screw up the logic, it may disable this protection all together and spam your RPT with errors. If you read the code you can see the various variables that connect to other files that are in that section. Follow the trail and you can see where the clean up fsm gets its information from.

 

There is no need to edit anything in the mission.sqm or a mission.sqf where you add objects and put any code in the init. Just edit your allowed objects and then you are done. No killing of players, no deleting of objects. Doing this 100% works, i used DHSKM_GUE and Searchlight_RUS in my testing, all working correctly, no errors in RPT, no players dieing, no objects deleting.

Link to comment
Share on other sites

  • 0

Thanks for the help, will have a look and try and track it down. One other thing, before 1.0.2 adding sarges code snippet to server clean up prevented AI vehicles disappearing as a side effect to allowing the admin tools to spawn vehicles in. I tired to add that back in but since that particular line of code has changed it no longer works and as you say, RPT errors pop up. 

 

Basically the issue I am having is you can force AI vehicle patrols to lose their ride by running at them, the vehicle disappears and when they dismount they don't see you. 

Link to comment
Share on other sites

  • 0

Here's a bit to help you figure it out.

    class vehicle_cleanup
    {
      name = "vehicle_cleanup";
      init = /*%FSM<STATEINIT""">*/"_safety = dayz_serverObjectMonitor;" \n
       "" \n
       "//Check for hackers" \n
       " {" \n
       "	if(vehicle _x != _x && !(vehicle _x in _safety) && (isPlayer _x)  && (typeOf vehicle _x) != ""ParachuteWest"") then {" \n
       "		diag_log (""CLEANUP: KILLING A HACKER "" + (name _x) + "" "" + str(_x) + "" IN "" + (typeOf vehicle _x));" \n
       "		(vehicle _x) setDamage 1;" \n
       "		_x setDamage 1;" \n
       "	 };" \n
       " } forEach allUnits;" \n
       "" \n
       "dayz_serverObjectMonitor = _safety;"/*%FSM</STATEINIT""">*/;
      precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
      class Links
      {
        /*%FSM<LINK "true">*/
        class true
        {
          priority = 0.000000;
          to="general_cleanup";
          precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
          condition=/*%FSM<CONDITION""">*/"true"/*%FSM</CONDITION""">*/;
          action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
        };
        /*%FSM</LINK>*/
      };
    };

This is the section that has all the information you will need.

 

&& (typeOf vehicle _x) != ""ParachuteWest""

 

Parachutes are a vehicle, and this filters out parachutes from the clean up so it does not kill the player when they are in that vehicle which has no ID, and thus not considered safe.

 

Just add the vehicles (static guns are 'vehicles' too) to that section of the code so they can get in it without being killed.

 

Next, if your object is deleted and ejects the player afterwards, you need to follow the _safety = dayz_serverObjectMonitor; code. You will find what objects are listed as 'safe' by an array of allowed objects. You can add any object (buildings are 'vehicles' too) to this array and it will not delete them.

 

I hope this helps!

 

Also do you have any  "Deleting object ... with invalid ID at pos..." type of lines in your RPT after a player gets into the static guns?

Link to comment
Share on other sites

  • 0

Hi Armifer that is basically what I was looking at, there are similar instances I found through trawling through many threads. I was hoping for something easier! As a table where you entered the items "allowed" and not. I don't need many just one or two, it will hopefully bring back some server fps by reducing the number of static AI by adding a few force multipliers in. 

 

That is a great help thank you. I wasn't sure whether to add them into the FSM or if it was the serverupdate file. 

 

Yes lots of invalid ID's, I commented out the guns as it was killing the AI as well. Poor Rincewind was having a bad day. Once it killed the AI it deleted the object. 

 

Still trying to work out how to stop it deleting downed AI choppers as I believe this will also fix the land patrols being deleted in proximity to a player. Previous to 1.0.2 I had a section from the admin tools which stopped this, with vehicles persisting until restart but it doesn't seem to work now. Or perhaps I just did it wrong. 

Link to comment
Share on other sites

  • 0
&& (typeOf vehicle _x) != ""ParachuteWest"" or (typeOf vehicle == "KORD_high_TK_EP1") then {" \n

Or am I being special?

 

Not sure if it is relevant to this cleanup issue but I am still getting an aggressive cleanup of dead zombies, where whole groups of corpses disappear when you get close to them or occasionally it just doesn't delete them at all with bodies persisting for over 5 minutes (AI and zombie). 

 

I think around this time it purges ammo boxes etc as well. 

 

*Edit..again. So I've created a custom variables file and added the ammo boxes/crates to hopefully prevent deletion by adding them to the allowed object lists. 

 

To prevent deletion of sarge vehicles and  the statics I think the server_updateObject,sqf looks promising, at the top of the file is a typeOf _object and when I look down the object deletion line saying to ignore parachutewest and locked objects so would I add the specifics there or at the top?

 

Looks like I also had a double entry at the group clean up, the original line with the sarge amended one underneath can't of helped.

Link to comment
Share on other sites

  • 0

You pretty much got it! Just change or to '&&', as you want it to ignore parachute AND kord AND whatever else. If you put it as or, one of the conditions doesn't need to be true so it will still kill the player. The 2nd part is reading 'or' type of vehicle equal to kord, meaning your telling it to kill the player if the vehicle is a kord. Look at again at the parachute portion, you want it to not equal the type of vehicle you are specifying. You are very close to solving this one! I hope that you have learned something new while doing this, as teaching you how to do it rather than posting code to copy and paste, will let you understand and develop more changes with your server! (It's kinda like the teach a man to fish thing, is what I'm getting at here).

 

As for the allowed objects you were spot on. Putting them in that array will result in the server functions sqf in marking them as safe in this section:

check_publishobject = {
	private["_allowed","_object","_playername"];

	_object = _this select 0;
	_playername = _this select 1;
	
	_allowed = false;
       
	//diag_log format ["DEBUG: Checking if Object: %1 is allowed published by %2", _object, _playername];

	if ((typeOf _object) in dayz_allowedObjects) then {
			//diag_log format ["DEBUG: Object: %1 published by %2 is Safe",_object, _playername];
			_allowed = true;
	};
    _allowed
};

This way you dont have to list every object in that code, as you already added it to the array of allowed objects which is read by this section, marking them as safe.

 

Give it another go, post your result and then I'll show you how to do it for multiple objects. Great job so far!

Link to comment
Share on other sites

  • 0

Hi Armfer I've got the Kord adding using:

&& (typeOf vehicle _x) != ""ParachuteWest"" && (typeOf vehicle != "KORD_high_TK_EP1") then {" \n

and it works, I got in, pulled the charging handle and got the invalid ID deletion. At least it didn't kill me on the spot!

 

Fixed the delete issue as well, I had the usual comma in the wrong place that I totally missed the dozen times I read it. 

 

Regarding multiple items to the kill a hacker fix, I was wondering if it would be possible to create a variable for all static weapons, place them in this variable list and then use that in the "parachute" line. Is that possible? Bearing in mind I have no clue how one would go about doing that although I could go through the Sarge files to see how he did it. 

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
  • Discord

×
×
  • Create New...