Initial Repo Setup
All checks were successful
Build / Build (push) Successful in 53s

This commit is contained in:
Jacob Schmidt 2025-01-01 14:35:12 -06:00
commit c6daf95415
463 changed files with 21917 additions and 0 deletions

32
.github/ISSUE_TEMPLATE/bug_report.md vendored Normal file
View File

@ -0,0 +1,32 @@
---
name: Bug report
about: Report a bug related to the framework.
title: "[addon name] - [short description]"
labels: bug
assignees: JSchmidt92
---
**Describe the bug**
A clear and concise description of what the bug is.
**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. See error
**Expected behavior**
A clear and concise description of what you expected to happen.
**Screenshots**
If applicable, add screenshots to help explain your problem.
**Mission file**
The mission where the issue occured.
**Log file**
The log file generated by the game.
**Additional context**
Add any other context about the problem here.

View File

@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: Request - [short description]
labels: ''
assignees: JSchmidt92
---
**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
**Additional context**
Add any other context or screenshots about the feature request here.

4
.github/PULL_REQUEST_TEMPLATE.md vendored Normal file
View File

@ -0,0 +1,4 @@
**When merged this pull request will:**
- Describe what this pull request will do
- Each change in a separate line
- Follow title standard `Module - Add|Fix|Improve|Change|Remove things`

33
.github/release_drafter.yml vendored Normal file
View File

@ -0,0 +1,33 @@
branches:
- master
name-template: "forge_client_v$NEXT_PATCH_VERSION"
tag-template: "$NEXT_PATCH_VERSION"
categories:
- title: "**ADDED:**"
labels:
- "feature"
- title: "**FIXED:**"
labels:
- "bug fix"
- title: "**IMPROVED:**"
labels:
- "enhancement"
- title: "**CHANGED:**"
labels:
- "cleanup"
exclude-labels:
- "ignore changelog"
change-template: "- $TITLE (#$NUMBER)"
template: |
## Change Log Summary
$CHANGES
replacers:
# Category titles
- search: '/\#\# (\*\*(ADDED|FIXED|IMPROVED|CHANGED):\*\*)/g'
replace: "$1"

50
.github/workflows/build.yml vendored Normal file
View File

@ -0,0 +1,50 @@
name: Build
on:
push:
branches: [master]
paths-ignore:
- ".github/**"
- "addons/main/script_version.hpp"
- "docs/**"
- "tools/**"
- "LICENSE"
- "README.md"
- "*.json"
workflow_dispatch:
jobs:
build:
name: Build
runs-on: ubuntu-22.04
steps:
- name: Checkout Source Code
uses: actions/checkout@v4
- name: Bump Version
id: bump-version
run: python3 tools/version_bumper.py increment_build push_commit
- name: Setup HEMTT
uses: arma-actions/hemtt@v1
- name: Run HEMTT build
run: hemtt release
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: 'stable'
- name: Initialize or Update Go module
run: |
if [ ! -f go.mod ]; then
go mod init gitea.innovativedevsolutions.org/IDSolutions/client
fi
go get code.gitea.io/sdk/gitea
- name: Run Release Action
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
VERSION: ${{ steps.bump-version.outputs.VERSION }}
run: go run main.go

410
.gitignore vendored Normal file
View File

@ -0,0 +1,410 @@
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
##
## Get latest from https://github.com/github/gitignore/blob/main/VisualStudio.gitignore
# User-specific files
*.rsuser
*.suo
*.user
*.userosscache
*.sln.docstates
# User-specific files (MonoDevelop/Xamarin Studio)
*.userprefs
# Mono auto generated files
mono_crash.*
# Build results
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
[Rr]eleases/
x64/
x86/
[Ww][Ii][Nn]32/
[Aa][Rr][Mm]/
[Aa][Rr][Mm]64/
bld/
[Bb]in/
[Oo]bj/
[Ll]og/
[Ll]ogs/
# Visual Studio 2015/2017 cache/options directory
.vs/
# Uncomment if you have tasks that create the project's static files in wwwroot
#wwwroot/
# Visual Studio 2017 auto generated files
Generated\ Files/
# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*
# NUnit
*.VisualState.xml
TestResult.xml
nunit-*.xml
# Build Results of an ATL Project
[Dd]ebugPS/
[Rr]eleasePS/
dlldata.c
# Benchmark Results
BenchmarkDotNet.Artifacts/
# .NET Core
project.lock.json
project.fragment.lock.json
artifacts/
# ASP.NET Scaffolding
ScaffoldingReadMe.txt
# StyleCop
StyleCopReport.xml
# Files built by Visual Studio
*_i.c
*_p.c
*_h.h
*.ilk
*.meta
*.obj
*.iobj
*.pch
*.pdb
*.ipdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.tmp_proj
*_wpftmp.csproj
*.log
*.tlog
*.vspscc
*.vssscc
.builds
*.pidb
*.svclog
*.scc
# Chutzpah Test files
_Chutzpah*
# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opendb
*.opensdf
*.sdf
*.cachefile
*.VC.db
*.VC.VC.opendb
# Visual Studio profiler
*.psess
*.vsp
*.vspx
*.sap
# Visual Studio Trace Files
*.e2e
# TFS 2012 Local Workspace
$tf/
# Guidance Automation Toolkit
*.gpState
# ReSharper is a .NET coding add-in
_ReSharper*/
*.[Rr]e[Ss]harper
*.DotSettings.user
# TeamCity is a build add-in
_TeamCity*
# DotCover is a Code Coverage Tool
*.dotCover
# AxoCover is a Code Coverage Tool
.axoCover/*
!.axoCover/settings.json
# Coverlet is a free, cross platform Code Coverage Tool
coverage*.json
coverage*.xml
coverage*.info
# Visual Studio code coverage results
*.coverage
*.coveragexml
# NCrunch
_NCrunch_*
.*crunch*.local.xml
nCrunchTemp_*
# MightyMoose
*.mm.*
AutoTest.Net/
# Web workbench (sass)
.sass-cache/
# Installshield output folder
[Ee]xpress/
# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html
# Click-Once directory
publish/
# Publish Web Output
*.[Pp]ublish.xml
*.azurePubxml
# Note: Comment the next line if you want to checkin your web deploy settings,
# but database connection strings (with potential passwords) will be unencrypted
*.pubxml
*.publishproj
# Microsoft Azure Web App publish settings. Comment the next line if you want to
# checkin your Azure Web App publish settings, but sensitive information contained
# in these scripts will be unencrypted
PublishScripts/
# NuGet Packages
*.nupkg
# NuGet Symbol Packages
*.snupkg
# The packages folder can be ignored because of Package Restore
**/[Pp]ackages/*
# except build/, which is used as an MSBuild target.
!**/[Pp]ackages/build/
# Uncomment if necessary however generally it will be regenerated when needed
#!**/[Pp]ackages/repositories.config
# NuGet v3's project.json files produces more ignorable files
*.nuget.props
*.nuget.targets
# Microsoft Azure Build Output
csx/
*.build.csdef
# Microsoft Azure Emulator
ecf/
rcf/
# Windows Store app package directories and files
AppPackages/
BundleArtifacts/
Package.StoreAssociation.xml
_pkginfo.txt
*.appx
*.appxbundle
*.appxupload
# Visual Studio cache files
# files ending in .cache can be ignored
*.[Cc]ache
# but keep track of directories ending in .cache
!?*.[Cc]ache/
# Others
ClientBin/
~$*
*~
*.dbmdl
*.dbproj.schemaview
*.jfm
*.pfx
*.publishsettings
orleans.codegen.cs
# Including strong name files can present a security risk
# (https://github.com/github/gitignore/pull/2483#issue-259490424)
#*.snk
# Since there are multiple workflows, uncomment next line to ignore bower_components
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
#bower_components/
# RIA/Silverlight projects
Generated_Code/
# Backup & report files from converting an old project file
# to a newer Visual Studio version. Backup files are not needed,
# because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm
ServiceFabricBackup/
*.rptproj.bak
# SQL Server files
*.mdf
*.ldf
*.ndf
# Business Intelligence projects
*.rdl.data
*.bim.layout
*.bim_*.settings
*.rptproj.rsuser
*- [Bb]ackup.rdl
*- [Bb]ackup ([0-9]).rdl
*- [Bb]ackup ([0-9][0-9]).rdl
# Microsoft Fakes
FakesAssemblies/
# GhostDoc plugin setting file
*.GhostDoc.xml
# Node.js Tools for Visual Studio
.ntvs_analysis.dat
node_modules/
# Visual Studio 6 build log
*.plg
# Visual Studio 6 workspace options file
*.opt
# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
*.vbw
# Visual Studio 6 auto-generated project file (contains which files were open etc.)
*.vbp
# Visual Studio 6 workspace and project file (working project files containing files to include in project)
*.dsw
*.dsp
# Visual Studio 6 technical files
*.ncb
*.aps
# Visual Studio LightSwitch build output
**/*.HTMLClient/GeneratedArtifacts
**/*.DesktopClient/GeneratedArtifacts
**/*.DesktopClient/ModelManifest.xml
**/*.Server/GeneratedArtifacts
**/*.Server/ModelManifest.xml
_Pvt_Extensions
# Paket dependency manager
.paket/paket.exe
paket-files/
# FAKE - F# Make
.fake/
# CodeRush personal settings
.cr/personal
# Python Tools for Visual Studio (PTVS)
__pycache__/
*.pyc
# Cake - Uncomment if you are using it
# tools/**
# !tools/packages.config
# Tabs Studio
*.tss
# Telerik's JustMock configuration file
*.jmconfig
# BizTalk build output
*.btp.cs
*.btm.cs
*.odx.cs
*.xsd.cs
# OpenCover UI analysis results
OpenCover/
# Azure Stream Analytics local run output
ASALocalRun/
# MSBuild Binary and Structured Log
*.binlog
# NVidia Nsight GPU debugger configuration file
*.nvuser
# MFractors (Xamarin productivity tool) working folder
.mfractor/
# Local History for Visual Studio
.localhistory/
# Visual Studio History (VSHistory) files
.vshistory/
# BeatPulse healthcheck temp database
healthchecksdb
# Backup folder for Package Reference Convert tool in Visual Studio 2017
MigrationBackup/
# Ionide (cross platform F# VS Code tools) working folder
.ionide/
# Fody - auto-generated XML schema
FodyWeavers.xsd
# VS Code files for those working on multiple tools
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
*.code-workspace
# Local History for Visual Studio Code
.history/
# Windows Installer files from build outputs
*.cab
*.msi
*.msix
*.msm
*.msp
# JetBrains Rider
*.sln.iml
# Hemtt
*.pbo
.hemttout
hemtt
hemtt.exe
*.biprivatekey
# Added by cargo
/target

21
.hemtt/project.toml Normal file
View File

@ -0,0 +1,21 @@
name = "FORGE Client"
author = "IDSolutions"
prefix = "forge_client"
mainprefix = "z"
[files]
include = [
"*.dll",
"*.so",
"*.json",
"mod.cpp",
"README.md",
"LICENSE",
"icon_64_ca.paa",
"icon_128_ca.paa",
"icon_128_highlight_ca.paa",
"title_co.paa"
]
[version]
git_hash = 0

112
LICENSE Normal file
View File

@ -0,0 +1,112 @@
Copyright (c) 2024 IDSolutions
Brief summary of this Licence
PLEASE, NOTE THAT THIS SUMMARY HAS NO LEGAL EFFECT AND IS ONLY OF AN INFORMATORY NATURE DESIGNED FOR YOU TO GET THE BASIC INFORMATION ABOUT THE CONTENT OF THIS LICENCE. THE ONLY LEGALLY BINDING PROVISIONS ARE THOSE IN THE ORIGINAL AND FULL TEXT OF THIS LICENCE.
With this licence you are free to adapt (i.e. modify, rework or update) and share (i.e. copy, distribute or transmit) the material under the following conditions:
Attribution - You must attribute the material in the manner specified by the author or licensor (but not in any way that suggests that they endorse you or your use of the material).
Noncommercial - You may not use this material for any commercial purposes.
Arma Only - You may not convert or adapt this material to be used in other games than Arma.
No Derivatives - If you remix, transform, or build upon the material, you may not distribute the modified material.
Full version of licence
By exercising the Licensed Rights (defined below), You accept and agree to be bound by the terms and conditions of this Arma Public License No Derivatives ("Public License"). To the extent this Public License may be interpreted as a contract, You are granted the Licensed Rights in consideration of Your acceptance of these terms and conditions, and the Licensor grants You such rights in consideration of benefits the Licensor receives from making the Licensed Material available under these terms and conditions.
Section 1 Definitions
Adapted Material means material subject to Copyright and Similar Rights that is derived from or based upon the Licensed Material and in which the Licensed Material is translated, altered, arranged, transformed, or otherwise modified in a manner requiring permission under the Copyright and Similar Rights held by the Licensor. For purposes of this Public License, where the Licensed Material is a musical work, performance, or sound recording, Adapted Material is always produced where the Licensed Material is synched in timed relation with a moving image.
ArmaOnly means primarily intended for or directed towards the use in any of existing and future Arma games, including but not limited to Arma: Cold War Assault, Arma, Arma 2 and Arma 3 and its official sequels and expansion packs.
Copyright and Similar Rights means copyright and/or similar rights closely related to copyright including, without limitation, performance, broadcast, sound recording, and Sui Generis Database Rights, without regard to how the rights are labeled or categorized. For purposes of this Public License, the rights specified in Section 2(b)(1)-(2) are not Copyright and Similar Rights.
Effective Technological Measures means those measures that, in the absence of proper authority, may not be circumvented under laws fulfilling obligations under Article 11 of the WIPO Copyright Treaty adopted on December 20, 1996, and/or similar international agreements.
Exceptions and Limitations means fair use, fair dealing, and/or any other exception or limitation to Copyright and Similar Rights that applies to Your use of the Licensed Material.
Licensed Material means the artistic or literary work, database, or other material to which the Licensor applied this Public License.
Licensed Rights means the rights granted to You subject to the terms and conditions of this Public License, which are limited to all Copyright and Similar Rights that apply to Your use of the Licensed Material and that the Licensor has authority to license.
Licensor means the individual(s) or entity(ies) granting rights under this Public License.
NonCommercial means not primarily intended for or directed towards commercial advantage or monetary compensation. For purposes of this Public License, the exchange of the Licensed Material for other material subject to Copyright and Similar Rights by digital file-sharing or similar means is NonCommercial provided there is no payment of monetary compensation in connection with the exchange.
Share means to provide material to the public by any means or process that requires permission under the Licensed Rights, such as reproduction, public display, public performance, distribution, dissemination, communication, or importation, and to make material available to the public including in ways that members of the public may access the material from a place and at a time individually chosen by them.
Sui Generis Database Rights means rights other than copyright resulting from Directive 96/9/EC of the European Parliament and of the Council of 11 March 1996 on the legal protection of databases, as amended and/or succeeded, as well as other essentially equivalent rights anywhere in the world.
You means the individual or entity exercising the Licensed Rights under this Public License. Your has a corresponding meaning.
Section 2 Scope
License grant
1. Subject to the terms and conditions of this Public License, the Licensor hereby grants You a worldwide, royalty-free, non-sublicensable, non-exclusive, irrevocable license to exercise the Licensed Rights in the Licensed Material to:
reproduce and Share the Licensed Material, in whole or in part, for NonCommercial and ArmaOnly purposes only; and
produce and reproduce for NonCommercial and ArmaOnly purposes only, but not Share Adapted Material.
Exceptions and Limitations For the avoidance of doubt, where Exceptions and Limitations apply to Your use, this Public License does not apply, and You do not need to comply with its terms and conditions.
Term. The term of this Public License is specified in Section 6(a).
Media and formats; technical modifications allowed. The Licensor authorizes You to exercise the Licensed Rights in all media and formats whether now known or hereafter created, and to make technical modifications necessary to do so. The Licensor waives and/or agrees not to assert any right or authority to forbid You from making technical modifications necessary to exercise the Licensed Rights, including technical modifications necessary to circumvent Effective Technological Measures. For purposes of this Public License, simply making modifications authorized by this Section 2(a)(4) never produces Adapted Material.
Downstream recipients.
Offer from the Licensor Licensed Material. Every recipient of the Licensed Material automatically receives an offer from the Licensor to exercise the Licensed Rights under the terms and conditions of this Public License.
No downstream restrictions. You may not offer or impose any additional or different terms or conditions on, or apply any Effective Technological Measures to, the Licensed Material if doing so restricts exercise of the Licensed Rights by any recipient of the Licensed Material.
No endorsement. Nothing in this Public License constitutes or may be construed as permission to assert or imply that You are, or that Your use of the Licensed Material is, connected with, or sponsored, endorsed, or granted official status by, the Licensor or others designated to receive attribution as provided in Section 3(a)(1)(a)(i).
Other rights
Moral rights, such as the right of integrity, are not licensed under this Public License, nor are publicity, privacy, and/or other similar personality rights; however, to the extent possible, the Licensor waives and/or agrees not to assert any such rights held by the Licensor to the limited extent necessary to allow You to exercise the Licensed Rights, but not otherwise.
Patent and trademark rights are not licensed under this Public License.
To the extent possible, the Licensor waives any right to collect royalties from You for the exercise of the Licensed Rights, whether directly or through a collecting society under any voluntary or waivable statutory or compulsory licensing scheme. In all other cases the Licensor expressly reserves any right to collect such royalties, including when the Licensed Material is used other than for NonCommercial and ArmaOnly purposes.
Section 3 License Conditions
Your exercise of the Licensed Rights is expressly made subject to the following conditions.
Attribution
If You Share the Licensed Material, You must:
retain the following if it is supplied by the Licensor with the Licensed Material:
identification of the creator(s) of the Licensed Material and any others designated to receive attribution, in any reasonable manner requested by the Licensor (including by pseudonym if designated);
a copyright notice;
a notice that refers to this Public License;
a notice that refers to the disclaimer of warranties;
a URI or hyperlink to the Licensed Material to the extent reasonably practicable;
indicate if You modified the Licensed Material and retain an indication of any previous modifications; and
indicate the Licensed Material is licensed under this Public License, and include the text of, or the URI or hyperlink to, this Public License.
For the avoidance of doubt, You do not have permission under this Public License to Share Adapted Material.
You may satisfy the conditions in Section 3(a)(1) in any reasonable manner based on the medium, means, and context in which You Share the Licensed Material. For example, it may be reasonable to satisfy the conditions by providing a URI or hyperlink to a resource that includes the required information.
If requested by the Licensor, You must remove any of the information required by Section 3(a)(1)(a) to the extent reasonably practicable.
Section 4 Sui Generis Database Rights
Where the Licensed Rights include Sui Generis Database Rights that apply to Your use of the Licensed Material:
for the avoidance of doubt, Section 2(a)(1) grants You the right to extract, reuse, reproduce, and Share all or a substantial portion of the contents of the database for NonCommercial and ArmaOnly purposes only, provided You do not Share Adapted Material;
if You include all or a substantial portion of the database contents in a database in which You have Sui Generis Database Rights, then the database in which You have Sui Generis Database Rights (but not its individual contents) is Adapted Material; and
You must comply with the conditions in Section 3(a) if You Share all or a substantial portion of the contents of the database.
For the avoidance of doubt, this Section 4 supplements and does not replace Your obligations under this Public License where the Licensed Rights include other Copyright and Similar Rights.
Section 5 Disclaimer of Warranties and Limitation of Liability
Unless otherwise separately undertaken by the Licensor, to the extent possible, the Licensor offers the Licensed Material as-is and as-available, and makes no representations or warranties of any kind concerning the Licensed Material, whether express, implied, statutory, or other. This includes, without limitation, warranties of title, merchantability, fitness for a particular purpose, non-infringement, absence of latent or other defects, accuracy, or the presence or absence of errors, whether or not known or discoverable. Where disclaimers of warranties are not allowed in full or in part, this disclaimer may not apply to You.
To the extent possible, in no event will the Licensor be liable to You on any legal theory (including, without limitation, negligence) or otherwise for any direct, special, indirect, incidental, consequential, punitive, exemplary, or other losses, costs, expenses, or damages arising out of this Public License or use of the Licensed Material, even if the Licensor has been advised of the possibility of such losses, costs, expenses, or damages. Where a limitation of liability is not allowed in full or in part, this limitation may not apply to You.
The disclaimer of warranties and limitation of liability provided above shall be interpreted in a manner that, to the extent possible, most closely approximates an absolute disclaimer and waiver of all liability.
Section 6 Term and Termination
This Public License applies for the term of the Copyright and Similar Rights licensed here. However, if You fail to comply with this Public License, then Your rights under this Public License terminate automatically.
Where Your right to use the Licensed Material has terminated under Section 6(a), it reinstates:
automatically as of the date the violation is cured, provided it is cured within 30 days of Your discovery of the violation; or
upon express reinstatement by the Licensor.
For the avoidance of doubt, this Section 6(b) does not affect any right the Licensor may have to seek remedies for Your violations of this Public License.
For the avoidance of doubt, the Licensor may also offer the Licensed Material under separate terms or conditions or stop distributing the Licensed Material at any time; however, doing so will not terminate this Public License.
Sections 1, 5, 6, 7, and 8 survive termination of this Public License.
Section 7 Other Terms and Conditions
The Licensor shall not be bound by any additional or different terms or conditions communicated by You unless expressly agreed.
Any arrangements, understandings, or agreements regarding the Licensed Material not stated herein are separate from and independent of the terms and conditions of this Public License.
Section 8 Interpretation
For the avoidance of doubt, this Public License does not, and shall not be interpreted to, reduce, limit, restrict, or impose conditions on any use of the Licensed Material that could lawfully be made without permission under this Public License.
To the extent possible, if any provision of this Public License is deemed unenforceable, it shall be automatically reformed to the minimum extent necessary to make it enforceable. If the provision cannot be reformed, it shall be severed from this Public License without affecting the enforceability of the remaining terms and conditions.
No term or condition of this Public License will be waived and no failure to comply consented to unless expressly agreed to by the Licensor.
Nothing in this Public License constitutes or may be interpreted as a limitation upon, or waiver of, any privileges and immunities that apply to the Licensor or You, including from the legal processes of any jurisdiction or authority.
Bohemia Interactive Notices
Bohemia Interactive a.s. is not a party to this License, and makes no warranty whatsoever in connection with the Licensed Material. Bohemia Interactive a.s. will not be liable to You or any party on any legal theory for any damages whatsoever, including without limitation any general, special, incidental or consequential damages arising in connection to this license. Notwithstanding the foregoing two (2) sentences, Bohemia Interactive a.s. may elect to apply the Public License to material it publishes and in those instances it becomes the "Licensor".
Except for the limited purpose of indicating to the public that the Licensed Material is shared under this Public License, Bohemia Interactive a.s. does not authorize the use by either party of the trademarks "Arma", "Bohemia Interactive" or any related trademark or logo of Arma or Bohemia Interactive without the prior written consent of Bohemia Interactive a.s.

56
README.md Normal file
View File

@ -0,0 +1,56 @@
<p align="center">
<a href="https://gitea.innovativedevsolutions.org/IDSolutions/client/releases/latest" target="blank">
<img src="https://img.shields.io/gitea/v/release/IDSolutions/client?gitea_url=https%3A%2F%2Fgitea.innovativedevsolutions.org" alt="latest-release" /></a>
<a href="https://gitea.innovativedevsolutions.org/IDSolutions/client/issues" target="blank">
<img src="https://img.shields.io/gitea/issues/open/IDSolutions/client?gitea_url=https%3A%2F%2Fgitea.innovativedevsolutions.org" alt="open-issues" /></a>
<a href="https://gitea.innovativedevsolutions.org/IDSolutions/client/actions?workflow=build.yml" target="blank">
<img src="https://gitea.innovativedevsolutions.org/IDSolutions/client/actions/workflows/build.yml/badge.svg?branch=master" alt="build-status" /></a>
</p>
Arma 3 FORGE: Build Your Legacy\
Version: Alpha 0.1.0
[Development Status: Active]
---
Step into a new era of military simulation with Arma 3 FORGE, a revolutionary framework that transforms Arma 3 into a dynamic persistent world. Create powerful organizations, manage complex operations, and leave your mark on the battlefield.
Key Features:
---
* Strategic Command: From recruitment to deployment, shape your organization into a formidable fighting force. Train operatives, establish hierarchies, and build a name that others will respect or fear
* Living Battlefield: Take on missions that evolve based on your reputation and past actions. Every choice ripples through the world, opening new opportunities or creating powerful enemies
* Financial Empire: Master a deep economic system where success breeds opportunity. Manage operational funds, invest in equipment, and watch your influence grow through smart resource management
* Combat Readiness: Unlock and customize an expanding arsenal of weapons and equipment. Your armory grows with your success, giving your operatives the edge they need
* Logistics Network: Command a fleet of vehicles and assets. From transport to combat support, build the infrastructure that keeps your operations running
* Operations Hub: Transform your headquarters into a powerhouse of strategic planning. Coordinate missions, manage resources, and direct your forces from a central command center
* Global Influence: Form alliances, manipulate rivalries, and navigate complex political landscapes that shift with your actions
* Endless Possibilities: A modular foundation designed for expansion. Seamlessly integrate new content and shape your perfect military simulation
* Connected World: Forge your path in a persistent multiplayer environment where organizations clash and cooperate for dominance
Arma 3 FORGE delivers a foundation for endless possibilities. Whether commanding elite PMC units, running tactical operations, or building a military empire, your choices create lasting impact.
Perfect for:
* Commanders seeking strategic depth
* Communities wanting persistent progression
* Players driven by meaningful advancement
* Mod developers building next-gen experiences
Arma 3 FORGE - Where every decision shapes your legacy, every mission builds your reputation, and every operation writes your story.
Join us in forging the future of military simulation.
Coming Features:
* Advanced Multiplayer Competition
* Rival Organization Mechanics
Support & Contributions
---
* Lead Developer: Jacob Schmidt
* Contributors:
* Creedcoder for his invaluable assistance and input.
* Special Thanks: To the Arma 3 community for their ongoing support and feedback.
License:
---
This mod is licensed under the [Arma Public License (APL-SA)](https://www.bohemia.net/community/licenses/arma-public-license-share-alike). Please refer to the LICENSE file for more information on usage and distribution rights.

3
a3f_client_version.json Normal file
View File

@ -0,0 +1,3 @@
{
"version": "1.0.0"
}

1
addons/admin/$PBOPREFIX$ Normal file
View File

@ -0,0 +1 @@
z\forge_client\addons\admin

View File

@ -0,0 +1,19 @@
class Extended_PreStart_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_preStart));
};
};
class Extended_PreInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_preInit));
serverInit = QUOTE(call COMPILE_FILE(XEH_preInit_server));
};
};
class Extended_PostInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_postInit));
clientInit = QUOTE(call COMPILE_FILE(XEH_postInit_client));
};
};

View File

@ -0,0 +1,7 @@
PREP(adminMessage);
PREP(adminPromote);
PREP(adminRefresh);
PREP(adminTransfer);
PREP(initAdmin);
PREP(openAdmin);
PREP(printAddonName);

View File

@ -0,0 +1 @@
#include "script_component.hpp"

View File

@ -0,0 +1 @@
#include "script_component.hpp"

View File

@ -0,0 +1,8 @@
#include "script_component.hpp"
ADDON = false;
PREP_RECOMPILE_START;
#include "XEH_PREP.hpp"
PREP_RECOMPILE_END;
ADDON = true;

View File

@ -0,0 +1 @@
#include "script_component.hpp"

View File

@ -0,0 +1,2 @@
#include "script_component.hpp"
#include "XEH_PREP.hpp"

18
addons/admin/config.cpp Normal file
View File

@ -0,0 +1,18 @@
#include "script_component.hpp"
class CfgPatches {
class ADDON {
name = COMPONENT_NAME;
units[] = {};
weapons[] = {};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"forge_client_main"};
authors[] = {"J. Schmidt", "Creedcoder"};
author = "IDSolutions";
VERSION_CONFIG;
};
};
#include "CfgEventHandlers.hpp"
#include "ui\RscCommon.hpp"
#include "ui\RscAdmin.hpp"

View File

@ -0,0 +1,30 @@
#include "..\script_component.hpp"
private ["_data", "_dialog", "_list", "_target", "_targetValue", "_textBox", "_textMessage"];
_dialog = findDisplay 202303;
_list = _dialog displayCtrl 2023001;
_textBox = _dialog displayCtrl 2023006;
_targetValue = lbCurSel _list;
_data = _list lbData _targetValue;
if ((isNil {_data})) exitWith { hintSilent "You did not select a player!" };
{
if (str (name (_x)) == str _data) then {
_target = _x;
};
} forEach playableUnits;
hintSilent format ["Player Selected. You have selected %1", _target];
if (isNil "_target") then {
hintSilent "Please Select an Active Player First!"
} else {
_textMessage = ctrlText _textBox;
[_target, _textMessage] remoteExec ["forge_server_misc_fnc_textMessage", 2];
// [format ["Message sent to %1: <br/>%2", _target, _textMessage], "blue-grey", 3] call EFUNC(misc,notify);
};
["dummy"] call FUNC(adminRefresh);

View File

@ -0,0 +1,31 @@
#include "..\script_component.hpp"
params [["_condition", "", [""]]];
private ["_data", "_data2", "_dialog", "_list", "_list2", "_paygrade", "_rankValue", "_target", "_targetValue"];
_dialog = findDisplay 202303;
_list = _dialog displayCtrl 2023001;
_list2 = _dialog displayCtrl 2023003;
_targetValue = lbCurSel _list;
_rankValue = lbCurSel _list2;
_data = _list lbData _targetValue;
_data2 = call compile format ["%1", (_list2 lbData _rankValue)];
_paygrade = _data2 select 0;
if ((isNil {_data})) exitWith { hintSilent "You did not select a player!" };
{
if (str (name (_x)) == str _data) then {
_target = _x;
};
} forEach playableUnits;
switch (_condition) do {
case ("promote"): {
SETPVAR(_target,PayGrade,_paygrade)
};
case ("demote"): {
SETPVAR(_target,PayGrade,_paygrade)
};
};
["dummy"] call FUNC(adminRefresh);

View File

@ -0,0 +1,53 @@
#include "..\script_component.hpp"
params [["_condition", "", [""]], ["_amount", 0, [0]]];
private _newFunds = 0;
private _dialog = findDisplay 202303;
private _list = _dialog displayCtrl 2023001;
switch (_condition) do {
case ("deduct"): {
_newFunds = companyFunds - _amount;
ctrlSetText [2023002, format ["$%1", (_newFunds call EFUNC(misc,formatNumber))]];
};
case ("advance"): {
_newFunds = companyFunds + _amount;
ctrlSetText [2023002, format ["$%1", (_newFunds call EFUNC(misc,formatNumber))]];
};
default {
lbClear _list;
{
if (str (side _x) == str (playerSide)) then {
private _name = name (_x);
private _defaultPaygrade = "E1";
private _paygrade = GETVAR(_x,PayGrade,_defaultPaygrade);
private _index = _list lbAdd format["%1 - %2", _name, _paygrade];
_list lbSetData [_index, name (_x)];
};
} forEach playableUnits;
lbSetCurSel [2023001, 0];
ctrlSetText [2023005, ""];
ctrlSetText [2023006, ""];
};
};
lbClear _list;
{
if (str (side _x) == str (playerSide)) then {
private _name = name (_x);
private _defaultPaygrade = "E1";
private _paygrade = GETVAR(_x,PayGrade,_defaultPaygrade);
private _index = _list lbAdd format["%1 - %2", _name, _paygrade];
_list lbSetData [_index, name (_x)];
};
} forEach playableUnits;
lbSetCurSel [2023001, 0];
ctrlSetText [2023005, ""];
ctrlSetText [2023006, ""];

View File

@ -0,0 +1,92 @@
#include "..\script_component.hpp"
params [["_condition", "", [""]]];
private _dialog = findDisplay 202303;
private _list = _dialog displayCtrl 2023001;
private _targetValue = lbCurSel _list;
private _data = _list lbData _targetValue;
private _amount = round (parseNumber (ctrlText 2023005));
if ((isNil {_data})) exitWith { hint "You did not select a player!" };
{
if (str (name (_x)) == str _data) then {
private _target = _x;
};
} count playableUnits;
switch (_condition) do {
case ("advance"): {
private _bank = GETVAR(_target,FORGE_Bank,0);
private _newBalance = _bank + _amount;
if (_amount > companyFunds) exitWith { ["Not enough money in the company's account!", "warning", 3] call EFUNC(misc,notify) };
SETPVAR(_target,FORGE_Bank,_newBalance);
["deduct", _amount] call FUNC(adminRefresh);
["deduct", _amount] remoteExecCall ["forge_server_money_fnc_handleFunds", 2];
};
case ("advanceAll"): {
private _count = count playableUnits;
if ((10000 * _count) > companyFunds) exitWith { ["Not enough money in the company's account!", "warning", 3] call EFUNC(misc,notify) };
{
private _bank = GETVAR(_x,Cash_Bank,0);
private _newBalance = _bank + 10000;
SETPVAR(_x,Cash_Bank,_newBalance);
} count playableUnits;
["deduct", (10000 * _count)] call FUNC(adminRefresh);
["deduct", (10000 * _count)] remoteExecCall ["forge_server_money_fnc_handleFunds", 2];
};
case ("deduct"): {
private _bank = GETVAR(_target,FORGE_Bank,0);
private _newBalance = _bank - _amount;
if (_amount > _bank) exitWith { ["Not enough money in the player's account!", "warning", 3] call EFUNC(misc,notify) };
SETPVAR(_target,FORGE_Bank,_newBalance);
["advance", _amount] call FUNC(adminRefresh);
["advance", _amount] remoteExecCall ["forge_server_money_fnc_handleFunds", 2];
};
case ("payday"): {
private _totalPayment = 0;
private _paymentToDo = [];
private _payGrades = (missionConfigFile >> "FORGE_CfgPaygrades" >> "payGrades") call BIS_fnc_getCfgData;
{
private _player = _x;
private _payGrade = GETVAR(_player,PayGrade,nil);
{
_x params ["_payGradeIndex", "_payGradeBonus"];
if ((_x select 0) == _payGrade) then {
_paymentToDo pushBack [_player, _payGradeBonus];
_totalPayment = _totalPayment + _payGradeBonus;
};
} forEach _payGrades;
} count playableUnits;
if (_totalPayment > companyFunds) exitWith { ["Not enough money in the company's account!", "warning", 3] call EFUNC(misc,notify) };
{
_x params ["_player", "_bonus"];
private _bank = GETVAR(_player,FORGE_Bank,0);
private _newBalance = _bank + _bonus;
SETPVAR(_player,FORGE_Bank,_newBalance);
} count _paymentToDo;
["deduct", _totalPayment] call FUNC(adminRefresh);
["deduct", _totalPayment] remoteExecCall ["forge_server_money_fnc_handleFunds", 2];
};
};
ctrlSetText [2023005, ""];

View File

@ -0,0 +1,18 @@
#include "..\script_component.hpp"
{
private _configName = configName(_x);
private _className = (missionConfigFile >> "CfgCpofs" >> "cpofs" >> _configName >> "className") call BFUNC(getCfgData);
private _pos = (missionConfigFile >> "CfgCpofs" >> "cpofs" >> _configName >> "pos") call BFUNC(getCfgData);
private _dir = (missionConfigFile >> "CfgCpofs" >> "cpofs" >> _configName >> "dir") call BFUNC(getCfgData);
private _cpof = createSimpleObject [_className, [0, 0, 0]];
_cpof setPosATL _pos;
_cpof setDir _dir;
_cpof allowDamage false;
_cpof setVariable ["isCPOF", true, true];
diag_log text format ["[FORGE Admin] ClassName: '%1' Pos: '%2' Dir: '%3'", _className, _pos, _dir];
} forEach ("true" configClasses (missionConfigFile >> "CfgCpofs" >> "cpofs"));

View File

@ -0,0 +1,31 @@
#include "..\script_component.hpp"
disableSerialization;
createDialog "RscAdmin";
private _dialog = findDisplay 202303;
private _list = _dialog displayCtrl 2023001;
private _list2 = _dialog displayCtrl 2023003;
{
if (str (side _x) == str (playerSide)) then {
private _name = name (_x);
private _payGrade = GETVAR(_x,paygrade,nil);
private _index = _list lbAdd format["%1 - %2", _name, _payGrade];
_list lbSetData [_index, _name];
};
} count (allPlayers);
lbSetCurSel [2023001, 0];
private _payGrades = (missionConfigFile >> "FORGE_CfgPaygrades" >> "payGrades") call BFUNC(getCfgData);
{
private _index = _list2 lbAdd format ["%1 - $%2", (_x select 0), ((_x select 1) call EFUNC(misc,formatNumber))];
_list2 lbSetData [_index, str _x];
} forEach _payGrades;
lbSetCurSel [2023003, 0];
ctrlSetText [2023002, format ["$%1", (companyFunds call EFUNC(misc,formatNumber))]];

View File

@ -0,0 +1,3 @@
#include "..\script_component.hpp"
systemChat format ["Thank you for using the %1", 'ADDON'];

View File

@ -0,0 +1,16 @@
#define COMPONENT admin
#define COMPONENT_BEAUTIFIED Admin
#include "\z\forge_client\addons\main\script_mod.hpp"
// #define DEBUG_MODE_FULL
// #define DISABLE_COMPILE_CACHE
#ifdef DEBUG_ENABLED_ADMIN
#define DEBUG_MODE_FULL
#endif
#ifdef DEBUG_SETTINGS_ADMIN
#define DEBUG_SETTINGS DEBUG_SETTINGS_ADMIN
#endif
#include "\z\forge_client\addons\main\script_macros.hpp"

View File

@ -0,0 +1,190 @@
class RscAdmin {
idd = 202303;
class Controls {
class RscAdminFrame: RscText {
idc = -1;
colorBackground[] = {0,0.25,0.5,1};
colorText[] = {1,1,1,1};
text = "";
x = "0.25 * safezoneW + safezoneX";
y = "0.125 * safezoneH + safezoneY";
w = "0.5 * safezoneW";
h = "0.725 * safezoneH";
};
class RscAdminPage: RscText {
idc = -1;
colorBackground[] = {1,1,1,1};
colorText[] = {0,0,0,1};
text = "";
x = "0.25 * safezoneW + safezoneX";
y = "0.1575 * safezoneH + safezoneY";
w = "0.5 * safezoneW";
h = "0.6925 * safezoneH";
};
class RscAdminRefresh: RscButton {
idc = -1;
colorText[] = {1,1,1,1};
onButtonClick = "[""dummy""] call forge_client_admin_fnc_adminRefresh;";
soundClick[] = {"\A3\ui_f\data\sound\RscButton\soundClick",0.09,1};
text = "Refresh";
x = "0.38625 * safezoneW + safezoneX";
y = "0.2 * safezoneH + safezoneY";
w = "0.05 * safezoneW";
h = "0.0275 * safezoneH";
};
class RscAdminActive: RscText {
idc = -1;
colorBackground[] = {1,1,1,1};
colorText[] = {0,0,0,1};
text = "Active Operators: ";
sizeEx = 0.035;
x = "0.275 * safezoneW + safezoneX";
y = "0.1775 * safezoneH + safezoneY";
w = "0.1 * safezoneW";
h = "0.05 * safezoneH";
};
class RscAdminUserList: RscListBox {
idc = 2023001;
x = "0.275 * safezoneW + safezoneX";
y = "0.25 * safezoneH + safezoneY";
w = "0.16125 * safezoneW";
h = "0.555 * safezoneH";
colorBackground[] = {0,0,0,0.25};
tooltip = "Double Click to Activate an Operator Selection"; //--- ToDo: Localize;
};
class RscAdminCash: RscText {
idc = -1;
colorText[] = {0,0,0,1};
text = "Company Account Balance:";
sizeEx = 0.035;
x = "0.575 * safezoneW + safezoneX";
y = "0.2 * safezoneH + safezoneY";
w = "0.075 * safezoneW";
h = "0.05 * safezoneH";
};
class RscAdminCashSum: RscText {
idc = 2023002;
colorText[] = {0,0,0,1};
text = "";
sizeEx = 0.035;
x = "0.65 * safezoneW + safezoneX";
y = "0.2 * safezoneH + safezoneY";
w = "0.075 * safezoneW";
h = "0.05 * safezoneH";
};
class RscAdminRank: RscCombo {
idc = 2023003;
text = "SELECT RANK";
x = "0.575 * safezoneW + safezoneX";
y = "0.2775 * safezoneH + safezoneY";
w = "0.1 * safezoneW";
h = "0.0275 * safezoneH";
};
class RscAdminPromote: RscButton {
idc = -1;
colorText[] = {1,1,1,1};
onButtonClick = "['promote'] call forge_client_admin_fnc_adminPromote;";
soundClick[] = {"\A3\ui_f\data\sound\RscButton\soundClick",0.09,1};
text = "Promote";
x = "0.675 * safezoneW + safezoneX";
y = "0.2775 * safezoneH + safezoneY";
w = "0.05 * safezoneW";
h = "0.0275 * safezoneH";
tooltip = "Promote the player currently selected."; //--- ToDo: Localize;
};
class RscAdminVal1: RscEdit {
idc = 2023005;
colorText[] = {0,0,0,1};
text = "";
x = "0.45 * safezoneW + safezoneX";
y = "0.2 * safezoneH + safezoneY";
w = "0.1125 * safezoneW";
h = "0.0275 * safezoneH";
tooltip = "Enter a dollar amount here"; //--- ToDo: Localize;
};
class RscAdminAdvance: RscButton {
idc = -1;
colorText[] = {1,1,1,1};
onButtonClick = "['advance'] call forge_client_admin_fnc_adminTransfer;";
soundClick[] = {"\A3\ui_f\data\sound\RscButton\soundClick",0.09,1};
text = "Advance";
x = "0.45 * safezoneW + safezoneX";
y = "0.25 * safezoneH + safezoneY";
w = "0.05 * safezoneW";
h = "0.0275 * safezoneH";
tooltip = "Advance the amount in the box to the player currently selected."; //--- ToDo: Localize;
};
class RscAdminDeduct: RscButton {
idc = -1;
colorText[] = {1,1,1,1};
onButtonClick = "['deduct'] call forge_client_admin_fnc_adminTransfer;";
soundClick[] = {"\A3\ui_f\data\sound\RscButton\soundClick",0.09,1};
text = "Deduct";
x = "0.5125 * safezoneW + safezoneX";
y = "0.25 * safezoneH + safezoneY";
w = "0.05 * safezoneW";
h = "0.0275 * safezoneH";
tooltip = "Deduct the amount in the box to the player currently selected."; //--- ToDo: Localize;
};
class RscAdminAdvanceAll: RscButton {
idc = -1;
colorText[] = {1,1,1,1};
onButtonClick = "['advanceAll'] call forge_client_admin_fnc_adminTransfer;";
soundClick[] = {"\A3\ui_f\data\sound\RscButton\soundClick",0.09,1};
text = "$10K To All";
x = "0.45 * safezoneW + safezoneX";
y = "0.3 * safezoneH + safezoneY";
w = "0.05 * safezoneW";
h = "0.0275 * safezoneH";
tooltip = "Advance $10,000 to each connected player from the company budget."; //--- ToDo: Localize;
};
class RscAdminPayday: RscButton {
idc = -1;
colorText[] = {1,1,1,1};
onButtonClick = "['payday'] call forge_client_admin_fnc_adminTransfer;";
soundClick[] = {"\A3\ui_f\data\sound\RscButton\soundClick",0.09,1};
text = "Payday";
x = "0.5125 * safezoneW + safezoneX";
y = "0.3 * safezoneH + safezoneY";
w = "0.05 * safezoneW";
h = "0.0275 * safezoneH";
tooltip = "Players Payday."; //--- ToDo: Localize;
};
class RscAdminVal2: RscEdit {
idc = 2023006;
x = "0.45 * safezoneW + safezoneX";
y = "0.35 * safezoneH + safezoneY";
w = "0.275 * safezoneW";
h = "0.15 * safezoneH";
style = "0x10";
lineSpacing = 1;
tooltip = "Type a message here."; //--- ToDo: Localize;
};
class RscAdminSend: RscButton {
idc = -1;
colorText[] = {1,1,1,1};
onButtonClick = "[] call forge_client_admin_fnc_adminMessage;";
soundClick[] = {"\A3\ui_f\data\sound\RscButton\soundClick",0.09,1};
text = "Send Message";
x = "0.6125 * safezoneW + safezoneX";
y = "0.525 * safezoneH + safezoneY";
w = "0.1125 * safezoneW";
h = "0.0275 * safezoneH";
tooltip = "Select an operator from the list, type a message, and hit this button to send it, "; //--- ToDo: Localize;
};
class RscAdminExit: RscButton {
idc = -1;
colorBackground[] = {0.9,0,0,1};
colorBackgroundActive[] = {1,0,0,1};
colorFocused[] = {0.9,0,0,1};
colorText[] = {1,1,1,1};
onButtonClick = "closeDialog 0;";
soundClick[] = {"\A3\ui_f\data\sound\RscButton\soundClick",0.09,1};
text = "X";
x = "0.73 * safezoneW + safezoneX";
y = "0.125 * safezoneH + safezoneY";
w = "0.02 * safezoneW";
h = "0.0325 * safezoneH";
};
};
};

View File

@ -0,0 +1,268 @@
// Control types
#define CT_STATIC 0
#define CT_BUTTON 1
#define CT_EDIT 2
#define CT_SLIDER 3
#define CT_COMBO 4
#define CT_LISTBOX 5
#define CT_TOOLBOX 6
#define CT_CHECKBOXES 7
#define CT_PROGRESS 8
#define CT_HTML 9
#define CT_STATIC_SKEW 10
#define CT_ACTIVETEXT 11
#define CT_TREE 12
#define CT_STRUCTURED_TEXT 13
#define CT_CONTEXT_MENU 14
#define CT_CONTROLS_GROUP 15
#define CT_SHORTCUTBUTTON 16
#define CT_HITZONES 17
#define CT_XKEYDESC 40
#define CT_XBUTTON 41
#define CT_XLISTBOX 42
#define CT_XSLIDER 43
#define CT_XCOMBO 44
#define CT_ANIMATED_TEXTURE 45
#define CT_OBJECT 80
#define CT_OBJECT_ZOOM 81
#define CT_OBJECT_CONTAINER 82
#define CT_OBJECT_CONT_ANIM 83
#define CT_LINEBREAK 98
#define CT_USER 99
#define CT_MAP 100
#define CT_MAP_MAIN 101
#define CT_LISTNBOX 102
#define CT_ITEMSLOT 103
#define CT_CHECKBOX 77
// Static styles
#define ST_POS 0x0F
#define ST_HPOS 0x03
#define ST_VPOS 0x0C
#define ST_LEFT 0x00
#define ST_RIGHT 0x01
#define ST_CENTER 0x02
#define ST_DOWN 0x04
#define ST_UP 0x08
#define ST_VCENTER 0x0C
#define ST_TYPE 0xF0
#define ST_SINGLE 0x00
#define ST_MULTI 0x10
#define ST_TITLE_BAR 0x20
#define ST_PICTURE 0x30
#define ST_FRAME 0x40
#define ST_BACKGROUND 0x50
#define ST_GROUP_BOX 0x60
#define ST_GROUP_BOX2 0x70
#define ST_HUD_BACKGROUND 0x80
#define ST_TILE_PICTURE 0x90
#define ST_WITH_RECT 0xA0
#define ST_LINE 0xB0
#define ST_UPPERCASE 0xC0
#define ST_LOWERCASE 0xD0
#define ST_SHADOW 0x100
#define ST_NO_RECT 0x200
#define ST_KEEP_ASPECT_RATIO 0x800
// Slider styles
#define SL_DIR 0x400
#define SL_VERT 0
#define SL_HORZ 0x400
#define SL_TEXTURES 0x10
// progress bar
#define ST_VERTICAL 0x01
#define ST_HORIZONTAL 0
// Listbox styles
#define LB_TEXTURES 0x10
#define LB_MULTI 0x20
// Tree styles
#define TR_SHOWROOT 1
#define TR_AUTOCOLLAPSE 2
// Default grid
// #define GUI_GRID_WAbs ((safezoneW / safezoneH) min 1.2)
// #define GUI_GRID_HAbs (GUI_GRID_WAbs / 1.2)
// #define GUI_GRID_W (GUI_GRID_WAbs / 40)
// #define GUI_GRID_H (GUI_GRID_HAbs / 25)
// #define GUI_GRID_X (safezoneX)
// #define GUI_GRID_Y (safezoneY + safezoneH - GUI_GRID_HAbs)
// Default text sizes
#define GUI_TEXT_SIZE_SMALL (GUI_GRID_H * 0.8)
#define GUI_TEXT_SIZE_MEDIUM (GUI_GRID_H * 1)
#define GUI_TEXT_SIZE_LARGE (GUI_GRID_H * 1.2)
class ScrollBar;
class RscObject;
class RscText;
class RscTextSmall;
class RscTitle;
class RscProgress;
class RscProgressNotFreeze;
class RscPicture;
class RscLadderPicture;
class RscPictureKeepAspect;
class RscHTML;
class RscButton;
class RscShortcutButton;
class RscButtonSmall;
class RscEdit;
class RscCombo;
class RscListBox;
class RscListNBox;
class RscXListBox;
class RscTree;
class RscSlider;
class RscSliderH;
class RscXSliderH;
class RscActiveText;
class RscStructuredText;
class RscControlsGroup;
class RscToolbox;
class RscMapControl;
class RscCheckBox;
class RscFrame;
class ctrlDefault;
class ctrlControlsGroup;
class ctrlDefaultText;
class ctrlDefaultButton;
class RscBackgroundStripeTop;
class RscBackgroundStripeBottom;
class RscIGText;
class RscIGProgress;
class RscListBoxKeys;
class RscControlsGroupNoScrollbars;
class RscControlsGroupNoHScrollbars;
class RscControlsGroupNoVScrollbars;
class RscLine;
class RscActivePicture;
class RscButtonTextOnly;
class RscShortcutButtonMain;
class RscButtonEditor;
class RscIGUIShortcutButton;
class RscGearShortcutButton;
class RscButtonMenu;
class RscButtonMenuOK;
class RscButtonMenuCancel;
class RscButtonMenuSteam;
class RscLoadingText;
class RscIGUIListBox;
class RscIGUIListNBox;
class RscBackground;
class RscBackgroundGUI;
class RscBackgroundGUILeft;
class RscBackgroundGUIRight;
class RscBackgroundGUIBottom;
class RscBackgroundGUITop;
class RscBackgroundGUIDark;
class RscBackgroundLogo;
class RscMapControlEmpty;
class RscVignette;
class CA_Mainback;
class CA_Back;
class CA_Title_Back;
class CA_Black_Back;
class CA_Title;
class CA_Logo;
class CA_Logo_Small;
class CA_RscButton;
class CA_RscButton_dialog;
class CA_Ok;
class CA_Ok_image;
class CA_Ok_image2;
class CA_Ok_text;
class ctrlCheckbox;
class ctrlCheckboxBaseline;
class ctrlStatic;
class ctrlControlsGroupNoScrollbars;
class ctrlStructuredText;
class RscTextMulti;
class RscTreeSearch;
class RscVideo;
class RscVideoKeepAspect;
class RscActivePictureKeepAspect;
class RscEditMulti;
class RscMapSignalBackground;
class RscMapSignalPicture;
class RscMapSignalText;
class RscColorPicker;
class RscInterlacingScreen;
class RscFeedback;
class RscTrafficLight;
class RscButtonSearch;
class RscIGUIText;
class RscOpticsText;
class RscOpticsValue;
class RscIGUIValue;
class RscButtonMenuMain;
class RscButtonTestCentered;
class RscDisplaySingleMission_ChallengeOverviewGroup;
class RscDisplayDebriefing_RscTextMultiline;
class RscDisplayDebriefing_ListGroup;
class RscButtonArsenal;
class RscTextNoShadow;
class RscButtonNoColor;
class RscToolboxButton;
class ctrlStaticPicture;
class ctrlStaticPictureKeepAspect;
class ctrlStaticPictureTile;
class ctrlStaticFrame;
class ctrlStaticLine;
class ctrlStaticMulti;
class ctrlStaticBackground;
class ctrlStaticOverlay;
class ctrlStaticTitle;
class ctrlStaticFooter;
class ctrlStaticBackgroundDisable;
class ctrlStaticBackgroundDisableTiles;
class ctrlButton;
class ctrlButtonPicture;
class ctrlButtonPictureKeepAspect;
class ctrlButtonOK;
class ctrlButtonCancel;
class ctrlButtonClose;
class ctrlButtonToolbar;
class ctrlButtonSearch;
class ctrlButtonExpandAll;
class ctrlButtonCollapseAll;
class ctrlButtonFilter;
class ctrlEdit;
class ctrlEditMulti;
class ctrlSliderV;
class ctrlSliderH;
class ctrlCombo;
class ctrlComboToolbar;
class ctrlListbox;
class ctrlToolbox;
class ctrlToolboxPicture;
class ctrlToolboxPictureKeepAspect;
class ctrlCheckboxes;
class ctrlCheckboxesCheckbox;
class ctrlProgress;
class ctrlHTML;
class ctrlActiveText;
class ctrlActivePicture;
class ctrlActivePictureKeepAspect;
class ctrlTree;
class ctrlControlsGroupNoHScrollbars;
class ctrlControlsGroupNoVScrollbars;
class ctrlShortcutButton;
class ctrlShortcutButtonOK;
class ctrlShortcutButtonCancel;
class ctrlShortcutButtonSteam;
class ctrlXListbox;
class ctrlXSliderV;
class ctrlXSliderH;
class ctrlMenu;
class ctrlMenuStrip;
class ctrlMap;
class ctrlMapEmpty;
class ctrlMapMain;
class ctrlListNBox;
class ctrlCheckboxToolbar;

View File

@ -0,0 +1 @@
z\forge_client\addons\ambient

View File

@ -0,0 +1,19 @@
class Extended_PreStart_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_preStart));
};
};
class Extended_PreInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_preInit));
serverInit = QUOTE(call COMPILE_FILE(XEH_preInit_server));
};
};
class Extended_PostInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_postInit));
clientInit = QUOTE(call COMPILE_FILE(XEH_postInit_client));
};
};

View File

@ -0,0 +1 @@
PREP(ambientSound);

View File

@ -0,0 +1 @@
#include "script_component.hpp"

View File

@ -0,0 +1 @@
#include "script_component.hpp"

View File

@ -0,0 +1,8 @@
#include "script_component.hpp"
ADDON = false;
PREP_RECOMPILE_START;
#include "XEH_PREP.hpp"
PREP_RECOMPILE_END;
ADDON = true;

View File

@ -0,0 +1 @@
#include "script_component.hpp"

View File

@ -0,0 +1,2 @@
#include "script_component.hpp"
#include "XEH_PREP.hpp"

16
addons/ambient/config.cpp Normal file
View File

@ -0,0 +1,16 @@
#include "script_component.hpp"
class CfgPatches {
class ADDON {
name = COMPONENT_NAME;
units[] = {};
weapons[] = {};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"forge_client_main"};
authors[] = {"J. Schmidt", "Creedcoder"};
author = "IDSolutions";
VERSION_CONFIG;
};
};
#include "CfgEventHandlers.hpp"

View File

@ -0,0 +1,47 @@
#include "..\script_component.hpp"
/*
* Function: forge_client_ambient_fnc_ambientSound
* Author: J.Schmidt
* Edit: 07.15.2024
* Copyright © 2024 J.Schmidt, All rights reserved
*
* Do not edit without permission!
*
* This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivative 4.0 International License.
* To view a copy of this license, vist https://creativecommons.org/licenses/by-nc-nd/4.0/ or send a letter to Creative Commons,
* PO Box 1866, Mountain View, CA 94042
*
* [Description]
* Create a sound source and play an ambient sfx sound.
*
* Arguments:
* 0: The sound source <OBJECT>
* 1: The name of the SFX sound <STRING>
* 2: Number of seconds before SFX sound will be deleted <NUMBER>
*
* Return Value:
* N/A
*
* Examples:
* [this, "sfx_sound_name"] spawn forge_client_ambient_fnc_ambientSound
*
* Public: Yes
*/
params [["_source", nil, [objNull, 0, [], sideUnknown, grpNull, ""]], ["_sfx", "", [""]], ["_time", nil, [0]]];
private _sound0 = createSoundSource [_sfx, position _source, [], 0];
while { alive _source } do {
if (!isNil "_time") exitWith {
uiSleep _time;
deleteVehicle _sound0;
};
uiSleep 5;
if (!alive _source) exitWith {
deleteVehicle _sound0;
};
};

View File

@ -0,0 +1,16 @@
#define COMPONENT ambient
#define COMPONENT_BEAUTIFIED Ambient
#include "\z\forge_client\addons\main\script_mod.hpp"
// #define DEBUG_MODE_FULL
// #define DISABLE_COMPILE_CACHE
#ifdef DEBUG_ENABLED_AMBIENT
#define DEBUG_MODE_FULL
#endif
#ifdef DEBUG_SETTINGS_AMBIENT
#define DEBUG_SETTINGS DEBUG_SETTINGS_AMBIENT
#endif
#include "\z\forge_client\addons\main\script_macros.hpp"

View File

@ -0,0 +1 @@
z\forge_client\addons\arsenal

View File

@ -0,0 +1,19 @@
class Extended_PreStart_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_preStart));
};
};
class Extended_PreInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_preInit));
serverInit = QUOTE(call COMPILE_FILE(XEH_preInit_server));
};
};
class Extended_PostInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_postInit));
clientInit = QUOTE(call COMPILE_FILE(XEH_postInit_client));
};
};

View File

@ -0,0 +1,8 @@
PREP(addArmoryItem);
PREP(addGarageVehicle);
PREP(addVirtualVehicle);
PREP(initArsenal);
PREP(openArmory);
PREP(openGarage);
PREP(saveUnlocks);
PREP(updateUnlocks);

View File

@ -0,0 +1,10 @@
#include "script_component.hpp"
[{
GETVAR(player,value_loadDone,false)
}, {
private _armoryUnlocks = GETVAR(player,Armory_Unlocks,[]);
private _garageUnlocks = GETVAR(player,Garage_Unlocks,[]);
[_armoryUnlocks, _garageUnlocks] call FUNC(initArsenal);
}] call CFUNC(waitUntilAndExecute);

View File

@ -0,0 +1 @@
#include "script_component.hpp"

View File

@ -0,0 +1,11 @@
#include "script_component.hpp"
ADDON = false;
PREP_RECOMPILE_START;
#include "XEH_PREP.hpp"
PREP_RECOMPILE_END;
GVAR(armory_unlocks) = [];
GVAR(garage_unlocks) = [];
ADDON = true;

View File

@ -0,0 +1 @@
#include "script_component.hpp"

View File

@ -0,0 +1,2 @@
#include "script_component.hpp"
#include "XEH_PREP.hpp"

16
addons/arsenal/config.cpp Normal file
View File

@ -0,0 +1,16 @@
#include "script_component.hpp"
class CfgPatches {
class ADDON {
name = COMPONENT_NAME;
units[] = {};
weapons[] = {};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"forge_client_main"};
authors[] = {"J. Schmidt", "Creedcoder"};
author = "IDSolutions";
VERSION_CONFIG;
};
};
#include "CfgEventHandlers.hpp"

View File

@ -0,0 +1,30 @@
#include "..\script_component.hpp"
/*
* Author: IDSolutions
* Adds item to player's armory unlocks and updates virtual arsenal
*/
params [["_class","",[""]],["_type",0,[0]]];
private _default = [[],[],[],[]];
private _armory_unlocks = GETVAR(player,Armory_Unlocks,_default);
private _index = (_armory_unlocks select _type) pushBackUnique _class;
if (_index > -1) then {
SETVAR(player,Armory_Unlocks,_armory_unlocks);
if (GVAR(armory_type) == 0) then {
[GVAR(gear_box),[_class],false,true,1,_type] call BFUNC(addVirtualItemCargo);
} else {
[GVAR(gear_box),[_class]] call AFUNC(arsenal,addVirtualItems);
};
["armory",_armory_unlocks] call FUNC(updateUnlocks);
["armory"] call FUNC(saveUnlocks);
TRACE_2("Item added to armory",_class,_type);
true
} else {
false
};

View File

@ -0,0 +1,26 @@
#include "..\script_component.hpp"
/*
* Author: IDSolutions
* Adds vehicle to player's garage unlocks and updates virtual garage
*/
params [["_class","",[""]],["_type",0,[0]]];
private _default = [[],[],[],[],[],[]];
private _garage_unlocks = GETVAR(player,Garage_Unlocks,_default);
private _index = (_garage_unlocks select _type) pushBackUnique _class;
if (_index > -1) then {
SETVAR(player,Garage_Unlocks,_garage_unlocks);
[[_class]] call FUNC(addVirtualVehs);
["garage",_garage_unlocks] call FUNC(updateUnlocks);
["garage"] call FUNC(saveUnlocks);
TRACE_2("Vehicle added to garage",_class,_type);
true
} else {
false
};

View File

@ -0,0 +1,80 @@
#include "..\script_component.hpp"
/*
* Author: IDSolutions
* Adds vehicles to virtual garage and categorizes them by type
*
* Arguments:
* 0: Vehicles <ARRAY> - Array of vehicle classnames
*/
params [["_vehicles",[],[[]]]];
private _default = [[],[],[],[],[],[]];
private _garage_unlocks = GETVAR(player,Garage_Unlocks,_default);
private _cars = _garage_unlocks select 0;
private _armor = _garage_unlocks select 1;
private _helis = _garage_unlocks select 2;
private _planes = _garage_unlocks select 3;
private _naval = _garage_unlocks select 4;
private _static = _garage_unlocks select 5;
{
switch true do {
case (_x isKindOf "Car"): {
if ((_x isKindOf "Tank") || (_x isKindOf "Wheeled_APC_F")) exitWith {};
_cars pushBackUnique _x;
};
case (_x isKindOf "Tank"): {
_armor pushBackUnique _x;
};
case (_x isKindOf "Helicopter"): {
_helis pushBackUnique _x;
};
case (_x isKindOf "Plane"): {
_planes pushBackUnique _x;
};
case (_x isKindOf "Ship"): {
_naval pushBackUnique _x;
};
case (_x isKindOf "Static"): {
_static pushBackUnique _x;
};
};
} forEach _vehicles;
GVAR(car_unlocks) = [];
GVAR(armor_unlocks) = [];
GVAR(heli_unlocks) = [];
GVAR(plane_unlocks) = [];
GVAR(naval_unlocks) = [];
GVAR(static_unlocks) = [];
{
GVAR(car_unlocks) append [getText(configFile >> "CfgVehicles" >> _x >> "model"),[configFile >> "CfgVehicles" >> _x]];
} forEach _cars;
{
GVAR(armor_unlocks) append [getText(configFile >> "CfgVehicles" >> _x >> "model"),[configFile >> "CfgVehicles" >> _x]];
} forEach _armor;
{
GVAR(heli_unlocks) append [getText(configFile >> "CfgVehicles" >> _x >> "model"),[configFile >> "CfgVehicles" >> _x]];
} forEach _helis;
{
GVAR(plane_unlocks) append [getText(configFile >> "CfgVehicles" >> _x >> "model"),[configFile >> "CfgVehicles" >> _x]];
} forEach _planes;
{
GVAR(naval_unlocks) append [getText(configFile >> "CfgVehicles" >> _x >> "model"),[configFile >> "CfgVehicles" >> _x]];
} forEach _naval;
{
GVAR(static_unlocks) append [getText(configFile >> "CfgVehicles" >> _x >> "model"),[configFile >> "CfgVehicles" >> _x]];
} forEach _static;
["garage",_garage_unlocks] call FUNC(updateUnlocks);
TRACE_1("Virtual vehicles updated",count _vehicles);

View File

@ -0,0 +1,29 @@
#include "..\script_component.hpp"
params [["_armory_data", [[],[],[],[]], [[]]], ["_garage_data", [[],[],[],[],[],[]], [[]]]];
if (count _armory_data != 4) then { _armory_data = [[],[],[],[]] };
if (count _garage_data != 6) then { _garage_data = [[],[],[],[],[],[]] };
GVAR(gear_box) = "ReammoBox_F" createVehicleLocal [0, 0, -999];
[GVAR(gear_box), false, false] call AFUNC(arsenal,initBox);
GVAR(pdb_mode) = "PDB_MODE" call BFUNC(getParamValue);
GVAR(armory_type) = "ARS_TYPE" call BFUNC(getParamValue);
GVAR(armory_unlocks) = _armory_data;
GVAR(garage_unlocks) = _garage_data;
GVAR(item_unlocks) = _armory_data # 0;
GVAR(weapon_unlocks) = _armory_data # 1;
GVAR(magazine_unlocks) = _armory_data # 2;
GVAR(backpack_unlocks) = _armory_data # 3;
GVAR(car_unlocks) = _garage_data # 0;
GVAR(armor_unlocks) = _garage_data # 1;
GVAR(heli_unlocks) = _garage_data # 2;
GVAR(plane_unlocks) = _garage_data # 3;
GVAR(naval_unlocks) = _garage_data # 4;
GVAR(static_unlocks) = _garage_data # 5;
TRACE_2("Arsenal System Initialized with defaults",count GVAR(armory_unlocks),count GVAR(garage_unlocks));

View File

@ -0,0 +1,7 @@
#include "..\script_component.hpp"
if (GVAR(armory_type) == 0) then {
["Open", [false, GVAR(gear_box), player]] call BFUNC(arsenal);
} else {
[GVAR(gear_box), player, false] call AFUNC(arsenal,openBox);
};

View File

@ -0,0 +1,57 @@
#include "..\script_component.hpp"
_locations = (missionConfigFile >> "FORGE_CfgGarages" >> "locations") call BFUNC(getCfgData);
{
GVAR(vehSpawnPos) = (_x select 1) getPos [5, (_x select 2)];
} count _locations;
private _vehicleSpawn = createVehicle ["Land_HelipadEmpty_F", GVAR(vehSpawnPos), [], 0, "NONE"];
SETMVAR(BIS_fnc_garage_center,_vehicleSpawn);
[missionNamespace, "garageOpened", {
params ["_display", "_toggleSpace"];
private _vehicles = [GVAR(car_unlocks),GVAR(armor_unlocks),GVAR(heli_unlocks),GVAR(plane_unlocks),GVAR(naval_unlocks),GVAR(static_unlocks)];
SETMVAR(BIS_fnc_garage_data,_vehicles);
{
lbClear (_display displayCtrl (960 + _forEachIndex));
} forEach BIS_fnc_garage_data;
["ListAdd", [_display]] call BFUNC(garage);
}] call BFUNC(addScriptedEventHandler);
private _defaultVehicle = getText (configFile >> "CfgVehicles" >> "B_Quadbike_01_F" >> "model");
SETMVAR(BIS_fnc_garage_centerType,_defaultVehicle);
["Open", true] call BFUNC(garage);
[missionNamespace, "garageClosed", {
private _nearestObjects = BIS_fnc_garage_center nearEntities [["Car","Tank","Air","Ship"], 15];
if (!isNil "_nearestObjects") then {
_obj = _nearestObjects select 0;
_veh = typeOf _obj;
_textures = getObjectTextures _obj;
_animationNames = animationNames _obj;
{ deleteVehicle _x } forEach _nearestObjects;
_createVehicle = createVehicle [_veh, GVAR(vehSpawnPos), [], 0, "CAN_COLLIDE"];
_createVehicle setVariable ["FORGE_GarageVehicle", true, true];
if (count _textures > 0) then {
_count = 0;
{
_createVehicle setObjectTextureGlobal [_count, _x];
_count = _count + 1;
} forEach _textures;
};
if (count _animationNames > 0) then {
_animationPhase = [];
for "_i" from 0 to count _animationNames -1 do {
_animationPhase pushBack [_animationNames select _i, _obj animationPhase (_animationNames select _i)];
{ _createVehicle animate _x; } forEach _animationPhase;
};
};
};
}] call BFUNC(addScriptedEventHandler);

View File

@ -0,0 +1,60 @@
#include "..\script_component.hpp"
/*
* Author: IDSolutions
* Saves arsenal/garage unlocks to appropriate storage based on persistence mode
*
* Arguments:
* 0: Type <STRING> ("armory" or "garage")
*
* Return Value:
* None
*
* Example:
* ["armory"] call forge_client_arsenal_fnc_saveArsenalUnlocks
*/
params [["_type","",[""]],["_data",[],[[]]]];
private _default_armory_unlocks = [[],[],[],[]];
private _default_garage_unlocks = [[],[],[],[],[],[]];
switch (_type) do {
case "armory": {
private _armory_data = GETVAR(player,Armory_Unlocks,_default_armory_unlocks);
switch (GVAR(pdb_mode)) do {
case 0: {
SETVAR(profileNamespace,Armory_Unlocks,_armory_data);
};
case 1: {
["hsetid",getPlayerUID player,"armory_unlocks",-1,_armory_data,"",false] remoteExec ["dragonfly_db_fnc_addTask",2,false];
};
default {
SETVAR(profileNamespace,Armory_Unlocks,_armory_data);
};
};
[_type,_armory_data] call FUNC(updateUnlocks);
};
case "garage": {
private _garage_data = GETVAR(player,Garage_Unlocks,_default_garage_unlocks);
switch (GVAR(pdb_mode)) do {
case 0: {
SETVAR(profileNamespace,Garage_Unlocks,_garage_data);
};
case 1: {
["hsetid",getPlayerUID player,"garage_unlocks",-1,_garage_data,"",false] remoteExec ["dragonfly_db_fnc_addTask",2,false];
};
default {
SETVAR(profileNamespace,Garage_Unlocks,_garage_data);
};
};
[_type,_garage_data] call FUNC(updateUnlocks);
};
};
TRACE_2("Arsenal Unlocks saved",_type,GVAR(pdb_mode));

View File

@ -0,0 +1,41 @@
#include "..\script_component.hpp"
/*
* Author: IDSolutions
* Updates the arsenal system variables when unlocks change
*
* Arguments:
* 0: Type <STRING> ("armory" or "garage")
* 1: Data <ARRAY> (Array of unlocks)
*
* Example:
* ["armory", _armory_unlocks] call forge_client_arsenal_fnc_updateUnlocks
*/
params [["_type","",[""]],["_data",[],[[]]]];
switch (_type) do {
case "armory": {
GVAR(armory_unlocks) = _data;
GVAR(item_unlocks) = _data select 0;
GVAR(weapon_unlocks) = _data select 1;
GVAR(magazine_unlocks) = _data select 2;
GVAR(backpack_unlocks) = _data select 3;
TRACE_1("Armory unlocks updated",count GVAR(armory_unlocks));
};
case "garage": {
GVAR(garage_unlocks) = _data;
GVAR(car_unlocks) = _data select 0;
GVAR(armor_unlocks) = _data select 1;
GVAR(heli_unlocks) = _data select 2;
GVAR(plane_unlocks) = _data select 3;
GVAR(naval_unlocks) = _data select 4;
GVAR(static_unlocks) = _data select 5;
TRACE_1("Garage unlocks updated",count GVAR(garage_unlocks));
};
};

View File

@ -0,0 +1,16 @@
#define COMPONENT arsenal
#define COMPONENT_BEAUTIFIED Arsenal
#include "\z\forge_client\addons\main\script_mod.hpp"
// #define DEBUG_MODE_FULL
// #define DISABLE_COMPILE_CACHE
#ifdef DEBUG_ENABLED_ARSENAL
#define DEBUG_MODE_FULL
#endif
#ifdef DEBUG_SETTINGS_ARSENAL
#define DEBUG_SETTINGS DEBUG_SETTINGS_ARSENAL
#endif
#include "\z\forge_client\addons\main\script_macros.hpp"

1
addons/bank/$PBOPREFIX$ Normal file
View File

@ -0,0 +1 @@
z\forge_client\addons\bank

View File

@ -0,0 +1,19 @@
class Extended_PreStart_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_preStart));
};
};
class Extended_PreInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_preInit));
serverInit = QUOTE(call COMPILE_FILE(XEH_preInit_server));
};
};
class Extended_PostInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_postInit));
clientInit = QUOTE(call COMPILE_FILE(XEH_postInit_client));
};
};

7
addons/bank/XEH_PREP.hpp Normal file
View File

@ -0,0 +1,7 @@
PREP(deposit);
PREP(initBank);
PREP(openBank);
PREP(refresh);
PREP(submit);
PREP(transfer);
PREP(withdraw);

View File

@ -0,0 +1 @@
#include "script_component.hpp"

View File

@ -0,0 +1 @@
#include "script_component.hpp"

View File

@ -0,0 +1,8 @@
#include "script_component.hpp"
ADDON = false;
PREP_RECOMPILE_START;
#include "XEH_PREP.hpp"
PREP_RECOMPILE_END;
ADDON = true;

View File

@ -0,0 +1 @@
#include "script_component.hpp"

View File

@ -0,0 +1,2 @@
#include "script_component.hpp"
#include "XEH_PREP.hpp"

18
addons/bank/config.cpp Normal file
View File

@ -0,0 +1,18 @@
#include "script_component.hpp"
class CfgPatches {
class ADDON {
name = COMPONENT_NAME;
units[] = {};
weapons[] = {};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"forge_client_main"};
authors[] = {"J. Schmidt", "Creedcoder"};
author = "IDSolutions";
VERSION_CONFIG;
};
};
#include "CfgEventHandlers.hpp"
#include "ui\BaseControls.hpp"
#include "ui\RscBankDialog.hpp"

View File

@ -0,0 +1,25 @@
#include "..\script_component.hpp"
private _amount = parseNumber (ctrlText IDC_AMOUNTINPUT);
// private _bank = player getVariable ["FORGE_Bank", 0];
// private _cash = player getVariable ["FORGE_Cash", 0];
private _bank = GETVAR(player,FORGE_Bank,0);
private _cash = GETVAR(player,FORGE_Cash,0);
if (_amount > 0 && _amount <= _cash) then {
_cash = _cash - _amount;
_bank = _bank + _amount;
// player setVariable ["FORGE_Bank", _bank];
// player setVariable ["FORGE_Cash", _cash];
SETPVAR(player,FORGE_Bank,_bank);
SETPVAR(player,FORGE_Cash,_cash);
// [] call forge_client_bank_fnc_refresh;
[] call FUNC(refresh);
hint "Money deposited successfully";
} else {
hint "Invalid amount";
};

View File

@ -0,0 +1,30 @@
#include "..\script_component.hpp"
{
private _configName = configName(_x);
private _className = (missionConfigFile >> "CfgBanks" >> "banks" >> _configName >> "className") call BFUNC(getCfgData);
private _pos = (missionConfigFile >> "CfgBanks" >> "banks" >> _configName >> "pos") call BFUNC(getCfgData);
private _dir = (missionConfigFile >> "CfgBanks" >> "banks" >> _configName >> "dir") call BFUNC(getCfgData);
private _type = (missionConfigFile >> "CfgBanks" >> "banks" >> _configName >> "type") call BFUNC(getCfgData);
if (_type == "object") then {
private _bank = createSimpleObject [_className, [0, 0, 0]];
_bank setPosATL _pos;
_bank setDir _dir;
_bank allowDamage false;
_bank setVariable ["isBank", true, true];
} else {
private _group = createGroup civilian;
private _bank = _group createUnit [_className, [0, 0, 0], [], 0, "NONE"];
_bank disableAI "MOVE";
_bank setPosATL _pos;
_bank setDir _dir;
_bank allowDamage false;
_bank setVariable ["isBank", true, true];
_bank setVariable ["BIS_enableRandomization", false];
};
diag_log text format ["[FORGE Bank] ClassName: '%1' Pos: '%2' Dir: '%3'", _className, _pos, _dir];
} forEach ("true" configClasses (missionConfigFile >> "CfgBanks" >> "banks"));

View File

@ -0,0 +1,24 @@
#include "..\script_component.hpp"
// private _bank = player getVariable ["FORGE_Bank", 0];
// private _cash = player getVariable ["FORGE_Cash", 0];
// private _rating = player getVariable ["FORGE_Rating", 0];
private _bank = GETVAR(player,FORGE_Bank,0);
private _cash = GETVAR(player,FORGE_Cash,0);
private _rating = GETVAR(player,FORGE_Rating,0);
disableSerialization;
createDialog "RscBankDialog";
ctrlSetText [IDC_CASHTEXT, format ["Cash: $%1", _cash]];
ctrlSetText [IDC_BANKTEXT, format ["Bank: $%1", _bank]];
ctrlSetText [IDC_RATINGTEXT, format ["Rating: %1", _rating]];
ctrlSetText [IDC_TIMESHEETTEXT, "Ready for Timesheet"];
{
lbAdd [IDC_PLAYERINPUT, name _x];
lbSetData [IDC_PLAYERINPUT, _forEachIndex, netId _x];
} forEach allPlayers;
lbSetCurSel [IDC_PLAYERINPUT, 0];
ctrlSetText [IDC_AMOUNTINPUT, ""];

View File

@ -0,0 +1,17 @@
#include "..\script_component.hpp"
// private _bank = player getVariable ["FORGE_Bank", 0];
// private _cash = player getVariable ["FORGE_Cash", 0];
// private _rating = player getVariable ["FORGE_Rating", 0];
private _bank = GETVAR(player,FORGE_Bank,0);
private _cash = GETVAR(player,FORGE_Cash,0);
private _rating = GETVAR(player,FORGE_Rating,0);
if (!isNull (findDisplay IDD_BANKDIALOG)) then {
ctrlSetText [IDC_CASHTEXT, format ["Cash: $%1", _cash]];
ctrlSetText [IDC_BANKTEXT, format ["Bank: $%1", _bank]];
ctrlSetText [IDC_RATINGTEXT, format ["Rating: %1", _rating]];
ctrlSetText [IDC_TIMESHEETTEXT, "Ready for Timesheet"];
ctrlSetText [IDC_AMOUNTINPUT, ""];
ctrlSetText [IDC_PLAYERINPUT, ""];
};

View File

@ -0,0 +1,22 @@
#include "..\script_component.hpp"
// private _bank = player getVariable ["FORGE_Bank", 0];
// private _rating = player getVariable ["FORGE_Rating", 0];
private _bank = GETVAR(player,FORGE_Bank,0);
private _rating = GETVAR(player,FORGE_Rating,0);
private _pending = rating player;
_rating = _rating + _pending;
_bank = _bank + _rating;
player addRating - _pending;
// player setVariable ["FORGE_Bank", _bank];
// player setVariable ["FORGE_Rating", 0];
SETPVAR(player,FORGE_Bank,_bank);
SETPVAR(player,FORGE_Rating,0);
// [] call forge_client_bank_fnc_refresh;
[] call FUNC(refresh);
// hint format ["Timesheet submitted! Received $%1 bonus based on rating of %2", _rating, _rating];
[format ["Timesheet submitted! Received $%1 based on rating of %2", _rating, _rating], "info", 3, "right"] call EFUNC(misc,notify);

View File

@ -0,0 +1,32 @@
#include "..\script_component.hpp"
private _display = findDisplay IDD_BANKDIALOG;
private _input = _display displayCtrl IDC_AMOUNTINPUT;
private _dropdown = _display displayCtrl IDC_PLAYERINPUT;
private _amount = parseNumber (ctrlText _input);
private _selectedTarget = lbCurSel _dropdown;
private _selectedTargetData = _dropdown lbData _selectedTarget;
private _target = objectFromNetId _selectedTargetData;
// private _bank = player getVariable ["FORGE_Bank", 0];
// private _targetBank = _target getVariable ["FORGE_Bank", 0];
private _bank = GETVAR(player,FORGE_Bank,0);
private _targetBank = GETVAR(_target,FORGE_Bank,0);
if (!isNull _target && _amount > 0 && _amount <= _bank) then {
_targetBank = _targetBank + _amount;
// _target setVariable ["FORGE_Bank", _targetBank, true];
SETPVAR(_target,FORGE_Bank,_targetBank);
_bank = _bank - _amount;
// player setVariable ["FORGE_Bank", _bank, true];
SETPVAR(player,FORGE_Bank,_bank);
// [] call forge_client_bank_fnc_refresh;
[] call FUNC(refresh);
// hint format ["Transferred $%1", _amount];
[format ["Transferred $%1", _amount], "info", 3, "right"] call EFUNC(misc,notify);
} else {
// hint "Invalid transfer details";
[format ["Invalid transfer details"], "warning", 3, "right"] call EFUNC(misc,notify);
};

View File

@ -0,0 +1,28 @@
#include "..\script_component.hpp"
private _display = findDisplay IDD_BANKDIALOG;
private _input = _display displayCtrl IDC_AMOUNTINPUT;
private _amount = parseNumber (ctrlText _input);
// private _bank = player getVariable ["FORGE_Bank", 0];
// private _cash = player getVariable ["FORGE_Cash", 0];
private _bank = GETVAR(player,FORGE_Bank,0);
private _cash = GETVAR(player,FORGE_Cash,0);
if (_amount > 0 && _amount <= _bank) then {
_bank = _bank - _amount;
_cash = _cash + _amount;
// player setVariable ["FORGE_Bank", _bank];
// player setVariable ["FORGE_Cash", _cash];
SETPVAR(player,FORGE_Bank,_bank);
SETPVAR(player,FORGE_Cash,_cash);
// [] call forge_client_bank_fnc_refresh;
[] call FUNC(refresh);
// hint "Money withdrawn successfully";
[format ["Money withdrawn successfully"], "info", 3, "right"] call EFUNC(misc,notify);
} else {
// hint "Invalid amount";
[format ["Invalid amount"], "warning", 3, "right"] call EFUNC(misc,notify);
};

View File

@ -0,0 +1,35 @@
#define COMPONENT bank
#define COMPONENT_BEAUTIFIED Bank
#include "\z\forge_client\addons\main\script_mod.hpp"
// #define DEBUG_MODE_FULL
// #define DISABLE_COMPILE_CACHE
#ifdef DEBUG_ENABLED_BANK
#define DEBUG_MODE_FULL
#endif
#ifdef DEBUG_SETTINGS_BANK
#define DEBUG_SETTINGS DEBUG_SETTINGS_BANK
#endif
#include "\z\forge_client\addons\main\script_macros.hpp"
#define IDD_BANKDIALOG 82300
#define IDC_DIALOGNAME 82301
#define IDC_ACCOUNTINFO 82302
#define IDC_AMOUNTLABEL 82303
#define IDC_AMOUNTINPUT 82304
#define IDC_PLAYERLABEL 82305
#define IDC_PLAYERINPUT 82306
#define IDC_DEPOSITBUTTON 82307
#define IDC_WITHDRAWBUTTON 82308
#define IDC_TIMESHEETBUTTON 82309
#define IDC_TRANSFERBUTTON 82310
#define IDC_CLOSEBUTTON 82311
#define IDC_WALLETGROUP 82312
#define IDC_CASHTEXT 82313
#define IDC_BANKTEXT 82314
#define IDC_RATINGGROUP 82315
#define IDC_RATINGTEXT 82316
#define IDC_TIMESHEETTEXT 82317

View File

@ -0,0 +1,35 @@
<?xml version="1.0" encoding="utf-8"?>
<Project name="forge_client">
<Package name="Bank">
<Key ID="STR_forge_client_bank_Amount">
<English>Amount</English>
</Key>
<Key ID="STR_forge_client_bank_Close">
<English>Close</English>
</Key>
<Key ID="STR_forge_client_bank_Deposit">
<English>Deposit</English>
</Key>
<Key ID="STR_forge_client_bank_Name">
<English>Bank</English>
</Key>
<Key ID="STR_forge_client_bank_Player">
<English>Player</English>
</Key>
<Key ID="STR_forge_client_bank_Rating">
<English>Rating</English>
</Key>
<Key ID="STR_forge_client_bank_SubmitTimesheet">
<English>Submit Timesheet</English>
</Key>
<Key ID="STR_forge_client_bank_Transfer">
<English>Transfer</English>
</Key>
<Key ID="STR_forge_client_bank_Wallet">
<English>Net Worth</English>
</Key>
<Key ID="STR_forge_client_bank_Withdraw">
<English>Withdraw</English>
</Key>
</Package>
</Project>

View File

@ -0,0 +1,265 @@
// Control types
#define CT_STATIC 0
#define CT_BUTTON 1
#define CT_EDIT 2
#define CT_SLIDER 3
#define CT_COMBO 4
#define CT_LISTBOX 5
#define CT_TOOLBOX 6
#define CT_CHECKBOXES 7
#define CT_PROGRESS 8
#define CT_HTML 9
#define CT_STATIC_SKEW 10
#define CT_ACTIVETEXT 11
#define CT_TREE 12
#define CT_STRUCTURED_TEXT 13
#define CT_CONTEXT_MENU 14
#define CT_CONTROLS_GROUP 15
#define CT_SHORTCUTBUTTON 16
#define CT_HITZONES 17
#define CT_XKEYDESC 40
#define CT_XBUTTON 41
#define CT_XLISTBOX 42
#define CT_XSLIDER 43
#define CT_XCOMBO 44
#define CT_ANIMATED_TEXTURE 45
#define CT_OBJECT 80
#define CT_OBJECT_ZOOM 81
#define CT_OBJECT_CONTAINER 82
#define CT_OBJECT_CONT_ANIM 83
#define CT_LINEBREAK 98
#define CT_USER 99
#define CT_MAP 100
#define CT_MAP_MAIN 101
#define CT_LISTNBOX 102
#define CT_ITEMSLOT 103
#define CT_CHECKBOX 77
// Static styles
#define ST_POS 0x0F
#define ST_HPOS 0x03
#define ST_VPOS 0x0C
#define ST_LEFT 0x00
#define ST_RIGHT 0x01
#define ST_CENTER 0x02
#define ST_DOWN 0x04
#define ST_UP 0x08
#define ST_VCENTER 0x0C
#define ST_TYPE 0xF0
#define ST_SINGLE 0x00
#define ST_MULTI 0x10
#define ST_TITLE_BAR 0x20
#define ST_PICTURE 0x30
#define ST_FRAME 0x40
#define ST_BACKGROUND 0x50
#define ST_GROUP_BOX 0x60
#define ST_GROUP_BOX2 0x70
#define ST_HUD_BACKGROUND 0x80
#define ST_TILE_PICTURE 0x90
#define ST_WITH_RECT 0xA0
#define ST_LINE 0xB0
#define ST_UPPERCASE 0xC0
#define ST_LOWERCASE 0xD0
#define ST_SHADOW 0x100
#define ST_NO_RECT 0x200
#define ST_KEEP_ASPECT_RATIO 0x800
// Slider styles
#define SL_DIR 0x400
#define SL_VERT 0
#define SL_HORZ 0x400
#define SL_TEXTURES 0x10
// progress bar
#define ST_VERTICAL 0x01
#define ST_HORIZONTAL 0
// Listbox styles
#define LB_TEXTURES 0x10
#define LB_MULTI 0x20
// Tree styles
#define TR_SHOWROOT 1
#define TR_AUTOCOLLAPSE 2
// Default text sizes
#define GUI_TEXT_SIZE_SMALL (GUI_GRID_H * 0.8)
#define GUI_TEXT_SIZE_MEDIUM (GUI_GRID_H * 1)
#define GUI_TEXT_SIZE_LARGE (GUI_GRID_H * 1.2)
// Pixel grid
#define pixelScale 0.50
#define GRID_W (pixelW * pixelGrid * pixelScale)
#define GRID_H (pixelH * pixelGrid * pixelScale)
class ScrollBar;
class RscObject;
class RscText;
class RscTextSmall;
class RscTitle;
class RscProgress;
class RscProgressNotFreeze;
class RscPicture;
class RscLadderPicture;
class RscPictureKeepAspect;
class RscHTML;
class RscButton;
class RscShortcutButton;
class RscButtonSmall;
class RscEdit;
class RscCombo;
class RscListBox;
class RscListNBox;
class RscXListBox;
class RscTree;
class RscSlider;
class RscSliderH;
class RscXSliderH;
class RscActiveText;
class RscStructuredText;
class RscControlsGroup;
class RscToolbox;
class RscMapControl;
class RscCheckBox;
class RscFrame;
class ctrlDefault;
class ctrlControlsGroup;
class ctrlDefaultText;
class ctrlDefaultButton;
class RscBackgroundStripeTop;
class RscBackgroundStripeBottom;
class RscIGText;
class RscIGProgress;
class RscListBoxKeys;
class RscControlsGroupNoScrollbars;
class RscControlsGroupNoHScrollbars;
class RscControlsGroupNoVScrollbars;
class RscLine;
class RscActivePicture;
class RscButtonTextOnly;
class RscShortcutButtonMain;
class RscButtonEditor;
class RscIGUIShortcutButton;
class RscGearShortcutButton;
class RscButtonMenu;
class RscButtonMenuOK;
class RscButtonMenuCancel;
class RscButtonMenuSteam;
class RscLoadingText;
class RscIGUIListBox;
class RscIGUIListNBox;
class RscBackground;
class RscBackgroundGUI;
class RscBackgroundGUILeft;
class RscBackgroundGUIRight;
class RscBackgroundGUIBottom;
class RscBackgroundGUITop;
class RscBackgroundGUIDark;
class RscBackgroundLogo;
class RscMapControlEmpty;
class RscVignette;
class CA_Mainback;
class CA_Back;
class CA_Title_Back;
class CA_Black_Back;
class CA_Title;
class CA_Logo;
class CA_Logo_Small;
class CA_RscButton;
class CA_RscButton_dialog;
class CA_Ok;
class CA_Ok_image;
class CA_Ok_image2;
class CA_Ok_text;
class ctrlCheckbox;
class ctrlCheckboxBaseline;
class ctrlStatic;
class ctrlControlsGroupNoScrollbars;
class ctrlStructuredText;
class RscTextMulti;
class RscTreeSearch;
class RscVideo;
class RscVideoKeepAspect;
class RscActivePictureKeepAspect;
class RscEditMulti;
class RscMapSignalBackground;
class RscMapSignalPicture;
class RscMapSignalText;
class RscColorPicker;
class RscInterlacingScreen;
class RscFeedback;
class RscTrafficLight;
class RscButtonSearch;
class RscIGUIText;
class RscOpticsText;
class RscOpticsValue;
class RscIGUIValue;
class RscButtonMenuMain;
class RscButtonTestCentered;
class RscDisplaySingleMission_ChallengeOverviewGroup;
class RscDisplayDebriefing_RscTextMultiline;
class RscDisplayDebriefing_ListGroup;
class RscButtonArsenal;
class RscTextNoShadow;
class RscButtonNoColor;
class RscToolboxButton;
class ctrlStaticPicture;
class ctrlStaticPictureKeepAspect;
class ctrlStaticPictureTile;
class ctrlStaticFrame;
class ctrlStaticLine;
class ctrlStaticMulti;
class ctrlStaticBackground;
class ctrlStaticOverlay;
class ctrlStaticTitle;
class ctrlStaticFooter;
class ctrlStaticBackgroundDisable;
class ctrlStaticBackgroundDisableTiles;
class ctrlButton;
class ctrlButtonPicture;
class ctrlButtonPictureKeepAspect;
class ctrlButtonOK;
class ctrlButtonCancel;
class ctrlButtonClose;
class ctrlButtonToolbar;
class ctrlButtonSearch;
class ctrlButtonExpandAll;
class ctrlButtonCollapseAll;
class ctrlButtonFilter;
class ctrlEdit;
class ctrlEditMulti;
class ctrlSliderV;
class ctrlSliderH;
class ctrlCombo;
class ctrlComboToolbar;
class ctrlListbox;
class ctrlToolbox;
class ctrlToolboxPicture;
class ctrlToolboxPictureKeepAspect;
class ctrlCheckboxes;
class ctrlCheckboxesCheckbox;
class ctrlProgress;
class ctrlHTML;
class ctrlActiveText;
class ctrlActivePicture;
class ctrlActivePictureKeepAspect;
class ctrlTree;
class ctrlControlsGroupNoHScrollbars;
class ctrlControlsGroupNoVScrollbars;
class ctrlShortcutButton;
class ctrlShortcutButtonOK;
class ctrlShortcutButtonCancel;
class ctrlShortcutButtonSteam;
class ctrlXListbox;
class ctrlXSliderV;
class ctrlXSliderH;
class ctrlMenu;
class ctrlMenuStrip;
class ctrlMap;
class ctrlMapEmpty;
class ctrlMapMain;
class ctrlListNBox;
class ctrlCheckboxToolbar;

View File

@ -0,0 +1,200 @@
class RscBankDialog {
idd = IDD_BANKDIALOG;
movingEnable = 1;
enableSimulation = 1;
class controlsBackground {
class MainBackground: RscText {
idc = -1;
x = "0.25 * safezoneW + safezoneX";
y = "0.125 * safezoneH + safezoneY";
w = "0.5 * safezoneW";
h = "0.725 * safezoneH";
colorBackground[] = {0, 0, 0, 0.7};
};
class DialogTitle: RscText {
idc = IDC_DIALOGNAME;
text = CSTRING(Name);
x = "0.25 * safezoneW + safezoneX";
y = "0.125 * safezoneH + safezoneY";
w = "0.5 * safezoneW";
h = "0.0325 * safezoneH";
colorBackground[] = {0.1, 0.1, 0.1, 1};
};
};
class controls {
class WalletGroup: RscControlsGroup {
idc = IDC_WALLETGROUP;
x = "0.26 * safezoneW + safezoneX";
y = "0.17 * safezoneH + safezoneY";
w = "0.23 * safezoneW";
h = "0.15 * safezoneH";
class controls {
class WalletBackground: RscText {
idc = -1;
x = 0;
y = 0;
w = "0.23 * safezoneW";
h = "0.15 * safezoneH";
colorBackground[] = {0.1, 0.1, 0.1, 0.8};
};
class WalletTitle: RscText {
idc = -1;
text = CSTRING(Wallet);
x = 0;
y = 0;
w = "0.23 * safezoneW";
h = "0.0325 * safezoneH";
};
class CashText: RscText {
idc = IDC_CASHTEXT;
x = "0.01 * safezoneW";
y = "0.04 * safezoneH";
w = "0.21 * safezoneW";
h = "0.0325 * safezoneH";
};
class BankText: RscText {
idc = IDC_BANKTEXT;
x = "0.01 * safezoneW";
y = "0.08 * safezoneH";
w = "0.21 * safezoneW";
h = "0.0325 * safezoneH";
};
};
};
class RatingGroup: RscControlsGroup {
idc = IDC_RATINGGROUP;
x = "0.51 * safezoneW + safezoneX";
y = "0.17 * safezoneH + safezoneY";
w = "0.23 * safezoneW";
h = "0.15 * safezoneH";
class controls {
class RatingBackground: RscText {
idc = -1;
x = 0;
y = 0;
w = "0.23 * safezoneW";
h = "0.15 * safezoneH";
colorBackground[] = {0.1, 0.1, 0.1, 0.8};
};
class RatingTitle: RscText {
idc = -1;
text = CSTRING(Rating);
x = 0;
y = 0;
w = "0.23 * safezoneW";
h = "0.0325 * safezoneH";
};
class RatingText: RscText {
idc = IDC_RATINGTEXT;
x = "0.01 * safezoneW";
y = "0.04 * safezoneH";
w = "0.21 * safezoneW";
h = "0.0325 * safezoneH";
};
class TimesheetText: RscText {
idc = IDC_TIMESHEETTEXT;
x = "0.01 * safezoneW";
y = "0.08 * safezoneH";
w = "0.21 * safezoneW";
h = "0.0325 * safezoneH";
};
};
};
class AmountLabel: RscText {
idc = IDC_AMOUNTLABEL;
text = CSTRING(Amount);
x = "0.26 * safezoneW + safezoneX";
y = "0.31 * safezoneH + safezoneY";
w = "0.48 * safezoneW";
h = "0.0325 * safezoneH";
};
class AmountInput: RscEdit {
idc = IDC_AMOUNTINPUT;
x = "0.26 * safezoneW + safezoneX";
y = "0.34 * safezoneH + safezoneY";
w = "0.48 * safezoneW";
h = "0.0325 * safezoneH";
};
class PlayerLabel: RscText {
idc = IDC_PLAYERLABEL;
text = CSTRING(Player);
x = "0.26 * safezoneW + safezoneX";
y = "0.36 * safezoneH + safezoneY";
w = "0.48 * safezoneW";
h = "0.0325 * safezoneH";
};
class PlayerInput: RscCombo {
idc = IDC_PLAYERINPUT;
x = "0.26 * safezoneW + safezoneX";
y = "0.39 * safezoneH + safezoneY";
w = "0.48 * safezoneW";
h = "0.0325 * safezoneH";
};
class DepositButton: RscButton {
idc = IDC_DEPOSITBUTTON;
text = CSTRING(Deposit);
x = "0.26 * safezoneW + safezoneX";
y = "0.44 * safezoneH + safezoneY";
w = "0.23 * safezoneW";
h = "0.0325 * safezoneH";
onButtonClick = "_this call forge_client_bank_fnc_deposit";
};
class WithdrawButton: RscButton {
idc = IDC_WITHDRAWBUTTON;
text = CSTRING(Withdraw);
x = "0.51 * safezoneW + safezoneX";
y = "0.44 * safezoneH + safezoneY";
w = "0.23 * safezoneW";
h = "0.0325 * safezoneH";
onButtonClick = "_this call forge_client_bank_fnc_withdraw";
};
class TimesheetButton: RscButton {
idc = IDC_TIMESHEETBUTTON;
text = CSTRING(SubmitTimesheet);
x = "0.26 * safezoneW + safezoneX";
y = "0.49 * safezoneH + safezoneY";
w = "0.23 * safezoneW";
h = "0.0325 * safezoneH";
onButtonClick = "_this call forge_client_bank_fnc_submit";
};
class TransferButton: RscButton {
idc = IDC_TRANSFERBUTTON;
text = CSTRING(Transfer);
x = "0.51 * safezoneW + safezoneX";
y = "0.49 * safezoneH + safezoneY";
w = "0.23 * safezoneW";
h = "0.0325 * safezoneH";
onButtonClick = "_this call forge_client_bank_fnc_transfer";
};
class CloseButton: RscButton {
idc = IDC_CLOSEBUTTON;
text = "X";
x = "0.7225 * safezoneW + safezoneX";
y = "0.125 * safezoneH + safezoneY";
w = "0.0275 * safezoneW";
h = "0.0325 * safezoneH";
onButtonClick = "closeDialog 0";
};
};
};

View File

@ -0,0 +1 @@
z\forge_client\addons\briefing

View File

@ -0,0 +1,19 @@
class Extended_PreStart_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_preStart));
};
};
class Extended_PreInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_preInit));
serverInit = QUOTE(call COMPILE_FILE(XEH_preInit_server));
};
};
class Extended_PostInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_postInit));
clientInit = QUOTE(call COMPILE_FILE(XEH_postInit_client));
};
};

View File

@ -0,0 +1,7 @@
PREP(endSlideShow);
PREP(initSlideShow);
PREP(nextImage);
PREP(prevImage);
PREP(spawnLecture);
PREP(spawnPresentation);
PREP(startSlideShow);

View File

@ -0,0 +1 @@
#include "script_component.hpp"

View File

@ -0,0 +1 @@
#include "script_component.hpp"

View File

@ -0,0 +1,8 @@
#include "script_component.hpp"
ADDON = false;
PREP_RECOMPILE_START;
#include "XEH_PREP.hpp"
PREP_RECOMPILE_END;
ADDON = true;

View File

@ -0,0 +1 @@
#include "script_component.hpp"

View File

@ -0,0 +1,2 @@
#include "script_component.hpp"
#include "XEH_PREP.hpp"

View File

@ -0,0 +1,16 @@
#include "script_component.hpp"
class CfgPatches {
class ADDON {
name = COMPONENT_NAME;
units[] = {};
weapons[] = {};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"forge_client_main"};
authors[] = {"J. Schmidt", "Creedcoder"};
author = "IDSolutions";
VERSION_CONFIG;
};
};
#include "CfgEventHandlers.hpp"

View File

@ -0,0 +1,55 @@
#include "..\script_component.hpp"
/*
Author: PDT for J. Schmidt
ends the slide show
Arguments:
0: _controller <OBJECT> - object that controls the slide show
Return Value:
<BOOL> - true if the slide show was ended; false if not
*/
params [["_controller", objNull]];
if (isNull _controller) exitWith {
_return = false;
_return
};
private _controllers = _controller getVariable ["FORGE_SlideShow_Controllers", []];
private _currentIndex = 0;
private _images = _controller getVariable ["FORGE_SlideShow_Images", []];
private _screens = _controller getVariable ["FORGE_SlideShow_Screens", []];
if (_images isEqualTo []) exitWith {
_return = false;
_return
};
if (_screens isEqualTo []) exitWith {
_return = false;
_return
};
if (_controllers isEqualTo []) exitWith {
_return = false;
_return
};
{
_x setObjectTextureGlobal [0, ""];
true
} count (_screens);
{
_x setVariable ["FORGE_SlideShow_Images", _images, true];
_x setVariable ["FORGE_SlideShow_Screens", _screens, true];
_x setVariable ["FORGE_SlideShow_CurrentIndex", _currentIndex, true];
_x setVariable ["FORGE_SlideShow_Started", false, true];
true
} count (_controllers);
_return = true;
_return

View File

@ -0,0 +1,74 @@
#include "..\script_component.hpp"
/*
Author: PDT for J. Schmidt
sets up a slide show
Arguments:
0: _screen <ARRAY> - array of objects to display images on
1: _controllers <ARRAY> - array of objects to use are controlers
2: _images <ARRAY> - array of image paths; images should be powers of 2
3: _autoScroll <BOOL> - should the image auto-scroll
4: _units <ARRAY> - unit(s) that should speak
5: _topic <STRING> - conversation topic
6: _sentence <STRING> - conversation sentence, "" = play all
Return Value:
<BOOL> - true if slide show was setup; false if not
Example:
[Screen01, [Controler01], ["images/folder/image.paa"]] call forge_client_briefing_fnc_initSlideShow;
*/
params [["_screens", []], ["_controllers", []], ["_images", []], ["_autoScroll", false], ["_units", []], ["_topic", ""], ["_sentence", ""]];
if (_screens isEqualTo []) exitWith {
_return = false;
_return
};
if (_controllers isEqualTo []) exitWith {
_return = false;
_return
};
if (_images isEqualTo []) exitWith {
_return = false;
_return
};
{
_x setVariable ["FORGE_SlideShow_Images", _images, true];
_x setVariable ["FORGE_SlideShow_Screens", _screens, true];
_x setVariable ["FORGE_SlideShow_CurrentIndex", 0, true];
_x setVariable ["FORGE_SlideShow_Controllers", _controllers, true];
_x setVariable ["FORGE_SlideShow_AutoScroll", _autoScroll, true];
_x setVariable ["FORGE_SlideShow_Units", _units, true];
_x setVariable ["FORGE_SlideShow_Topic", _topic, true];
_x setVariable ["FORGE_SlideShow_Sentence", _sentence, true];
[_x, ["Start Slide Show", {
params ["_target", "_caller", "_actionId", "_arguments"];
_target setVariable ["FORGE_SlideShow_Started", true, true];
[_target] remoteExec ["forge_client_briefing_fnc_startSlideShow", 2, false];
}, nil, 1.5, true, true, "", "!(_target getVariable ['FORGE_SlideShow_Started', false])", 2.5, false, "", ""]] remoteExecCall ["addAction", 0, true];
[_x, ["Next Image", {
params ["_target", "_caller", "_actionId", "_arguments"];
[_target] remoteExecCall ["forge_client_briefing_fnc_nextImage", 2, false];
}, nil, 1.5, true, true, "", "_target getVariable ['FORGE_SlideShow_Started', false] && {!(_target getVariable ['FORGE_SlideShow_AutoScroll', false])}", 2.5, false, "", ""]] remoteExecCall ["addAction", 0, true];
[_x, ["Previous Image", {
params ["_target", "_caller", "_actionId", "_arguments"];
[_target] remoteExecCall ["forge_client_briefing_fnc_prevImage", 2, false];
}, nil, 1.5, true, true, "", "_target getVariable ['FORGE_SlideShow_Started', false] && {!(_target getVariable ['FORGE_SlideShow_AutoScroll', false])}", 2.5, false, "", ""]] remoteExecCall ["addAction", 0, true];
[_x, ["End Slide Show", {
params ["_target", "_caller", "_actionId", "_arguments"];
[_target] remoteExecCall ["forge_client_briefing_fnc_endSlideShow", 2, false];
}, nil, 1.5, true, true, "", "_target getVariable ['FORGE_SlideShow_Started', false]", 2.5, false, "", ""]] remoteExecCall ["addAction", 0, true];
true
} count (_controllers);
_return = true;
_return

View File

@ -0,0 +1,60 @@
#include "..\script_component.hpp"
/*
Author: PDT for J. Schmidt
displays the next image
Arguments:
0: _controller <OBJECT> - object that controls the slide show
Return Value:
<BOOL> - true if the next image was displayed; false if not
*/
params [["_controller", objNull]];
if (isNull _controller) exitWith {
_return = false;
_return
};
private _controllers = _controller getVariable ["FORGE_SlideShow_Controllers", []];
private _currentIndex = _controller getVariable ["FORGE_SlideShow_CurrentIndex", 0];
private _images = _controller getVariable ["FORGE_SlideShow_Images", []];
private _screens = _controller getVariable ["FORGE_SlideShow_Screens", []];
if (_images isEqualTo []) exitWith {
_return = false;
_return
};
if (_screens isEqualTo []) exitWith {
_return = false;
_return
};
if (_controllers isEqualTo []) exitWith {
_return = false;
_return
};
private _imageCount = (count _images) - 1;
if (_currentIndex isEqualTo _imageCount) then {
_currentIndex = 0;
} else {
_currentIndex = _currentIndex + 1;
};
{
_x setObjectTextureGlobal [0, (_images select _currentIndex) select 0];
true
} count (_screens);
{
_x setVariable ["FORGE_SlideShow_CurrentIndex", _currentIndex, true];
true
} count (_controllers);
_return = true;
_return

View File

@ -0,0 +1,60 @@
#include "..\script_component.hpp"
/*
Author: PDT for J. Schmidt
displays the previous image
Arguments:
0: _controller <OBJECT> - object that controls the slide show
Return Value:
<BOOL> - true if the previous image was displayed; false if not
*/
params [["_controller", objNull]];
if (isNull _controller) exitWith {
_return = false;
_return
};
private _controllers = _controller getVariable ["FORGE_SlideShow_Controllers", []];
private _currentIndex = _controller getVariable ["FORGE_SlideShow_CurrentIndex", 0];
private _images = _controller getVariable ["FORGE_SlideShow_Images", []];
private _screens = _controller getVariable ["FORGE_SlideShow_Screens", []];
if (_images isEqualTo []) exitWith {
_return = false;
_return
};
if (_screens isEqualTo []) exitWith {
_return = false;
_return
};
if (_controllers isEqualTo []) exitWith {
_return = false;
_return
};
private _imageCount = (count _images) - 1;
if (_currentIndex isEqualTo 0) then {
_currentIndex = 0;
} else {
_currentIndex = _currentIndex - 1;
};
{
_x setObjectTextureGlobal [0, (_images select _currentIndex) select 0];
true
} count (_screens);
{
_x setVariable ["FORGE_SlideShow_CurrentIndex", _currentIndex, true];
true
} count (_controllers);
_return = true;
_return

View File

@ -0,0 +1,40 @@
#include "..\script_component.hpp"
/*
Name: forge_client_briefing_fnc_spawnLecture
Date: 8/6/2022
Version: 1.0
Author: J. Schmidt
Description:
AI plays a given sentence/conversation.
Parameter(s):
0: Unit that is playing the given sentence/conversation. <OBJECT>
1: Topic that is being talked about. <STRING>
2: Sentence partaining to the topic at hand. <STRING>
*/
params ["_unit", "_topic", "_sentence"];
FORGE_Briefing_inProgress = true;
publicVariable "FORGE_Briefing_inProgress";
while { alive _unit } do {
_unit disableAI "ALL";
_unit switchMove " ";
_handle = [_topic, _sentence, nil, nil, nil, [_unit], 1, false] spawn BIS_fnc_kbTell;
if (!alive _unit) exitWith {
[_unit] spawn BIS_fnc_kbSkip;
FORGE_Briefing_inProgress = false;
publicVariable "FORGE_Briefing_inProgress";
};
uiSleep 5;
};
waitUntil { scriptDone _handle };
FORGE_Briefing_inProgress = false;
publicVariable "FORGE_Briefing_inProgress";

View File

@ -0,0 +1,26 @@
#include "..\script_component.hpp"
/*
Name: forge_client_briefing_fnc_spawnLecture
Date: 8/6/2022
Version: 1.0
Author: J. Schmidt
Description:
Object displays a slideshow presentation.
Parameter(s):
0: Object that will display the presentation. <OBJECT>
1: Slides that will be used for the presentation. <ARRAY>
1-0: Texture used for the Slide. <STRING>
1-1: Amount of Time the Slide will display. <NUMBER>
*/
params ["_object", "_slides"];
{
_x params ["_texture", "_delay"];
_object setObjectTextureGlobal [0, _texture];
uiSleep _delay;
true
} count (_slides);

View File

@ -0,0 +1,92 @@
#include "..\script_component.hpp"
/*
Author: PDT for J. Schmidt
starts the slideshow
Arguments:
0: _controller <OBJECT> - object that controls the slide show
Return Value:
<BOOL> - true if slide show was started
*/
params [["_controller", objNull], ["_units", []], ["_topic", ""], ["_sentence", ""]];
FORGE_Briefing_inProgress = true;
publicVariable "FORGE_Briefing_inProgress";
if (isNull _controller) exitWith {
_return = false;
_return
};
private _autoScroll = _controller getVariable ["FORGE_SlideShow_AutoScroll", false];
private _controllers = _controller getVariable ["FORGE_SlideShow_Controllers", []];
private _currentIndex = _controller getVariable ["FORGE_SlideShow_CurrentIndex", 0];
private _images = _controller getVariable ["FORGE_SlideShow_Images", []];
private _screens = _controller getVariable ["FORGE_SlideShow_Screens", []];
private _units = _controller getVariable ["FORGE_SlideShow_Units", []];
private _topic = _controller getVariable ["FORGE_SlideShow_Topic", ""];
private _sentence = _controller getVariable ["FORGE_SlideShow_Sentence", ""];
private _started = _controller getVariable ["FORGE_SlideShow_Started", true];
if (_images isEqualTo []) exitWith {
_return = false;
_return
};
if (_screens isEqualTo []) exitWith {
_return = false;
_return
};
if (_controllers isEqualTo []) exitWith {
_return = false;
_return
};
private _imageCount = (count _images) - 1;
if (_currentIndex isEqualTo _imageCount) then {
_currentIndex = 0;
};
_handle = [_topic, _sentence, nil, nil, nil, _units, 1, false] spawn BIS_fnc_kbTell;
{
_x setObjectTextureGlobal [0, (_images select _currentIndex) select 0];
true
} count (_screens);
{
_x setVariable ["FORGE_SlideShow_CurrentIndex", _currentIndex, true];
true
} count (_controllers);
if (_autoScroll) then {
{
private _index = _controller getVariable ["FORGE_SlideShow_CurrentIndex", 0];
private _image = _x select 0;
private _sleep = _x select 1;
{
_x setObjectTextureGlobal [0, _image];
true
} count (_screens);
_index = _index + 1;
_controller setVariable ["FORGE_SlideShow_CurrentIndex", _index, true];
uiSleep _sleep;
true
} count (_images);
};
waitUntil { scriptDone _handle };
FORGE_Briefing_inProgress = false;
publicVariable "FORGE_Briefing_inProgress";
_return = true;
_return

View File

@ -0,0 +1,16 @@
#define COMPONENT briefing
#define COMPONENT_BEAUTIFIED Briefing
#include "\z\forge_client\addons\main\script_mod.hpp"
// #define DEBUG_MODE_FULL
// #define DISABLE_COMPILE_CACHE
#ifdef DEBUG_ENABLED_BRIEFING
#define DEBUG_MODE_FULL
#endif
#ifdef DEBUG_SETTINGS_BRIEFING
#define DEBUG_SETTINGS DEBUG_SETTINGS_BRIEFING
#endif
#include "\z\forge_client\addons\main\script_macros.hpp"

1
addons/db/$PBOPREFIX$ Normal file
View File

@ -0,0 +1 @@
z\forge_client\addons\db

View File

@ -0,0 +1,19 @@
class Extended_PreStart_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_preStart));
};
};
class Extended_PreInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_preInit));
serverInit = QUOTE(call COMPILE_FILE(XEH_preInit_server));
};
};
class Extended_PostInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_postInit));
clientInit = QUOTE(call COMPILE_FILE(XEH_postInit_client));
};
};

3
addons/db/XEH_PREP.hpp Normal file
View File

@ -0,0 +1,3 @@
PREP(saveToMission);
PREP(saveToProfile);
PREP(saveToTempDB);

View File

@ -0,0 +1,3 @@
#include "script_component.hpp"
GVAR(tempDB) = [];

View File

@ -0,0 +1 @@
#include "script_component.hpp"

Some files were not shown because too many files have changed in this diff Show More