Install Steam
login
|
language
简体中文 (Simplified Chinese)
繁體中文 (Traditional Chinese)
日本語 (Japanese)
한국어 (Korean)
ไทย (Thai)
Български (Bulgarian)
Čeština (Czech)
Dansk (Danish)
Deutsch (German)
Español - España (Spanish - Spain)
Español - Latinoamérica (Spanish - Latin America)
Ελληνικά (Greek)
Français (French)
Italiano (Italian)
Bahasa Indonesia (Indonesian)
Magyar (Hungarian)
Nederlands (Dutch)
Norsk (Norwegian)
Polski (Polish)
Português (Portuguese - Portugal)
Português - Brasil (Portuguese - Brazil)
Română (Romanian)
Русский (Russian)
Suomi (Finnish)
Svenska (Swedish)
Türkçe (Turkish)
Tiếng Việt (Vietnamese)
Українська (Ukrainian)
Report a translation problem
Just change the percentage in the DeckgunBoostConfig.xlsx.
500% gives you smove 55 knots top speed.
If you dont want to miss out on the deck gun, make sure the DeckgunEnginePatches.cs looks like this:
using System.Collections.Generic;
using Harmony;
using UBOAT.Game.Core;
using UBOAT.Game.Core.Data;
using UBOAT.Game.Sandbox;
using UBOAT.Game.Scene.Items;
using UBOAT.Game.Scene.Entities;
using UBOAT.Game.Scene.Characters.Actions;
using DWS.Common.InjectionFramework;
using UnityEngine;
namespace UBOAT.Mods.DeckgunEngine
{
class DeckgunEnginePatches
{
[Inject] private static PlayerShip playerShip;
static bool RecheckDeckGun = true;
static bool RemovedDeckGun = false;
private static readonly GameDataReference Boost = new GameDataReference("DeckgunBoostConfig/Settings/DeckgunBoost/Underwater Speed Boost");
private static bool CheckRemovedDeckGun()
{
if (RecheckDeckGun)
{
Debug.Log($"{Constants.ModName} Rechecking Deck Gun");
List<Equipment> equiment = playerShip.Equipment;
foreach (Equipment item in equiment)
{
if (item.Name == "Removed Deck Gun" || item.Name == "Deck Gun Mount Cover")
{
Debug.Log($"{Constants.ModName} Found Removed Deck Gun");
RemovedDeckGun = true;
break;
}
if (item.Name == "Artillery - 8.8 cm")
{
Debug.Log($"{Constants.ModName} Found Deck Gun");
RemovedDeckGun = true;
break;
}
}
RecheckDeckGun = false;
}
return RemovedDeckGun;
}
[HarmonyPatch(typeof(Propeller), "FixedUpdate")]
public class FixedUpdatePatch
{
public static bool modified = false;
public static void Prefix(ref float __state, ref float ___power)
{
if (!Physics.autoSimulation)
return;
if (!CheckRemovedDeckGun() || playerShip.DeckDepth < 1.5f)
return;
modified = true;
__state = ___power;
___power += __state * Boost;
//Debug.Log($"{Constants.ModName} Old Power {__state} Power Increase {__state * Boost} New Power {___power} ");
}
public static void Postfix(float __state, ref float ___power)
{
if (!modified)
return;
___power = __state;
modified = false;
}
}
[HarmonyPatch(typeof(PlayerCareer), "OnAfterDeserialize")]
public class OnAfterDeserialize
{
public static void Postfix()
{
Debug.Log($"{Constants.ModName} Deck Gun Recheck Needed");
RecheckDeckGun = true;
}
}
[HarmonyPatch(typeof(EnterUpgradeModeAction), "GameState_UpgradeModeChanged")]
public class EnterUpgradeModeActionPatch
{
public static void Prefix(GameState ___gameState)
{
if (!___gameState.UpgradeMode)
{
Debug.Log($"{Constants.ModName} Deck Gun Recheck Needed");
RecheckDeckGun = true;
}
}
}
}
}