Jump to content
  • 0

Epoch Buildables - How to make Indestructible


ToejaM

Question

Does anyone know where to edit the code to make objects spawned in indestructible, specifically buildables.

 

I imagine a isKindOf "name","name" string will be needed.

 

Or perhaps someone knows where vaults are given their immunity unless thats coded before spawning through the database.

 

Any help appreciated.

Link to comment
Share on other sites

20 answers to this question

Recommended Posts

  • 0

Please keep personal opinions on request threads to yourself. :)

I would assume the destructible aspect of the bases will be based in the fn_selfactions.sqf file, where the option to remove objects are. As for the time-decay, you may want to scavenge through server_cleanup.fsm in your server.pbo. Those are my guesses.

A dirty work-around would be to set the damage (assuming the objects get a damage value set) and the date-stamp to fresh values every object update via SQL.

One way to do this (according to the wiki):

CREATE EVENT preventCleanup
    ON SCHEDULE EVERY 1 DAY
    COMMENT 'prevents all cleanup by setting datestamp to current'
    DO
        UPDATE `object_data` SET `Datestamp`=CURRENT_TIMESTAMP 'Damage'=0 WHERE `ObjectUID` <> 0 AND `CharacterID` <> 0 AND ( (`Inventory` IS NULL) OR (`Inventory` = '[]') )
I have not tested any of the above, these are just recommendations.
Link to comment
Share on other sites

  • 0

I would be interested in an answer to this as well, at the moment I'm holding off with the base building mod until I see what the devs have planned. I've not found anything obvious as of yet. 

 

Austin I suggest you and all the "realism" cronys stop talking about "realism" and join the real world. You know, the one where not everyone can maintain a Blackhawk helicopter let alone fly it. Where a 4 cyclinder Lada engine from 1949 fits any helicopter or car. Where you can hump 4 24 foot long rotor blades and the assembly with gearbox weighing a total of roughly 2 tons in your arms or a backpack. 

Link to comment
Share on other sites

  • 0

I would be interested in an answer to this as well, at the moment I'm holding off with the base building mod until I see what the devs have planned. I've not found anything obvious as of yet. 

 

Austin I suggest you and all the "realism" cronys stop talking about "realism" and join the real world. You know, the one where not everyone can maintain a Blackhawk helicopter let alone fly it. Where a 4 cyclinder Lada engine from 1949 fits any helicopter or car. Where you can hump 4 24 foot long rotor blades and the assembly with gearbox weighing a total of roughly 2 tons in your arms or a backpack.

Refer to: Video Game

The main reason the developers are not supporting Base Building 1.2 and anyone asking for help with it is due to the fact that it is third-party software. Do what you want on your own server, but don't force it upon the devs.

Link to comment
Share on other sites

  • 0
The main reason the developers are not supporting Base Building 1.2 and anyone asking for help with it is due to the fact that it is third-party software. Do what you want on your own server, but don't force it upon the devs. 

 

 

And don't spam fanboi statements in every single thread where the mod is mentioned. Read what has been posted. 

 

Speaking of damage settings, would it not be possible to alter the armour settings of the various pieces, thus making almost impervious? I do remember seeing an armour value in one of the files I was browsing yesterday. Can't remember which one unfortunately. 

Link to comment
Share on other sites

  • 0

Anyone had any luck on this yet?

 

Think it might have to go down to a script executed on server start to godmode the buildings.

 

The cinderwalls get taken out by 3 satchel charges and even though they're expensive on my server, many groups have a lot of them.

 

You can also run down wooden walls with a lada lol.. so all the time creating it, taken down by someone who buys/finds a rubbish car. Though cinderwalls dont go down even with a vodnik going at 150 so thats a good start but would still like them all to be indestructible before I even think about changing the base building mod.

Link to comment
Share on other sites

  • 0

Anyone had any luck on this yet?

 

Think it might have to go down to a script executed on server start to godmode the buildings.

 

The cinderwalls get taken out by 3 satchel charges and even though they're expensive on my server, many groups have a lot of them.

 

You can also run down wooden walls with a lada lol.. so all the time creating it, taken down by someone who buys/finds a rubbish car. Though cinderwalls dont go down even with a vodnik going at 150 so thats a good start but would still like them all to be indestructible before I even think about changing the base building mod.

Like mentioned previously, find the solution if you want it so badly.

HERE'S A REALLY QUICK SEARCH ON GOOGLE THAT I DID, TOOK ME 1 MINUTE TO DO

http://community.bistudio.com/wiki/ArmA_2:_Event_Handlers#HandleDamage

http://forums.bistudio.com/showthread.php?76067-indestructible-Invincible-Objects

http://forums.bistudio.com/showthread.php?152900-Handle-Damage-before-it-s-processed

this addEventHandler ["HandleDamage", {false}];
Link to comment
Share on other sites

  • 0

And don't spam fanboi statements in every single thread where the mod is mentioned. Read what has been posted.

Speaking of damage settings, would it not be possible to alter the armour settings of the various pieces, thus making almost impervious? I do remember seeing an armour value in one of the files I was browsing yesterday. Can't remember which one unfortunately.

That file was this I believe: https://github.com/vbawol/DayZ-Epoch/blob/master/SQF/dayz_code/Configs/cfgVehicles.hpp

The buildings with DestructNo appear to describe the obvious, too.

Link to comment
Share on other sites

  • 0

Please keep personal opinions on request threads to yourself. :)

I would assume the destructible aspect of the bases will be based in the fn_selfactions.sqf file, where the option to remove objects are. As for the time-decay, you may want to scavenge through server_cleanup.fsm in your server.pbo. Those are my guesses.

A dirty work-around would be to set the damage (assuming the objects get a damage value set) and the date-stamp to fresh values every object update via SQL.

One way to do this (according to the wiki):

CREATE EVENT preventCleanup
    ON SCHEDULE EVERY 1 DAY
    COMMENT 'prevents all cleanup by setting datestamp to current'
    DO
        UPDATE `object_data` SET `Datestamp`=CURRENT_TIMESTAMP 'Damage'=0 WHERE `ObjectUID` <> 0 AND `CharacterID` <> 0 AND ( (`Inventory` IS NULL) OR (`Inventory` = '[]') )
I have not tested any of the above, these are just recommendations.

 

 

I put this in. I"m assuming it's working. If I decide I don't want this anymore, how do I cancel it in my database?

Link to comment
Share on other sites

  • 0

You can make any object receive no damage that is spawned through server monitor with this _object setVehicleInit "this addEventHandler [""HandleDamage"",{}]";

I haven't messed with the new server monitor yet or the Epoch one but this should point you in the right direction. I used to do this on ammo boxes I spawned in with the database.

What you need to do is intercept the _object when the server_monitor spawns it in and add the event handler.

 

Here is an example. Note this is really old code so things look a lot different now. Just started back up with DayZ :)

                //Create it
                _object = createVehicle [_type, _pos, [], 0, "CAN_COLLIDE"];
                _object setVariable ["lastUpdate",time];
                if (_ownerID == "0") then {_object setVariable ["ObjectID", str(_idKey), true];} else {_object setVariable ["ObjectUID", str(_idKey),true];}; //_object setVariable ["ObjectID", _idKey, true];
                _object setVariable ["CharacterID", _ownerID, true];
                
                clearWeaponCargoGlobal  _object;
                clearMagazineCargoGlobal  _object;
                if (_object isKindOf "AN2_DZ") then {
                
                    _object addWeapon "M240_veh";
                    _object addMagazine "100Rnd_762x51_M240";
                    _object addMagazine "100Rnd_762x51_M240";
                    _object addMagazine "100Rnd_762x51_M240";
                    _object addMagazine "100Rnd_762x51_M240";
                };                
                
                if (_object isKindOf "TentStorage") then {
                    _pos set [2,0];
                    _object setpos _pos;
                    _object addMPEventHandler ["MPKilled",{_this call vehicle_handleServerKilled;}];
                };
                if (_object isKindOf "USBasicAmmunitionBox") then {
                    _object setVehicleInit "this addEventHandler [""HandleDamage"",{}]";
                    processInitCommands;
                };
Link to comment
Share on other sites

  • 0

So I'm assuming he's not wanting to share his way of doing it (or he's really busy). Anyone else have the fix so we can all enjoy this?

I like how you ignore my post because it requires you to make it work. Look up my posts on OpenDayz and read the topics about server_moniter and make it work.

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