Compare commits

..

10 commits

Author SHA1 Message Date
1ab9848ee7 archive project 2022-06-29 23:53:27 +09:00
3c7d101d72 improved building instruction 2022-05-06 23:15:50 +09:00
c210ae8e81 v1.14 update: made it work in v466 2022-05-06 23:15:38 +09:00
a6359cca7b v1.13.0.0 update: made it work in v465 2022-04-30 12:24:12 +09:00
ffebff3229 v1.12.0.0 update
- made it work in v464
2022-04-12 13:20:16 +09:00
106dc517f5 made WBM work in v463 2022-04-01 14:52:55 +09:00
f9fb8d7a4e v1.10.0.0 update
- made WBM work in WB v462
2022-03-26 13:40:13 +09:00
bbd8d882e6 filename capitalization 2022-03-21 13:20:54 +09:00
aeba107b31 bumped version from v1.9.1.0 to v1.9.2.0 2022-03-20 17:54:33 +09:00
33571dc3ef fixed old gun sound 2022-03-20 17:54:08 +09:00
9 changed files with 85 additions and 72 deletions

View file

@ -1,5 +1,10 @@
# [War Brokers Mods (WBM)](https://github.com/War-Brokers-Mods/WBM)
WBM has been officially included into the game
<details>
<summary>Potentially outdated information (click to unfold)</summary>
[![what's this?](https://img.shields.io/badge/what's_this%3F-grey?style=for-the-badge)](https://developomp.com/portfolio/wbm)
[![discord invite](https://img.shields.io/badge/Discord-5865F2?style=for-the-badge&logo=discord&logoColor=white)](https://discord.gg/aQqamSCUcS)
[![video tutorial](https://img.shields.io/badge/video_tutorial-red?style=for-the-badge&logo=youtube&logoColor=white)](https://www.youtube.com/watch?v=ZBE3nVvHwF8&t=64s)
@ -254,7 +259,8 @@ and can create hacks on their own anyway.
WB_PLUGINS_DIR="<PATH_TO_PLUGIN_INSTALL_DIRECTORY>"
```
5. Now you can run the scripts.
5. Install the `zip` cli. Most likely you already have it.
6. Now you can run the scripts.
- `scripts/debug.sh`: Builds WBM in debug mode and copy the files to the plugins directory.
- `scripts/release.sh`: Creates a zip file that can be uploaded to the gh release section.
@ -280,3 +286,5 @@ The source code for this project is available under the [MIT License](https://op
Fonts:
- https://fonts.google.com/specimen/Architects+Daughter : OFL (used in WBM logo)
</details>

38
WBM/MangledNames.cs Normal file
View file

@ -0,0 +1,38 @@
/// This file contains all information related to matching
/// mangles names to something more readable
namespace WBM
{
public static class MangledNames
{
//
// Variables
//
public const string AKRifleShotClip = "AJLCLOJGKLF";
public const string SMGShotClip = "GDKKJENDFOF";
// fps limit value
public const string fpsValue = "PFOMGOFNIOE";
public const string showElo = "JEFPGBDBGFF";
// show squad servers
public const string isClan = "GHAAFBAPMMH";
// show testing servers
public const string isTesting = "CIAFOJDAKFA";
public const string chatList = "CBKINJHGBOM";
public const string gameState = "HHBJFNILCBJ";
public const string nickList = "MBFCFOPONAI";
public const string personGun = "FDHBIGANHOH";
public const string localPlayerIndex = "INGKMFAPBJC";
public const string teamList = "GKDEFMOHMGH";
public const string statsList = "GNKKKHEDFAN";
//
// functions
//
public const string drawChatMessage = "IACLHANNPED";
public const string clearMessages = "NFNFPNGMKFD";
public const string onFPSChanged = "EFDAECNGBEP";
public const string addMessage = "GPIKJGHDPEA";
}
}

View file

@ -6,7 +6,7 @@ using System.Text;
using System.IO;
using System.Threading.Tasks;
using System.Runtime.Serialization.Json;
using CPersonGun = LELHDOPKMBE;
using CPersonGun = JABKDMKNMKE;
namespace WBM
{
@ -49,31 +49,31 @@ namespace WBM
public static float getGunZoom(CPersonGun gun)
{
// CPersonGun.cameraZoom
return gun.CAAABKHHGLM;
return gun.IDOOGDDHKOG;
}
public static float getGunFireTimer(CPersonGun gun)
{
// CPersonGun.fireTimer
return gun.HDDNCAICDOJ;
return gun.ABENIMBBCFL;
}
public static float getGunFireVelocity(CPersonGun gun)
{
// CPersonGun.fireVel
return gun.IMNMEFPBAAM;
return gun.EMDMIEBFHDL;
}
public static float getGunFireRate(CPersonGun gun)
{
// CPersonGun.fireRate
return gun.LCDDGLKGKCO;
return gun.EDHPPDGFLEB;
}
public static float getGunReloadTimer(CPersonGun gun)
{
// CPersonGun.reloadTimer
return gun.ILBBFNBJJKI;
return gun.ALNGHNHLNGP;
}
}
}

View file

@ -13,7 +13,7 @@ namespace WBM
{
public const string programID = "com.developomp.wbm";
public const string programName = "War Brokers Mods";
public const string programVersion = "1.9.1.0";
public const string programVersion = "1.14.0.0";
/// This function is called as soon as the component becomes active.
/// It is the first event function that's called during the component's lifecycle.

View file

@ -9,8 +9,8 @@ using System.IO;
using System.Reflection;
using System.Collections;
using System.Collections.Generic;
using CPersonGun = LELHDOPKMBE;
using SPlayerStats = BBOACLMHKLF;
using CPersonGun = JABKDMKNMKE;
using SPlayerStats = INPDBACNIGK;
namespace WBM
{
@ -109,18 +109,18 @@ namespace WBM
result[i] = new Data.PlayerStatsStruct
{
kills = currentlyParsing.GPLIPBNIDNC,
deaths = currentlyParsing.DKJCHCPBADP,
damage = currentlyParsing.EOPJFDCLCCL,
longestKill = currentlyParsing.MPJBKDPMLBD,
points = currentlyParsing.IEJEOANMHKI,
headShots = currentlyParsing.PEJJONGBLLH,
vote = currentlyParsing.BIPKEJFKPGD,
mapVote = currentlyParsing.FLOHPDGHOOG,
gamesElo = currentlyParsing.EAFMCHFNJAL,
gamesEloDelta = currentlyParsing.GPLEHHJJCIN,
killsElo = currentlyParsing.GOJIAOADAJJ,
killsEloDelta = currentlyParsing.IPICEMAAMBM,
kills = currentlyParsing.JJEIOHLJMHO,
deaths = currentlyParsing.CADBJPEGEAL,
damage = currentlyParsing.MBNBFDFDBAN,
longestKill = currentlyParsing.FNOCIFHHINH,
points = currentlyParsing.AIDBBHHNCAK,
headShots = currentlyParsing.FJPBIMILEPN,
vote = currentlyParsing.ILNFHPIOPCI,
mapVote = currentlyParsing.DPMNDAMAHML,
gamesElo = currentlyParsing.OPMKKKJPDON,
gamesEloDelta = currentlyParsing.BIFCAPOBMIO,
killsElo = currentlyParsing.ICIBGMLJNHJ,
killsEloDelta = currentlyParsing.ONICDMLDBFL,
};
}

View file

@ -17,19 +17,19 @@ namespace WBM
private static Slider slider = GameObject.Find("fpsSlider").GetComponent<Slider>();
private static AccessTools.FieldRef<webguy, float> fpsValueRef = AccessTools.FieldRefAccess<webguy, float>(MangledNames.fpsValue);
static bool Prefix(webguy __instance, float KFBLINBNKHI)
static bool Prefix(webguy __instance, float CNFIJGNCMNE)
{
fpsValueRef(__instance) = KFBLINBNKHI;
int targetFrameRate = (int)(KFBLINBNKHI * maxTargetFrameRate);
fpsValueRef(__instance) = CNFIJGNCMNE;
int targetFrameRate = (int)(CNFIJGNCMNE * maxTargetFrameRate);
if (targetFrameRate == 0)
{
((InfernalBehaviour)__instance).GHLANFKABIH(fpsSliderTextObj, __instance.LMOKBIHLKFK("Disabled"));
((InfernalBehaviour)__instance).CEHBKMNGHPG(fpsSliderTextObj, __instance.ILCOAONDEKP("Disabled"));
targetFrameRate = defaultTargetFrameRate;
}
else
{
((InfernalBehaviour)__instance).GHLANFKABIH(fpsSliderTextObj, targetFrameRate.ToString());
((InfernalBehaviour)__instance).CEHBKMNGHPG(fpsSliderTextObj, targetFrameRate.ToString());
}
if (targetFrameRate > 0 && targetFrameRate < 5) targetFrameRate = 5;

View file

@ -3,7 +3,7 @@ using BepInEx.Configuration;
using System;
using System.Reflection;
using CAudioClip = DMJGLPCLOPG;
using CAudioClip = KGEACBNNOIM;
namespace WBM
{
@ -35,21 +35,23 @@ namespace WBM
private void setupOldGunSound()
{
this.useOldGunSoundConf = Config.Bind("Config", "use old gun sound", true);
this.useOldGunSoundConf.SettingChanged += this.onOldGunSoundChange;
this.AKSoundRef = webguyType.GetField(MangledNames.AKRifleShotClip, bindFlags);
this.SMGSoundRef = webguyType.GetField(MangledNames.SMGShotClip, bindFlags);
this.useOldGunSoundConf = Config.Bind("Config", "use old gun sound", true);
this.useOldGunSoundConf.SettingChanged += this.onOldGunSoundChange;
this.onOldGunSoundChange(new object(), new EventArgs());
this.oldGunSound = new DMJGLPCLOPG("Sound/gun_shot", 1f, 0f);
this.oldGunSound.GPBDJPDFDMJ(50f, 1_000f);
this.oldGunSound = new CAudioClip("Sound/gun_shot", 1f, 0f);
this.oldGunSound.DMMKODLJJGP(50f, 1_000f);
this.newAKSound = new CAudioClip("Sound/AK47_Krinkov_Close_Single", 1f, 0f);
this.newAKSound.GPBDJPDFDMJ(50f, 1_000f);
this.newAKSound.DMMKODLJJGP(50f, 1_000f);
this.newSMGSound = new DMJGLPCLOPG("Sound/smg_gun_shot", 1f, 0f);
this.newSMGSound.GPBDJPDFDMJ(50f, 1_000f);
this.newSMGSound = new CAudioClip("Sound/smg_gun_shot", 1f, 0f);
this.newSMGSound.DMMKODLJJGP(50f, 1_000f);
this.onOldGunSoundChange(new object(), new EventArgs());
}
private void onOldGunSoundChange(object sender, EventArgs e)

View file

@ -1,7 +1,6 @@
using BepInEx.Configuration;
using UnityEngine;
using CFPSGuy = BLALJCIJGGH;
namespace WBM
{
@ -42,7 +41,7 @@ namespace WBM
private void setCrouchState(bool crouchState)
{
// CFPSGuy.inSt.isCrouching
CFPSGuy.GODHOHFPIFB.BLACKAOLGNP = crouchState;
HGIJNAOOGIC.AIPINJPLLIN.GDKHEALABDI = crouchState;
}
}
}

View file

@ -1,34 +0,0 @@
/// This file contains all information related to matching
/// mangles names to something more readable
namespace WBM
{
public static class MangledNames
{
public const string AKRifleShotClip = "AMLFKFMFNHJ";
public const string SMGShotClip = "JBPCEBHIPOA";
// fps limit value
public const string fpsValue = "DDMMENCGNNJ";
public const string showElo = "GOLMFEFNGEO";
// show squad servers
public const string isClan = "DMKFINANCKN";
// show testing servers
public const string isTesting = "IMIBKMIHNEF";
public const string chatList = "NPGFEBBFCKM";
public const string gameState = "HJKIAMIDEMB";
public const string nickList = "PAGBLNDBFFM";
public const string personGun = "DOKPBFNBIMP";
public const string localPlayerIndex = "HHMPKKFMJCN";
public const string teamList = "MGHADKEDFHK";
public const string statsList = "CHNEHJPEKGM";
//
// functions
//
public const string drawChatMessage = "CIHAFDBGGDP";
public const string clearMessages = "FOLIGEPKOMI";
public const string onFPSChanged = "NGENLDFJGLK";
public const string addMessage = "HAFDILLPPMB";
}
}