Jump to content
Tankbuster

Editing, Expanding and Modifying Domination

Recommended Posts

The thing is, the database connections are done client-side (I think, it's all launched from the x-intro.sqf). And the addScore command only works when it's launched serverside.

The database handling is completely done on the server, nothing client-side and not in the intro script, the intro script just displays some additional info if the stats are available :)

Add something like this to the onPlayerConnected script (x_serverOPC):

{
   if (getPlayerUID _x == _uid) then {
       _nscore = _res select whatever_idx_in_the_array_the_score_is_stored; // I can't remember which one it was
       if (_nscore > 0) then {
           _x addScore _nscore; // be aware that the arma server itself stores the player score so if a player reconnects it may add this to the previous player score
       };
   };
} forEach playableUnits;

It should find the correct player object (at least if playableUnits works as expected and the new connected player object is already in the playableUnits array) and add the score from the sqlite database to the player object.

You can also iterate over all Dom player entities to find the correct unit and read the player object from missionNamespace (check the onPlayerDisconnected script, it's using it).

If a player clicks the button to check his stats a query is send to the server and the server will send the current player data just to this specific client. Once the client has received the data from the server the player stats dialog opens or, if a timeout is reached because something went wrong it won't open (the data of each client is cached in an ingame object on the server while the mission runs, better for performance because it reduces the callExtension calls accessing the sqlite database; the only times the sqlite database gets actually accessed is when a player connects and disconnects).

Xeno

Share this post


Link to post
Share on other sites

Hello all,

I would need help to find a way to changes the bonus points an engineer gets when he repairs vehicles. (it's a TVT ACE domination ranked 2.71)

I checked the i_client.sqf :

if (GVAR(with_ranked)) then {

GVAR(ranked_a) = [

0, // points that an engineer must have to repair/refuel a vehicle

[7,4,2,0], // points engineers win for fast repairing an air vehicle, tank, car, other.

how to substract points instead of giving points ? (i tried to put negative values without success)

edit :

ok i found how to fix my own problem : something was missing (negative values are working) :

in x_client folder there is two files to modify (x_repcheck and x_repengineer)

in both files check for "if (_addscore > 0)".

rename it, for example "if (_addscore > -5)"

if you set subtracted points higher than -5.

for example : [-3,-2,-1,0], // points engineers win for fast repairing an air vehicle, tank, car, other

the substraction will be took into account for each repair.

Edited by cychou

Share this post


Link to post
Share on other sites

Hi !

Again i have another little problem :)

I want to change the time you need to repair the support buildings (aricraft_fac, wreck_fac... etc). I think you know what i mean ;)

The time is a little bit too long. Around 10 seconds would be great...

If i can't change this...i need to know how to delete those buildings. But the repair scripts/triggers must work though...

We also have another problem:

2013/04/22, 19:52:35 Error Undefined variable in expression: _rep_station

2013/04/22, 19:52:35 File mpmissions\__cur_mp.takistan\x_server\x_f\x_serverfuncs.sqf, line 643

2013/04/22, 19:52:35 Error in expression <_wreck = [_rep_station,_types] call d_fnc_GetWreck>

2013/04/22, 19:52:35 Error position: <_rep_station,_types] call d_fnc_GetWreck>

2013/04/22, 19:52:35 Error Undefined variable in expression: _rep_station

2013/04/22, 19:52:37 Error in expression <elect 1;

_no = nearestObjects [position _rep_station, _types, 8];

if (count _no >

The message appears continuously. When someone join, the server crash immediately oder after around 10min.

maxx

Edited by maxx2504

Share this post


Link to post
Share on other sites

Hi !

I have another question again for Domination:

We all know there is a Revive System implemented where players can revive players or AI can revive players. This is good...but...

I want that the enemies can also revive their mates and i want revive my AI teammates (if i recruited some) too.

Is that possible in any way with a script for domination ?

maxx

Share this post


Link to post
Share on other sites

Thank you very much, Xeno, for clarifying how the DB access is being handled.

Sadly, even with your tips I am unable to get it to work.

I inserted this in the x_serverOPC.sqf:

{
if (getPlayerUID _x == _uid) then {
	_nscore = _res select 2; // Query stored score from database
	_score = score _x;
	if (_nscore > 0) then {
		_x addScore - _score; // Remove possible existing score that's stored mission-based
		format["Player: %1 retrieved %2 points from the database.", _x,_nscore] call FUNC(GlobalChat);
		_x addScore _nscore; // add score from database
	};
};
} forEach playableUnits;

I'm not surprised this isn't working, as this is really a very wild guess on the code. I would be very grateful if someone could enlighten me on how to make this code "proper". I'm used to high level languages like Java and Python, but not Arma...

I don't think it should be that difficult to implement this, but I'm really certain I'm just making some big mistakes...

EDIT: I continued to fiddle (probably a dozen times by now...) and the script still doesn't really run. I updated the above code with my current attempt... :/

Edited by Senshi

Share this post


Link to post
Share on other sites

deleted

Edited by Shift
Sorry, found a more suitable thread to post this

Share this post


Link to post
Share on other sites

Ok, I am having issues with my domination. I want to know these things.

How to modify the scripted ammo box's content

How to add vehicles to the main vehicle respawn system.

How to custom define a server admin to skip a side mission.

Share this post


Link to post
Share on other sites

Hi !

Is it possible in any way to expand the spotting range of the enemies at AO ? The problem is when i fly with a plane i can easily shoot 3-4 tanks in 2-3 km distance and don't get spotted by the enemy. Thats a little bit dumb ;)

OR

Is it possible that the enemy call reinforcements right after the new AO was set ? Its too easy to destroy all the vehicle without enemy airplanes.

Maybe you understand what i want ;)

Maxx

Share this post


Link to post
Share on other sites

Hi guys, I´m making a CWR2 Resistance Domination 2.60 on Nogova.

The mission is working but I need only a little advice on how to change flags in Main Targets camps.

I need to put the soviet one changing to FIA one when you capture the camp.

Thanks in advance.

Share this post


Link to post
Share on other sites

hi bossOfgames, the files to edit to change your ammobox content is here :

1) modify ammobox content :

find this :

your domination folder/x_client/x_weaponcargo.sqf or

x_client/x_weaponcargor.sqf

(x_weaponcargor.sqf if you use ranking system, and x_weaponcargo.sqf if you don't)

inside this you will have a list of weapon classname (the rank distinction is only taken into account for x_weaponcargor.sqf)

add whatever you want, but the most important is to maintain the text shape (one single error will make the ammobox to not work).

for example when using ranked version :

//privates rifles

[["M16a4",1],["M16A2",1],["M4a1",1]],

//Corporal

[["M40A3",1]],

//Sergeant

etc....

- don't forget [[ and ]] at the begining and at the end of each rank weapon list.

- don't forget "" arround each weapon name.

- don't forget the , between each weapon.

at the bottom end of this file you have _awc and _amc line

__awc is for additional object ex : _awc(Laserdesignator,1)

__amc is for magazines. ex : __amc(30Rnd_9x19_MP5,50)

use this site to find all the classname you need (Including all ACE weapons classname if you use ACE)

http://browser.six-projects.net/cfg_weapons (press search and find what you want (weapon, Magazines, vehicles...)

the object name is the one displayed in the "name" column)

2) if you want to add vehicle inside your base you must edit the mission.sqm file.

copy the mission.sqm (contained in your domination.pbo) into your mission editor folder saved mission.

C:\Users\yourname\Documents\ArmA 2 Other Profiles\nickname\missions\

in "mission" you create a folder called Domination.Takistan (if takistan)

- inside the Domination.takistan you past the mission.sqm

- then open the arma 2 mission editor

- select your mission

- add the vehicle you want (empty vehicles)

you can add respawn capability to your vehicles (go check a file called vehicle.sqf inside you domination folder.)

For example i want to add an empty bradley who will respawn to his initial point 5 min after destruction or 10 min after inactivity (time is set in seconds) :

veh = [this, 300, 600] execVM "vehicle.sqf";

in mission editor you must copy this line into the initialisation line of your Bradley.

(several other options can be added in this init line, check vehicle.sqf for more infos)

3) you can disable all side missions, but i don't think you can skip only one (for example if a side mission is bugged)

to completely disable side mission select the domination mission in you mission list

go to "parameters" and you have a line to switch ON/OFF side mission and main AO.

---------- Post added at 11:04 PM ---------- Previous post was at 11:03 PM ----------

Hello, i would need help in domination to change something :

one of the side mission is to bring back a prototype chopper to your base.

but once you brought the chopper to your base the bonus point are given to the players who are near the side mission marker.

i would like to change it and to give bonus point to the players near your flag at your base. (like when you must bring back hostages or flag)

I know that the file to modify is probably x_mission/common/x_sidesteal.sqf

but I don't know the exact line to change and what to write.

Edited by cychou

Share this post


Link to post
Share on other sites

So I tried porting the Takistan OA ACE AI version of Domination to the Cao Bang map of UNSUNG and it worked, but I was wondering how to replace the enemy infantry/vehicles/weapons with Viet Cong and NVA (pre 66) weapons, vehicles and units?

Share this post


Link to post
Share on other sites
thx, helped. but more questions.

1. when player dead, how can i make another respawn point? shows a availables, and choose one...

Searched the thread to see if this question was ever answered - there is only one other reply which essentially advised MacmillanINC not to ask again.

; )

So, here is what I am looking for .... XTheHybridX's Taviana Domination http://www.armaholic.com/page.php?id=18635 has an Airfield AND Carrier version (JDG Nimitz addon) and then is pretty much a straight port of Domination (thanks again Xeno).

What I am looking to do is add an ADDITIONAL respawn option called "Carrier" so that when a player dies, and their timer counts down, they may opt to revive aboard the Nimitz. To be clear, I want to keep "Base" as well as "Mobile Respawn 1" and "Mobile Respawn 2" as other options as well, this is an effort to add an additional respawn option. Also, all MilSim Reality Sins aside, the group I play with is small and respawn is necessary like it or not.

Simple code-gazing hasn't gleaned me much, so before I sally bravely forth and break the mission I figured I'd ask the thread for suggestions and how to's so I could add "Carrier" as a new respawn option.

Thanks and hope someone can help,

Theopolus

Edited by Theopolus

Share this post


Link to post
Share on other sites

Hey this is Avibird 1 lost my old acc after the last forum update! Does anyone know how to allow damage to the AI recruitment building during the mission. It seems the opfor units attack it but can't destroy it. Can this been done if yes and how. The AI recruitment building is placed on the map by a marker. Thanks for any input on this.

A side note can one of the forum MOD's help me regain my old acc! Avibird 1 member since 2009.

Share this post


Link to post
Share on other sites
Searched the thread to see if this question was ever answered - there is only one other reply which essentially advised MacmillanINC not to ask again.

; )

So, here is what I am looking for .... XTheHybridX's Taviana Domination http://www.armaholic.com/page.php?id=18635 has an Airfield AND Carrier version (JDG Nimitz addon) and then is pretty much a straight port of Domination (thanks again Xeno).

What I am looking to do is add an ADDITIONAL respawn option called "Carrier" so that when a player dies, and their timer counts down, they may opt to revive aboard the Nimitz. To be clear, I want to keep "Base" as well as "Mobile Respawn 1" and "Mobile Respawn 2" as other options as well, this is an effort to add an additional respawn option. Also, all MilSim Reality Sins aside, the group I play with is small and respawn is necessary like it or not.

Simple code-gazing hasn't gleaned me much, so before I sally bravely forth and break the mission I figured I'd ask the thread for suggestions and how to's so I could add "Carrier" as a new respawn option.

Thanks and hope someone can help,

Theopolus

So are there really no suggestions here? Is there an existing post or thread that answers this question? Any suggestions would really be appreciated.

Thanks,

Share this post


Link to post
Share on other sites

Hi can anyone help with the following problems i have with dedicated server running DomiOA West 2.6.

Most vehicles Added into the mission do not show, i have tried a c130 and ah46 and some others but they don't show in game! I am guessing there is scripting that is restricting them from spawning in game but i can't find it.

I also have a ammo.sqf filler script for a baf ammo box i have i added a DMR and some other weapons into it. The extra's i added show in the ammo box but i can't take the extra weapons out the box for some reason.

Thanks

DT39

Edited by DT39

Share this post


Link to post
Share on other sites

Hi again people has nobody got a clue as to any of the issues i have in the last post i have spent hours looking through .sqm's and reading through old posts etc but still can't solve the problems!

I have tried adding vehicles in editor using simple respawn script and also via adding them into the domination vehicle arrays via i_client.sqm & d_init.sqm so the work of proper domination respawn but still they don't show/spawn in the game. There must be a restriction on how many vehicles or type somewhere!

Ammobox issue again tried a few things but still back to square one! So if i add a DMR to the box it shows in the ammobox but players can't take it out of box! If i add same to the domintaion player ammobox via x_weaponcargo_oa.sqm it will show and players can take the weapons etc... but the reason for not doing it this way is i want more than one box at base!

Any thoughts let me know.

Thanks

DT39

Share this post


Link to post
Share on other sites

Hey DT39 I have many domination edits that I play. Never had any issues with putting down vehicles via editor and using the simple respawn script as well as multiple edits using a ammo filler script.

1. Simple Vehicle Respawn Script v1.7 by Tophe of Östgöta Ops

2. Universal Crate Filler 2.0 by Tophe of Östgöta Ops

? Why are you not using the update version of domination 2.71

What I found in the past few years of attempting to edit and make a domination mission the way I want to play is you can easily F UP YOUR mission very fast. The mission has so many folders/files that work together if you change one thing you may cause a different issue with a different file. You should make a working copy of your mission before you start F with a new edit in the mission. It will save you a lot of time when you break your mission lol. I would try to add a simple Vehicle Respawn and Crate Filler to a vanilla copy of domination to see if you can get it to work. You should! I have many different domination edits all with crate fillers and vehicle scripts going back to 2.54 version. Good luck. Avibird

Share this post


Link to post
Share on other sites

Thanks Avibird1. Yeah beats me no idea why there not working.

I can't go with 2.71 as I have a Linux server and it says latest windows only.:-(

Think I will just start over with clean mission.

Ah yes already had my fingers Burnt with no copy before changes! Hopefully the last :-)

Cheers

DT39

Share this post


Link to post
Share on other sites

Hey guys so i found a Domi port for A3, and was wondering what scripts need to be changed so that the Heli lift choppers have the ability to lift boats and other vech's instead of just the MHQ, i have looked in the i_client, as well as any other script that i saw that mentioned heli, but it eludes me to where it is. Any help on this would be great.

Share this post


Link to post
Share on other sites
Hey guys so i found a Domi port for A3, and was wondering what scripts need to be changed so that the Heli lift choppers have the ability to lift boats and other vech's instead of just the MHQ, i have looked in the i_client, as well as any other script that i saw that mentioned heli, but it eludes me to where it is. Any help on this would be great.

find file fn_preinit in x_init folder, in that file find:

GVAR(helilift1_types) =

#ifdef __OWN_SIDE_OPFOR__

switch (true) do {

case (__A3Ver): {

["put here class name of vehicle you want to lift","B_Truck_01_covered_F","BMP2_HQ_TK_EP1","M113Ambul_TK_EP1","UralSupply_TK_EP1","UralRepair_TK_EP1","UralRefuel_TK_EP1","UralReammo_TK_EP1","V3S_Open_TK_EP1","V3S_TK_EP1","UAZ_Unarmed_TK_EP1","D30_TK_EP1"]

};

add class name of vehicle you want to lift. Above you can lift truck covered from A3 , bmp2 from A2 , etc. cheers, pawel

Share this post


Link to post
Share on other sites

Is there a way to increase the number of attack planes and/or helicopters?

If I mod this line to read anything but 1, nothing happens GVAR(number_attack_planes) = 1; and GVAR(number_attack_choppers) = 1;

Did some poking around but couldn't see where I could increase the numbers. any help would be great thanks again

Share this post


Link to post
Share on other sites

@rowdied yes you can. When I get time I will look at what file you need to edit the code.

Share this post


Link to post
Share on other sites
@rowdied yes you can. When I get time I will look at what file you need to edit the code.

Any luck?

Share this post


Link to post
Share on other sites

Any having troubles with sidemission rewards ?

Im getting a something like: "sidemission done you will be get a , its available in base"

Nothing is comes up in base ?

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

×