Skip to content

Commit

Permalink
Upgrade to latest hemtt (#216)
Browse files Browse the repository at this point in the history
  • Loading branch information
diwako authored Dec 25, 2023
1 parent 1b85edb commit d45fdeb
Show file tree
Hide file tree
Showing 12 changed files with 572 additions and 118 deletions.
80 changes: 47 additions & 33 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,50 +3,64 @@ name: CI
on:
push:
branches:
- master
- master
pull_request:

jobs:
validate:
runs-on: ubuntu-latest
steps:
- name: Checkout the source code
uses: actions/checkout@master
- name: Validate SQF
run: python3 tools/sqf_validator.py
- name: Validate Config
run: python3 tools/config_style_checker.py
- name: Check for BOM
uses: arma-actions/bom-check@master
- name: Checkout the source code
uses: actions/checkout@master
- name: Validate SQF
run: python3 tools/sqf_validator.py
- name: Validate Config
run: python3 tools/config_style_checker.py
- name: Check for BOM
uses: arma-actions/bom-check@master

lint:
runs-on: ubuntu-latest
steps:
- name: Checkout the source code
uses: actions/checkout@master
- name: Lint (sqflint)
uses: jokoho48/sqflint@master
continue-on-error: true # No failure due to many false-positives
- uses: actions/upload-artifact@master
with:
name: 'sqfLint Log'
path: 'sqf.log'
- name: Validate SQFLinter Logs
run: python3 tools/sqf_linter_LogChecker.py
- name: Checkout the source code
uses: actions/checkout@master
- name: Lint (sqflint)
uses: jokoho48/sqflint@master
continue-on-error: true # No failure due to many false-positives
- uses: actions/upload-artifact@master
with:
name: "sqfLint Log"
path: "sqf.log"
- name: Validate SQFLinter Logs
run: python3 tools/sqf_linter_LogChecker.py

stringtables:
runs-on: ubuntu-latest
steps:
- name: Install Python packages
run: |
pip3 install wheel
pip3 install setuptools
pip3 install pygithub
pip3 install pygithub3
- name: Checkout the source code
uses: actions/checkout@master
- name: Update Translation issue
if: github.repository == 'diwako/diwako_dui' && github.ref == 'refs/heads/master' && ! contains(github.event.head_commit.message, '[ci skip]')
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: python3 tools/stringtableDeploy.py
- name: Install Python packages
run: |
pip3 install wheel
pip3 install setuptools
pip3 install pygithub
pip3 install pygithub3
- name: Checkout the source code
uses: actions/checkout@master
- name: Update Translation issue
if: github.repository == 'diwako/diwako_dui' && github.ref == 'refs/heads/master' && ! contains(github.event.head_commit.message, '[ci skip]')
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: python3 tools/stringtableDeploy.py

build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Setup HEMTT
uses: arma-actions/hemtt@v1
- name: Run HEMTT build
run: hemtt release
# - name: Upload Release
# uses: actions/upload-artifact@v4
# with:
# name: my-mod-latest
# path: release/my-mod-latest.zip
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

hemtt\.exe
armake2\.exe
.hemttout/
keys/
releases/
*.pbo
Expand All @@ -17,3 +18,5 @@ keys/*
*.sqfc
*.bat
*.dll

.vscode/*
14 changes: 14 additions & 0 deletions .hemtt/hooks/pre_release/set_version.rhai
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// Read the current contents of the mod.cpp
// file from the project source
let version = HEMTT_DIRECTORY
.join("mod.cpp")
.open_file()
.read();
// Replace the placeholder version with the actual version
version.replace("{version}", HEMTT.project().version().to_string_short());
// Write the new contents to the build output
// create_file will overwrite the file if it exists
HEMTT_OUTPUT
.join("mod.cpp")
.create_file()
.write(version);
43 changes: 43 additions & 0 deletions .hemtt/project.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name = "DUI Squad Radar"
prefix = "diwako_dui"
author = "Diwako"
mainprefix = "z"

[version]
path = "addons/main/script_version.hpp"
git_hash = 0

[files]
include = [
"mod.cpp",
"authors.txt",
"license.txt",
"logolarge.paa",
"logosmall.paa"
]
exclude = [
"*.psd",
"*.png",
"*.tga"
]

[hemtt.launch.default]
workshop = [
"450814997", # CBA_A3's Workshop ID
"463939057" # ACE3
]
parameters = [
"-skipIntro", # These parameters are passed to the Arma 3 executable
"-noSplash", # They do not need to be added to your list
"-showScriptErrors", # You can add additional parameters here
"-debug",
"-world=empty",
"-filePatching",
"C:\\Users\\diwako\\Documents\\Arma 3\\missions\\dui.VR\\mission.sqm", # Launch into existing Editor Mission - \\ needed
]

[hemtt.signing]
authority = "diwako_dui"

[hemtt.release]
folder = "diwako_dui"
60 changes: 46 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,76 +3,108 @@
## A UI showing unit positions and names of units in your squad

## Summary

This mod shows a compass in the bottom middle of your screen and a list of people in your current squad. It is made with SQF commands which recently have been added to Arma3 and were not available back in the days of Arma2 or early Arma3. Meaning no weird workarounds with map elements are needed anymore which just eat more frames.
A strong point of this UI is its customizability and its many features are all settable with CBA settings.

## Requirements

- CBA

## Supported mods

- ACE 3
- ACRE
- TFAR (Both versions)

## Features
#### Scaling

#### Scaling

Rescale the UI elements in CBA settings, text can be rescaled on its own as well!

#### Font
#### Font

Choose which font is used in the UI

#### Icon Styles
#### Icon Styles

Choose which icon style should be used

#### Color Schemes
#### Color Schemes

Choose the colors that are used throughout the UI

#### Compass Styles
#### Compass Styles

Choose how your compass should look like

#### Choose which UI elements should be shown
#### Choose which UI elements should be shown

Enable or disable the Compass or Namelist on the fly, both or individually. Keybind to hide the UI is included

#### Show the Bearing On Top Of The Compass
#### Show the Bearing On Top Of The Compass

Or don’t, you choose. Also possible to show milradians!

#### Adjustable Compass Range
#### Adjustable Compass Range

Change the range of the compass on the fly either via CBA settings or keybindings

#### Compass Refresh Rate
#### Compass Refresh Rate

Do not want to update the compass every frame? Choose the refresh rate of it!

#### Compass Unit Occlusion
#### Compass Unit Occlusion

Time to get lost in the jungle again!

#### Namelist Text Size
#### Namelist Text Size

Change the size of the text of the squad name list. Smaller means more units will fit into one column!

#### Buddy System
#### Buddy System

Designate someone in your squad as your buddy, they will get their own icon so you will always find each other

#### Show Unit Ranks
#### Show Unit Ranks

SQL just died? No problem, Keybind included to see who is the next in rank

#### Make your own styles
#### Make your own styles

Color, icon and compass styles on mission level are supported!

## Special Variables

DUI has a special variable mission makers can use.

### diwako_dui_special_track

Array of objects in `missionNamepace`. Every unit or vehicle in this array will be tracked on compass. Be aware that this might be a performance issue if too many objects are added. Be also aware that you do not add a unit that is already in your squad, or else you have 2 icons for that unit.

# Reporting bugs

Create a fitting title beginning with the tag word "BUG".
In general, be as specific as possible when reporting bugs, it is good to tell how to reproduce it, so it gets fixed faster.

# Requesting Features

For requesting features create a new issue with the tag word "FEATURE" at the beginning of the title. Feature requests can range from new styles to whole new functionality. The feasibility of those requests will be analysed inside the feature request itself

# Pull requests

Tell in detail what your PR will change, why it should be added and what benefits you think it will bring. PRs can be from new styles, bug fixes to whole new functionality. The changes will be reviewed within the PR.

# Building

Use the [latest version of Hemtt](https://github.com/BrettMayson/HEMTT/releases/tag/v1.10.2) to build this project.
After installing Hemtt, you can build this project using `hemtt dev` or `hemtt build`.

To test your changes and such, you can launch Arma directly using `hemtt launch`.

# Additional

[Playable version (DEV)](https://steamcommunity.com/sharedfiles/filedetails/?id=1617125729) (You can build from source as well)\
[Playable version (STABLE)](https://steamcommunity.com/sharedfiles/filedetails/?id=1638341685)\
[BI Thread](https://forums.bohemia.net/forums/topic/221597-dui-squad-radar/)
2 changes: 1 addition & 1 deletion addons/main/script_mod.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#define VERSION_AR MAJOR,MINOR,PATCHLVL,BUILD
#define VERSION_PLUGIN MAJOR.MINOR.PATCHLVL.BUILD

#define REQUIRED_VERSION 2.04
#define REQUIRED_VERSION 2.14

#ifdef COMPONENT_BEAUTIFIED
#define COMPONENT_NAME QUOTE(DUI - COMPONENT_BEAUTIFIED)
Expand Down
6 changes: 3 additions & 3 deletions addons/main/script_version.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#define MAJOR 1
#define MINOR 9
#define PATCHLVL 3
#define BUILD 1
#define MINOR 10
#define PATCHLVL 0
#define BUILD 0
48 changes: 0 additions & 48 deletions hemtt.toml

This file was deleted.

Loading

0 comments on commit d45fdeb

Please sign in to comment.