Git Product home page Git Product logo

zbassmusic's Introduction

zBassMusic

zBassMusic is a modern music system for Gothic I and Gothic II NotR based on BASS Audio Library distributed as a Union plugin. It replaces the old DirectMusic system to let the modders create music for Gothic as regular audio files instead of unfriendly DirectMusic format.

Features:

  • Music playback with modern audio formats like WAV, MP3, OGG
  • Out-of-the-box support for existing C_MUSICTHEME instances
  • Scriptable interface to take full control of music scheduling
  • Loading music files from VDFS volumes (excluding .sgt)
  • Backwards compatibility with DirectMusic .sgt files

Project Status

zBassMusic is in experimental/development phase. Releases may not be stable, but we try our best to not introduce regression.

Usage

Download zBassMusic.vdf and place it inside <GOTHIC_ROOT>/Data with Union installed to automatically load the system at the start of the game. With default settings you can use modern audio formats directly in MusicInst.d like:

instance SYS_MENU(C_MUSICTHEME_DEF)
{
	// wav file will load and play instead of .sgt
	file = "modern_audio_file.wav";
	// file = "gamestart.sgt";
	transtype = TRANSITION_TYPE_NONE;
	transsubtype = TRANSITION_SUB_TYPE_BEAT;
	reverbmix = -12;
	reverbtime = 8500;
};

For more advanced usage, check our docs:

Build

To build the project you need Visual Studio 2022 with v143 toolset (eg. 14.36.32532). Then you can clone the repository and update submodules:

git clone [email protected]:Silver-Ore-Team/zBassMusic.git
cd zBassMusic
git submodule update --remote --recursive

The project is based on CMake, so you can open it in Visual Studio, CLion or any other IDE supporting CMake, and build plugin target to compile zBassMusic.dll.

Run cmake --install out/build/x86-release --prefix out/install/x86-release to generate release directory with all required DLLs and VDF file to include in Gothic.

Support

If you have found a bug in zBassMusic, please create an issue and state your problem in detail. Include zBassMusic version, Union version and your environment (other plugins, stack traces etc.).

License

zBassMusic is licensed under MIT license excluding some dependencies.

union-api and gothic-api are licensed under GNU GENERAL PUBLIC LICENSE V3.

BASS library is licensed under a proprietary license that's free for non-commercial use only. For commercial licensing please refer to www.un4seen.com.

GothicVDFS 2.6 Copyright (c) 2001-2003, Nico Bendlin, Copyright (c) 1994-2002, Peter Sabath / TRIACOM Software GmbH

zbassmusic's People

Contributors

bogu9821 avatar muczc1wek avatar piotrmacha avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

bogu9821

zbassmusic's Issues

Invalid hook definition

You must deactivate hooks that are not intended for the version of the game the plugin was running on.
Use something like GetGameVersion() == ENGINE ? zSwitch(0x004240C0, 0x00424C70) : 0

auto Ivk_CGameManager_Init = Union::CreateHook(reinterpret_cast<void*>(zSwitch(0x004240C0, 0x00424C70)), &CGameManager::Init_Hook, Union::HookType::Hook_CallPatch);
inline void CGameManager::Init_Hook(HWND__*& hwnd)
{
if (GetGameVersion() != ENGINE)
{
return;
}

Problem with zbassmusic.dll

Hi,
I have a problem with running your plugin. I can't run it on a clean installation of Gothic II NotR. Stepps I did before:

  1. Installation of G2NotR (Polish CD edition)
  2. G2MDK 2.6
  3. G2MDK 2.6a
  4. Playerkit + UNION 1.0m (with Resource Manager)
  5. I copied my modification files to _work\data (scripts\System\Musicinst.d I left unchanged)
  6. I copied zBassMusic.vdf to Gothic II\Data
  7. I copied zBassMusic.dll, bass.dll, UnionAPI.dll to Gothic II\System
  8. I did reparse scripts and got an Access Violation like that:
    AccessViolation
    The fun fact is that I could run that on my second laptop and it works perfectly. My friends also have an AV error like that or the plugin just doesn't work for them.
    Maybe I did something wrong?

Music doesn't play after watching video in menu

The music does not start playing back after watching the video in the menu (authors list or intro).
I checked this case in CoM and there the music plays back after the video ends.
(Version v0.0.12)

Recommend Projects

  • React photo React

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

  • Vue.js photo Vue.js

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

  • Typescript photo Typescript

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

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

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

Recommend Topics

  • javascript

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

  • web

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

  • server

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

  • Machine learning

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

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

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

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

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

  • D3 photo D3

    Data-Driven Documents codes.