Hypoxic125/Sandbox – User

From Bohemia Interactive Community
< Hypoxic125
Categories:
No edit summary
(Initial upload)
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
{{TOC|side}}
{{TOC|side}}
Creating a custom loading bar involves utilizing two images. A background image (typically desaturated) and a foreground image (full color).
Below is the list of vegetation in Arma: Reforger, sorted by where they grow. Use this to help you with your terrain creation.


Key things to establish before you develop your own loading bar:
{| class="wikitable sortable"
* Where will your control be defined
|+ Riparian Zone/Wetlands
* In what direction will the loading bar flow in
|-
! Species !! Common Name !! Form
|-
| Salix fragilis || Crack Willow || Tree
|-
| Salix cinerea || Grey Willow || Bush
|-
| Phragmites australis || Common Reed || Bush
|-
| Populus nigra || Black Poplar || Tree
|}


== Required Images ==
&nbsp;


[[File:arma3 decal-rifle-gray.png|300px|frameless|right|Background Image - Desaturated]][[File:arma3 decal-rifle-pink.png|300px|frameless|right|Foreground Image - Full Color]]
{| class="wikitable sortable"
|+ Forest/Upland Areas
|-
! Species !! Common Name !! Form
|-
| Picea abies || Norway Spruce || Tree
|-
| Pinus sylvestris || Scots Pine || Tree
|-
| Betula pendula || Silver Birch || Tree
|-
| Carpinus betulus || European Hornbeam || Tree
|-
| Tilia cordata || Littleleaf Linden || Tree
|-
| Sorbus aucuparia || European Rowan || Tree
|-
| Dryopteris filix-mas || Male Fern || Plant
|-
| Pteridium aquilinum || Bracken Fern || Plant
|-
| Vaccinium myrtillus || Bilberry || Plant
|}


You will need to have two images:
&nbsp;
* Background Image: Desaturated
* Foreground Image: Full Color


These images will need to be converted from .png to .paa using TexView2
{| class="wikitable sortable"
|+ Open/Disturbed Areas
|-
! Species  !! Common Name !! Form
|-
| Rosa canina || Dog Rose || Bush
|-
| Rubus idaeus || Raspberry || Bush
|-
| Corylus avellana || Common Hazel || Bush
|-
| Juniperus communis || Common Juniper || Bush
|-
| Sambucus nigra || European Elder || Bush
|-
| Achillea millefolium || Yarrow || Plant
|-
| Arrhenatherum elatius || Tall Oatgrass || Plant
|-
| Urtica dioica || Stinging Nettle || Plant
|}


&nbsp;


{| class="wikitable sortable"
|+ Coastal/Shoreline Areas
|-
! Species  !! Common Name !! Form
|-
| Fucus vesiculosus || Bladderwrack || Plant
|}


== Building The Config ==
&nbsp;


'''Define Pixel Grid Macros'''
{| class="wikitable sortable"
<syntaxhighlight lang="cpp">
|+ Caption text
#define pixelScale          0.5
|-
#define GRID_X              safezoneX
! Species  !! Common Name !! Form
#define GRID_Y              safezoneY
|-
#define GRID_W              (pixelW * pixelGridNoUIScale * pixelScale)
| Malus domestica || Apple Tree || Tree
#define GRID_H              (pixelH * pixelGridNoUIScale * pixelScale)
|-
#define CENTER_X            ((getResolution select 2) * 0.5 * pixelW)
| Prunus domestica || European Plum || Tree
#define CENTER_Y            ((getResolution select 3) * 0.5 * pixelH)
|-
</syntaxhighlight>
| Tilia cordata || Littleleaf Linden || Tree
 
|}
'''Define Image Positions'''
<syntaxhighlight lang="cpp">
#define IMAGE_X    0
#define IMAGE_Y    0
// IMAGE_W and IMAGE_H need to follow the aspect ratio of your image. This is for a 2:1 image.
#define IMAGE_W    50
#define IMAGE_H    25
</syntaxhighlight>
 
'''Create Config'''
 
Import Base Classes
* [[GUI_Tutorial#Import_Classes_Via_import_Keyword_(Mission_Only)|Mission]]
* [[GUI_Tutorial#Declare_Classes_(Addon_Only)|Addon]]
 
<syntaxhighlight lang="cpp">
#define pixelScale          0.5
#define GRID_X              safezoneX
#define GRID_Y              safezoneY
#define GRID_W              (pixelW * pixelGridNoUIScale * pixelScale)
#define GRID_H              (pixelH * pixelGridNoUIScale * pixelScale)
#define CENTER_X            ((getResolution select 2) * 0.5 * pixelW)
#define CENTER_Y            ((getResolution select 3) * 0.5 * pixelH)
 
#define IMAGE_X    0
#define IMAGE_Y    0
// IMAGE_W and IMAGE_H need to follow the aspect ratio of your image. This is for a 2:1 image.
#define IMAGE_W    50
#define IMAGE_H    25
 
class TAG_MyDisplay {
idd = -1;
onLoad = "uiNamespace setVariable ['TAG_MyDisplay', _this select 0]";
onUnload = "uiNamespace setVariable ['TAG_MyDisplay', nil]";
 
class Controls {
class BackgroundCtrl: RscPicture {
idc = -1;
x = IMAGE_X * GRID_W;
y = IMAGE_Y * GRID_H;
w = IMAGE_W * GRID_W;
h = IMAGE_H * GRID_H;
onLoad = "uiNamespace setVariable ['TAG_BackgroundCtrl', _this select 0]";
onUnload = "uiNamespace setVariable ['TAG_BackgroundCtrl', nil]";
text = "pathTo\BackgroundImg.paa";
};
class ForegroundCtrlGroup: RscControlsGroupNoScrollBars {
    idc = -1;
    x = IMAGE_X * GRID_W;
    y = IMAGE_Y * GRID_H;
    w = IMAGE_W * GRID_W;
    h = IMAGE_H * GRID_H;
onLoad = "uiNamespace setVariable ['TAG_ForegroundCtrlGroup', _this select 0]";
onUnload = "uiNamespace setVariable ['TAG_ForegroundCtrlGroup', nil]";
    class controls {
        class ForegroundCtrl: RscPicture {
            idc = -1;
            x = 0 * GRID_W;
            y = 0 * GRID_H;
            w = IMAGE_W * GRID_W;
            h = IMAGE_H * GRID_H;
            onLoad = "uiNamespace setVariable ['TAG_ForegroundCtrl', _this select 0]";
            text = "pathTo\ForegroundImg.paa";
        };
    };
};
};
};
</syntaxhighlight>
 
[[Category:Arma 3: Editing]]

Latest revision as of 07:26, 19 February 2025

Below is the list of vegetation in Arma: Reforger, sorted by where they grow. Use this to help you with your terrain creation.

Riparian Zone/Wetlands
Species Common Name Form
Salix fragilis Crack Willow Tree
Salix cinerea Grey Willow Bush
Phragmites australis Common Reed Bush
Populus nigra Black Poplar Tree

 

Forest/Upland Areas
Species Common Name Form
Picea abies Norway Spruce Tree
Pinus sylvestris Scots Pine Tree
Betula pendula Silver Birch Tree
Carpinus betulus European Hornbeam Tree
Tilia cordata Littleleaf Linden Tree
Sorbus aucuparia European Rowan Tree
Dryopteris filix-mas Male Fern Plant
Pteridium aquilinum Bracken Fern Plant
Vaccinium myrtillus Bilberry Plant

 

Open/Disturbed Areas
Species Common Name Form
Rosa canina Dog Rose Bush
Rubus idaeus Raspberry Bush
Corylus avellana Common Hazel Bush
Juniperus communis Common Juniper Bush
Sambucus nigra European Elder Bush
Achillea millefolium Yarrow Plant
Arrhenatherum elatius Tall Oatgrass Plant
Urtica dioica Stinging Nettle Plant

 

Coastal/Shoreline Areas
Species Common Name Form
Fucus vesiculosus Bladderwrack Plant

 

Caption text
Species Common Name Form
Malus domestica Apple Tree Tree
Prunus domestica European Plum Tree
Tilia cordata Littleleaf Linden Tree