Jump to content

[How To] [CPC] Indestructible Bases


ToejaM

Recommended Posts

If its not in the list and you want it to be indestructible, add it to the list. I added everything I could find at the time of writing the script. Will add this to the main post to.

 

then just add this two: CinderWallDoorLocked_DZ and CinderWallDoorSmallLocked_DZ whats the problem? :D

 

This ^

 

Pretty sure you could just use the group names for them all and it would work and likely keep it updated unless Epoch add group names themself, if someone wants to confirm it I'll add it to the tutorial.

Link to comment
Share on other sites

Pretty sure you could just use the group names for them all and it would work and likely keep it updated unless Epoch add group names themself, if someone wants to confirm it I'll add it to the tutorial.

Would work, but only if you change the script in step 3, this:

if (typeOf(_object) in _cpcimmune) then ...

"in" does only work with the exact names, you can change it to something like

_isImmune = false;
{
	if (_object isKindOf _x) exitWith {
		_isImmune = true;
	};
} forEach _cpcimmune;

if (_isImmune) then ...

that should work, didn't test it though :D

 

 

I know that's a little wordy, I've written some array extensions functions for cases like this, will release it soon but for this example you could write it in 1 line like this:

_isImmune = [_cpcimmune, { _object isKindOf _x }] call AEX_any;

for that to work you will need my array function "AEX_any" of course, I just wanted to show you how helpful that could be also for many other things and for people who may not be so fluent in ArmA script or programming it makes some things easier, I hope :)

 

I don't want to hijack this thread but an easy example would be to get a list of all vehicles with damage over 50%:

[vehicles, { damage _x > 0.5 }] call AEX_filter;

that would be all to get a list of all damaged vehicles on the server :D

Edited by Axe Cop
Link to comment
Share on other sites

Around line 44 change this:

  1. _object addMPEventHandler ["MPKilled",{_this call object_handleServerKilled;}];
  2. // Test disabling simulation server side on buildables only.
  3. _object enableSimulation false;

to this:

  1. _object addMPEventHandler ["MPKilled",{_this call object_handleServerKilled;}];
  2. // Test disabling simulation server side on buildables only.
  3. _object enableSimulation false;
  4. // ### CPC Swap Object Fix
  5. _object addEventHandler ["HandleDamage", {false}];
  6. // ### CPC Swap Object Fix

 

  1. I did that but now when i join my server it either puts me in debug or just wont load me in or just disconnect me back to lobby :/  Help ?
Link to comment
Share on other sites

Strange one I think related to this, I've added the indestructible base for the concrete type walls with the maintenance fix but have an issue with tents. I presume it will be the same with any storage. 

 

I can place the item and access it but cannot actually put anything in it until I relog that character, any ideas if it is related to this or what it could be?

Link to comment
Share on other sites

Just added the fixe and double checked everything, I can't place objects anymore, pressing space bar, pgup or down doesn't do anything. Any ideas of what could cause a problem ?

 

Part of my player_build.sqf

	if(!_cancel) then {

		_classname = _classnametmp;

		// Start Build 
		_tmpbuilt = createVehicle [_classname, _location, [], 0, "CAN_COLLIDE"];
		// ### [CPC] Indestructible Base Fix
		_tmpbuilt addEventHandler ["HandleDamage", {false}];
		_tmpbuilt enableSimulation false;
		// ### [CPC] Indestructible Base Fix
		
		_tmpbuilt setdir _dir;
	
		// Get position based on object
		_location = _position;
Link to comment
Share on other sites

Hm, I don't think I have those, I'm using 1.0.2.5 and https://github.com/denisio/Dayz-Epoch-Linux-Server for my server.

I don't know if there are structural differences in the .sqf that could prevent the mod to run.

Edit : Found errors (for all the objects) in dump.log.

Edit² : Here's my server_monitor.sqf : http://www.sendspace.com/file/dnkpmf or Pastebin : http://pastebin.com/Piuqzz6s

 

Dump.log

 

if (typeOf(_object) in _cpcimmune) then {

_object addEventHandl>

12:08:58   Error position: <_cpcimmune) then {

_object addEventHandl>

12:08:58   Error Undefined variable in expression: _cpcimmune

12:08:58 File z\addons\dayz_server\system\server_monitor.sqf, line 209

12:08:58 "VEHICLE oid: 273, c: GNT_C185U, d: 0, f: 0.028"

12:08:58 Error in expression <Damage _damage;

Edit 3 : I have a _object setposATL _pos; instead of a _object setpos _pos;

I don't know if it's relevant.

Link to comment
Share on other sites

I dont think that there are differences between the versions but I run mine on the windows version and have no experience with the Linux one.

 

Its telling you that the error is around line 209, your file is completely different to mine around that number due to the spaced out file names (done so its easier for most to read). Are you using another mod that might change this even more?

 

This is my server_monitor.sqf: 

 

http://pastebin.com/d4SH6Z8X

Link to comment
Share on other sites

Nothing besides the fact I use the linux version made by denisio, Indestructible Bases is the only mod I use which modify server_monitor.
Besides this I have AGN Safezone & Chernarus Mission installed.

 

I managed to fix the line 209 error. I forgot to add the "_cpcimmune =["WoodFloor_DZ", etc" to the dayz_server.pbo. The rest is ok.

But pressing spacebar to place objects still have no effects. I don't have any noticeable errors in the log now.

Link to comment
Share on other sites

Check client side rpt, search your pc for it. Errors will be in there. If you're using someone else's file then that's why but you have very large differences to default and lots of important parts commented out. If you use my server monitor it should work fine. My changes are very basic code wise..

Link to comment
Share on other sites

As I said, I'm using this Linux Epoch Server. I did nothing other than using it. It's a vanilla server_monitor (for this version at least). :o

So I used ToejaM server_monitor and it didn't fix the problem (plus vehicles couldn't spawn).

I guess the problem is located in player_build.sqf.

Here's mine : http://pastebin.com/fiMQXhL2

The only way I can place objects at the moment is by logging out when the placing timer is running.

Link to comment
Share on other sites

I see no error in your player_build.sqf, just wondering why your linux version is so much different from the default Epoch 1.0.2.5 code, maybe it doesn't work with the default scripts, whyever that would be?

I've never tried to run it with linxux myself ^^

Link to comment
Share on other sites

I think I'm going to stick with the destructible bases. Haven't checked yet but do you think it's possible to lower the maintenance cost ?

I don't think you can change the config files, because they are binarized in the config.bin and that file cannot be added to the mission file, correct me if i am wrong.

You could change the script and remove the maintain costs or set a general costs for all items maybe..

Link to comment
Share on other sites

I'm struggling to get this to work on our server. I applied the part 1 and part 2 fixes to our dayz.st server but base structures are still destructible. Any advice or anyone able to quickly check my files to see where I am going wrong? thanks in advance.

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...