Jump to content
Tankbuster

Editing, Expanding and Modifying Domination

Recommended Posts

Does anyone know if it's possible to modify the x_server\x_helirespawn2.sqf so it will respawn vehicles with their original name intact? I can't use the simple respawn script as it won't work along side of the lift chopper & MHQ's scripts.

I'm using ver 2.60

Thanks in advance

Signaller

Share this post


Link to post
Share on other sites

The solution is not to use other scripts. The scripts already in Domination can do what you need.

Share this post


Link to post
Share on other sites
The solution is not to use other scripts. The scripts already in Domination can do what you need.

What I'm trying to do is have a recall & teleport script for the lift vehicles as they are constantly abandoned in the middle of nowhere, the only way I can think of recalling them is by their name (see script below) I realise that you can use the abandoned vehicle setting, but we have members that use them responsibly & don't need them to respawn if 'abandoned'.

ch50 attachTo [a10hook,[0,0,1]]; 
ch50 setfuel 0;
ch50 setdamage o;
hint "A10 will be available in a few moments";
ch50 setfuel 1;
Sleep 10;
detach ch50;
hint "A10 is ready";

Share this post


Link to post
Share on other sites

I know this isn't much help, but it's your players that need changing. :)

The lift (and the wrecker) choppers specifically; get your users to crash them instead of leaving them. Fly over where they want to be and instead of landing, just get some height on and eject. The chopper should crash, be destroyed and respawn. Turn the abandoned vehicle thing off. Job done.

I assume that they are using the lift choppers to get from the base to the AO? Are they forced to do this because teleport is off? What about paradrop?

Share this post


Link to post
Share on other sites

At the moment we run three 20 slots servers 2 of them are public & that's the problem ;)

On our members server we have no problems as everyone's in TS and happily plays ball, the Wreck chopper on the public servers was sorted out by adding a second wreck chopper that's locked out to non members by vehicle class, we'd rather not do that to he lift choppers to avoid ruining the game for non members.

Share this post


Link to post
Share on other sites

Yeah but you're facing the perennial problem for mission designers. Whose responsibility is it to stop this happening? Xeno has put in lots of options to try and prevent it and it helps to some extent, but there's nothing that anyone can do when the knobheads start griefing.

How about the 'only pilots can fly' setting and the 'pilot kick' timer. Can't remember the proper name for that one. Hopefully the griefers go elsewhere while the serious players accept the limitations are there for a reason.

Share this post


Link to post
Share on other sites

Problem solved! The choppers do actually have a name after respawn & it's not the same as the editor, if we look in the i_client.sqf we see ["HR1",0,"chopper1",301,"n_air","ColorWhite","1","Lift One"], "HR1" being the name of the chopper before & after respawn so I can now run my recall script (even if someones flying it at the time) ;)

Share this post


Link to post
Share on other sites

yes, that's right. If I remember correctly, 301 is a code for the role of the aircraft.

Share this post


Link to post
Share on other sites

Got a couple of questions of my own this time, hopefully someone has the answers as I've hit a wall.

1) Target town locations.

I think I read somewhere a long time ago about setting up towns created with the Arrowhead Town Creator module so that they would be Domination targets, however both I can't find that anymore and Domination has changed a lot since then. Anybody able to tell me what I need to do here?

2) Reward Units.

This one I'm more curious as to if it is possable, say I put down two markers for bonus air vehicles, one in a hanger and the other in the open. Is it possable to specify which type spawns where? Such as only planes spawn in the hanger and only helicopters spawn in the open, if so how would you go about that?

Thanks for any help that can be provided.

Regards Hawk.

Share this post


Link to post
Share on other sites
Problem solved! The choppers do actually have a name after respawn & it's not the same as the editor, if we look in the i_client.sqf we see ["HR1",0,"chopper1",301,"n_air","ColorWhite","1","Lift One"], "HR1" being the name of the chopper before & after respawn so I can now run my recall script (even if someones flying it at the time) ;)

hello, it seems you have did something i've been attempting, or close to anyway....

i have changed ch3 and ch4 to v22 ospreys and want to be able to add action on them to run a script to allow you to open the rear door and attach a gun. the script works 100% and i can get the v22's to start the game with them with the default init.sqf.. the problem i am having is getting them to respawn with that action added... would you happen to know what files i can add some init lines to those two choppers are?

actually should i add... would anybody have any idea how to add action to opsrey (ch3 and ch4) upon respawn just cant find where it would pull init information from

Edited by Shadowmantis

Share this post


Link to post
Share on other sites

Im not sure for attaching guns on it but for opening rear doors this could do it, in i_client.sqf at the bottom

// add action menu entries to all or specific vehicles, default = none
// example:
// GVAR(action_menus_vehicle) = [
// 		[[],"Whatever2", "whateverscript2.sqf", -1000], // will add action menu entry "Whatever2" to all vehicles
// 		[["UH60MG", "M113_MHQ"],"Whatever1", "whateverscript1.sqf", -1000] // will add action menu entry "Whatever1" to chopper 1 and MHQ 1
// 
// ];
[color="#FF0000"]GVAR(action_menus_vehicle) = [[["MV22"],"Open Rear Door", "HERE SHOULD BE THE NAME OF YOUR REAR DOOR SCRIPT.sqf", -1000]];[/color]

Edited by matosinec

Share this post


Link to post
Share on other sites

well the code for attaching the guns is done, i just need to find where to inject the call to make it look for the SQF file to run the actual code "IE: add the addaction to the mouse wheel options" i dont actually need the entire code set, sorry for the confusion there...

so to reiterate.. i'm just needing to know where to add the code in the respawn script so the osprey will have a new action available so i can run the script from that.

thanks for the reply though will take a deeper look at it, you may still have answered my question

edit: It seems like this is what i'm looking for but i'm having trouble getting it to work...

here is basically the scripts i'm using maybe someone can help me mesh this together (its a heavily modified v22 doorgun script using attachto. i've set it up to have it so you can walk to the v22 and choose to attach eitehr a m2 or mk19.. then detach as needed to load items inside. i basically just need some way to add the call script to the vehicles init and have it respawn with it... like i said, i can get it to start the game with the ability, but if its blown up and respawns it doesn't work anymore

i_client.sqf:

// add action menu entries to all or specific vehicles, default = none

// example:

// GVAR(action_menus_vehicle) = [

// [[],"Whatever2", "whateverscript2.sqf", -1000], // will add action menu entry "Whatever2" to all vehicles

// [["UH60MG", "M113_MHQ"],"Whatever1", "whateverscript1.sqf", -1000] // will add action menu entry "Whatever1" to chopper 1 and MHQ 1

//

// ];

// GVAR(action_menus_vehicle) = [];

//***custom EDIT***

GVAR(action_menus_vehicle) = [["ch3"],"Open Rear Door", "v22gun.sqf", -1000];

GVAR(action_menus_vehicle) = [["ch4"],"Open Rear Door", "v22gun.sqf", -1000];

//***custom EDIT END***

call script with flip flop

_veh setVariable ["vehicle_reargunnerDeployed", false, true];

_veh addAction ["Attach Rear Gun (M2)", "mv22_m2.sqf", ["Deploy"], 51, false, true, "", "!(_target getVariable 'vehicle_reargunnerDeployed')"];

_veh addAction ["Detach Rear Gun (M2)", "mv22_m2.sqf", ["Stow"], 50, false, true, "", "(_target getVariable 'vehicle_reargunnerDeployed')"];

_veh setVariable ["vehicle_reargunnerDeployed", false, true];

_veh addAction ["Attach Rear Gun (MK19)", "mv22_mk19.sqf", ["Deploy"], 51, false, true, "", "!(_target getVariable 'vehicle_reargunnerDeployed')"];

_veh addAction ["Detach Rear Gun (MK19)", "mv22_mk19.sqf", ["Stow"], 50, false, true, "", "(_target getVariable 'vehicle_reargunnerDeployed')"];

lastly, the attach script (1 of 2 this version for the m2

/************************************

Script to mount rear and side door M134 guns to an MV-22.

Modfied from sxp2high's example posted in BIS forums :)

Instructions:

==============

1. Add this to the vehicle's init line in the editor:

this setVariable ["vehicle_reargunnerDeployed", false, true];

this addAction ["Mount Door Guns", "mv22reargunner.sqf", ["Deploy"], 51, false, true, "", "!(_target getVariable 'vehicle_reargunnerDeployed')"];

this addAction ["Dismount Door Guns", "mv22reargunner.sqf", ["Stow"], 50, false, true, "", "(_target getVariable 'vehicle_reargunnerDeployed')"];

2. Save and copy this script into the mission folder.

3. Walk up to the MV22 and select the "Mount Door Guns" action. Enjoy!

************************************/

if (isDedicated) exitWith {};

_vehicle = _this select 0;

_man = _this select 1;

_option = (_this select 3) select 0;

if (_man != player) exitWith {};

if (_option == "Deploy") exitWith {

if (vehicle _man != player) then {

hint "You must exit the aircraft first";

} else {

_man playMove "AinvPknlMstpSlayWrflDnon_medic";

sleep 1;

_vehicle animate ["ramp_top", 1];

_vehicle animate ["ramp_bottom", 1];

sleep 1;

_vehicle_reargunner = "M2HD_mini_TriPod_US_EP1" createVehicle [0,0,0];

_vehicle_reargunner attachTo [_vehicle, [-.4, -4.9, -1.88]];

_vehicle_reargunner setDir 180;

_vehicle_reargunner setPos getPos _vehicle_reargunner;

_vehicle_reargunnerb = "AmmoCrate_NoInteractive_" createVehicle [0,0,0];

_vehicle_reargunnerb attachTo [_vehicle, [0, -5.3, -3]];

sleep 3;

hint "Door Guns will be ready in a few seconds";

_vehicle animate ["door1_bottom", 0];

_vehicle setVariable ["vehicle_reargunnerDeployed", true, true];

sleep 1;

waitUntil {!(_vehicle getVariable "vehicle_reargunnerDeployed") || !(alive _vehicle)};

if (!(_vehicle getVariable "vehicle_reargunnerDeployed")) exitWith {};

sleep 2;

_vehicle_reargunner = nearestObject [_vehicle, "M2HD_mini_TriPod_US_EP1"];

deleteVehicle _vehicle_reargunner;

_vehicle_reargunner = nearestObject [_vehicle, "MK19_TriPod"];

deleteVehicle _vehicle_reargunner;

_vehicle_reargunnerb = nearestObject [_vehicle, "AmmoCrate_NoInteractive_"];

deleteVehicle _vehicle_reargunnerb;

sleep 1;

_vehicle animate ["ramp_top", 0];

sleep 1;

_vehicle animate ["ramp_bottom", 0];

sleep 1;

_vehicle setVariable ["vehicle_reargunnerDeployed", false, true];

};

};

if (_option == "Stow") exitWith {

if (vehicle _man != player) then {

hint "You must exit the aircraft first";

} else {

_man playMove "AinvPknlMstpSlayWrflDnon_medic";

sleep 2;

_vehicle animate ["door1_top", 0];

_vehicle_reargunner = nearestObject [_vehicle, "M2HD_mini_TriPod_US_EP1"];

deleteVehicle _vehicle_reargunner;

_vehicle_reargunner = nearestObject [_vehicle, "MK19_TriPod"];

deleteVehicle _vehicle_reargunner;

_vehicle_reargunnerb = nearestObject [_vehicle, "AmmoCrate_NoInteractive_"];

deleteVehicle _vehicle_reargunnerb;

sleep 1;

_vehicle animate ["ramp_top", 0];

sleep 1;

_vehicle animate ["ramp_bottom", 0];

sleep 1;

_vehicle setVariable ["vehicle_reargunnerDeployed", false, true];

};

};

Edited by Shadowmantis

Share this post


Link to post
Share on other sites

Well im not sure how to do it but this is how i got for doors and ramps maybe you can copy this and do samething with guns.

i_client.sqf

// add action menu entries to all or specific vehicles, default = none
// example:
// GVAR(action_menus_vehicle) = [
// 		[[],"Whatever2", "whateverscript2.sqf", -1000], // will add action menu entry "Whatever2" to all vehicles
// 		[["UH60MG", "M113_MHQ"],"Whatever1", "whateverscript1.sqf", -1000] // will add action menu entry "Whatever1" to chopper 1 and MHQ 1
// 
// ];
GVAR(action_menus_vehicle) = [
    [["MV22"],"Ramp Down", "scripts\Openramp.sqf", -1000],
    [["MV22"],"Open door", "scripts\Opendoor.sqf", -1000]
];

Open ramp (same with doors)

_MV22 = _this select 0;
_caller = _this select 1;
_id = _this select 2;

_MV22 animate ["ramp_top",1];
_MV22 animate ["ramp_bottom",1];
_MV22 removeaction _id;
_MV22 addaction ["Close ramp", "scripts\Closeramp.sqf", [], 1,false, false, "", " _target == vehicle player"];

Close ramp (same with doors)

_MV22 = _this select 0;
_caller = _this select 1;
_id = _this select 2;

_MV22 animate ["ramp_top",0];
_MV22 animate ["ramp_bottom",0];
_MV22 removeaction _id;
_MV22 addaction ["Open ramp", "scripts\Openramp.sqf", [], 1,false, false, "", " _target == vehicle player"];

Works fine after respawn.

Share this post


Link to post
Share on other sites

I've modified the ACE AI mission and added an M1 as described in this thread several times. Everything seems to work since it respawns after being wrecked and the marker is on the map etc.

But after an engineer repairs a damaged tank it shows it's refueled but as soon as I want to drive the fuel is suddenly gone. Does that happen on purpose?

Besides that I still do not really understand how the repair-system works - especially as an engineer. All my mates on our server are able to repair/refuel their vehicles once although they are not engineers (why is that?). And the engineer has 2 options: 'Repair (Vehiclename)' - which is on top of the action menu - or 'Repair/Refuel Vehicle' - which is under 'Analyse Vehicle'. Where is the difference between those 2 options?

Furthermore the FARP sometimes does the job and sometimes not. It seems like as soon as the vehicles where heavily damaged and they're out of ammo you cannot rearm at FARP neither at an ammo truck. That happens after the engineer repaired the vehicle. Could someone pls tell me if I am simply not understanding the concept or whatever cause I am looking for troubleshooting for quite a while now and it does not seem to be a general issue anywhere. Thx in advance!

Share this post


Link to post
Share on other sites

Could someone pls be so kind and mail me the original 2.61 west ace chernarus mission PBO (c300c@gmx.net)? I cannot get the dom maker working properly. Thx a lot!

That will help me sort things out regarding the repair-problem. I believe I have messed it up a bit. Running ACE version without setting up the mission file correctly ...

Share this post


Link to post
Share on other sites

second thing i'm trying to do also that requires being able to add init information to the aircraft..i'm trying to add certain aircraft to the F2F loadout mod ie like the f35. so does anyone know how i could go about doing this? thats two items i need to add code to the vehicle init line to make them work but i cant find where to add that in domi

Share this post


Link to post
Share on other sites

So you want to add code for clearing weapon stations on aircraft, and cleans it again after respawn or ....?

Share this post


Link to post
Share on other sites

Ugh, still having difficulties with the ammo box.

Anyone has a x_weaponcargo_oa.sqf filled with all the guns that I could have?

I can't for the life of me figure out how to make it work out, there's always guns and ammunition missing or guns in the wrong category altogether and all that.

Share this post


Link to post
Share on other sites
Could someone pls be so kind and mail me the original 2.61 west ace chernarus mission PBO (c300c@gmx.net)? I cannot get the dom maker working properly. Thx a lot!

That will help me sort things out regarding the repair-problem. I believe I have messed it up a bit. Running ACE version without setting up the mission file correctly ...

You can download it on dev-heaven.net>Projects>Domination

Ugh, still having difficulties with the ammo box.

Anyone has a x_weaponcargo_oa.sqf filled with all the guns that I could have?

I can't for the life of me figure out how to make it work out, there's always guns and ammunition missing or guns in the wrong category altogether and all that.

There arent much weapons in game, there should be space in ammobox unless you are running ACE then you need to have ACEAmmobox.

Share this post


Link to post
Share on other sites

actually kindof, but its for a side project not related to domination.

the problem still on the domination is just where to how to make it so when lets say, chopper1 (CH1) respawns it still has a line of code in its init to add another extra feature (hope this explanation makes more sense)

as for my weapon stations and weapon change script, i'm searching for other things for it, if i dont find soon i'll post a new topic, dont want to derail this domi one with non domi specific question

Share this post


Link to post
Share on other sites

I do not know if there is a script in mission folder, in which you can add init code, but you can create one. For example:

if (typeOf _vehicle == "CH_47F") then {
   _vehicle setVehicleInit "this allowdamage false";
};

Well something like that, im not scripter so this might not be correct.

Share this post


Link to post
Share on other sites

Hi all!

I've just recently edited in some custom units (Navy SEALs) into a ACE/DOM2 Lingor mission, and for some reason, they spawn just fine, where they're supposed to initially, but someone dies using one of those characters, they respawn in the far upper right hand corner of the map, inside of the water. Just so you know, I have searched google, and these forums thoroughly for a similar problem, but I've not found anything, I also am using the Editing Guide by Mr. Murray, but I am just starting out with all of this stuff, so it is a tad confusing to me. Any help would be greatly appreciated!

Share this post


Link to post
Share on other sites

sounds so close... where would i put that? in the main init.sqf? would that get added to a newly spawned/respawned ch47?

Share this post


Link to post
Share on other sites
sounds so close... where would i put that? in the main init.sqf? would that get added to a newly spawned/respawned ch47?

Im not sure about adding this code directly to init.sqf, but you can create new .sqf file with this code and execute it from init.sqf (execVM "blabla.sqf"; )

Hi all!

I've just recently edited in some custom units (Navy SEALs) into a ACE/DOM2 Lingor mission, and for some reason, they spawn just fine, where they're supposed to initially, but someone dies using one of those characters, they respawn in the far upper right hand corner of the map, inside of the water. Just so you know, I have searched google, and these forums thoroughly for a similar problem, but I've not found anything, I also am using the Editing Guide by Mr. Murray, but I am just starting out with all of this stuff, so it is a tad confusing to me. Any help would be greatly appreciated!

Maybe those units are not added in i_common.sqf player_entities/roles array.

Edited by matosinec

Share this post


Link to post
Share on other sites

Maybe those units are not added in i_common.sqf player_entities/roles array.

Thanks for the really quick response! and ya I think you're right, this is the first time I've ever done this so if you could elaborate a little bit I'd appreciate it, I am looking at that specific section of the sqf file and I don't see the "hotel" squad in the list, which is what i set this setGroupid ["Hotel"]; to, so do i just add "hotel_1", "hotel_2", "hotel_3", etc. to the GVAR (player_entities) section? and what about the d_player_roles section?

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×