Jump to content
Tankbuster

Editing, Expanding and Modifying Domination

Recommended Posts

Used the search function here with no result so I'll ask,

1) How do I disable bonus vehicles?

2) If I go into the editor, change the name of the unit (non-description field name) will any scripts break? If so, which ones?

Note, my goal is simple: add slots, custom weapon boxes, and add my vehicles that are there from the beginning of the mission with a simple respawn script via the editors init field. Any advise or warnings would be appreciated.

Share this post


Link to post
Share on other sites
Used the search function here with no result so I'll ask,

1) How do I disable bonus vehicles?

2) If I go into the editor, change the name of the unit (non-description field name) will any scripts break? If so, which ones?

Note, my goal is simple: add slots, custom weapon boxes, and add my vehicles that are there from the beginning of the mission with a simple respawn script via the editors init field. Any advise or warnings would be appreciated.

1) There's no simple way of stopping the mission giving bonus vehicles. It's odd that you want to do this given it's the central premise of the mission. Still.. you'll need to find the script that chooses prizes (I'm at work now so don't have access to my gaming PC) and remark out the majority of it.

2) You aren't advised to change the names. Much of the mission's functionality hangs off these names. There are variables such as can_use_artillery that specify unit names. You *can* do it, but be aware you'll need to change a lot of other stuff if you do.

3) Don't use the init field for scripts in this mission. If you want vehicles to respawn, you need them special names too. Look in the editor for the names of the MHQ and helos, then look for instances of those names. You'll see the built-in respawn scripts. You're advised to make use of them.

Share this post


Link to post
Share on other sites

Thanks for the reply. The reason I want to disable the bonus vehicles is because I want to add 156 slots to the mission (not saying 156 players at once), just need to add all available slots for people and the all need room; nicest area I could find is the bonus vehicle area, and we dont necessarily need bonus vehicles.

If someone already knows which scripts that contain the unit names, and vehicle respawns it'd save me a lot of time.

Share this post


Link to post
Share on other sites

Is there a good solution to making domination saveable? me and my friend play it on a server I host (local) and it works great. I edited the mission and enabled saving, but vehicles don't seem to respawn.

Share this post


Link to post
Share on other sites

I'm thinking of asking my questions in another thread because when I ask em in this one they pretty much get overlooked.

I do thank you for any help you may have given me that actually worked though.

Share this post


Link to post
Share on other sites
when I ask em in this one they pretty much get overlooked.

What you want is someone to do it for you. :) Not everyone here has time to do that. This thread (and this forum) is about helping you to help yourself, not spoonfeeding. But.. that understood, I'll give you some more pointers to get you going.

First, read the first few posts of this thread, they give you some valuable techniques for working out how to change parts of the mission.

I already told you that initvec.sqf has some eventhandlers set up, also (from memory) there's a file called checkdriver.sqf (both in x_client folder) that will do some of the stuff you are looking for. Look through both files and try to work out what they do, then you should be able to see where your new code should go.

You want to eject players who don't have clan tags? The easiest way to do this is to compare the name of the player who tries to get in a vehicle with a list of known clan members - so you'll need an array. It needs to be global so declare it in i_common.sqf

clanmemberlist = ["DarkGuerilla","My mate","My othermate"];

Rather confusingly, there's largely identical files called checkdriver.sqf and checkenterer.sqf in x_client. Both are called by x_setupplayer so we can assume that the first one do runs when someone gets in a drivers seat and the other runs when they try to get in another seat such as gunner. Look carefully through those files and see how they work.

You should see that the variable called _enterer contains the person trying to get in. So you can do something like


if _enterer !(in clanmemberlist) then _enterer action ["eject", _vehicle] ;

*code not tested and may require fixing. :)

You could ask in another thread, but the chances of it being locked are high. You can't keep firing up new threads because you don't like the answer you got in the last one.

Share this post


Link to post
Share on other sites

Hey everybody. Thanks for helping me out a few weeks ago, I've got a pretty simple one for you guys.

I remember in Domination for A1 you could place any vehicle you like on the map and then put a snippet of code in the init line of that vehicle to make it respawn when killed. Does anyone remember that snippet? It was a call to exec the respawn.sqf but i can't find the syntax anywhere.

Also, I've added the F16 to the sm bonus array, but it doesn't create a wreck when destroyed. I was pretty sure the vehicles that created wrecks were simply the ones listed in the SM and MT bonus arrays. How can I make my F16 create a wreck (not respawn).

Thanks for your help fellas.

Share this post


Link to post
Share on other sites

Agh! Don't use init lines in Domination missions!

Give the unit a name and then reference it in the spawn script.

Are you sure the F16 has a wreck model available? Have you seen it in other missions?

Share this post


Link to post
Share on other sites
Hey everybody. Thanks for helping me out a few weeks ago, I've got a pretty simple one for you guys.

I remember in Domination for A1 you could place any vehicle you like on the map and then put a snippet of code in the init line of that vehicle to make it respawn when killed. Does anyone remember that snippet? It was a call to exec the respawn.sqf but i can't find the syntax anywhere.

Thanks for your help fellas.

This is in Smokey's Dom Falloujah.

Works like a charm.

Whole mission is available for download at Armaholics.

Can't say enough good things about this edition of Domination.

Only thing I did was add a random IED and person to the city.

(Hope Smokey doesn't mind me putting this here. But this works great.)

veh = [this, 3600, 3600, 0, FALSE, FALSE] execVM "vehicle.sqf";

In the root folder you have vehicle.sqf

and it is this below.

/*

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

Simple Vehicle Respawn Script v1.7

by Tophe of Östgöta Ops [OOPS]

Put this in the vehicles init line:

veh = [this] execVM "vehicle.sqf"

Options:

There are some optional settings. The format for these are:

veh = [this, Delay, Deserted timer, Respawns, Effect, Static] execVM "vehicle.sqf"

Default respawn delay is 30 seconds, to set a custom

respawn delay time, put that in the init as well.

Like this:

veh = [this, 15] execVM "vehicle.sqf"

Default respawn time when vehicle is deserted, but not

destroyed is 120 seconds. To set a custom timer for this

first put the respawn delay, then the deserted vehicle timer. (0 = disabled)

Like this:

veh = [this, 15, 10] execVM "vehicle.sqf"

By default the number of respawns is infinite. To set a limit

First set the other values then the number of respawns you want (0 = infinite).

Like this:

veh = [this, 15, 10, 5] execVM "vehicle.sqf"

Set this value to TRUE to add a special explosion effect to the wreck when respawning.

Default value is FALSE, which will simply have the wreck disappear.

Like this:

veh = [this, 15, 10, 5, TRUE] execVM "vehicle.sqf"

By default the vehicle will respawn to the point where it first

was when the mission started (static). This can be changed to

dynamic. Then the vehicle will respawn to the position where it was destroyed.

First set all the other values then set TRUE for dynamic or FALSE for static.

Like this:

veh = [this, 15, 10, 5, TRUE, TRUE] execVM "vehicle.sqf"

If you you want to set the INIT field of the respawned vehicle, first set all other

values, then set init commands. Those must be inside quotations.

Like this:

veh = [this, 15, 10, 5, TRUE, FALSE, "this setDammage 0.5"] execVM "vehicle.sqf"

Default values of all settings are:

veh = [this, 30, 120, 0, FALSE, FALSE] execVM "vehicle.sqf"

Contact & Bugreport: harlechin@hotmail.com

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

*/

if (!isServer) exitWith {};

// Define variables

_unit = _this select 0;

_delay = if (count _this > 1) then {_this select 1} else {30};

_deserted = if (count _this > 2) then {_this select 2} else {120};

_respawns = if (count _this > 3) then {_this select 3} else {0};

_explode = if (count _this > 4) then {_this select 4} else {false};

_dynamic = if (count _this > 5) then {_this select 5} else {false};

_unitinit = if (count _this > 6) then {_this select 6} else {};

_haveinit = if (count _this > 6) then {true} else {false};

_hasname = false;

_unitname = vehicleVarName _unit;

if (isNil _unitname) then {_hasname = false;} else {_hasname = true;};

_noend = true;

_run = true;

_rounds = 0;

if (_delay < 0) then {_delay = 0};

if (_deserted < 0) then {_deserted = 0};

if (_respawns <= 0) then {_respawns= 0; _noend = true;};

if (_respawns > 0) then {_noend = false};

_dir = getDir _unit;

_position = getPosASL _unit;

_type = typeOf _unit;

_dead = false;

_nodelay = false;

// Start monitoring the vehicle

while {_run} do

{

sleep (2 + random 10);

if ((getDammage _unit > 0.8) and ({alive _x} count crew _unit == 0)) then {_dead = true};

// Check if the vehicle is deserted.

if (_deserted > 0) then

{

if ((getPosASL _unit distance _position > 10) and ({alive _x} count crew _unit == 0) and (getDammage _unit < 0.8)) then

{

_timeout = time + _deserted;

sleep 0.1;

waitUntil {_timeout < time or !alive _unit or {alive _x} count crew _unit > 0};

if ({alive _x} count crew _unit > 0) then {_dead = false};

if ({alive _x} count crew _unit == 0) then {_dead = true; _nodelay =true};

if !(alive _unit) then {_dead = true; _nodelay = false};

};

};

// Respawn vehicle

if (_dead) then

{

if (_nodelay) then {sleep 0.1; _nodelay = false;} else {sleep _delay;};

if (_dynamic) then {_position = getPosASL _unit; _dir = getDir _unit;};

if (_explode) then {_effect = "M_TOW_AT" createVehicle getPosASL _unit; _effect setPosASL getPosASL _unit;};

sleep 0.1;

deleteVehicle _unit;

sleep 2;

_unit = _type createVehicle _position;

_unit setPosASL _position;

_unit setDir _dir;

if (_haveinit) then

{_unit setVehicleInit format ["%1;", _unitinit];

processInitCommands;};

if (_hasname) then

{_unit setVehicleInit format ["%1 = this; this setVehicleVarName ""%1""",_unitname];

processInitCommands;};

_dead = false;

// Check respawn amount

if !(_noend) then {_rounds = _rounds + 1};

if ((_rounds == _respawns) and !(_noend)) then {_run = false;};

};

};

---------- Post added at 08:28 PM ---------- Previous post was at 07:49 PM ----------

Agh! Don't use init lines in Domination missions!

Sorry TB, Had to show him.. He asked.

:)

Share this post


Link to post
Share on other sites

Exactly what I was looking for, thanks so much Styxx, works great.

As for the F16 no I haven't seen it in other missions. I know when it blows up there is a wreck, but you can't pick it up and it isn't marked on the map like BIS planes are. Sooooo. I guess I can't use it?

I just figured if I have the addon, and it's in the array, then it would work but that's not the case then?

Thanks again for your help everyone, you rock.

Oh, one more question. I'm making an ArmA/OA mix dom on Chenaraus. How can I have the OA weapon box AND the old Chenaraus weapon box spawn at base? (ACE version).

Share this post


Link to post
Share on other sites

Adding a classname to the bonus array should mean you can pick it's wreck up with the wreck chopper. But I do remember having to fix the original code to make it work. Damned if I can remember what it was though. Look in i_common to make sure the wrecklift array is being assembled correctly.

About OA and Ace boxes at base.. You can't do that easily. It would require quite a substantial code overhaul.

Share this post


Link to post
Share on other sites

Look in x_client directory. There's files called x_weaponcargo something.sqf. These are the files that hold what is in the weapons cache.

ones ending in r are for ranked and contain the code that decides what rank controls what weapons. ones ending in ACE are for ACE and OA are for Takistan.

Share this post


Link to post
Share on other sites

Right, so I just copied the weapon script from my OA Takistan, renamed it and overwrote the one in my Chenaraus Dom. Works great, embarrassed I didn't think of it.

Thanks for your help TB, it's awesome when you can get all your answers in one day. Cheers!:yay:

Share this post


Link to post
Share on other sites
I'm thinking of asking my questions in another thread because when I ask em in this one they pretty much get overlooked.

I do thank you for any help you may have given me that actually worked though.

Yeah I apologize for that one. I was having a bad day that day.

Anywho.

I made my i_common.sqf have the

// position of radar and anti air at own base
#ifdef __DEFAULT__
if (__OAVer) then {
d_base_radar_pos = [8108.81,1742.59,0];
d_base_anti_air1 = [7802.25,1569.14,0];
d_base_anti_air2 = [8356.78,1875.39,0];

} else {
d_base_radar_pos = [4452.74,10256.3,0];
d_base_anti_air1 = [4210.8,10670.5,0];
d_base_anti_air2 = [4737.63,9774.83,0];
};
#endif
#ifdef __EVERON__
d_base_radar_pos = [4853.66,12051.6,0];
d_base_anti_air1 = [4694.31,11914.1,0];
d_base_anti_air2 = [4710.19,10933.5,0];
#endif

clanmemberlist=["Member","Member","Member","DarkGuerilla","Member"];

And my x_checkdriver.sqf

	} else {
	if (playerSide == east && _d_side == west) then {
		_exit_it = true;
		["This is a US mobile respawn vehicle.\nYou are not allowed to enter it !!!", "SIDE"] call XHintChatMsg;
	};
};
};
if (_exit_it) exitWith {
_enterer action["Eject",_vehicle];
if (!_was_engineon && isEngineOn _vehicle) then {_vehicle engineOn false};
};
if _enterer !(in clanmemberlist) then _enterer action ["eject", _vehicle]
#endif

Really all these guys want in their edit is something that will not let anyone fly who isn't on TS3 with us and the best way they figure is to have some sort of array that will lock the aircraft to keep them out. Mostly because we don't like the idea of some idiot flying over the town and dropping bombs and likely hitting us. I'm not a good scripter so I have no clue how to get that to work. I'm still learning how to edit Domination.

Share this post


Link to post
Share on other sites

The theory is right. You should get a more experienced coder to look over it for syntax - I think it needs a semicolon are ["eject", _vehicle]

Share this post


Link to post
Share on other sites

So I am haveing some troubles with the revive version I am running on my server now. Most notably, chutes not opening for some people. I remember running into this when I played on some other servers and they got fixed. I of course do not know what they did. I am sure there are some posts on this out there. And please believe me when I tell you. I have searched for hours and hours before leaving this post. Nothing bothers me more than not being able to solve my own problem. Well, searching and finding the solution anyway. I have searched all the applicable Bis forums with stuff like, "chute not openeing, Parachute not opening, Parachute not opening in revive and so on. Even searched Google/web for answers. You get the idea. Could someone possible point me in the right direction. I am wondering if it has something to do with the class they are coming in as. It only happens to certain indivudals. I had one guy said it was no big deal cause as he was falling he would just debug. Not real sure what he meant by that. Anyway, thank you all for your time and efforts.

nuke

Share this post


Link to post
Share on other sites
So I am haveing some troubles with the revive version I am running on my server now. Most notably, chutes not opening for some people.

nuke

NukeRat are You SURE it is not a PEBKAC error?

When the new Chutes came out my fellow clanmates did a LOT of complaining that the chutes where not opening.

Funny I never had an issue and would always get spot on and I am not a chute expert by any stretch.

Or they would suddenly separate from the chute and really after WAY too much technical trouble shooting I had a LAN party and saw these people where actually not pulling their chutes early enough or CUTTING their chutes away right after they pulled them.

Just be aware it could be that and nothing technical with your server or mission.

Keep us advised.

Share this post


Link to post
Share on other sites

Yeah, I'm pretty sure 'chute failures were fixed, I remember chatting to Xeno about it. Now that I think about it, he also fixed the 'can't get out of chute when landing on sloped terrain problem'.

I also suspect ID-10 T issue. Is there anything of interest in the server or client RPTs?

Edited by Tankbuster
removed text as I was talking bollocks. again.

Share this post


Link to post
Share on other sites

That parachute issue is something I still encounter in my edits of domination 2.22.

How can I fix it?

It is very annoying to parachute and get stuck on a slope.

Share this post


Link to post
Share on other sites

Peeps coming to you once more.

The ammo crate that is created at the flagpole.

I want to move it, or duplicate it.

I have gone to it in game and it is called US Special Weapons.

But just placing one of those does not duplicate what is really in it at the flag pole so I am guessing it is a special XENO crate.

I would hazard a guess that to move it I just need to find the name and move it like mia389 showed me how to move the AI Hut.

Any assistance would be VERY much appreciated.

Share this post


Link to post
Share on other sites

Near the top of i_client.sqf.

#ifdef __DEFAULT__

if (isNil "d_with_carrier") then {

if (__OAVer) then {

[[8273.4199,2110.2529,0],330]

In red are the coordinates of the crate and blue is the direction.

Share this post


Link to post
Share on other sites
Near the top of i_client.sqf.

#ifdef __DEFAULT__

if (isNil "d_with_carrier") then {

if (__OAVer) then {

[[8273.4199,2110.2529,0],330]

In red are the coordinates of the crate and blue is the direction.

Worked like a charm.

Thanks Strikor.

Really appreciate that.

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

×