Git Product home page Git Product logo

acearsenalextended's Introduction

ACE3 Arsenal Extended

Find easily your favorite gear within ACE3 Arsenal

Based on an original idea of Krogar from Arma Mod France and UnderSiege Productions

Need help ? Contact me on Discord on channel #arsenal-extended

For users

Install mod from Steam Workshop

ACE Arsenal

Ingame self-actions

For mission creators

3DEN Editor

ACE3 Arsenal Extended is also now available in 3DEN Editor.

An additional property "Texture options (ACE Arsenal Extended)" is available. This property is used by Arsenal to store "texture options" that would be otherwise lost. This property is an array of key-value pairs [["model_option","value"], ...], example : [["USP_G3C_pantscamo","M81"]].

For mod creators

Lost in configuration making ? You may try the Config Helper Application to generate configuration.

Modelisation

  • The root object is "Model".
  • Each "Model", has one or more "Options".
  • Each "Option", has multiple "Values".
  • Each "Model", has one unique "Config" for a combinaison of "Value" per "Option".

Model

All these objets are found in Arma 3 configuration :

  • A "Config" is a class in CfgWeapons/CfgGlasses/CfgVehicle, that have a XtdGearInfo subclass or that have a class with the same name in XtdGearModels >> CfgWeapons/CfgGlasses/CfgVehicle.
  • A "Model", in a class in XtdGearModels >> CfgWeapons/CfgGlasses/CfgVehicle.
  • An "Option" is a class within a "Model", with it's name referenced in options property.
  • A "Value" is a class within a "Option", with it's name referenced in values property.

"Options" and "Values" may have conventional names, referenced in XtdGearModels >> Conventional. This allow to inherit values, without real inheritance to avoid creating a dependency to this mod. See addons/gearinfo/XtdGearModels.hpp for existing names and options.

Sample

class XtdGearModels
{
    class CfgWeapons 
    {
        class my_model
        {
            label = "Model label";
            author = "My name";
            options[] = {"camo","optionA"};
            class camo // coventional name
            {
                values[] = {"MTP", "Tropic"};
                // all values already exists, no need to create subentries
            };
            class optionA
            {
                label = "Option A label";
                values[] = {"value1", "value2"};
                changeingame = 0; // 1 if value can be changed in game via ACE menu
                alwaysSelectable = 1; // allows the selection of the values even if there isn't an item with a complete match of options available, falling back to a weak match with this single value (optional)
                // changedelay = 2; If can changeingame, wait delay before change is effective (can be 0, 0.1, or more)
                // icon = "xxx"; If can changeingame, action group icon in ACE menu
                class value1
                {
                    label = "1";
                    description = "Value 1 for option A"; // displayed as tooltip
                    // image = "xxx"; Background image in Arsenal
                    // icon = "xxx"; If can changeingame, action icon in ACE menu
                    // actionlabel = "xxx"; If can changeingame, action label in ACE menu 
                    // itemingame = "xxx"; If can changeingame, requires this item to be present in inventory. Item will be removed from inventory (added back if an other value is choosen)
                    // changedelay = (inherited by default); If can changeingame, wait delay before change is effective
                    faction[] = {"BLU_F", "BLU_T_F", "BLU_W_F"}; // shows this value only for selected factions, identified by their A3 code (optional)
                };
                class value2
                {
                    label = "2";
                };
            };
        };
    };
};
class CfgWeapons 
{
    class baseClass;
    class my_model_MTP_value1 : baseClass // you can use any name
    {
        class XtdGearInfo
        {
            model = "my_model"; // class name in XtdGearModels >> CfgWeapons
            camo = "MTP";
            optionA = "value1";
        };
        // ...
    };
    // ...
};

Alternative syntax to avoid impacting CfgWeapons/CfgGlasses/CfgVehicle :

class XtdGearModels
{
    // identical to previous sample
};
class XtdGearInfos
{
    class CfgWeapons 
    {
        class my_model_MTP_value1 // exact class name in CfgWeapons (case sensitive !)
        {
            model = "my_model"; // class name in XtdGearModels >> CfgWeapons
            camo = "MTP";
            optionA = "value1";
        };
        // ...
    };
};

Texture Options

On uniforms and backback, you can add special options called "texture options". Those options will not change the "Config", but will allow you to change a texture of an hiddenselection defined in the "Config".

Those options are listed in the textureOptions array in the "Model". Options are defined like all others options with an additional string or number hiddenselection. "Values" have an additional string texture.

Texture options does not yet support changeingame.

class XtdGearModels
{
    class CfgWeapons 
    {
        class my_model
        {
            // ...
            textureOptions = { "bloodtype" };
            class bloodtype
            {
                label = "Blood type";
                values[] = {"A", "B", "AB", "O"};
                hiddenselection = "selectionName";
                class A
                {
                    texture = "path\to\texture.paa";
                    // material = "path\to\material.rvmat"; (if you use material on an option, you MUST set it on all options to avoid undefined behavior)
                };
                // ...
            };
        };
    };
};
class CfgWeapons 
{
    class baseClass;
    class my_model_MTP_value1 : baseClass
    {
        class XtdGearInfo
        {
            model = "my_model";
            // ...
        };
        hiddenselections = { /*..., */ "selectionName" };
        // ...
    };
    // ...
};

A texture option may impact multiple hidden selections. Instead of hiddenselection + texture, specify hiddenselections + textures.

class XtdGearModels
{
    class CfgWeapons 
    {
        class my_model
        {
            // ...
            textureOptions = { "bloodtype" };
            class bloodtype
            {
                label = "Blood type";
                values[] = {"A", "B", "AB", "O"};
                hiddenselections[] = { "selectionName1", "selectionName2" };
                class A
                {
                    textures[] = { "path\to\texture.paa", "" };
                    // materials[] = { "path\to\material.rvmat", "" }; (if you use material on an option, you MUST set it on all options to avoid undefined behavior)
                };
                class B
                {
                    textures[] = { "", "path\to\texture.paa" };
                    // materials[] = { "", "path\to\material.rvmat" }; 
                };
                class AB
                {
                    textures[] = { "path\to\texture.paa", "path\to\texture.paa" };
                    // materials[] = { "path\to\material.rvmat", "path\to\material.rvmat" }; 
                };
                // ...
            };
        };
    };
};

A texture option can be mapped to a text to texture, it allows player to choose a custom text for texture. It can be usefull for name or call sign. Specify a texttexture with procedural texture value with a %1 for user-input.

class XtdGearModels
{
    class CfgWeapons 
    {
        class my_model
        {
            // ...
            textureOptions = { "name" };
            class name
            {
                label = "Name";
                hiddenselection = "selectionName";
                texttexture = "#(rgb,512,512,3)text(1,1,""PuristaBold"",0.8,""#00000000"",""#101010"",""%1"")";
                // textmaterial = "path\to\material.rvmat";
            };
        };
    };
};

The bluit-in approach

You can builtin configuration for ACE3 Arsenal Extended within your mod, without creating a dependency. You may duplicate all what you need, or use conventional names.

The compat mod approach

You can also build a compat addon that overrides entries in CfgWeapons/CfgGlasses/CfgVehicle to add required informations.

The all-in-one ACEAX mod approach

You can also add data to the ACEAX mod in XtdGearInfos to extends a mod without creating a direct dependency on it (Pull-Request are welcome !).

How to build ?

Download the incredible HEMTT tool by BrettMayson.

Place hemtt.exe at the project root, and launch .\hemtt.exe build

License

Arsenal integration is under GNU GPL v2 License. Other parts are under the MIT License.

It includes sources files from CBA_A3 (script_macros_common.hpp) and ACE3 (defines.hpp).

acearsenalextended's People

Contributors

alexsaurber avatar daemonspring avatar jerry442 avatar jetelain avatar jordanndev avatar liamcannon avatar matfax avatar petmudstone avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

acearsenalextended's Issues

Could you guys help me out?

if there's any other place to reach you guys out like a discord or something it would be easier
i recently created a compat of your mod to the BRAF mod (Brazillian Armed Forces)

/// What they have

They have a system where you can add your name to the Uniform via a function/script

And a system based on ranks,brevet,branch, where it's a hidden selection with a specific texture.
there's the rank hidden selection with 13 options of hidden textures to have all ranks.

/// What i'm trying to do

I wanted to know if there's any chance that i can make a button like the ones i use to execute the commands to create those things

like, a button written "Name" on it, that when you press it it executes the function/script that selects the player name and put it into the Uniform

or 13 buttons for the ranks so i can click on like Soldier and it executes
this command
_this setObjectTextureGlobal [7,"Path to paa"] //7 being the number of the hidden selection i'm selecting.

I did create several uniforms with all combinations utlizing a script i did in C++ that looped everything until every possibility was complete, the problem was that it had over 60 million lines and Arma took to long to read it all (1 million per 5 minutes)

/// Final words

if you guys can lead my way or help me in any way achieving this -> Button that executes those scripts in the same UI as the uniform i have your mod on, i would be grateful.

if in case of any response i can help clarify things further like, where the function is, how do you call it and stuff like that.

Loadouts not saving?

So my group has started using this arsenal, and once everyone made loadouts and logged off it seems once they load back in the loadouts are no longer functional, they're blacked out like some of the stuff is not in the arsenal. Once they load the loadout, the shirt and sometimes the helmet aren't the correct configuration they selected.

Feature Request: ability to choose length of action for fnc_changeGear

Currently, the length of time that any gear change made through the ACE self-interact menu takes is determined in the script and is unchangeable.

The request is to be able to pass a specified duration to the script via another param or config entry, similar to the "actionLabel=" entry.

I encountered this as an issue while adding some features to my community's uniform pack. We wanted the ability to "turn off our active ear protection (Peltors)" in the event that we were operating in high-noise environments (such as near helicopters). Our solution was to simply double up our headgear classes, with one class having "ace_hearing_lowerVolume=0" (to represent on) and the other having a higher value (to represent the active listening being turned off), and use the ACE-AX gear chang function to easily swap them out. It then became apparent that the timer is hard coded, and it does not take 2 seconds to turn off a set of Peltors.

ACEAX allows clients to choose items that shouldn't be available.

When ACEAX and relevant compatibility patches are enabled, it is possible to select items through the pop-up window that appears from the bottom of the arsenal interface even if said items wouldn't normally be available from the arsenal.

Backpack tab during an operation without ACEAX:
WithoutACEAX

Backpack tab during an operation with ACEAX and a compat patch for vanilla enabled:
WithACEAX

First Suggestion and an issue!

The Issue: After re-connecting to server, your customized uniform using textureoptions is reset
The suggestion: you can't use this awesome option in editor which is quite sad, ACE arleady added ACE Arsenal for editor

Feature Request: Weapons, RHS Support

Lots of vanilla weapons with multiple variants that could be cleaned up using this solution. Would a similar config work for CfgWeapons?

Further, RHS has a ton of uniform variants, especially for the Russian uniforms. Condensing those into the submenu buttons would be super handy. I'm willing to do the work and make a pull, but I want to ask feasibility first -- is there anything in the way?

L129 incorrect camo

Some of the camo options are incorrect, FG WDL is missing, BLK and CTRGA are swapped, etc.

Assignees:
Labels:

Uniform and Vest Disappearing

I have an issue that sounds similar to the ones Mihal190 reported, but I don't know if it is exactly the same issue.

My Arma3 community just started using this mod with USP AIO, and any time we select a USP uniform or vest slot it completely clears any previous selection, including any contents.

When loading a saved loadout, either uniform or vest (often both) will fail to load.

Avoid dependency on mods, to allow "all-in-one" compatibility

Compatibility with a large number of mods would be really great, but with current approach it would leads to publish a lot of mods on the workshop, which is not sustainable.

To address this, the dependency on mod pbo should not be required.

The idea is to create a secondary way to annotate configs with a new XtdGearInfos class.

class XtdGearInfos
{
  class CfgWeapons
  {
    class Xxxx
    {
      model = "xxxx";
      ...
    };
  };
};

It should be possible with really little refactoring.

It will also avoid headaches with mods class hierarchy.

Update ACEAX to support latest version of HEMTT.

HEMTT has updated and its latest release version's exe does not work with the ACEAX repository at present. Aside from ensuring that newcomers to the repo don't have issues with using latest HEMTT releases out of confusion, updating to support the latest version of HEMTT will allow terminal output to report in what specific files configuration errors occur and in what location. At present the intended version of HEMTT doesn't actually report in what files errors occur.

Bug: New Feature breaks uniform materials / texture

I can't re-open that issue, and my comment dissapeared when i commented on closed case.

This needs to be changed ASAP:
// material = = "path\to\material.rvmat"; (default is "\a3\data_f\default.rvmat")
Right now it breaks every model in the game that uses textureoptions. This parameter should be ignored if not present

Feature Request: Changeable font size

Sometimes i want to put full names, because i often hear what is TSW, i wish i would be able to put TigerStripe (Woodland) in just smaller font or have word wrap option

G36 info needs redoing.

Currently the camo and models appear to be missing some options. Needs to be checked / redone?

Assignees:
Labels:

Extended Loadouts information loading doesn't apply to all clients

Only tested with USP, however after the first time of loading a loadout after death, all Extended Loadouts information is not applied to all clients (with USP it's pants camo, patches etc). Took a look through the repo and couldn't see what would be causing it.

Feature Request: Alternative Syntax

Right now my code looks like this:

         class Gloves
            {
                label = "Gloves";
                values[] = {"OR_Black","OR_Coyote"};
                hiddenselection = "Camo2";
                class OR_Black {label = "OR";texture = "sgu_sof_2\data\gloves\ORb.paa";};
                class OR_Coyote {label = "OR";texture = "sgu_sof_2\data\gloves\OR2.paa";};
            };

And it's only useable for chaning textures, i wonder if we can improve it to switch models with hidden selections

         class Gloves
            {
                label = "Gloves";
                values[] = {"OverLord_Black","Mechanix_Red"};
                class OR_Black {label = "OR";texture = "sgu_sof_2\data\gloves\ORb.paa";hiddenselection = "Glove_OverLord";};
                class OR_Coyote {label = "OR";texture = "sgu_sof_2\data\gloves\OR2.paa";hiddenselection = "Glove_Mechanix";};
            };

with this setup i should be able to completly hide unwatned gloves with hidden selections, keeping configs and optimized.
Hiddenselection inside sub-class should overwrite default one

Allow easy use of "Text to Texture"

The Arma 2.12 feature "Text to Texture" can be used to create name tape on uniforms.
We could add an special "texture option" whose value is a text to display.

Weapons with attachments in LintedItems class are not selectable

I was making a compat patch for the rest of the weapons in the Tier 1 Weapons mod and noticed something that I had to rack my brain over. Weapons that have linkeditems do not play nice and cannot be selected via options. The remedy for this is to add delete LinktedItems; to the weapon class. Only if there are no attachments attached by default will the weapons be selectable via the options you define. Not sure if there is a way for you to take care of this or not, but it would be good for other users to take note. This causes compatibility for any machinegun that comes with a bipod as default to not be stackable.

I see this was a feature under the https://github.com/jetelain/AceArsenalExtended/blob/c7e1651bb57367219857f4eec1f19ce7c2b0d41c/addons/gearinfo/functions/script_component.hpp file, what is the reasoning for that? Suppressing class names of weapons with grips, such as Tier1_MK46_Mod1_Savit_KACGrip_Desert?

See below.

    class Tier1_MK48_Mod0_Para_Desert : Tier1_MK48_Mod0
	{
		class XtdGearInfo
		{
			model = "ax_mk48mod";
			camo = "desert";
			revision = "mk48mod0";
			version = "para";
		};
		delete LinkedItems;
	};

Thanks!

Ace Extended Hidden Options

Hopefully there is already a way to do what I want, but I'm here just asking if you know how it would be possible or if not would you give me permission to modify and then pull request a change to this project to implement the change I seek.

I have generated configs to allow me to create all the possible variants I need for a fully customisable vest, however I don't want these options to all show up in my mod unless you have ace extended loaded (I don't want to create a separate compac) and instead just want a way to allow scopeArsenal=1 items to still be recognised by ace extended. Or another way for this mod to detect the my variants and allow them to be accessed while having ace arsenal itself not detect them and therefore they will only show up when ace extended is loaded, but the classes still exist so anyone regardless of if they have ace extended or not they will still be able to see these variants when someone else has them loaded.

Essentially I want to provide the options to people with the mod loaded, but not flood peoples arsenals if they don't have it loaded.

I know this is more than possible with an independent compac that requires ace extended, but I'd love to keep it all within the single project, so my main questions are:
Is this already possible and if so how?
If it's not possible where in your code do you detect all the possible variants in which I could implement another scopeValue it would accept for example extendedScope = 2 in which if it detects this it will add it to the possible variants regardless of the scopeArsenal value.

Thanks for your time Jerry

Problem with texture options in the latest update

I added the Ace Arsenal Extended to the BRAF (Brazillian Armed Forces) Mod and i mostly utilize textureoptions as a way of changing the skins and i've received complains of the modification made using the texture options resetting when swapping Vests and Backpacks

In more details if i change the textures in the uniform and then swap either my backpack or my vest they reset to the default pattern used by the base uniform, opening the uniform tab back adds the modifications back but several users noted this problem with annoyance

the same issue can be seen with the USP fork of the Arsenal Extended with the flags and patches that uses the texture options to customize them

Upon further testing if i swap to a Vest that utilizes Ace Arsenal Extended the issue appears to disappear? if i select a vest that doesn't uses AAE the texture altered with texture options disappear if i THEN select a vest or backpack that utilizes AAE the textures modified with texture options starts working again

The problems stated above can be seen in the following video https://www.youtube.com/watch?v=Xf93DfkUVW4

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.