Mod.cpp/bin File Format: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "<tt>([^ ]*=[^ ]*)<\/tt>" to "{{hl|c= $1}}")
m (Some wiki formatting)
 
Line 2: Line 2:
{{Feature|UnsupportedDoc}}
{{Feature|UnsupportedDoc}}


= mod.cpp/bin =
As of Operation Arrowhead, the root folder of your @mod can contain an (optional) mod.cpp/bin.


{{hl|somewhere\@YourMod\mod.bin}}
== mod.cpp/bin ==


and on the command line to start arrowhead
As of {{arma2oa}}, the root folder of your @mod can contain an (optional) mod.cpp/bin.
 
somewhere\@YourMod\mod.bin
{{hl|c= mod=somewhere\@YourMod}}
and on the command line to start {{arma2oa}}
-mod=somewhere\@YourMod


A mod.cpp/bin allows for more detailed information in the Game's expansion menu for mod folders (rather than the engine simply declaring there is a mysterious {{hl|@yourmod}})
A mod.cpp/bin allows for more detailed information in the Game's expansion menu for mod folders (rather than the engine simply declaring there is a mysterious {{hl|@yourmod}})
Line 15: Line 14:
Contents of this cpp/bin could be as follows:
Contents of this cpp/bin could be as follows:
<syntaxhighlight lang="cpp">
<syntaxhighlight lang="cpp">
name = "mod_"; // Name of your mod
name = "mod_"; // Name of your mod
author = "author_mod"; // Affects Arma 3 Launcher, when the mod are loaded as local
author = "author_mod"; // Affects Arma 3 Launcher, when the mod are loaded as local
logo = "files\ic.paa"; // Logo displayed in the main menu
logo = "files\ic.paa"; // Logo displayed in the main menu
logoOver = "files\ic_active.paa"; // When the mouse is over, in the main menu
logoOver = "files\ic_active.paa"; // When the mouse is over, in the main menu
tooltip = "mod_";
tooltip = "mod_";
tooltipOwned = "credit_mod"; // Tool tip displayed when the mouse is left over, in the main menu
tooltipOwned = "credit_mod"; // Tool tip displayed when the mouse is left over, in the main menu
picture = "files\overview.paa"; // Picture displayed from the expansions menu. Optimal size is 2048x1024
picture = "files\overview.paa"; // Picture displayed from the expansions menu. Optimal size is 2048x1024
actionName = "GitHub";
actionName = "GitHub";
action = "https://github.com/my-mod-page"; // Website URL, that can be accessed from the expansions menu
action = "https://github.com/my-mod-page"; // Website URL, that can be accessed from the expansions menu
overview = "This awesome mod does this and that."; // Supports structured text
overview = "This awesome mod does this and that."; // Supports structured text
hideName = 0; // Hide the extension name
hideName = 0; // Hide the extension name
hidePicture = 0; // Hide the extension menu
hidePicture = 0; // Hide the extension menu
dlcColor[] = {0.23,0.39,0.30,1}; // Color used for DLC stripes and backgrounds (RGBA)
dlcColor[] = { 0.23, 0.39, 0.30, 1 }; // Color used for DLC stripes and backgrounds (RGBA)
logoSmall = "files\ic_small.paa"; // Display in creative lists, next to the entities added by the mod
logoSmall = "files\ic_small.paa"; // Display in creative lists, next to the entities added by the mod
</syntaxhighlight>
</syntaxhighlight>
This is the standard, easy to apply, method.
This is the standard, easy to apply, method.


As convenient (and clever) as it may be, it does not fit well with standard methods of distribution. E.g.m, all things pbo.
As convenient (and clever) as it may be, it does not fit well with standard methods of distribution. E.g.m, all things pbo.
{{Feature|arma3|In {{arma3}} the mod.cpp is needed to display mod information in the [[Arma 3 Launcher]].}}
{{Feature|arma3|In {{arma3}} the {{hl|mod.cpp}} is needed to display mod information in the [[Arma 3 Launcher]].}}
 
 
== CfgMods ==


= CfgMods =
{{Feature|warning|As of {{GVI|arma3|2.02}} CfgMods is broken and does not work!}}
{{Feature|warning|As of {{GVI|arma3|2.02}} CfgMods is broken and does not work!}}
The alternative is to insert a CfgMods class into one of your pbo's, or, make one specifically for this.
The alternative is to insert a CfgMods class into one of your pbo's, or, make one specifically for this.
The following are BI samples of how it is done (find more samples [[Arma_3_DLC_Content_Licensing|here]]):
The following are BI samples of how it is done (find more samples [[Arma_3_DLC_Content_Licensing|here]]):
{{Feature|important|NOTE: Be careful: true/false are ''invalid'' values in the mod.cpp.}}
{{Feature|important|
{{hl|true}}/{{hl|false}} values are invalid values in {{hl|mod.cpp}}; use {{hl|1}}/{{hl|0}} instead or define them with
<syntaxhighlight lang="cpp">
#define true 1
#define false 0
</syntaxhighlight>
}}


== {{arma2}} ==
=== {{arma2}} ===


<syntaxhighlight lang="cpp">
<syntaxhighlight lang="cpp">
//config.cpp
//config.cpp
#define true 1
#define true 1
#define false 0
#define false 0
 
class CfgMods
{
defaultAction = "http://www.arma2.com/mods";


class CfgMods
class Expansion
{
{
defaultAction = "http://www.arma2.com/mods";
dir = "Expansion";
class Expansion
name = "Arma 2: Operation Arrowhead";
{
picture = "ca\ui\data\logo_arma2ep1_ca.paa";
dir = "Expansion";
hidePicture = false;
name = "Arma 2: Operation Arrowhead";
hideName = true;
picture = "ca\ui\data\logo_arma2ep1_ca.paa";
action = "http://www.arma2.com/arrowhead";
hidePicture = false;
};
hideName = true;
 
action = "http://www.arma2.com/arrowhead";
class BAF
};
{
class BAF
dir = "BAF";
{
name = "Arma 2: British Armed Forces (Lite)";
dir = "BAF";
picture = "ca\data_baf\mod.paa";
name = "Arma 2: British Armed Forces (Lite)";
action = "http://www.arma2.com/BAF";
picture = "ca\data_baf\mod.paa";
hash = "BAF v. 1.03";
action = "http://www.arma2.com/BAF";
hideName = 1;
hash = "BAF v. 1.03";
actionName = "Buy Now";
hideName = 1;
hidePicture = 1;
actionName = "Buy Now";
islite = 1;
hidePicture = 1;
};
islite = 1;
 
};
class PMC
class PMC
{
{
dir = "PMC";
dir = "PMC";
picture = "ca\ui\data\logo_arma2pmc_ca.paa";
picture = "ca\ui\data\logo_arma2pmc_ca.paa";
hash = "PMC v. 1.02";
hash = "PMC v. 1.02";
action = "http://www.arma2.com/PMC";
action = "http://www.arma2.com/PMC";
hideName = 1;
hideName = 1;
name = "Arma 2: Private Military Company";
name = "Arma 2: Private Military Company";
hidePicture = 0;
hidePicture = 0;
};
};
};
};
</syntaxhighlight>
</syntaxhighlight>


== {{arma3}} - Zeus ==
=== {{arma3}} - Zeus ===
 
<syntaxhighlight lang="cpp">
<syntaxhighlight lang="cpp">
class CfgMods
class CfgMods
{
{
class Mod_Base;
class Mod_Base;
class Curator: Mod_Base
class Curator : Mod_Base
{
{
picture = "\A3\Ui_F_Curator\Data\Logos\arma3_zeus_icon_ca.paa";
picture = "\A3\Ui_F_Curator\Data\Logos\arma3_zeus_icon_ca.paa";
logo = "\A3\Ui_F_Curator\Data\Logos\arma3_curator_logo_ca.paa";
logo = "\A3\Ui_F_Curator\Data\Logos\arma3_curator_logo_ca.paa";
logoOver = "\A3\Ui_F_Curator\Data\Logos\arma3_curator_logoOver_ca.paa";
logoOver = "\A3\Ui_F_Curator\Data\Logos\arma3_curator_logoOver_ca.paa";
tooltipOwned = "$STR_A3_CFGMODS_CURATOR_NAME";
tooltipOwned = "$STR_A3_CFGMODS_CURATOR_NAME";
action = "http://zeus.arma3.com";
action = "http://zeus.arma3.com";
fieldManualTopicAndHint[] = {"Curator","Curator"};
fieldManualTopicAndHint[] = {"Curator","Curator"};
dlcColor[] = {0.31,0.78,0.78,1};
dlcColor[] = { 0.31, 0.78, 0.78, 1 };
overview = "$STR_A3_DLC_CURATOR_DESCRIPTION";
overview = "$STR_A3_DLC_CURATOR_DESCRIPTION";
hideName = 1;
hideName = 1;
hidePicture = 0;
hidePicture = 0;
name = "$STR_A3_CFGMODS_CURATOR_NAME";
name = "$STR_A3_CFGMODS_CURATOR_NAME";
dir = "Curator";
dir = "Curator";
appId = 275700;
appId = 275700;
};
};
};
};
</syntaxhighlight>
</syntaxhighlight>


= Notes =
<dl class="command_description">


<dt></dt>
== Notes ==
<dd class="notedate">Posted on Feburary 2, 2015 - 00:23 (GMT-5)</dd>
 
<dt class="note">[[User:Benargee|Benargee]]</dt>
{{Note
<dd class="note">
|user= Benargee
'''ARMA 3'''<br>
|timestamp= 20150202063900
|text= '''ARMA 3'''<br>
Use '''<nowiki><br /></nowiki>''' to get a line break for mod overview.<br><br>
Use '''<nowiki><br /></nowiki>''' to get a line break for mod overview.<br><br>
HTML Link tags can also be used in overview, but you must use single quotes around the url. Example:<br>
HTML Link tags can also be used in overview, but you must use single quotes around the url. Example:<br>
'''<nowiki>"<a href='http://www.Arma3.com'>Arma 3 Home Page</a>"</nowiki>'''<br>
'''<nowiki>"<a href='http://www.arma3.com'>Arma 3 Home Page</a>"</nowiki>'''<br>
Colored text works too: '''<nowiki><t color='#ffff00'>Your yellow text!</t></nowiki>'''<br>
Colored text works too: '''<nowiki><t color='#ffff00'>Your yellow text!</t></nowiki>'''<br>
Other html tags might work, but I have not tested them. See: [[Structured Text]]
Other html tags might work, but I have not tested them. See: [[Structured Text]].
</dd>
}}


</dl>


[[Category:BIS_File_Formats]]
[[Category:BIS_File_Formats]]
{{GameCategory|arma1|Addon_Configuration}}
{{GameCategory|arma1|Addon_Configuration}}

Latest revision as of 22:56, 13 May 2023

bi symbol white.png
Disclaimer: This page describes internal undocumented structures of Bohemia Interactive software.

This page contains unofficial information.

Some usage of this information may constitute a violation of the rights of Bohemia Interactive and is in no way endorsed or recommended by Bohemia Interactive.
Bohemia Interactive is not willing to tolerate use of such tools if it contravenes any general licenses granted to end users of this community wiki or BI products.


mod.cpp/bin

As of Arma 2: Operation Arrowhead, the root folder of your @mod can contain an (optional) mod.cpp/bin.

somewhere\@YourMod\mod.bin

and on the command line to start Arma 2: Operation Arrowhead

-mod=somewhere\@YourMod

A mod.cpp/bin allows for more detailed information in the Game's expansion menu for mod folders (rather than the engine simply declaring there is a mysterious @yourmod)

Contents of this cpp/bin could be as follows:

name			= "mod_";					// Name of your mod
author			= "author_mod";				// Affects Arma 3 Launcher, when the mod are loaded as local
logo			= "files\ic.paa";			// Logo displayed in the main menu
logoOver		= "files\ic_active.paa";	// When the mouse is over, in the main menu
tooltip			= "mod_";
tooltipOwned	= "credit_mod";				// Tool tip displayed when the mouse is left over, in the main menu
picture			= "files\overview.paa";		// Picture displayed from the expansions menu. Optimal size is 2048x1024
actionName		= "GitHub";
action			= "https://github.com/my-mod-page";			// Website URL, that can be accessed from the expansions menu
overview		= "This awesome mod does this and that.";	// Supports structured text
hideName		= 0;						// Hide the extension name
hidePicture		= 0;						// Hide the extension menu
dlcColor[]		= { 0.23, 0.39, 0.30, 1 };	// Color used for DLC stripes and backgrounds (RGBA)
logoSmall		= "files\ic_small.paa";		// Display in creative lists, next to the entities added by the mod

This is the standard, easy to apply, method.

As convenient (and clever) as it may be, it does not fit well with standard methods of distribution. E.g.m, all things pbo.

Arma 3
In Arma 3 the mod.cpp is needed to display mod information in the Arma 3 Launcher.


CfgMods

As of Arma 3 logo black.png2.02 CfgMods is broken and does not work!

The alternative is to insert a CfgMods class into one of your pbo's, or, make one specifically for this. The following are BI samples of how it is done (find more samples here):

true/false values are invalid values in mod.cpp; use 1/0 instead or define them with
#define true 1
#define false 0

Arma 2

//config.cpp
#define true 1
#define false 0

class CfgMods
{
	defaultAction = "http://www.arma2.com/mods";

	class Expansion
	{
		dir = "Expansion";
		name = "Arma 2: Operation Arrowhead";
		picture = "ca\ui\data\logo_arma2ep1_ca.paa";
		hidePicture = false;
		hideName = true;
		action = "http://www.arma2.com/arrowhead";
	};

	class BAF
	{
		dir = "BAF";
		name = "Arma 2: British Armed Forces (Lite)";
		picture = "ca\data_baf\mod.paa";
		action = "http://www.arma2.com/BAF";
		hash = "BAF v. 1.03";
		hideName = 1;
		actionName = "Buy Now";
		hidePicture = 1;
		islite = 1;
	};

	class PMC
	{
		dir = "PMC";
		picture = "ca\ui\data\logo_arma2pmc_ca.paa";
		hash = "PMC v. 1.02";
		action = "http://www.arma2.com/PMC";
		hideName = 1;
		name = "Arma 2: Private Military Company";
		hidePicture = 0;
	};
};

Arma 3 - Zeus

class CfgMods
{
	class Mod_Base;
	class Curator : Mod_Base
	{
		picture = "\A3\Ui_F_Curator\Data\Logos\arma3_zeus_icon_ca.paa";
		logo = "\A3\Ui_F_Curator\Data\Logos\arma3_curator_logo_ca.paa";
		logoOver = "\A3\Ui_F_Curator\Data\Logos\arma3_curator_logoOver_ca.paa";
		tooltipOwned = "$STR_A3_CFGMODS_CURATOR_NAME";
		action = "http://zeus.arma3.com";
		fieldManualTopicAndHint[] = {"Curator","Curator"};
		dlcColor[] = { 0.31, 0.78, 0.78, 1 };
		overview = "$STR_A3_DLC_CURATOR_DESCRIPTION";
		hideName = 1;
		hidePicture = 0;
		name = "$STR_A3_CFGMODS_CURATOR_NAME";
		dir = "Curator";
		appId = 275700;
	};
};


Notes

Benargee - c
Posted on Feb 02, 2015 - 06:39 (UTC)
ARMA 3
Use <br /> to get a line break for mod overview.

HTML Link tags can also be used in overview, but you must use single quotes around the url. Example:
"<a href='http://www.arma3.com'>Arma 3 Home Page</a>"
Colored text works too: <t color='#ffff00'>Your yellow text!</t>
Other html tags might work, but I have not tested them. See: Structured Text.