Skip to content

Commit

Permalink
Exp rainbow color (#7)
Browse files Browse the repository at this point in the history
* Updates libs to BSQ 1.17.1. Fixed rainbow effect. Modified presets.

* Updated workflow, versioning system, readme, and package description.

* fix error echo not supported in powershell workflow

* Fix 2

* Fix 3

* Fix 4

* fix 5

* New generic Action workflow, Build and Android.mk

* Updated readme

* Fix readme typo

Co-authored-by: Marcus Zhou <[email protected]>
  • Loading branch information
okibcn and SuperMarcus authored Nov 18, 2021
1 parent 5a182a9 commit efba278
Show file tree
Hide file tree
Showing 24 changed files with 659 additions and 364 deletions.
131 changes: 106 additions & 25 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,33 @@
name: Nightly build
on: [ push, pull_request ]

# set env (global) variables
env:
ndkname: android-ndk-r22

jobs:
build:
# We will use this OS
runs-on: ubuntu-latest
strategy:
matrix:
target: ["Release", "Debug"]

# building a mod consists of a few steps
steps:

# Downloads and installs Android NDK
- uses: actions/checkout@v2
name: Checkout NDK
with:
fetch-depth: 0
- name: Setup NDK
id: setup-ndk
uses: nttld/[email protected]
with:
ndk-version: r22b
submodules: recursive
lfs: true


# Copied from sc2ad :)
# create the ndkpath.txt file needed in our own compile scripts
- name: Create ndkpath.txt
run: |
echo "$ANDROID_NDK_LATEST_HOME" > ${GITHUB_WORKSPACE}/ndkpath.txt
cat ${GITHUB_WORKSPACE}/ndkpath.txt
# Downloads QPM package for Beat Saber for Quest Development
- name: Get QPM
uses: dawidd6/action-download-artifact@v2
with:
Expand All @@ -27,10 +36,16 @@ jobs:
name: QPM-ubuntu-x64
path: QPM
repo: sc2ad/QuestPackageManager


# Collect dependencies and print them to console
- name: QPM Collect
run: |
chmod +x ./QPM/QPM
./QPM/QPM collect
# Accelerates QPM restore
- name: QPM Dependencies Cache
id: cache-qpm-deps
uses: actions/cache@v2
Expand All @@ -43,27 +58,93 @@ jobs:
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
# Restore and resolve all dependencies from the package
- name: QPM Restore
run: ./QPM/QPM restore


# Step added for workflow debugging
- name: List Post Restore
run: |
ls -la ${GITHUB_WORKSPACE}/extern/
ls -la QPM_Temp
- name: Build for ${{ matrix.target }}
run: ./build.sh
env:
ANDROID_NDK_HOME: ${{ steps.setup-ndk.outputs.ndk-path }}
CI_BUILD_TARGET: ${{ matrix.target }}
- name: Package for ${{ matrix.target }}
run: ./release-qmod.sh
env:
ANDROID_NDK_HOME: ${{ steps.setup-ndk.outputs.ndk-path }}
CI_BUILD_TARGET: ${{ matrix.target }}
- name: Upload Artifacts
# Step added for workflow debugging
- name: List Pre Build
run: |
ls -la ${GITHUB_WORKSPACE}/
# Creates the release and debug library binary files
- name: Build Binary
shell: pwsh
run: ./build.ps1


# Creates the QMOD package release file
- name: Create QMOD Package
shell: pwsh
run: ./buildQMOD.ps1


# Step added for workflow debugging
- name: List Post Build
run: |
ls -la ${GITHUB_WORKSPACE}/
ls -la ${GITHUB_WORKSPACE}/libs/arm64-v8a/
ls -la ${GITHUB_WORKSPACE}/obj/local/arm64-v8a/
# get the library name from mod.json
- name: Get Library Filename
id: libname
shell: pwsh
run: |
$mod = "./mod.json"
$modJson = Get-Content $mod -Raw | ConvertFrom-Json
$libname = "lib" + $modJson.id.ToLower() + ".so"
echo "::set-output name=NAME::$libname"
# get the qmod package name mod.json
- name: Get QMOD Package Filename
id: qmodname
shell: pwsh
run: |
$mod = "./mod.json"
$modJson = Get-Content $mod -Raw | ConvertFrom-Json
$qmodname = $modJson.id + "-v" + $modJson.version + ".qmod"
echo "::set-output name=NAME::$qmodname"
#uploads the normal .so binary as artifact
- name: Upload Release Lib Artifact
uses: actions/upload-artifact@v2
with:
name: ${{ steps.libname.outputs.NAME }}
path: ./libs/arm64-v8a/${{ steps.libname.outputs.NAME }}
# if not found error obviously
if-no-files-found: error


#uploads the debug .so binary as artifact
- name: Upload Debug Artifact
uses: actions/upload-artifact@v2
with:
name: debug_${{ steps.libname.outputs.NAME }}
path: ./obj/local/arm64-v8a/${{ steps.libname.outputs.NAME }}
# if not found error obviously
if-no-files-found: error


# uploads the qmod package as artifact
- name: Upload qmod artifact
uses: actions/upload-artifact@v2
with:
name: ParticleTuner.${{ matrix.target }}
path: |
*.qmod
name: ${{ steps.qmodname.outputs.NAME }}
path: ./${{ steps.qmodname.outputs.NAME }}
# if not found error obviously
if-no-files-found: error
7 changes: 4 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ libs/
obj/
Android.mk.backup
qpm.shared.json
ParticleTuner.zip
.idea
cmake-build-debug
ParticleTuner.qmod
ParticleTuner.*.qmod
*.qmod
*.backup
*.so
ndkpath.txt
2 changes: 1 addition & 1 deletion .vscode/c_cpp_properties.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"defines": [
"__GNUC__",
"__aarch64__",
"VERSION=\"1.3.0\"",
"VERSION=\"1.17.1\"",
"ID=\"particletuner\""
],
"includePath": [
Expand Down
46 changes: 29 additions & 17 deletions Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -3,55 +3,67 @@ TARGET_ARCH_ABI := $(APP_ABI)

rwildcard=$(wildcard $1$2) $(foreach d,$(wildcard $1*),$(call rwildcard,$d/,$2))

# Creating prebuilt for dependency: beatsaber-hook - version: 2.2.5
# Creating prebuilt for dependency: beatsaber-hook
include $(CLEAR_VARS)
LOCAL_MODULE := beatsaber-hook_2_2_5
LOCAL_MODULE := beatsaber-hook_$(BSHOOK)
LOCAL_EXPORT_C_INCLUDES := extern/beatsaber-hook
LOCAL_SRC_FILES := extern/libbeatsaber-hook_2_2_5.so
LOCAL_SRC_FILES := extern/libbeatsaber-hook_$(BSHOOK).so
LOCAL_CPP_FEATURES += exceptions
include $(PREBUILT_SHARED_LIBRARY)
# Creating prebuilt for dependency: modloader - version: 1.2.3

# Creating prebuilt for dependency: modloader
include $(CLEAR_VARS)
LOCAL_MODULE := modloader
LOCAL_EXPORT_C_INCLUDES := extern/modloader
LOCAL_SRC_FILES := extern/libmodloader.so
LOCAL_CPP_FEATURES += exceptions
include $(PREBUILT_SHARED_LIBRARY)
# Creating prebuilt for dependency: custom-types - version: 0.12.6

# Creating prebuilt for dependency: custom-types
include $(CLEAR_VARS)
LOCAL_MODULE := custom-types
LOCAL_EXPORT_C_INCLUDES := extern/custom-types
LOCAL_SRC_FILES := extern/libcustom-types.so
LOCAL_CPP_FEATURES += exceptions
include $(PREBUILT_SHARED_LIBRARY)
# Creating prebuilt for dependency: codegen - version: 0.12.5

# Creating prebuilt for dependency: codegen
include $(CLEAR_VARS)
LOCAL_MODULE := codegen_0_12_5
LOCAL_MODULE := codegen
LOCAL_EXPORT_C_INCLUDES := extern/codegen
LOCAL_SRC_FILES := extern/libcodegen_0_12_5.so
LOCAL_SRC_FILES := extern/libcodegen.so
LOCAL_CPP_FEATURES += exceptions
include $(PREBUILT_SHARED_LIBRARY)
# Creating prebuilt for dependency: questui - version: 0.10.2

# Creating prebuilt for dependency: questui
include $(CLEAR_VARS)
LOCAL_MODULE := questui
LOCAL_EXPORT_C_INCLUDES := extern/questui
LOCAL_SRC_FILES := extern/libquestui.so
LOCAL_CPP_FEATURES += exceptions
include $(PREBUILT_SHARED_LIBRARY)

# Creating main build
include $(CLEAR_VARS)
LOCAL_MODULE := particletuner
LOCAL_MODULE := "$(LIBNAME)"
LOCAL_SRC_FILES += $(call rwildcard,src/,*.cpp)
LOCAL_SRC_FILES += $(call rwildcard,extern/beatsaber-hook/src/inline-hook/,*.cpp)
LOCAL_SRC_FILES += $(call rwildcard,extern/beatsaber-hook/src/inline-hook/,*.c)
LOCAL_SHARED_LIBRARIES += beatsaber-hook_2_2_5
LOCAL_CFLAGS += -DVERSION='"$(VERSION)"'
LOCAL_CFLAGS += -DID='"$(MODID)"'
LOCAL_CFLAGS += -isystem 'extern/libil2cpp/il2cpp/libil2cpp'
LOCAL_CPPFLAGS += -std=c++2a -frtti
LOCAL_CPP_FEATURES += exceptions
LOCAL_LDLIBS += -llog
LOCAL_SHARED_LIBRARIES += beatsaber-hook_$(BSHOOK)
LOCAL_SHARED_LIBRARIES += modloader
LOCAL_SHARED_LIBRARIES += custom-types
LOCAL_SHARED_LIBRARIES += questui
LOCAL_SHARED_LIBRARIES += codegen_0_12_5
LOCAL_LDLIBS += -llog
LOCAL_CFLAGS += -DVERSION='"1.3.0"' -DID='"particletuner"' -isystem 'extern/libil2cpp/il2cpp/libil2cpp'
LOCAL_CPPFLAGS += -std=c++2a -frtti
LOCAL_C_INCLUDES += ./include ./src ./shared ./extern ./extern/beatsaber-hook/shared ./extern/modloader/shared ./extern/questui/shared ./extern/custom-types/shared ./extern/codegen/include
LOCAL_CPP_FEATURES += exceptions
LOCAL_SHARED_LIBRARIES += codegen
LOCAL_C_INCLUDES += ./include ./src ./shared ./extern
LOCAL_C_INCLUDES += ./extern/codegen/shared ./extern/codegen/include
LOCAL_C_INCLUDES += ./extern/beatsaber-hook/shared ./extern/beatsaber-hook/include
LOCAL_C_INCLUDES += ./extern/modloader/shared ./extern/modloader/include
LOCAL_C_INCLUDES += ./extern/questui/shared ./extern/questui/include
LOCAL_C_INCLUDES += ./extern/custom-types/shared ./extern/custom-types/include
include $(BUILD_SHARED_LIBRARY)
13 changes: 13 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Copyright (c) 2018, Jack Baron

Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
14 changes: 13 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,19 @@ Quest ParticleTuner

![cover](./cover.gif)

A partial port of the [ParticleOverdrive mod](https://github.com/Shadnix-was-taken/BeatSaber-ParticleOverdrive/commit/68f8eeb9100a88606faabdd875520654993fbcbc) from PC.
A partial port of the [ParticleOverdrive mod](https://github.com/Shadnix-was-taken/BeatSaber-ParticleOverdrive/commit/68f8eeb9100a88606faabdd875520654993fbcbc) from PC. Coded by [Marcus Zhou](https://github.com/SuperMarcus) for Beat Saber v1.16.4 and updated to BSQ 1.17.1 by [Mioki](https://github.com/okibcn) with fixed rainbow particles and speed optimizations.

## Features

* De/Activate Core particles
* De/Activate Clash effects
* De/Activate ambiend dust
* De/Activate Rainbow sparkles

* customizable amount of sparkles
* customizable amount of explosion particles
* customizable lengh of effects explosions and sparkles
* customizable transparency of explosions and sparkles

## Settings

Expand Down
6 changes: 3 additions & 3 deletions bmbfmod.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"id": "particletuner",
"name": "Particles",
"version": "1.3.0",
"version": "1.17.1",
"author": "marcuszhou",
"description": [
"Boost or reduce note-cutting and environmental particle effects. QuestParticles is a port of the ParticleOverdrive mod from PC to the Quest."
],
"coverImageFilename": "cover.gif",
"category": "Gameplay",
"gameVersion": "1.13.2",
"gameVersion": "1.17.1",
"links": {
"project-home": "https://github.com/SuperMarcus/QuestParticleTuner"
},
Expand All @@ -26,7 +26,7 @@
{
"type": "HookModLibrary",
"installAction": {
"installLibraryFile": "libbeatsaber-hook_1_3_3.so"
"installLibraryFile": "libbeatsaber-hook_2_3_0.so"
}
}
]
Expand Down
Loading

0 comments on commit efba278

Please sign in to comment.