Mod.cpp/bin File Format: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - " it's" to " it is")
(little overhaul ;))
Line 1: Line 1:
{{SideTOC}}
{{unsupported-doc}}
{{unsupported-doc}}


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


somewhere\@YourMod\mod.bin
<tt>somewhere\@YourMod\mod.bin</tt>


and on the command line to start arrowhead
and on the command line to start arrowhead


mod=somewhere\@YourMod,lots,of,others...
<tt>mod=somewhere\@YourMod</tt>


A mod.bin/cpp 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)
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 <tt>@yourmod</tt>)


Contents of this cpp could be as follows:
Contents of this cpp/bin could be as follows:
 
<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 = "description_mod";
  overview = "description_mod";
  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>
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. Eg 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]].}}


= CfgMods =
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]]):
{{Important|NOTE: Be careful: true/false are ''invalid'' values in the mod.cpp.}}
{{Important|NOTE: Be careful: true/false are ''invalid'' values in the mod.cpp.}}


The alternative is to insert a cfgMods class into one of your pbo's, or, make one specifically for this.
<syntaxhighlight lang="cpp">
 
The following are BI samples of how it is done (find more samples [[Arma_3_DLC_Content_Licensing|here]]):
 
  //config.cpp
  //config.cpp
  #define true 1
  #define true 1
  #define false 0
  #define false 0
   
  == {{arma3}} ==
  class CfgMods
  class CfgMods
  {
  {
Line 77: Line 80:
  };
  };
  };
  };
</syntaxhighlight>


Arma 3 Zeus:
== {{arma3}} - Zeus ==
 
<syntaxhighlight lang="cpp">
  class CfgMods
  class CfgMods
  {
  {
Line 100: Line 104:
  };
  };
  };
  };
</syntaxhighlight>


==Notes==
= Notes =  
<dl class="command_description">
<dl class="command_description">
<!-- Note Section BEGIN -->
<!-- Note Section BEGIN -->
Line 119: Line 124:
<!-- Note Section END -->
<!-- Note Section END -->
</dl>
</dl>
<h3 style="display:none">Bottom Section</h3>


<dl class="command_description">
<dl class="command_description">

Revision as of 12:20, 24 November 2020

Template:SideTOC Template:unsupported-doc

mod.cpp/bin

As of 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 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 		= "description_mod";
 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

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):

NOTE: Be careful: true/false are invalid values in the mod.cpp.
 //config.cpp
 #define true 1
 #define false 0
 == {{arma3}} ==
 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

Inkompetent
Currently in ArmA3 (version 1.08) the CfgMods entry in config.cpp does not seem to work, and the mod.cpp file must be used.
Posted on January 15, 2013 - 15:26
Bull_A
ArmA3 (version 1.38) the CfgMods entry in config.cpp appears to be working, providing the 'dir' attribute in the CfgMods class is pointing to the correct folder. Best practice is to use both cfgMods in the config.cpp and the mod.cpp
Posted on February, 2015 - 16:14
Posted on Feburary 2, 2015 - 00:23 (GMT-5)
Benargee
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
Posted on 2020-06-17 3:10 PM
Ilias38rus
ARMA 3 1.98
CfgMods doesn't affect anything, only mod.cpp are working .