Skip to content

Commit

Permalink
v3.1 Merge pull request #932 from Die4Ever/develop
Browse files Browse the repository at this point in the history
v3.1
  • Loading branch information
Die4Ever authored Aug 29, 2024
2 parents 07ba8ab + 0b7daec commit c2ddce8
Show file tree
Hide file tree
Showing 25 changed files with 156 additions and 15 deletions.
5 changes: 3 additions & 2 deletions DXRBalance/DeusEx/Classes/AugmentationManager.uc
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,8 @@ simulated function Float CalcEnergyUse(float deltaTime)
energyMult = 1.0;
boostMult = 1.0;

Player.AmbientSound = None;
if(Player != None) // TODO: figure out why this happens in the dxonly map, obviously the player exists if they're calling CalcEnergyUse
Player.AmbientSound = None;

anAug = FirstAug;
while(anAug != None)
Expand All @@ -171,7 +172,7 @@ simulated function Float CalcEnergyUse(float deltaTime)
}

if ((anAug.bAutomatic == false && anAug.bAlwaysActive == false) || f > 0.0) {
Player.AmbientSound = anAug.LoopSound;
if(Player != None) Player.AmbientSound = anAug.LoopSound;
}
}
anAug = anAug.next;
Expand Down
2 changes: 2 additions & 0 deletions DXRCore/DeusEx/Classes/DXRBase.uc
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ simulated function PlayerAnyEntry(#var(PlayerPawn) player)

simulated event PreTravel()
{
if(dxr != None && dxr.bIsOpeningURL) return;

SetTimer(0, False);
if(dxr != None) {
_PreTravel();
Expand Down
15 changes: 15 additions & 0 deletions DXRCore/DeusEx/Classes/DXRInfo.uc
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,13 @@ simulated function err(coerce string message, optional bool skip_player_message)
class'DXRTelemetry'.static.SendLog(GetDXR(), Self, "ERROR", message);
}
static function OpenURL(PlayerPawn p, string url)
{
class'DXRando'.default.dxr.bIsOpeningURL = true;
p.ConsoleCommand("start " $ url);
class'DXRando'.default.dxr.bIsOpeningURL = false;
}
static function int _SystemTime(LevelInfo Level)
{
local int time, m;
Expand Down Expand Up @@ -205,6 +212,14 @@ function bool IsFridayThe13th()
return Level.DayOfWeek == 5 && Level.Day == 13;
}
function bool DateAtLeast(int year, int month, int day)
{
if(Level.Year > year) return true;
if(Level.Year == year && Level.Month > month) return true;
if(Level.Year == year && Level.Month == month && Level.Day >= day) return true;
return false;
}
function bool IsChristmasSeason()
{
if (Level.Month==11) return true;
Expand Down
6 changes: 3 additions & 3 deletions DXRCore/DeusEx/Classes/DXRVersion.uc
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,20 @@ simulated static function CurrentVersion(optional out int major, optional out in
major=3;
minor=1;
patch=0;
build=10;//build can't be higher than 99
build=11;//build can't be higher than 99
}

simulated static function bool VersionIsStable()
{
return false;
return true;
}

simulated static function string VersionString(optional bool full)
{
local int major,minor,patch,build;
local string status;

status = "Beta";
status = "";

if(status!="") {
status = " " $ status;
Expand Down
3 changes: 3 additions & 0 deletions DXRCore/DeusEx/Classes/DXRando.uc
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ var config int rando_beaten;
var transient bool runPostFirstEntry;
var transient bool bTickEnabled;// bTickEnabled is just for DXRandoTests to inspect
var transient bool bLoginReady;
var transient bool bIsOpeningURL;

#ifdef revision
var transient bool RevisionMaps;
Expand Down Expand Up @@ -137,7 +138,9 @@ function DXRInit()
simulated event PreTravel()
{
local int i;
if(bIsOpeningURL) return;
Level.LevelAction = LEVACT_Loading;
log("PreTravel()");
for(i=0; i<num_modules; i++) {
modules[i].PreTravel();
modules[i] = None;
Expand Down
5 changes: 5 additions & 0 deletions DXRMapFixups/DeusEx/Classes/DXRFixupParis.uc
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ function PreFirstEntryMapFixes()
local FlagTrigger ft;
local #var(prefix)Teleporter tele;
local Businesswoman1 bw;
local #var(prefix)NicoletteDuclare nico;

VanillaMaps = class'DXRMapVariants'.static.IsVanillaMaps(player());

Expand Down Expand Up @@ -149,6 +150,10 @@ function PreFirstEntryMapFixes()
}
}

foreach AllActors(class'#var(prefix)NicoletteDuclare',nico){
RemoveReactions(nico);
}

SetAllLampsState(true, true, false, vect(-1821.85, -351.37, -207.11), 200.0); // the two Lamp3s on the desks near the back exit, but not the one where the accountant is

Spawn(class'PlaceholderItem',,, vectm(-607.8,-1003.2,59)); //Table near Nicolette Vanilla
Expand Down
28 changes: 28 additions & 0 deletions DXRModules/DeusEx/Classes/DXRHalloween.uc
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ function FirstEntry()
}
MakeCosmetics();
}

MakeBlackCats(); //Black cats always exist
}

function ReEntry(bool IsTravel)
Expand Down Expand Up @@ -266,6 +268,32 @@ function MakeCosmetics()
}
}

function MakeBlackCats()
{
local #var(prefix)Cat cat;
local #var(prefix)CatCarcass catCarc;
local float catChance;

SetSeed("MakeBlackCats");

if (IsFridayThe13th()) catChance = 50.0;
else if (dxr.flags.IsHalloweenMode()) catChance = 30.0;
else if (IsOctober()) catChance = 10.0;
else catChance = 1.0;

//Chance to convert living cats
foreach AllActors(class'#var(prefix)Cat',cat){
if (!chance_single(catChance)) continue;
class'BlackCat'.static.ConvertNormalCat(cat);
}

//Chance to convert dead cats
foreach AllActors(class'#var(prefix)CatCarcass',catCarc){
if (!chance_single(catChance)) continue;
class'BlackCatCarcass'.static.ConvertNormalCat(catCarc);
}
}

function SpawnJackOLantern(vector loc)
{
local DXRJackOLantern jacko;
Expand Down
33 changes: 32 additions & 1 deletion DXRModules/DeusEx/Classes/DXRTelemetry.uc
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ function CheckConfig()
function AnyEntry()
{
local #var(PlayerPawn) p;

Super.AnyEntry();
#ifdef hx
//SetTimer(300, true);
Expand All @@ -41,6 +42,36 @@ function AnyEntry()
if( p == None ) return;
info("health: "$p.health$", HealthLegLeft: "$p.HealthLegLeft$", HealthLegRight: "$p.HealthLegRight$", HealthTorso: "$p.HealthTorso$", HealthHead: "$p.HealthHead$", HealthArmLeft: "$p.HealthArmLeft$", HealthArmRight: "$p.HealthArmRight);
info("renderer: " $ GetConfig("Engine.Engine", "GameRenderDevice"));

CheckOfflineUpdates();
}

function CheckOfflineUpdates()
{
local DXRNews news;
local DXRNewsWindow newswindow;
local DeusExRootWindow r;

if(enabled) return;// telemetry enabled, get real updates
if(!CanShowNotification()) return;
if(!DateAtLeast(2024, 10, 2)) return;// don't show until Oct 2nd to be safe, especially with timezones

if(!VersionOlderThan(VersionNumber(), 3,3,0,0)) return;// v3.3 doesn't need this notification
if(VersionIsStable() && !VersionOlderThan(VersionNumber(), 3,2,0,0)) return;// a stable branch of v3.2 doesn't need this

newsdates[0] = "2024-10-01";
newsheaders[0] = "v3.2 Halloween Update!";// it's supposed to be a surprise!
newstexts[0] = "You have Online Features disabled, so we can't know for sure, but there's a good chance that the Halloween Update has been released!";

notification_url = "https://github.com/Die4Ever/deus-ex-randomizer/releases/latest";

foreach AllObjects(class'DXRNews', news) {
news.Set(self);
}

r = DeusExRootWindow(player().rootWindow);
newswindow = DXRNewsWindow(r.InvokeUIScreen(class'DXRNewsWindow'));
newswindow.Set(self, newsheaders[0]);
}

function Timer()
Expand Down Expand Up @@ -239,7 +270,7 @@ function CheckNotification(Json j)
function MessageBoxClicked(int button, int callbackId){
Super.MessageBoxClicked(button, callbackId);
if( button == 0 ) {
player().ConsoleCommand("start "$notification_url);
OpenURL(player(), notification_url);
}
//Implementations in subclasses just need to call Super to pop the window, then can handle the message however they want
//Buttons:
Expand Down
11 changes: 11 additions & 0 deletions DXRVanilla/DeusEx/Classes/DXRCat.uc
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
class DXRCat injects #var(prefix)Cat;

function EndPetting(optional bool bInterrupted)
{
Super.EndPetting(bInterrupted);

//A cat purrs if you pet it!
if (!bInterrupted){
PlaySound(sound'CatPurr', SLOT_None,,, 256);
}
}
1 change: 1 addition & 0 deletions DXRVanilla/DeusEx/Classes/Player.uc
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ function CalcBehindView(out vector CameraLocation, out rotator CameraRotation, f
event ClientTravel( string URL, ETravelType TravelType, bool bItems )
{
nextMap = URL;
log("ClientTravel " $ URL @ TravelType @ bItems);
Super.ClientTravel(URL, TravelType, bItems);
}
Expand Down
Binary file modified DeusEx.u
Binary file not shown.
Binary file modified GMDXRandomizer.u
Binary file not shown.
4 changes: 2 additions & 2 deletions GUI/DeusEx/Classes/MenuChoice_JoinDiscord.uc
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ var string discord_url;
// ----------------------------------------------------------------------
function bool ButtonActivated( Window buttonPressed )
{
player.ConsoleCommand("start "$discord_url);
return True;
class'DXRInfo'.static.OpenURL(player, discord_url);
return True;
}

event InitWindow()
Expand Down
2 changes: 1 addition & 1 deletion GUI/DeusEx/Classes/MenuChoice_ReleasePage.uc
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ var string release_url;
// ----------------------------------------------------------------------
function bool ButtonActivated( Window buttonPressed )
{
player.ConsoleCommand("start "$release_url);
class'DXRInfo'.static.OpenURL(player, release_url);
return True;
}

Expand Down
2 changes: 1 addition & 1 deletion GUI/DeusEx/Classes/MenuChoice_Website.uc
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ var string url;
// ----------------------------------------------------------------------
function bool ButtonActivated( Window buttonPressed )
{
player.ConsoleCommand("start "$url);
class'DXRInfo'.static.OpenURL(player, url);
return True;
}

Expand Down
2 changes: 1 addition & 1 deletion GUI/DeusEx/Classes/PersonaScreenBingo.uc
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ event bool BoxOptionSelected(Window msgBoxWindow, int buttonNumber)
if (action=="reset"){
ResetBingoBoard();
} else if (action=="wiki"){
player.ConsoleCommand("start "$bingoWikiUrl);
class'DXRInfo'.static.OpenURL(player, bingoWikiUrl);
}

return True;
Expand Down
3 changes: 1 addition & 2 deletions GUI/DeusEx/Classes/PersonaScreenGoals.uc
Original file line number Diff line number Diff line change
Expand Up @@ -283,8 +283,7 @@ function OpenGoalRandoWikiPage()
}
url = sprintf(goalRandoWikiUrl, missionNum);
player.ConsoleCommand("start "$url);
class'DXRInfo'.static.OpenURL(player, url);
}
function Teleporter findOtherTeleporter(Teleporter nearThis){
Expand Down
Binary file modified HXRandomizer.u
Binary file not shown.
2 changes: 1 addition & 1 deletion Pawns/DeusEx/Classes/BlackCat.uc
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ defaultproperties
CarcassType=class'BlackCatCarcass'
Fatness=132
MultiSkins(0)=Texture'BlackCatTex1'
ScaleGlow=100
ScaleGlow=1
bUnlit=True
}
14 changes: 13 additions & 1 deletion Pawns/DeusEx/Classes/BlackCatCarcass.uc
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
class BlackCatCarcass extends #var(prefix)CatCarcass;


static function ConvertNormalCat(#var(prefix)CatCarcass cat)
{
cat.MultiSkins[0]=class'BlackCatCarcass'.Default.MultiSkins[0];
cat.Fatness=class'BlackCatCarcass'.Default.Fatness;
cat.ScaleGlow=class'BlackCatCarcass'.Default.ScaleGlow; //To help their eyes shine in dark areas
cat.bUnlit=class'BlackCatCarcass'.Default.bUnlit;
}

defaultproperties
{
Multiskins(0)=Texture'BlackCatTex1'
Fatness=132
MultiSkins(0)=Texture'BlackCatTex1'
ScaleGlow=1
bUnlit=True
}
Binary file modified Pawns/DeusEx/Textures/BlackCatTex1.pcx
Binary file not shown.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ Here's a trailer for WaltonWare mode. WaltonWare mode is focused on quick wins b
* WaltonWare mode - A quick option to get into the game without the time commitment of the full game! You start in a random mission and win by completing one bingo. As New Game+ keeps making it harder, see how fast you can complete them or how many you can complete!
* WaltonWare Entrance Rando - both modes combined!
* Zero Rando - great for first-time Deus Ex players to benefit from the bug fixes, QoL improvements, and balance changes we've made, without any randomization.
* Zero Rando Plus - similar to Zero Rando, but with a few more of our balance changes.
* DXRVanillaFixer: This one is for the purists. Use our new installer program and it will do compatibility fixes for the vanilla game (Kentie's Launcher, D3D10, DXVK, Engine.dll fix, and more), then just run DeusEx.exe as normal and the gameplay will be unchanged but with high frame rates and resolutions!
* Randomizer Lite - randomizes some things without interfering with the immersion and mood of the game. Great for players who haven't played Deus Ex in a long time, or if you're intimidated by the full Randomizer.
* Randomizer Medium - similar to Randomizer Lite but with more randomization features enabled by default. Remember you can tweak the settings in the Advanced menu to play with any randomization level you want.
Expand Down
Binary file modified RevRandomizer.u
Binary file not shown.
Binary file modified VMDRandomizer.u
Binary file not shown.
32 changes: 32 additions & 0 deletions notes/notes.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,35 @@

from aizome8086:

(need to compile against a modified Object.uc to remove const on name, so it would have to be in its own package that we don't recompile often)

class FixedEngine extends Object config;

var config string GameRenderDevice;

static final function SetGameRenderDevice(string RenderDevicePath)
{
local Package LastOuterObject;
local Name LastClassName;

LastOuterObject = Default.Class.Outer;
LastClassName = Default.Class.Name;

Default.Class.Outer = class'Engine'.Outer;
Default.Class.Name = 'Engine';
Default.GameRenderDevice = RenderDevicePath;

StaticSaveConfig();

Default.Class.Outer = LastOuterObject;
Default.Class.Name = LastClassName;
}

(could maybe be useful for HUDSpeedrunSplits to save config as separate classes for each difficulty and gamemode?)

-----------------------------
-----------------------------

check gas grenades ammo
loadouts score boosts?

Expand Down

0 comments on commit c2ddce8

Please sign in to comment.