Skip to content

Commit

Permalink
New player class for Revision to support various Rando QoL features #187
Browse files Browse the repository at this point in the history


This means Revision now gets:
-Medbots that respect your maximum health
-Fixed Camera Mode
-Over The Shoulder cam for third-person instead of ass view
-Aim Laser for third person and fixed cameras
-Support for left-click to consume
-Support for autoapplied weapon mods
-Additional HUD colour schemes (All the new rando ones)
-Support for the various camera rotation Crowd Control effects
(sideways, upside down, barrel roll, Resident Evil mode)
-Alcohol heals legs first
-Balanced healing
-Drugs only get you so fucked up
-Slower burning when on fire so death isn't inevitable
-Passive resistance from Environmental skill
-Adjusted body part damage
-Support for damage multiplier Crowd Control effects
-Support for scrambler grenades toggling augs
-Support for Wine Bullets Crowd Control effect
  • Loading branch information
theastropath committed Dec 30, 2024
1 parent 1969504 commit f47b37f
Show file tree
Hide file tree
Showing 17 changed files with 1,111 additions and 54 deletions.
6 changes: 3 additions & 3 deletions DXRCore/DeusEx/Classes/DXRMenuSetupRando.uc
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,9 @@ function BindControls(optional string action)
NewMenuItem("Camera Mode", "What camera mode should be used");
EnumOption("First Person", 0, f.moresettings.camera_mode);
EnumOption("Third Person", 1, f.moresettings.camera_mode);
#ifdef vanilla
EnumOption("Fixed Camera", 2, f.moresettings.camera_mode);
#endif
if(#defined(vanilla || revision)) {
EnumOption("Fixed Camera", 2, f.moresettings.camera_mode);
}

NewMenuItem("Splits Overlay", "Splits and total game time overlay");
EnumOption("Don't Show", 0, f.moresettings.splits_overlay);
Expand Down
5 changes: 5 additions & 0 deletions DXRMapFixups/DeusEx/Classes/DXRFixupM02.uc
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,11 @@ function PreFirstEntryMapFixes()
l("hiding " $ c @ c.Tag @ c.Event);
c.bHidden = true;// hide it so DXRSwapItems doesn't move it, this is supposed to be inside the plane that flies overhead
}

//Another store room with the same key as AugStore in the RevisionMaps
foreach AllActors(class'DeusExMover', d, 'SwankyStore') {
d.bFrobbable = true;
}
}
foreach AllActors(class'DeusExMover', d, 'AugStore') {
d.bFrobbable = true;
Expand Down
9 changes: 8 additions & 1 deletion DXRMapFixups/DeusEx/Classes/DXRFixupM05.uc
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,9 @@ function PreFirstEntryMapFixes()
function PostFirstEntryMapFixes()
{
local RetinalScanner r;
local bool VanillaMaps;

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

switch(dxr.localURL) {
case "05_NYC_UNATCOHQ":
Expand All @@ -302,7 +305,11 @@ function PostFirstEntryMapFixes()
r.hackStrength = 0;
r.msgUsed = "Access De-/.&*% g r a n t e d";
} else if (r.Event == 'securitytrigger') {
r.Event = 'UNblastdoor';
if (VanillaMaps){
r.Event = 'UNblastdoor';
} else {
r.Event = 'UN_blastdoor'; //Revision changed the tag name on the door
}
r.bHackable = true;
r.hackStrength = 0;
r.msgUsed = "Access De-/.&*% g r a n t e d";
Expand Down
2 changes: 1 addition & 1 deletion DXRMissions/DeusEx/Classes/DXRMissionsM03.uc
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ function int InitGoalsRev(int mission, string map)

AddGoalLocation("03_NYC_747", "Cargo", NORMAL_GOAL | VANILLA_GOAL, vect(-147.147064,-511.348846,158.870544), rot(0,15760,0));
AddGoalLocation("03_NYC_747", "Office", NORMAL_GOAL, vect(6,-736,339), rot(0,-32,0));
AddGoalLocation("03_NYC_747", "Flight Deck", NORMAL_GOAL, vect(1339,-513,484), rot(0,16480,0));
AddGoalLocation("03_NYC_747", "Flight Deck", NORMAL_GOAL, vect(1530,-505,484), rot(0,16480,0));
AddGoalLocation("03_NYC_747", "Bedroom", NORMAL_GOAL, vect(1594,-710,368), rot(0,0,0));
AddGoalLocation("03_NYC_HANGAR", "Near Trailers", NORMAL_GOAL, vect(1867,-1318,29), rot(0,0,0));
AddGoalLocation("03_NYC_HANGAR", "Near Engine", NORMAL_GOAL, vect(4140,-1554,29), rot(0,32776,0));
Expand Down
18 changes: 9 additions & 9 deletions DXRModules/DeusEx/Classes/DXRCameraModes.uc
Original file line number Diff line number Diff line change
Expand Up @@ -116,16 +116,16 @@ function SetThirdPersonCamera()

function SetFixedCamera()
{
#ifdef vanilla
player().bBehindView=False;
player().bCrosshairVisible=False;
player().Style= STY_Normal;
if (reCam==None || reCam.bDeleteMe){
SpawnRECam();
if(#defined(vanilla || revision)){
player().bBehindView=False;
player().bCrosshairVisible=False;
player().Style= STY_Normal;
if (reCam==None || reCam.bDeleteMe){
SpawnRECam();
}
} else {
err("Fixed camera not supported in this mod!");
}
#else
err("Fixed camera only supported in vanilla!");
#endif
}

function SpawnRECam()
Expand Down
2 changes: 1 addition & 1 deletion DXRModules/DeusEx/Classes/DXRFlags.uc
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ simulated function PlayerAnyEntry(#var(PlayerPawn) p)
#endif

Super.PlayerAnyEntry(p);
#ifdef injections
#ifdef injections||revision
p.bZeroRando = IsZeroRandoPure();
p.bReducedRando = IsReducedRando();
p.bCrowdControl = (crowdcontrol!=0);
Expand Down
2 changes: 1 addition & 1 deletion DXRModules/DeusEx/Classes/DXRHints.uc
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,7 @@ simulated function InitHints()
if(dxr.flags.settings.goals > 0)
AddHint("The location of the computer with the ROM Encoding is randomized.", "Check the Goal Randomization page on our Wiki.");
} else if (map ~= "06_HongKong_WanChai_Street") {
AddHint("All that time JC spent practicing the piano...", "All wasted because of your choices.");
AddHint("All that time JC spent practicing the piano...", "All wasted because of your choices.",true);
if(dxr.flags.settings.goals > 0)
AddHint("The Dragon Tooth Sword is randomized in Hong Kong.","Open the case in Maggie Chow's apartment for a hint.");
} else if (map ~= "06_HongKong_VersaLife") {
Expand Down
4 changes: 2 additions & 2 deletions DXRModules/DeusEx/Classes/DXRSkills.uc
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ static simulated function string DescriptionLevelExtended(Actor act, int i, out
return shortDisplay $ p;
}
else if( s.Class == class'#var(prefix)SkillEnviro' ) {
#ifdef vanilla
#ifdef vanilla||revision
word = "Damage Reduction (Passive/HazMat/Armor)";
val = FClamp(val, 0, 1.1);
#else
Expand All @@ -235,7 +235,7 @@ static simulated function string DescriptionLevelExtended(Actor act, int i, out
case 2: r = "|n Advanced: "; break;
case 3: r = "|n Master: "; break;
}
#ifdef vanilla
#ifdef vanilla||revision
shortDisplay = string(int( (1 - (f * 1.1 + 0.3)) * 100.0 ));
r = r $ shortDisplay $ p $ " / "; // passive is * 1.1 + 0.3
r = r $ int( (1 - f * 0.75) * 100.0 ) $ p $ " / ";// hazmat is * 0.75
Expand Down
20 changes: 20 additions & 0 deletions DXRNonVanilla/DeusEx/Classes/DXRandoGameInfo.uc
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,26 @@ function DXRando GetDXR()
return dxr;
}

//To determine whether the player class is allowed in that mode or not
//Vanilla forces you to JCDentonMale if this is false
//Revision forces you to RevJCDentonMale if false
function bool ApproveClass( class<playerpawn> SpawnClass)
{
log("DXRandoGameInfo ApproveClass "$SpawnClass);
#ifdef revision
if (SpawnClass==class'#var(PlayerPawn)') return true;
#endif
return false;
}

event playerpawn Login(string Portal, string Options, out string Error, class<playerpawn> SpawnClass)
{
#ifdef revision
SpawnClass=class'#var(PlayerPawn)'; //Force the player to the rando player class
#endif

return Super.Login(Portal,Options,Error,SpawnClass);
}
event InitGame( String Options, out String Error )
{
Super.InitGame(Options, Error);
Expand Down
Loading

0 comments on commit f47b37f

Please sign in to comment.