Jump to content
Tankbuster

Editing, Expanding and Modifying Domination

Recommended Posts

Look at it this way Xeno. Not only have you provided endless hours of enjoyment for the trigger pullers, you have also provided endless hours of "enjoyment" for people like me who play about with the code :)

:)

I've never found the time (or had the will) to rewrite the arty operator handling, as it needs quite a lot of changes (it is limited to two persons which is the reason it was somehow hardcoded and stayed that way) .

It's much more fun to see what you guys are doing to Dom than to work on it myself. Endless spare time now ...

Xeno

Share this post


Link to post
Share on other sites

Sorry if I missed that one in the last pages..

But couldn't read all 33 pages of this thread..

I'd like to exchange some units in the normal ACE Domination!

I'd like to have some of the Seals from the TF86 Seal pack, but if I exchange a unit (kept the name and init stuff) I always get russian weapons in the ammocreates the one at start and also those I call in via chopper..

What can I do so I get the normal American weapons?

be aware I kinda suck at scripting :)

Best Regars,

KG

Share this post


Link to post
Share on other sites
:)

I've never found the time (or had the will) to rewrite the arty operator handling, as it needs quite a lot of changes (it is limited to two persons which is the reason it was somehow hardcoded and stayed that way) .

It's much more fun to see what you guys are doing to Dom than to work on it myself. Endless spare time now ...

Xeno

I wasn't having a dig, Xeno, honestly. I realise there was more broken bits than that chunck of code that needed your attention more. I'm glad we amuse you and thank you for taking my criticism in the way it was intended - that of the awed, but slightly confused student at the desk of the master.

The best way to fix the arty right now is to remove the if=rescue and let the can_use_arty handle it. IIRC, that's what I did.

Share this post


Link to post
Share on other sites

where and how can i change the units and vehicles with custom ones?

i try to replace all units with vte units to port a domination mission to vte.

is there any tutorial availlable ?

Share this post


Link to post
Share on other sites

There's no tutorial. You can read the few few posts in this thread. That tells you enough to get you started.

Share this post


Link to post
Share on other sites

@horror1: Basically you need to search for all occurances of _EP1 and replace relevant occurances with what you want (a lot of work), and/or add conditional replacement code using #ifdef and if(version...) stuff (a lot of work, and hard to get right).

It's a lot of work.

Pluss you need to do test runs to locate any potential problems with the addon that might force you not to include certain units.

Did I mention it's a lot of work? :)

So... Bump.. Anyone have the guts to check out my problem, and suggestions to solve it?

Share this post


Link to post
Share on other sites

Trial, error, and swearing is the best tutorial around here. Luckily it's worth it in the end.

Share this post


Link to post
Share on other sites

I looked too, CG. It's rather outside of my envelope of understanding.

Share this post


Link to post
Share on other sites

Hey guys just a real quick question.

I put a few choppers in right off the bat and when I go to use them on my server right away I cant... it says I have to wait 30 some odd minutes before I can access them.

What file and what command do I change to get rid of this for all vehicles - I've been going through files constantly and cant figure it out.

Share this post


Link to post
Share on other sites
Hey guys just a real quick question.

I put a few choppers in right off the bat and when I go to use them on my server right away I cant... it says I have to wait 30 some odd minutes before I can access them.

What file and what command do I change to get rid of this for all vehicles - I've been going through files constantly and cant figure it out.

You don't need to edit any files for this, it's one of the things you can change at the parameters screen when logged in admin is setting up the server.

Share this post


Link to post
Share on other sites

Got my original question fixed, so now I'll put a new one in :)

I noticed on the OA Domi Ace map, all of the Ace2 weapons only havea count of 1, and if I take one it will have a count of zero. I've found multiple files under "x_client" called "x_weaponcargo_ace.sqf" or "x_weaponcargo_ace_oa.sqf" and opening them shows what seems to be whats included in the ammo box. Are these what I need to edit to change, say, all weapons to a 10 count? Will this affect everyone on my server? If so, which one, I'm assuming weaponcargo_ace_oa.sqf, do I need to edit

Edited by 7akata

Share this post


Link to post
Share on other sites
Got my original question fixed, so now I'll put a new one in :)

I noticed on the OA Domi Ace map, all of the Ace2 weapons only havea count of 1, and if I take one it will have a count of zero. I've found multiple files under "x_client" called "x_weaponcargo_ace.sqf" or "x_weaponcargo_ace_oa.sqf" and opening them shows what seems to be whats included in the ammo box. Are these what I need to edit to change, say, all weapons to a 10 count? Will this affect everyone on my server? If so, which one, I'm assuming weaponcargo_ace_oa.sqf, do I need to edit

The ammo boxes are created locally so what you see in the box isnt what everyone else has and the box will refill every 20 minutes i think...

Share this post


Link to post
Share on other sites
So... Bump.. Anyone have the guts to check out my problem, and suggestions to solve it?

Figured it out... I think... All I had to do was check if (!isNil "_respawntimer) then { ...do the spawn ...}. Not getting the multiple messages anymore anyways, and respawn timer seem to work. I've highlighted the parts that are interresting (i.e. d_vec_array not being _d_vec_array anymore), and the spawned stuff (to allow different delays) is shown in red. Pay attention to that, and implement line by line - a copy & paste will not work as I have other stuff in there you should not do). In case anyone is interrested:

x_server\x_vrespawn2.sqf

// by Xeno
#include "x_setup.sqf"

#define __Trans(tkind) _trans = getNumber(configFile >> #CfgVehicles >> typeOf _vehicle >> #tkind)
private ["_vehicle", "_camotype", "_camo", "_i", "_disabled", "_trans", "_empty", "_outb", "_hasbox"];
if (!isServer) exitWith{};

d_vec_array = [];
{
_vehicle = _x select 0;
_number_v = _x select 1;
[b]_respawntimer = _x select 2;[/b]
[b]d_vec_array[/b] set [count [b]d_vec_array[/b], [_vehicle,_number_v,position _vehicle,direction _vehicle,typeOf _vehicle,[b]_respawntimer[/b]]];
_vehicle setVariable ["D_OUT_OF_SPACE", -1];
_vehicle setVariable ["d_vec", _number_v, true];
[b]_vehicle setVariable ["d_respawntimer",_respawntimer];[/b]
_vehicle setAmmoCargo 0;
_vehicle setVariable ["d_vec_islocked", if (locked _vehicle) then {true} else {false}];
clearMagazineCargo _vehicle;
clearWeaponCargo _vehicle;
_kind = typeOf _vehicle;
switch (_kind) do {
	case "M1129_MC_EP1": {_vehicle setVehicleInit "0 = [this] spawn DOM_Refill_Vehicle; this addEventHandler [""fired"",{_this + [nearestObject [_this select 0,_this select 4]] spawn DOM_EH_Fired}]"; processInitCommands;};
	default {_vehicle setVehicleInit "0 = [this] spawn DOM_Refill_Vehicle"; processInitCommands;};
};
#ifdef __TT__
if (_number_v < 100) then {
	_vehicle addeventhandler ["killed", {_this call x_checkveckillwest}];
} else {
	_vehicle addeventhandler ["killed", {_this call x_checkveckilleast}];
};
#endif
if (_number_v < 10 || (_number_v > 99 && _number_v < 110)) then {
	_vehicle addeventhandler ["killed", {(_this select 0) setVariable ["D_MHQ_Deployed",false,true]}];
};
#ifndef __CARRIER__
_camotype = switch (getNumber (configFile >> "CfgVehicles" >> typeOf _vehicle >> "side")) do {
	case 1: {if (__OAVer) then {"Land_CamoNetB_NATO_EP1"} else {"Land_CamoNetB_NATO"}};
	case 0: {if (__OAVer) then {"Land_CamoNetB_EAST_EP1"} else {"Land_CamoNetB_EAST"}};
};
//	_camo = createVehicle [_camotype, position _vehicle, [], 0, "NONE"];
//	_camo setPos position _vehicle;
//	_camo setDir (direction _vehicle) + 180;
//	_vehicle setVariable ["d_camonet", _camo];
#endif
} forEach _this;
_this = nil;

sleep 65;

while {true} do {
sleep 8 + random 5;
__MPCheck;
__DEBUG_NET("x_vrespawn2.sqf",(call XPlayersNumber))
for "_i" from 0 to (count d_vec_array - 1) do {
	_d_vec_a = d_vec_array select _i;
	_vehicle = _d_vec_a select 0;
	_disabled = false;
	if (damage _vehicle > 0.9) then {
		_disabled = true;
	} else {
		__Trans(transportAmmo);
		if (_trans > 0) then {
			_vehicle setAmmoCargo 1;
#ifdef __MANDO__
			_msl = _vehicle getVariable "mando_source_level";
			if (isNil "_msl") then {_msl = 0};
			if (_msl < 20) then {
				_vehicle setVariable ["mando_source_level", 100];
				["d_man_r", _vehicle] call XNetCallEvent;
			};
#endif
		};
		__Trans(transportRepair);
		if (_trans > 0) then {
			_vehicle setRepairCargo 1;
		};
		__Trans(transportFuel);
		if (_trans > 0) then {
			_vehicle setFuelCargo 1;
		};
	};

	_empty = _vehicle call XfGetVehicleEmpty;

	if (_empty && !_disabled && alive _vehicle && (_vehicle call XOutOfBounds)) then {
		_outb = _vehicle getVariable "D_OUT_OF_SPACE";
		if (_outb != -1) then {
			if (time > _outb) then {_disabled = true};
		} else {
			_vehicle setVariable ["D_OUT_OF_SPACE", time + 600];
		};
	} else {
		_vehicle setVariable ["D_OUT_OF_SPACE", -1];
	};

	sleep 0.01;

#ifdef __ACE__
	_aliveve = if (!isNil {_vehicle getVariable "ace_canmove"}) then {_vehicle call ace_v_alive} else {alive _vehicle};
#else
	_aliveve = alive _vehicle;
#endif

	if ((_disabled && _empty) || (_empty && !_aliveve)) then {
		_number_v = _d_vec_a select 1;
		_hasbox = [_vehicle, "d_ammobox", false] call XfGetVar;
		if (_hasbox) then {["ammo_boxes",__XJIPGetVar(ammo_boxes) - 1] call XNetSetJIP};
		_respawntimer = _vehicle getVariable "d_respawntimer";
		if (_number_v < 10 || (_number_v > 99 && _number_v < 110)) then {
			_dhqcamo = [_vehicle, "D_MHQ_Camo", objNull] call XfGetVar;
			if (!isNull _dhqcamo) then {deleteVehicle _dhqcamo};
		};
#ifndef __CARRIER__
		_camo = _vehicle getVariable "d_camonet";
		if (!isNil "_camo") then {deleteVehicle _camo;_camo = objNull} else {_camo = objNull};
#endif
		_isitlocked = _vehicle getVariable "d_vec_islocked";
		sleep 0.1;
		deletevehicle _vehicle;
//			player globalChat format ["_respawntimer outside spawn: %1, isNil: %2",_respawntimer, isNil "_respawntimer"];
		sleep 0.5;
		[b]if (!isNil "_respawntimer") then {[/b]
			[b][_vehicle,_d_vec_a,_number_v, _respawntimer,_isitlocked,_i] spawn {[/b]
[color="Red"]					_vehicle = _this select 0;
				_d_vec_a = _this select 1;
				_number_v = _this select 2;
				_respawntimer = _this select 3;
				_isitlocked = _this select 4;
				_i = _this select 5;
				["d_v_rs",[0,[(_d_vec_a select 4),0] call XfGetDisplayName,_respawntimer/60]] call XNetCallEvent;
				_vehicle = objNull;
				sleep _respawntimer;
				_vehicle = createVehicle [(_d_vec_a select 4), (_d_vec_a select 2), [], 0, "NONE"];
#ifndef __CARRIER__
				_vehicle setpos (_d_vec_a select 2);
#else
				if (_number_v > 9) then {
					_vehicle setPos (_d_vec_a select 3);
				} else {
					_vehicle setPosASL [(_d_vec_a select 2) select 0, (_d_vec_a select 2) select 1, 15.9];
				};
#endif
				_vehicle setdir (_d_vec_a select 3);
				if (_number_v < 10 || (_number_v > 99 && _number_v < 110)) then {
					_vehicle addeventhandler ["killed", {(_this select 0) setVariable ["D_MHQ_Deployed",false,true]}];
				};
				_d_vec_a set [0, _vehicle];
				[b]d_vec_array[/b] set [_i, _d_vec_a];
				_vehicle setVariable ["D_OUT_OF_SPACE", -1];
				_vehicle setVariable ["d_vec", _number_v, true];
				_vehicle setVariable ["d_respawntimer", _respawntimer];
				_vehicle setAmmoCargo 0;
				clearMagazineCargo _vehicle;
				clearWeaponCargo _vehicle;
				_vehicle setVariable ["d_vec_islocked", _isitlocked];
				if (_isitlocked) then {_vehicle lock true};
				["d_n_v", _vehicle] call XNetCallEvent;
//					player globalChat format ["_respawntimer inside spawn: %1",_respawntimer];
				["d_v_rs",[1,[typeOf _vehicle,0] call XfGetDisplayName,(round(_respawntimer * (call XPlayersNumber) / 600)) max 1]] call XNetCallEvent;
#ifdef __TT__
				if (_number_v < 100) then {
					_vehicle addeventhandler ["killed", {_this call x_checkveckillwest}];
				} else {
					_vehicle addeventhandler ["killed", {_this call x_checkveckilleast}];
				};
#endif
#ifndef __CARRIER__
/*
				if (isNull _camo) then {
					_camotype = switch (getNumber (configFile >> "CfgVehicles" >> typeOf _vehicle >> "side")) do {
						case 1: {if (__OAVer) then {"Land_CamoNetB_NATO_EP1"} else {"Land_CamoNetB_NATO"}};
						case 0: {if (__OAVer) then {"Land_CamoNetB_EAST_EP1"} else {"Land_CamoNetB_EAST"}};
					};
					_camo = createVehicle [_camotype, position _vehicle, [], 0, "NONE"];
					_camo setPos position _vehicle;
					_camo setDir (direction _vehicle) + 180;
					_vehicle setVariable ["d_camonet", _camo];
				};
*/
#endif
				_kind = typeOf _vehicle;
				switch (_kind) do {
					case "M1129_MC_EP1" : {
						_vehicle setVehicleInit "0 = [this] spawn DOM_Refill_Vehicle; this addEventHandler [""fired"",{_this + [nearestObject [_this select 0,_this select 4]] spawn DOM_EH_Fired}]"; processInitCommands;
					};
					default {_vehicle setVehicleInit "0 = [this] spawn DOM_Refill_Vehicle"; processInitCommands;};
				};
			}; //End spawn[/color]
		[b]};[/b] //End if (!isnil _respawntimer")
	}; //End respawn condition
	sleep 8 + random 5;
}; //End for all vehicles do
}; //End while true do

And vehicles in init.sqf (Adjust to suit your needs, I have quite different set of vehicles than vanilla):

[
	[xvec1,0,[b]60[/b]],[xvec7,1,[b]60[/b]],
	[xmedvec,10,[b]240[/b]],
	[xvec3,20,[b]120[/b]],[xvec4,21,[b]120[/b]],[xvec5,22,[b]120[/b]],
	[xvec6,30,[b]180[/b]],
	[xvec9,40,[b]60[/b]],[xvec10,41,[b]30[/b]],[xvec11,42,[b]90[/b]],[xvec12,43,[b]90[/b]],[xvec2,44,[b]300[/b]]
] execVM "x_server\x_vrespawn2.sqf";

x_client\x_setupplayer.sqf (register the new event used):

[2, "d_v_rs", { //short for d_vehicle_respawn
switch (_this select 0) do {
	case 0: {format ["A %1 has been destroyed. A new one will be delivered at base in about %2 minutes.", _this select 1, _this select 2] call XfHQChat};
	case 1: {format ["A %1 has been delivered to your base. Keep this one alive! NIP worth %2 points.", _this select 1, _this select 2] call XfHQChat}; //NIP - Not Implemented Punishment :p
}
}] call XNetAddEvent;

Share this post


Link to post
Share on other sites
Hey guys just a real quick question.

I put a few choppers in right off the bat and when I go to use them on my server right away I cant... it says I have to wait 30 some odd minutes before I can access them.

What file and what command do I change to get rid of this for all vehicles - I've been going through files constantly and cant figure it out.

class GVAR(AutoKickTime) {
	title = "Air vecs autokick time:";
	values[] = {0,60, 300, 600, 1800,3600};
	default = 0;
	texts[] = {"0 Minutes","1 Minute","5 Minutes","10 Minutes","30 Minutes","60 Minutes"};
};

It's not really labeled right in my opinion, but just set that to 0.

I noticed on the OA Domi Ace map, all of the Ace2 weapons only havea count of 1, and if I take one it will have a count of zero. I've found multiple files under "x_client" called "x_weaponcargo_ace.sqf" or "x_weaponcargo_ace_oa.sqf" and opening them shows what seems to be whats included in the ammo box. Are these what I need to edit to change, say, all weapons to a 10 count? Will this affect everyone on my server? If so, which one, I'm assuming weaponcargo_ace_oa.sqf, do I need to edit

You've got the right file. As stated, the ammo box is local so consider it your own personal ammo box. The refresh time is 20 minutes, but that is easily changeable if you want. I suggest instead of changing the weapons to a 10 count to just do 2 or 3, but that depends on if your gear saves or not (respawn with old weapons). Also, everything you do in that file effects everybody on the server, but only on their end, if that makes sense. Like I said, it's their own personal ammobox.

Share this post


Link to post
Share on other sites
The ammo boxes are created locally so what you see in the box isnt what everyone else has and the box will refill every 20 minutes i think...

Great info, thanks!

Share this post


Link to post
Share on other sites
Figured it out... I think...

x_server\x_vrespawn2.sqf

One of the reasons I couldn't help was because I didn't understand what you wanted to do.

I assume you trying to change time it takes for the base vehicles to respawn if destroyed?

Share this post


Link to post
Share on other sites

Correct. Just tested briefly in MP as well, and no problems anymore. The idea was to set a variable on each vehicle that is the respawn delay for that vehicle. That way I can put some pressure on the players to try to keep the vehicles alive, depending on how complex the vehicle is. If you destroy an advanced vehicle like the Stryker MC (it's a team vehicle in my version, nobody outside that team can enter it), having a 5 minute respawn delay I think will make them think twice on rolling in close to the target area to spam with Mk19 once the mortar rounds was spent. A HMMWV on the other hand (HQ MRV - Mobile Respawn Vehicle [crates, bicycles and only respawn] and HQ MTV - Mobile Terminal Vehicle [uAV and Satelite view but no respawn]), will respawn only after 1 minute. Sniper teams ATV (also team vehicle), 30 seconds.

Will do the same for choppers; 2 minutes for the sniper teams AH-6X and weapons teams MH-6J, 4 minutes for the Hueys, 8 minutes for the wreck chopper, and 12 minutes for the CH-47 lifter. Or something like that. Be wreckless, pay the price.

Vehicle markers will also be shown with a faded color if their canMove flag is false, indicating they need repairs. If destroyed, the marker will be completely invisible. For base services same apply, although they can only be damaged beyond use but still repairable, so they get faded color.

No player markers yet, think I will base it on if squad leader (the slot) is carrying a "radio" (UAV-Backpack). Small problem with no-fire-zones (external fire support) adding size twice for non JIP clients, but think I can fix it. The biggest thorn so far is the damned trigger based cfgSFX sounds (always disappear if you hear the sound when you're killed, and sometimes even if you're not around the sound - I just don't get the logic behind the bug) and UAV support I had planned (where nothing is working in MP).

Share this post


Link to post
Share on other sites

Are you doing this for the original base vehicles (lift/wreck choppers && MHQ && support trucks) that respawn on their base markers or for prize vehicles being "rebuilt" on the wreck repair point?

Share this post


Link to post
Share on other sites

The original base vehicles only. Awarded ones doesn't use the respawn script :) Keep in mind in realistic modes when you loose a vehicle it's gone for good. The goal is to get closer to hard code missions, while retaining the ability to have a persistent mission. Doing mistakes like loosing a vehicle or dying is supposed to hurt for a while, but not to the point of having to spectate as a bird for an hour waiting for the mission to complete. You have one mobile respawn (a HMMWV), no teleporting, no magic parajumping. Only the CSW/SF team gets HALO (but from 30000 feet, so it's not as convenient as it sounds), but everyone gets Combat Jumping (but not too close to main or side, for the aircrafts safety), requiring a bit of walking. Highly role driven wrt what weapons and abilities you get, just like in most hard core missions. Better (or worse, depends on how you see it) weather system, where dust storms will cause radial blur unless you put goggles on, but those restrict your view a little, also with fog and snow particles (not the builtin system), complete with a BlueNightYellowClearDay thingy for color post processing (also not the builtin system). Rain should be synchronized, and not as speedy on the updating as the default. More infantry based, so forget the Domination hardware orgy, top vehicle you'll get is the Bradley/Linebacker. More artillery types, but you'll have to do side missions to get the rounds as awards, pluss no map click - type in the grid (6 or 8 digit), but FDC may deny you the mission if it doesn't follow their own ROE (no firezones by markers). AI artillery is also much more aggressive and immersive and they will use suppressive fire to make you stay when they call for support. Ammo will be a challenge. Try to be a one man tank wrecking crew, and you'll find that very hard with only two rockets in your crate. Fill the assistant slot, and you'll have plenty ammo. Team play is highly suggested. Bigger towns are filled with ambient sounds, make it sound more alive. And AI will be given and use flares (and even see with them) during night missions, which is my favorite theme. Added some camera shake to mounted vehicle weapons. A little more verbal communications with two new identities (Anvil for artillery and Mohican for mortars, lol) during call for fire, with readout of grids etc. A lot of them "small details" which makes a lot of sense to me, but probably nobody else :p

Does it work, does it play out well? I have no idea, it's kinda hard to test it out solo.

Share this post


Link to post
Share on other sites

Has anyone ever tried to take away the red circles for the main targets and just post up a coordinate/name in the message box? That sounds like an interesting take, considering no one knows how big the AO is, and would be forced to send in recon units.

Share this post


Link to post
Share on other sites

Vehicle markers will also be shown with a faded color if their canMove flag is false, indicating they need repairs. If destroyed, the marker will be completely invisible. For base services same apply, although they can only be damaged beyond use but still repairable, so they get faded color.

How did you go about doing this? I searched through the code you posted previously but could not find it.

Share this post


Link to post
Share on other sites

Didn't show it, but here is what I have in x_client\x_marker.sqf:

X_XMarkerVehicles = {
_rem = [];
{
	if (!isNull _x) then {
		_m = _x getVariable "d_marker";
		_m setMarkerPosLocal (getPosASL _x);
		if (d_v_marker_dirs) then {
			_m setMarkerDirLocal (direction _x)
		};
		if (!canMove _x) then {
			_m setMarkerAlphaLocal 0.3;
		} else {
			_m setMarkerAlphaLocal 1.0;
		};
	};
	if (isNull _x || !alive _x) then {_rem set [count _rem, _x]};
	sleep 0.03;
} forEach d_marker_vecs;
if (count _rem > 0) then {
	for "_i" from 0 to count _rem - 1 do {
		_m = (_rem select _i) getVariable "d_marker";
		_m setMarkerAlphaLocal 0.0;
		sleep 0.03;
	};
	d_marker_vecs = d_marker_vecs - _rem;
};
};

I think that was all I needed, not sure. Let me know if it doesn't work.

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

×