Jump to content

Photo
- - - - -

Editing, Expanding and Modifying Domination


  • Please log in to reply
1924 replies to this topic
Thread Starter
tankbuster
tankbuster

    First Lieutenant

  • Members
  • 5340 posts

#1

Posted 06 August 2010 - 08:27

Xeno's thread over user missions, does get a bit bunged up with questions about editing and modifying Domination, so I got permission to start this thread.

For me Domination got me into playing as well as editing. His code is usually internally documented very well and it's possible, with a little code gazing to see how he's done stuff and why he's used a given method.

So, let's get started! :)

---------- Post added at 09:22 AM ---------- Previous post was at 09:10 AM ----------



The basics. To edit a Domination mission you need the mission file, available from Dev Hev or if you don't want the vanilla stuff, from your mission cache folder. The Dev Hev stuff comes in a 7z file, use 7z or winrar to unpack it.

You're going to need an application to 'dePBO' the file. I like Kegetys cPBO but some have trouble with it. So, once you're dePBO'd the mission file, you will end up with the mission folder.

To edit the mission files, I use notepad++ because it does bracket and parenthesis pair matching, but equally a lot of people like Armaedit. It's cool as it knows all the reserved and key words, but it's author is long gone.

That's the absolute basics. So, get in there, have a look through the files and get editing. When you're done, you can see your efforts in editor preview, or use cPBO to remake the PBO from the mission file and try them on a server.

---------- Post added at 09:27 AM ---------- Previous post was at 09:22 AM ----------

There are 3 main files you should look into first.

In the mission folder, there are files called i_server, i_client and i_common.

i_server makes all the server side units, so that's all the enemies.

i_client deals with all the player stuff such as scoring and player interaction with other stuff in the game.

i_common is where stuff common to both server and client is managed. So, enemy town locations and the arrays that determine what units you win for completing objectives in here.

Edited by Foxhound, 08 June 2011 - 09:36.

Documentation is not a dirty word.
: TeamSPAFF : PRACS : RKSL : Stella Artois : Creme Eggs : Elite Warriors :

Making working streetside IEDs since 2011.

CarlGustaffa
CarlGustaffa

    Captain

  • Members
  • 6397 posts

#2

Posted 06 August 2010 - 08:54

I've never tried notepad++ so I won't comment on it. But I've sort of grown up using UltraEdit and UltraCompare, which can be found here. They're not free though, but Kegetys have a very nice highlighting wordfile you can use for UltraEdit. Regular Notepad and using OS for file search? Forget it, you'll just end up frustrated. UltraCompare is an extremely nice tool if you try to keep your edited version updated to the latest vanilla Domination, since you can do a three-way folder compare; your version, latest Domination version, and the previous Domination version. Especially useful when you loose track of what files you have edited.

A tip. When editing Domination, don't change the code. Instead copy the old line and comment it using // at the beginning of the line. Use // also for multiple lines, and avoid block commenting using /* and */ unless what you are commenting is really huge. Reason: When something gets messed up (and it will :)) when you search for text in files, you'll always see both versions at the same time which will make it easier to identify your introduced bug. If you used block commenting (/* and */) the line would show up but it wouldn't be immediately apparent that it was commented out before you actually open the file.
Regards
Carl Gustaffa - left this game due becoming Steam Exclusive :(

Thread Starter
tankbuster
tankbuster

    First Lieutenant

  • Members
  • 5340 posts

#3

Posted 06 August 2010 - 09:05

Ah yes, compare programs. I use Beyond Compare. It's my favourite price. :)

Another thread worthy of a look is Bushlurkers Domination Conversion Guide. Although it's primarily about moving Domination to other islands, there's some interesting and relevent stuff in there. Recommended.
Documentation is not a dirty word.
: TeamSPAFF : PRACS : RKSL : Stella Artois : Creme Eggs : Elite Warriors :

Making working streetside IEDs since 2011.

RT. Green Label
RT. Green Label

    Lance Corporal

  • Members
  • 55 posts

#4

Posted 06 August 2010 - 09:40

nice thread Tankbuster,

sure it will be helpfull for a lot of people when it gets filled up.

I'll start by posting the question i had on the other thread:

"on request of a clanmember i have added a blackhawk to the 2.28 version.
For now it can pick up ammoboxes, but i got no 'chopper menu' to drop it after loading it in.
How can i get that chopper to have such a menu?"
Battle is the most magnificent competition in which a human being can indulge.
It brings out all that is best; it removes all that is base. All men are afraid in battle.
The coward is the one who lets his fear overcome his sense of duty.
Duty is the essence of manhood.
--George S. Patton--

Posted Image

CarlGustaffa
CarlGustaffa

    Captain

  • Members
  • 6397 posts

#5

Posted 06 August 2010 - 16:57

In init.sqf you define the vehicles, initiate them with respawn scripts etc.
In i_client.sqf you define d_check_ammo_load_vecs (I guess you probably already did this), add the chopper here. Also look for d_choppers where you setup marker to use and hud name etc.
In x_client\x_chop_hud.sqf you can change the welcome message if you want to.
In x_client\x_initvec.sqf the action is added using the __addchopm macro. It should be applied to all choppers defined above with d_choppers.

Maybe a bit vague, but I hope it helps. I've never added choppers myself, only removed or rearranged stuff. These are the places I would start to look, but there might be more. Hard to tell when I can't really try it out.
Regards
Carl Gustaffa - left this game due becoming Steam Exclusive :(

{SAS}Nutta
{SAS}Nutta

    Private First Class

  • Members
  • 16 posts

#6

Posted 06 August 2010 - 17:04

Things to check for the chopper ammo box hud are:

i_client.sqf:
d_check_ammo_load_vecs needs to have the chopper type in it.
d_choppers needs an entry for the chopper (make sure you put it into the correct version's array) - something along the lines of:
["HR7",2,"chopper7",307,"n_air","ColorWhite","7",""]

init.sqf:
Search for x_helirespawn2 and add an entry for your chopper:
[ch7,307,true]
Note that ch7 is the name of the chopper in mission.sqm and 307 must match with the number in d_choppers.

That should be it, if it still isn't working post what you've already got and I'll have another go.

*edit* Agh! I see you beat me to it Carl Gustaffa - I shall remember to type quicker next time, even if I am eating... :)

Edited by {SAS}Nutta, 06 August 2010 - 17:11.
Pipped to the post :(


Durka-Durka
Durka-Durka

    Sergeant

  • Members
  • 147 posts

#7

Posted 06 August 2010 - 20:40

Great thread, thanks for posting it. One quick question...
I edited a version of Domination, but didn't know it was missing the revive option. Is there an easy way to make it into a revive mission, or should I just do the work and port all my custom stuff into the Domination_west_revive? Thanks.
Posted Image
You can have your Jihad, you ain't seen Yee-Yawed

Thread Starter
tankbuster
tankbuster

    First Lieutenant

  • Members
  • 5340 posts

#8

Posted 07 August 2010 - 00:01

I'd suggest that revive is a build option. That means it usually has it's own vanilla mission file, so yes, you should get the revive version and port your stuff into it.

But this isn't too hard if you're methodical. Take a file comparison application as mentioned earlier, compare your vanilla version to a vanilla revive. There you can see how revive differs from normal. Then compare your edit to the unedited normal, Now you can see your edits. If your edits are to files that are identical when you compared normal to revive, you can dump your edited file straight into the revive mission folder. if not, the comparison program will suggest how you might merge them.

At the very worst you'll have to reauthor your modded version by editing a revive mission folder, but as you documented all your changes, this won't be a problem. You *did* document all your changes, didn't you? :)
Documentation is not a dirty word.
: TeamSPAFF : PRACS : RKSL : Stella Artois : Creme Eggs : Elite Warriors :

Making working streetside IEDs since 2011.

RT. Green Label
RT. Green Label

    Lance Corporal

  • Members
  • 55 posts

#9

Posted 07 August 2010 - 08:05

TX lads,

i can work with this info.
I'll start cracking my brain after my morning coffee :D
Battle is the most magnificent competition in which a human being can indulge.
It brings out all that is best; it removes all that is base. All men are afraid in battle.
The coward is the one who lets his fear overcome his sense of duty.
Duty is the essence of manhood.
--George S. Patton--

Posted Image

Vixente
Vixente

    Sergeant

  • Members
  • 187 posts

#10

Posted 07 August 2010 - 18:22

How do i increment the chances of getting bonus air vehicles? Like, say A-10, AH-1Z, AH-64D, for example.

Thread Starter
tankbuster
tankbuster

    First Lieutenant

  • Members
  • 5340 posts

#11

Posted 07 August 2010 - 19:09

How do i increment the chances of getting bonus air vehicles? Like, say A-10, AH-1Z, AH-64D, for example.


Ah now, this is a tricky one.

In i_common, there's two array and they hold the classnames of the vehicles that you are given for prizes. The two arrays are called (for side mission and main mission respectively);

d_sm_bonus_vehicle_array and d_mt_bonus_vehicle_array

The problem is that when you win a side or main mission, the game chooses, at random, 1 vehicle from the appropriate array. So, there's an equal chance of getting any of the vehicles from that array. What you can do to increase the chance of getting a particular vehicle is to put it in the array twice.

So, here's the basic side mission bonus array from my game;

["A10_US_EP1","AH64D_EP1","AH6J_EP1","M1A1_US_DES_EP1","M1A2_US_TUSK_MG_EP1","M6_EP1","UH60M_EP1"]

So theres a 1 in 8 chance of getting a Tusk, but if you wanted to increase the chance of getting Tusks, you could put the Tusk classname in there twice;

["A10_US_EP1","AH64D_EP1","AH6J_EP1","M1A1_US_DES_EP1","M1A2_US_TUSK_MG_EP1","M1A2_US_TUSK_MG_EP1","M6_EP1","UH60M_EP1"]

So, now there's a 2 in 9 (or nearly 1 in 4) chance of getting a Tusk.

Hope this helps,

Tanky -Paul-
Documentation is not a dirty word.
: TeamSPAFF : PRACS : RKSL : Stella Artois : Creme Eggs : Elite Warriors :

Making working streetside IEDs since 2011.

Muzzleflash
Muzzleflash

    First Sergeant

  • Members
  • 835 posts

#12

Posted 07 August 2010 - 19:22

I don't think that will work since it is randomly decided whether your bonus should be an AIR vehicle or not.. Instead you might wanna change the number _airval in server_x\x_getbonus.sqf. Eg. setting it to 60 will mean you have 40% change to get an airplane.

Thread Starter
tankbuster
tankbuster

    First Lieutenant

  • Members
  • 5340 posts

#13

Posted 07 August 2010 - 19:39

Oh I see, he wants to increase the chances of getting air vehicles, rather than a particular vehicle.
I've not looked at that getbonus.sqf file, that's good find. I didn't realise the method of selecting the vehicle isn't totally random any more. Thank you.

---------- Post added at 08:39 PM ---------- Previous post was at 08:33 PM ----------

I'm going to add another piece of software Domeditors might consider.
SBSMAC has written a file checker called Squint. It's very much a work in progress and is not fully featured yet but in short, it can check your files for errors such as mismatched brackets and braces, and also suggest good coding practice.
Just drop a sqf, or even an entire mission folder into it's file pane and it will check the files for all kinds of errors.
Documentation is not a dirty word.
: TeamSPAFF : PRACS : RKSL : Stella Artois : Creme Eggs : Elite Warriors :

Making working streetside IEDs since 2011.

RT. Green Label
RT. Green Label

    Lance Corporal

  • Members
  • 55 posts

#14

Posted 07 August 2010 - 20:28

Xeno adjusted that already since version 2.24 (i believe)
What version are you using?
Battle is the most magnificent competition in which a human being can indulge.
It brings out all that is best; it removes all that is base. All men are afraid in battle.
The coward is the one who lets his fear overcome his sense of duty.
Duty is the essence of manhood.
--George S. Patton--

Posted Image

Thread Starter
tankbuster
tankbuster

    First Lieutenant

  • Members
  • 5340 posts

#15

Posted 08 August 2010 - 14:40

Xeno adjusted that already since version 2.24 (i believe)
What version are you using?


Me? 2.28. What point are you replying to?

---------- Post added at 03:40 PM ---------- Previous post was at 03:35 PM ----------

I would appreciate some clarification on something from the guys...

I realise that the #defines are sometimes not exclusive. For example, if possible to have both #ifdef __TT__ and #ifdef __wounds__ true at the same time, but something is bugging me. Are any of them exclusive? Can we get into an fatal condition by having a bad combination of defines?

So, let me ask this. __OA__ isn't really about Arrowhead is it? I mean, if I edit my TT version and add in ArmA2 units, __OA__ is still true isn't it? I think __OA__ is more about __Takistan__ than about Arrowhead.
Documentation is not a dirty word.
: TeamSPAFF : PRACS : RKSL : Stella Artois : Creme Eggs : Elite Warriors :

Making working streetside IEDs since 2011.

CarlGustaffa
CarlGustaffa

    Captain

  • Members
  • 6397 posts

#16

Posted 08 August 2010 - 15:15

What becomes true (defined) or not is up to you. x_setup.sqf has some pretty strict rules on what to combine or not. I know I tried some "funny stuff" a long time ago that would end in a crash. I believe the __OA__ define for Xeno is that it is based only on Operation Arrowhead content; no Chernarus land or Arma2 units in use. If you want to make a new version, maybe the safest thing would be to define a new one, i.e. __CO__ for "Combined Operations". Will give a hefty workload though, and a nightmare to keep updated. With Arma2 content lacking so badly, I don't see why you would want to though.
Regards
Carl Gustaffa - left this game due becoming Steam Exclusive :(

Thread Starter
tankbuster
tankbuster

    First Lieutenant

  • Members
  • 5340 posts

#17

Posted 08 August 2010 - 15:50

I believe the __OA__ define for Xeno is that it is based only on Operation Arrowhead content; .


Yes, but that doesn't preclude me from leaving __OA__ defined and adding ArmA2 units? Will something bad happen?

---------- Post added at 04:50 PM ---------- Previous post was at 04:48 PM ----------

maybe the safest thing would be to define a new one, i.e. __CO__ for "Combined Operations". Will give a hefty workload though, and a nightmare to keep updated. .


Which is why I won't do it. It's far too much hard work.

My plan is to have ArmA2 Russians as the (TT) North base and US Army (with some USMC) as the south base. The AI will be Takistanis. That's why I need ArmA2 content.
Documentation is not a dirty word.
: TeamSPAFF : PRACS : RKSL : Stella Artois : Creme Eggs : Elite Warriors :

Making working streetside IEDs since 2011.

{SAS}Nutta
{SAS}Nutta

    Private First Class

  • Members
  • 16 posts

#18

Posted 08 August 2010 - 18:36

After a weekend in which I spent almost as much time editing DomiOA! as playing it I've fixed a few more bugs in v2.28:

Choppers not respawning when abandoned intact despite setting times in init.sqf:
Spoiler

Engineers unable to build a FARP after first death:
Spoiler

Fix for network messages for FARP, MASH and MG nest marker removal:
Spoiler

That's about it for now, I'll be back if I find any more...

Previous bug fixes for DomiOA! 2.28

Edited by {SAS}Nutta, 08 August 2010 - 18:55.
Forgot to say it was abandoned not wrecked choppers...


RT. Green Label
RT. Green Label

    Lance Corporal

  • Members
  • 55 posts

#19

Posted 08 August 2010 - 19:12

Me? 2.28. What point are you replying to?


Sry Tank, i was refering to the chances of getting an aircraft, nvm.



I am since today running an ACE domi AI 2.28 version on my server,
but the airdrop doesn't seem to work.
I tried every airdrop but the when the planes flies over, he droppes nothing.

Any advice on how to solve this?
i compared the x_createdrop.sqf of an ace and non-ace 2.28 version and they show no difference.

Regards
Battle is the most magnificent competition in which a human being can indulge.
It brings out all that is best; it removes all that is base. All men are afraid in battle.
The coward is the one who lets his fear overcome his sense of duty.
Duty is the essence of manhood.
--George S. Patton--

Posted Image

Grimes -3rd ID-
Grimes -3rd ID-

    Master Gunnery Sergeant

  • Members
  • 1056 posts

#20

Posted 08 August 2010 - 22:13

Was the Domination Dev Heaven space taken down? I saw Xeno was thinking about retiring from Domination :( Are we staying at 2.28?