Git Product home page Git Product logo

ballancemodloader's Introduction

Ballance Mod Loader

BML

If you play Minecraft and have heard of Forge, then you would easily understand what BML means to Ballance.

Ballance Mod Loader is a free, open-source modding API used to extend the content of original Ballance game.

For more information, please read The Wiki.

The source code of built-in mods is in another repository.

Installing

Go to the Release page and download the latest build (Do not download the dev package unless you would like to develop your own mod). Extract all contents into your Ballance root folder. After that you can find the following files in your Ballance directory:

  • BML.dll in BuildingBlocks directory;
  • ModLoader directory.

Before launching the game please check if the compatibility mode of Player.exe is at least Windows XP (Windows 7, Windows 8, etc.). If everything goes well, then you can see the message of BML on the top.

Hello World

Uninstalling

Go to Ballance root folder, and delete BML.dll in BuildingBlocks directory. If you would like to remove the entire data of BML (installed mods, maps, configs etc.), delete the ModLoader folder as well.

Building

  • Clone this repository.
  • Open BML.sln with Visual Studio 2019.
  • Go to Project Properties -> C/C++ -> Precompile Header, and disable it.
  • Set building configuration to Release, x86.
  • Change the output path to what you want.
  • Build the solution.

Troubleshooting

If your game crashes after installing BML, or you have met bugs playing with BML, please raise a new Issue at GitHub, with the following information:

  • Describe the condition you met in detail;
  • Screenshots to help explaining if possible;
  • Paste the content of ModLoader.log (in ModLoader folder).

ballancemodloader's People

Contributors

doyagu avatar gamepiaynmo avatar swung0x48 avatar xenapte avatar yyc12345 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

ballancemodloader's Issues

Unable to modify BML settings in-game with only keyboard

All other settings in "Options" can be modified by using the keyboard, except those in the "Mods" page, i.e. BML settings. Once inside it the keyboard seems to lose function and only leaves you with the mouse to click everything.

(yeah it's true you can just use the mouse to get around - but sometimes it's very annoying since all other parts of the game can be controlled with keyboard only - and that's how most people do when they pause in-game to modify some settings)

Game stuck when load a custom map called First CLU

Affected BML version:
All BML version since the publish of this issue.

Phenomenons:
Game load progressbar stuck at first stage. And the game start music(Misc_StartLevel.wav) played unexceptly.
I dropped BML and game load this map correctly.
I also try deleting almost objects in this map and only keep the skeleton of a basic level. It still can not be loaded.
I enabled <Debug?> in base.cmo but got nothing.
I disabled all BML mods and it still can't be loaded, only build-in mods existed. (BML build-in mod, not the build-in mods in release package).

Reproduce step:
Download attached files. Both of overwriting original level file and loading it with BML can reproduce this problem. I can't indicate where is the bug comes from. So I open this issue, otherwise I will open a PR to solve this problem
CL_1_-_First_CLUs_Level.zip
.

BML not working under wine.

I've attempted to install BML 0.3.31 on macOS Wine(WS11WineCX64Bit19.0.1-1).
The game crashes at cold boot. (It works fine without BML, so not Wine's fault, or at least it's not on its own)
Just simply pulling BML out of that Ballance copy made it alive again.

After inspecting ModLoader.log , it seems like minhook has failed to hook?

[03/04/2021 08:03:37.473] [ModLoader/INFO]: Initializing Mod Loader version 0.3.30
[03/04/2021 08:03:37.473] [ModLoader/INFO]: Website: https://github.com/Gamepiaynmo/BallanceModLoader
[03/04/2021 08:03:37.473] [ModLoader/INFO]: MinHook Initialized
[03/04/2021 08:03:37.740] [ModLoader/INFO]: Step Hook created
[03/04/2021 08:03:37.740] [ModLoader/ERROR]: Create Object Loader Hook Failed

Compiling from source won't help. (which spits out the same error)

Ballance shows a black screen

  • I used the latest version (v0.3.40).
  • I have downloaded the mod loader again just in case (4 times).
  • I downloaded the normal one and not the developer version.
  • I have reset the configs.
  • I have set the compatibility mode to Windows XP or higher (set to Windows 7).
  • I have tried reinstalling Ballance.

Log file: https://files.catbox.moe/d4j0x5.log
Games\ModLoader folder: https://files.catbox.moe/aao5ef.zip
Games\Ballance\ModLoader folder: https://files.catbox.moe/ix4sqo.zip
Ballance (Games\Ballance\LogPlayer.csv) Log: https://files.catbox.moe/wgxtbu.csv
Ballance (Games\Ballance\errorPlayer.csv) Log: https://files.catbox.moe/w7af8q.csv
Ballance (Games\Ballance\Bin\errorTT_Player_CMO_Interface.csv) Log: https://files.catbox.moe/w7af8q.csv

Observations:

  • Changing fullscreen mode using F11 still works.
  • Going into windowed mode, going into fullscreen mode, putting the game out of focus, and going into windowed mode makes the game window invisible and uninteractable.
  • Ballance always consumes close to 50% CPU power.

PC Specifications:

  • CPU: AMD A6-7400K, 2 cores, 3.50GHz
  • GPU: (Integrated) Radeon R5, 4 cores
  • RAM: Dual-channel 4GB DDR3@1333MHz
  • Storage: Samsung 860 EVO 500GB SSD

How can I compile and build this project for myself?

Which runtime, SDK or dependencies do I need so that I can compile and build this for myself?
Just found this work is brilliant and I personally wanna contribute a bit to it.
FYI, I tried to compile it and it's spitting out unexpected end of file while looking for precompiled header. Did you forget to add #include "pch.h" to your source? all over the place. It seems to be a precompiled header? No idea what to do with that.
I have no idea if anything else is required, so I turned here for help.

Game abruptly ends after I load Chinese worded maps to Modloader folder

When I copy and paste a few Chinese based file name maps into the ModLoader\Maps folder, the game starts, followed by a black screen, then quits by itself.
See the folder here:

Chinese and English Maps

However, when I delete the Chinese worded files and leave only the English, the game and BML loads and works as normal:

English Maps
Normal Load

Here is the log:
ModLoader.log

I'm running Windows 10 Home (English (US)). Sorry I don't know anything about programming or modding, just a simple user and fan of the game. TIA

License?

Saying it's free and open source in the readme ain't gonna cut it. You also need a proper LICENSE or COPYING file (and sometimes a license notice on top of each file).

https://choosealicense.com may be a good place to start if you need help.

Couldn't launch BML in my Ballance.

BML crash when I install it on my Ballance.

Ballance version: original 1.13 english
Windows version: Windows 10 1903
Used BML version: a830065
VC compiler version: 19.23.28106.4

BML crashed. But I got 4 folders in ModLoader folder: Cache, Config, Maps and Mods. But all of them are empty.
And, I got ModLoader.log, but it still is empty.

I use Visual Studio 2019 to debug this dll. And it report:
0x240360AD (CK2.dll)处(位于 Player.exe 中)引发的异常: 0xC0000005: 读取位置 0x00000004 时发生访问冲突。
It seems like CK2.dll's problem. I couldn't locate any code which comes from BML. and debugger stuck in this exception.

Run-Time Check Failure #0

I was writing a BML mod recently. I was using BML 0.3.28 and it threw a exception when I running my mod.

Run-Time Check Failure #0 - The value of ESP was not properly saved across a function call.  This is usually a result of calling a function declared with one calling convention with a function pointer declared with a different calling convention.

What I wrote is:

void GetMaterialTextureName(CKMaterial* mat, std::string* name) {
	std::filesystem::path filepath;
	CKTexture* texture = NULL;

	name->clear();

	texture = mat->GetTexture(0);
	if (texture == NULL) return;
	if (texture->GetSlotFileName(0) == NULL) return;

	filepath = texture->GetSlotFileName(0);
	*name = filepath.filename().string();
}

When debugging it, it stop at texture = mat->GetTexture(0);.
Is it BML's bug? Is it a vtable problem or a parameter problem?

My full codes: https://github.com/yyc12345/BMLMods/tree/master/BallanceOptiFine
BML log:

[12/29/2020 17:18:36.843] [ModLoader/INFO]: Initializing Mod Loader version 0.3.28
[12/29/2020 17:18:36.844] [ModLoader/INFO]: Website: https://github.com/Gamepiaynmo/BallanceModLoader
[12/29/2020 17:18:36.844] [ModLoader/INFO]: MinHook Initialized
[12/29/2020 17:18:36.871] [ModLoader/INFO]: Step Hook created
[12/29/2020 17:18:36.894] [ModLoader/INFO]: Object Loader Hook created
[12/29/2020 17:18:37.129] [ModLoader/INFO]: Input Manager Hooks created
[12/29/2020 17:18:37.130] [ModLoader/INFO]: Get CKContext pointer 0x025f22e8
[12/29/2020 17:18:37.130] [ModLoader/INFO]: Get Attribute Manager pointer 0x025aa578
[12/29/2020 17:18:37.130] [ModLoader/INFO]: Get Behavior Manager pointer 0x04e38948
[12/29/2020 17:18:37.130] [ModLoader/INFO]: Get Collision Manager pointer 0x04e460b8
[12/29/2020 17:18:37.130] [ModLoader/INFO]: Get Input Manager pointer 0x04e3ffb8
[12/29/2020 17:18:37.131] [ModLoader/INFO]: Get Message Manager pointer 0x025e4ac8
[12/29/2020 17:18:37.131] [ModLoader/INFO]: Get Path Manager pointer 0x025e1c88
[12/29/2020 17:18:37.131] [ModLoader/INFO]: Get Parameter Manager pointer 0x025f3dc0
[12/29/2020 17:18:37.131] [ModLoader/INFO]: Get Sound Manager pointer 0x04e2aba8
[12/29/2020 17:18:37.131] [ModLoader/INFO]: Get Time Manager pointer 0x04e37f40
[12/29/2020 17:18:37.132] [ModLoader/INFO]: Loading Mod Loader
[12/29/2020 17:18:37.132] [ModLoader/INFO]: Process Function Hooked
[12/29/2020 17:18:37.132] [ModLoader/INFO]: Render Function Hooked
[12/29/2020 17:18:37.977] [ModLoader/INFO]: Get Render Context pointer 0x09752c28
[12/29/2020 17:18:37.977] [ModLoader/INFO]: Get Render Manager pointer 0x04e68ee8
[12/29/2020 17:18:37.991] [ModLoader/INFO]: Loading Mod BML[Ballance Mod Loader] v0.3.28 by Gamepiaynmo & YingChe
[12/29/2020 17:18:38.105] [ModLoader/INFO]: Loading Mod NewBallType[New Ball Type] v0.3.28 by Gamepiaynmo
[12/29/2020 17:18:38.137] [ModLoader/INFO]: Loading Mod BallanceOptiFine[Ballance OptiFine] v0.3.28 by yyc12345
[12/29/2020 17:18:38.170] [ModLoader/INFO]: Loading Mod BallSticky[Ball Sticky] v0.3.18 by Gamepiaynmo
[12/29/2020 17:18:38.183] [NewBallType/INFO]: Registered New Ball Type: Sticky
[12/29/2020 17:18:38.184] [NewBallType/INFO]: Registered New Modul Ball Type: P_Ball_Sticky
[12/29/2020 17:18:38.184] [NewBallType/INFO]: Registered New Ball Transformer Type: P_Trafo_Sticky
[12/29/2020 17:18:38.184] [ModLoader/INFO]: Loading Mod BMLModuls[BML Moduls] v0.3.18 by Gamepiaynmo
[12/29/2020 17:18:38.197] [NewBallType/INFO]: Registered New Modul Type: P_Rotboard_Wood
[12/29/2020 17:18:38.199] [NewBallType/INFO]: Registered New Modul Type: P_Rotboard_Wood_Inv
[12/29/2020 17:18:38.200] [NewBallType/INFO]: Registered New Modul Type: P_Dropboard_Wood
[12/29/2020 17:18:38.201] [NewBallType/INFO]: Registered New Floor Type: Phys_Floors_F0
[12/29/2020 17:18:38.203] [NewBallType/INFO]: Registered New Floor Type: Phys_Floors_E80
[12/29/2020 17:18:38.205] [NewBallType/INFO]: Registered New Floor Type: Phys_Floors_E400
[12/29/2020 17:18:38.205] [ModLoader/INFO]: Loading Mod DualBallControl[Dual Ball Control] v0.3.18 by Zzq_203 & Gamepiaynmo
[12/29/2020 17:18:38.225] [ModLoader/INFO]: Loading Mod DynamicFov[Dynamic Fov] v0.3.18 by Gamepiaynmo
[12/29/2020 17:18:38.241] [ModLoader/INFO]: Loading Mod MapScripts[Map Scripts] v0.3.18 by Gamepiaynmo
[12/29/2020 17:18:38.244] [ModLoader/INFO]: Loading Mod SpiritTrail[Spirit Trail] v0.3.18 by Gamepiaynmo
[12/29/2020 17:18:38.331] [BML/INFO]: Unlock higher resolutions
[12/29/2020 17:18:38.332] [BML/INFO]: Skip Loading Animation
[12/29/2020 17:18:38.332] [BML/INFO]: Insert message Start Menu Hook
[12/29/2020 17:18:38.333] [BML/INFO]: Insert message Exit Game Hook
[12/29/2020 17:18:38.333] [BML/INFO]: Insert message Load Level Hook
[12/29/2020 17:18:38.334] [BML/INFO]: Insert message Start Level Hook
[12/29/2020 17:18:38.334] [BML/INFO]: Insert message Reset Level Hook
[12/29/2020 17:18:38.334] [BML/INFO]: Insert message Pause Level Hook
[12/29/2020 17:18:38.334] [BML/INFO]: Insert message Unpause Level Hook
[12/29/2020 17:18:38.336] [BML/INFO]: Insert message Exit Level Hook
[12/29/2020 17:18:38.337] [BML/INFO]: Insert message Next Level Hook
[12/29/2020 17:18:38.337] [BML/INFO]: Insert message Dead Hook
[12/29/2020 17:18:38.337] [BML/INFO]: Insert message End Level Hook
[12/29/2020 17:18:38.337] [NewBallType/INFO]: Reset ball pieces for new ball types
[12/29/2020 17:18:39.627] [BML/INFO]: Create Command Gui
[12/29/2020 17:18:39.634] [BML/INFO]: Create Console Gui
[12/29/2020 17:18:40.036] [BML/INFO]: Create BML Gui
[12/29/2020 17:18:40.041] [BML/INFO]: Create Mod Options Gui
[12/29/2020 17:18:40.410] [BML/INFO]: Start to insert Mods Button into Options Menu
[12/29/2020 17:18:40.411] [BML/INFO]: Mods Button inserted
[12/29/2020 17:18:40.446] [BML/INFO]: Insert Ball/Camera Active/Inactive Hook
[12/29/2020 17:18:40.448] [BML/INFO]: Debug Ball Force
[12/29/2020 17:18:40.449] [NewBallType/INFO]: Modify Ingame script to accommodate new ball types
[12/29/2020 17:18:40.454] [BML/INFO]: Insert Counter Active/Inactive Hook
[12/29/2020 17:18:40.455] [BML/INFO]: Insert Life/Point Hooks
[12/29/2020 17:18:40.456] [BML/INFO]: Insert Checkpoint & GameOver Hooks
[12/29/2020 17:18:40.480] [BML/INFO]: Adjust Ingame Camera
[12/29/2020 17:18:40.501] [NewBallType/INFO]: New Modul & Floor Types Registered
[12/29/2020 17:18:40.619] [NewBallType/INFO]: New Ball Types Registered
[12/29/2020 17:18:40.625] [DualBallControl/INFO]: Created Dual Balls
[12/29/2020 17:18:40.647] [SpiritTrail/INFO]: Created Spirit Balls
[12/29/2020 17:18:40.712] [BML/INFO]: Acquire Game Fonts
[12/29/2020 17:18:41.531] [ModLoader/INFO]: On Message PreStartMenu
[12/29/2020 17:18:41.854] [BML/INFO]: Adjust MenuLevel Camera
[12/29/2020 17:18:42.031] [ModLoader/INFO]: On Message PostStartMenu
[12/29/2020 17:18:45.549] [ModLoader/INFO]: On Message PreLoadLevel
[12/29/2020 17:18:46.186] [BallanceOptiFine/INFO]: OptiFine detect loading map. Start processing.

Can't finish ANY map load with BML on

捕获20210726

I am new here and I have tried some different Ballance programs before using this. Now the game is stuck and can't load any map (both vanilla and custom). It can't even normally quit and I have to use task manager. What's worse, the vanilla uninstaller always say that "can't find INSTALL.LOG" (actually exists), making reinstall a headache. I tried Windows XP compat mode on starter, player, uninstaller but nothing changes.

C2027: use of undefined type 'CK2dCurve'

CK2dCurve and CK2dCurvePoint classes are not complete in the code.

I notice that all of them don't have virtual function and all exported functions are existed in CK2.dll exports. It might be easier to fufill these classes. Is it possible to add them into code?
I also know that there are existed CK2dCurve and CK2dCurvePoint header files(in Virtools 2.5/3.5/... header folder). But some functions are not complete such as GetPos.

BML在部分时候下无法在虚拟机中被Ballance加载

我在macOS 12.1 使用了 VMWare Fusion 安装了一台Windows 7 x86虚拟机,在部分时候,Ballance打开后出现了开场动画,并且在屏幕上方没有Ballance Mod Loader的字样,加载自制地图的功能并没有在选关页面显示。重启游戏后BML可以正常加载,但在一段时间后,再次开启Ballance依然无法加载BML。

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.