Jump to content

Recommended Posts

Hello everyone,

 

I need help for creat a simple module.

Indeed, i need creat a addon as ALiVE. but i need edit config.sqf

I need simple example module. (more information that bohemia)

 

help plz ? :down:

 

Share this post


Link to post
Share on other sites

Hello,

I created a mission framwork. ALiVE is the best-known example. I would like my first module to allow the user to set mission variables.

My module calls a function_setvariablemymission;

 

Need use this module in 3DEden as ALiVe

Share this post


Link to post
Share on other sites

Hello,

thank you MarcelDev89

I try this, know succes ...

 

I try insert module test in Eden editor

class CfgPatches {
    class ADDON {
        units[] = {};
        weapons[] = {};
        requiredVersion = REQUIRED_VERSION;
        requiredAddons[] = {};
        versionDesc = "HDS";
        //versionAct = "['mil_placement',_this] execVM '\x\alive\addons\main\about.sqf';";
        author = "H|iddens";
        authors[] = {"H|iddens"};
        authorUrl = "";
    };
};

class cfgFunctions {
        class HDS {
                class HDS_modulenoyeau {
                        class MP {
                                description = "La classe principale";
                                file = "hds_module_noyeau\fnc_essai.sqf";
                };
        };
};
};
class CfgVehicles {
        class HDS_modulenoyeau;
        class ADDON : HDS_modulenoyeau
        {
                scope = 2;
                displayName = "";
                function = "HDS_modulenoyeau";
                author = "H|iddens";
                functionPriority = 90;
                isGlobal = 1;
                icon = "";
                picture = "";
                class Arguments
                {

                        class sizeFilter
                        {
                                displayName = "essai";
                                description = "essai";
                                class Values
                                {
                                        class NONE
                                        {
                                                name = "essai";
                                                value = "0";
                                                default = 1;
                                        };
                                        class SMALL
                                        {
                                                name = "essai";
                                                value = "100";
                                        };
                                        class MEDIUM
                                        {
                                                name = "essai";
                                                value = "200";
                                        };
                                        class LARGE
                                        {
                                                name = "essai";
                                                value = "300";
                                        };

                                };
                        };
        };
};
};

 

Share this post


Link to post
Share on other sites

Well,

Basic code working

 

class CfgPatches {
    class HDS {
        units[] = {};
        weapons[] = {};
        requiredVersion = 1.0;
        requiredAddons[] = {};
        author = "Hiddens";
    };
};

class CfgFactionClasses
{
	class Events;
	class HDS_Noyeau: Events
	{
		displayName = "Noyeau";
	};
};


class CfgVehicles
{
	class Logic;
	class Module_F: Logic
	{
		class AttributesBase
		{
			class Default;
			class Edit; // Default edit box (i.e., text input field)
			class Combo; // Default combo box (i.e., drop-down menu)
			class Checkbox; // Default checkbox (returned value is Bool)
			class CheckboxNumber; // Default checkbox (returned value is Number)
			class ModuleDescription; // Module description
			class Units; // Selection of units on which the module is applied
		};
		// Description base classes, for more information see below
		class ModuleDescription
		{
			class AnyBrain;
		};
	};
	class HDS_Noyeau: Module_F
	{
		// Standard object definitions
		scope = 2; // Editor visibility; 2 will show it in the menu, 1 will hide it.
		displayName = "Noyeau"; // Name displayed in the menu
		icon = "\hds_module_noyeau\Hiddens.paa"; // Map icon. Delete this entry to use the default icon
		category = "Events";

		// Name of function triggered once conditions are met
		function = "HDS_fnc_noyeau";
		// Execution priority, modules with lower number are executed first. 0 is used when the attribute is undefined
		functionPriority = 1;
		// 0 for server only execution, 1 for global execution, 2 for persistent global execution
		isGlobal = 1;
		// 1 for module waiting until all synced triggers are activated
		isTriggerActivated = 1;
		// 1 if modules is to be disabled once it's activated (i.e., repeated trigger activation won't work)
		isDisposable = 1;
		// // 1 to run init function in Eden Editor as well
		is3DEN = 1;

		// Module attributes, uses https://community.bistudio.com/wiki/Eden_Editor:_Configuring_Attributes#Entity_Specific
		class Attributes: AttributesBase
		{
			// Module specific arguments
			class Yield: Combo
  			{
				// Unique property, use "<moduleClass>_<attributeClass>" format to make sure the name is unique in the world
				property = "HDS_Noyeau_Yield";
				displayName = "Noyeau"; // Argument label
				tooltip = "Editer le noyeau"; // Tooltip description
				typeName = "NUMBER"; // Value type, can be "NUMBER", "STRING" or "BOOL"
				defaultValue = "50"; // Default attribute value. WARNING: This is an expression, and its returned value will be used (50 in this case)
				class Values
				{
					class 50Mt	{name = "50 megatons";	value = 50;}; // Listbox item
					class 100Mt	{name = "100 megatons"; value = 100;};
				};
			};
		};
	};
};

class CfgFunctions
{
	class HDS
	{
		class Events
		{
			file = "\hds_module_noyeau\fnc_essai.sqf";
			class essai{};
		};
	};
};

 

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

×