Skip to content

Commit

Permalink
v2.6.2 Beta Merge pull request #671 from Die4Ever/develop
Browse files Browse the repository at this point in the history
* fix WeaponRubberBaton reference for non vanilla mods

* Rando options menu fix Restore Defaults button

* reduce lower-bound door/keypad strength adjustments

* fearless Leo Gold

* fix death animation showing first person weapon and hand

* reduce melee throw distance when enemies die

* DXRando.default.dxr singleton reference

* Show Teleporters option for "According to Game Mode"

* decrease ammo drop velocities from weapons

* fix for doors and keypads that had 0 strength

* MAHOGANY

* synthetic heart auto tweaks: shorter linger, no more energy penalty

* aug descriptions show auto and linger time

* cleanup MenuChoice_ShowTeleporters functions

* Explosives Only! (#672)

* add explosives only loadout

* soawb AmmoRockets instead of WeaponGEPGuns in explosivesly only mode

* player_message only!

* add #var(package) in "explosives only" allows

Co-authored-by: Die4Ever <30947252+Die4Ever@users.noreply.github.com>

* add package prefixes to WeaponRubberBatons

---------

Co-authored-by: Die4Ever <30947252+Die4Ever@users.noreply.github.com>

* rubber baton updates, can't hurt pawns, 3 base damage, now affected by skill

* rubber baton damage fish for bingo purposes

* fix loadout grenades only definition

* DXRando clean up error on overwriting singleton

* v2.6.2.4 Beta builds

---------

Co-authored-by: Jeffrey Thomas Piercy <mqduck@mqduck.net>
  • Loading branch information
Die4Ever and MQDuck authored Mar 31, 2024
2 parents 36a23c0 + 69721dc commit 30846e2
Show file tree
Hide file tree
Showing 54 changed files with 189 additions and 249 deletions.
9 changes: 2 additions & 7 deletions DXRBalance/DeusEx/Classes/AugAqualung.uc
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,6 @@ function PostPostBeginPlay()
Description = default.Description;
}

simulated function SetAutomatic()
{
Super.SetAutomatic();
// aqualung doesn't take the penalty for being automatic, this one is just a gift
energyRate = default.energyRate;
}

simulated function bool IsTicked()
{// aqualung is perfectly automatic
local bool bWater;
Expand All @@ -28,6 +21,8 @@ simulated function bool IsTicked()
defaultproperties
{
bAutomatic=true
AutoLength=0
AutoEnergyMult=1// no penalty, it's a gift
MaxLevel=1
Description="Soda lime exostructures imbedded in the alveoli of the lungs convert CO2 to O2, extending the time an agent can remain underwater.|n|nTECH ONE: Lung capacity is extended moderately.|n|nTECH TWO: An agent can stay underwater indefinitely."
LevelValues(0)=60.000000
Expand Down
2 changes: 1 addition & 1 deletion DXRBalance/DeusEx/Classes/AugCombat.uc
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,5 @@ simulated function TickUse()
defaultproperties
{
bAutomatic=true
AutoLength=2.25// combat aug specifically makes sense to only use energy while active? a little extra so it doesn't fall in between ticks?
AutoLength=2.2// combat aug specifically makes sense to only use energy while active? a little extra so it doesn't fall in between ticks?
}
4 changes: 2 additions & 2 deletions DXRBalance/DeusEx/Classes/AugDisplayWindow.uc
Original file line number Diff line number Diff line change
Expand Up @@ -308,8 +308,8 @@ function DrawTargetAugmentation(GC gc)

// check 500 feet in front of the player
target = TraceHoverHint(8000);
if(class'MenuChoice_ShowTeleporters'.default.show_teleporters > 1) {
tgtTeleporter = #var(prefix)Teleporter(target);
if(class'MenuChoice_ShowTeleporters'.static.ShowDescriptions()) {
tgtTeleporter = #var(prefix)Teleporter(target);
}

// display teleporter destinations
Expand Down
2 changes: 2 additions & 0 deletions DXRBalance/DeusEx/Classes/AugHeartLung.uc
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,6 @@ class DXRAugHeartLung injects AugHeartLung;
defaultproperties
{
bAutomatic=true
AutoLength=1.2
AutoEnergyMult=1
}
8 changes: 8 additions & 0 deletions DXRCore/DeusEx/Classes/DXRBase.uc
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,14 @@ simulated function bool RandoLevelValues(Actor a, float min, float max, float we

s = "(DXRando) " $ word $ ":|n " $ s;
#ifdef injections
if(aug != None && aug.bAutomatic) {
s = s $ "|n|nThis aug is automatic";
if(aug.AutoLength>0.1) s = s $ ", with a linger time of " $ TrimTrailingZeros(aug.AutoLength) $ " seconds";
s = s $ ".";
}
#endif
l("RandoLevelValues "$a$" = "$s);
ReapplySeed( oldseed );
Expand Down
4 changes: 2 additions & 2 deletions DXRCore/DeusEx/Classes/DXRVersion.uc
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ simulated static function CurrentVersion(optional out int major, optional out in
major=2;
minor=6;
patch=2;
build=3;//build can't be higher than 99
build=4;//build can't be higher than 99
}

simulated static function bool VersionIsStable()
Expand All @@ -18,7 +18,7 @@ simulated static function string VersionString(optional bool full)
local int major,minor,patch,build;
local string status;

status = "Alpha";
status = "Beta";

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 @@ -12,6 +12,7 @@ var int seed, tseed;

var transient private int CrcTable[256]; // for string hashing to do more stable seeding

var DXRando dxr;// singleton reference in default
var transient DXRBase modules[48];
var transient int num_modules;

Expand Down Expand Up @@ -112,6 +113,8 @@ function DXRInit()
flags.InitCoordsMult();// for some reason flags is loaded too early and doesn't have the new map url
flags.LoadFlags();
LoadModules();
dxr = self;
default.dxr = self;// singleton reference
RandoEnter();
}

Expand Down
7 changes: 7 additions & 0 deletions DXRFixes/DeusEx/Classes/Carcass.uc
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,8 @@ function bool TryLootItem(DeusExPlayer player, Inventory item)
local DeusExPickup invItem;
local int itemCount;
local int ammoAdded, ammoLeftover, ammoPrevious;
local DXRando dxr;
local DXRLoadouts loadout;

if (item.IsA('DeusExWeapon'))
{
Expand Down Expand Up @@ -242,6 +244,11 @@ function bool TryLootItem(DeusExPlayer player, Inventory item)

if (item.IsA('DeusExWeapon')) // I *really* hate special cases
{
dxr = class'DXRando'.default.dxr;
loadout = DXRLoadouts(dxr.FindModule(class'DXRLoadouts'));
if (loadout != None && loadout.is_banned(Weapon(item).AmmoName))
Weapon(item).PickupAmmoCount = 0;

// Okay, check to see if the player already has this weapon. If so,
// then just give the ammo and not the weapon. Otherwise give
// the weapon normally.
Expand Down
4 changes: 2 additions & 2 deletions DXRFixes/DeusEx/Classes/ScriptedPawn.uc
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ function ThrowInventory(bool gibbed)
if( Ammo(item) != None )
drop = false;
if( drop ) {
class'DXRActorsBase'.static.ThrowItem(item, 1.0);
class'DXRActorsBase'.static.ThrowItem(item, 0.3);
if(gibbed)
item.Velocity *= vect(-2, -2, 2);
item.Velocity *= vect(-10, -10, 10);
else
item.Velocity *= vect(-1.5, -1.5, 1.5);
}
Expand Down
4 changes: 4 additions & 0 deletions DXRMapFixups/DeusEx/Classes/DXRFixupM04.uc
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,10 @@ function PreFirstEntryMapFixes()
hc.bImportant = true;
}

if(IsAprilFools()) {
Spawnm(class'MahoganyDesk',,, vect(646.848999, 1524.899902, 263.097137), rot(0, -16384, 0));
}

break;

case "04_NYC_BATTERYPARK":
Expand Down
4 changes: 4 additions & 0 deletions DXRMissions/DeusEx/Classes/DXRMissionsM01.uc
Original file line number Diff line number Diff line change
Expand Up @@ -169,5 +169,9 @@ function AfterMoveGoalToLocation(Goal g, GoalLocation Loc)
$ "|nIf you get really stuck then click on Show Spoilers, Show Nanokeys, or Show Datacubes.";

SpawnDatacubePlaintext(vectm(2801.546387, 171.028091, 2545.382813), rotm(0,0,0), text, true);

if(ScriptedPawn(g.actors[0].a) != None) {
RemoveFears(ScriptedPawn(g.actors[0].a));
}
}
}
6 changes: 1 addition & 5 deletions DXRMissions/DeusEx/Classes/DXRMissionsM06.uc
Original file line number Diff line number Diff line change
Expand Up @@ -273,10 +273,6 @@ function AfterMoveGoalToLocation(Goal g, GoalLocation Loc)

if (Loc.name == "Overlook Office") {
// spawn the MAHOGANY desk (CreateGoal only gets called for different maps)
g.actors[1].a = Spawnm(class'#var(prefix)WHDeskOvalOffice',,,Loc.positions[1].pos, Loc.positions[1].rot);
if(g.actors[1].a != None) {
#var(prefix)WHDeskOvalOffice(g.actors[1].a).ItemName = "Mahogany Desk";
#var(prefix)WHDeskOvalOffice(g.actors[1].a).HitPoints *= 4;
}
g.actors[1].a = Spawnm(class'MahoganyDesk',,,Loc.positions[1].pos, Loc.positions[1].rot);
}
}
6 changes: 1 addition & 5 deletions DXRMissions/DeusEx/Classes/DXRMissionsM09.uc
Original file line number Diff line number Diff line change
Expand Up @@ -334,11 +334,7 @@ function AfterMoveGoalToLocation(Goal g, GoalLocation Loc)

if (g.name=="Bilge Pump Computer" && Loc.name=="Helipad Air Control") {
// spawn the MAHOGANY desk (CreateGoal only gets called for different maps)
g.actors[1].a = Spawnm(class'#var(prefix)WHDeskOvalOffice',,,Loc.positions[1].pos, Loc.positions[1].rot);
if(g.actors[1].a != None) {
#var(prefix)WHDeskOvalOffice(g.actors[1].a).ItemName = "Mahogany Desk";
#var(prefix)WHDeskOvalOffice(g.actors[1].a).HitPoints *= 4;
}
g.actors[1].a = Spawnm(class'MahoganyDesk',,,Loc.positions[1].pos, Loc.positions[1].rot);
}
}

Expand Down
7 changes: 5 additions & 2 deletions DXRModules/DeusEx/Classes/DXRAugmentations.uc
Original file line number Diff line number Diff line change
Expand Up @@ -329,15 +329,18 @@ simulated function RandoAug(Augmentation a)
a.Description = add_desc $ "|n|n" $ a.Description;
}

if( #var(prefix)AugSpeed(a) != None || #var(prefix)AugLight(a) != None || #var(prefix)AugHeartLung(a) != None
if( #var(prefix)AugSpeed(a) != None || #var(prefix)AugLight(a) != None
|| #var(prefix)AugIFF(a) != None || #var(prefix)AugDatalink(a) != None || AugNinja(a) != None )
return;

aug_value_wet_dry = float(dxr.flags.settings.aug_value_rando) / 100.0;
if((#var(prefix)AugVision(a) != None || #var(prefix)AugMuscle(a) != None) && aug_value_wet_dry > 0) {
if(( aug_value_wet_dry > 0
&& ( #var(prefix)AugVision(a) != None || #var(prefix)AugMuscle(a) != None) || #var(prefix)AugHeartLung(a) != None )
) {
// don't randomize vision aug strength and instead randomize its energy usage
// so it can be used for speedrun strategies with specific spots to check from
// aug muscle picking up heavy items is confusing when the strength is randomized, just randomize the energy cost
// synth heart, can't randomize its strength, just randomize energy cost
a.energyRate = int(rngrange(a.default.energyRate, 0.5, 1.5));
aug_value_wet_dry = 0;
add_desc = add_desc $ "Energy Rate: "$int(a.energyRate)$" Units/Minute";
Expand Down
2 changes: 1 addition & 1 deletion DXRModules/DeusEx/Classes/DXRAutosave.uc
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ function CheckConfig()
save_delay = 0.1;
}
Super.CheckConfig();
autosave_combat = class'MenuChoice_AutosaveCombat'.default.autosave_combat;
autosave_combat = class'MenuChoice_AutosaveCombat'.default.value;
}

function BeginPlay()
Expand Down
9 changes: 6 additions & 3 deletions DXRModules/DeusEx/Classes/DXRCameraModes.uc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class DXRCameraModes expands DXRActorsBase;
class DXRCameraModes expands DXRActorsBase transient;

var int tempCameraMode;
var CCResidentEvilCam reCam;
Expand Down Expand Up @@ -121,15 +121,18 @@ function SetCameraMode(int mode)
{
local name stateName;

//player().ClientMessage("tempCameraMode: "$tempCameraMode$" mode being set: "$mode);

if (player()!=None){
stateName = player().GetStateName();

//These are the possible states when you're in a cutscene
if (stateName=='Interpolating' || stateName=='Paralyzed'){
mode = CM_FirstPerson; //Leave it in first person
} else if (stateName=='Dying') {
return; // setting camera mode while dying causes your weapon and hand to show after dying
}
} else {
err("SetCameraMode no player");
return;
}

switch(mode){
Expand Down
19 changes: 9 additions & 10 deletions DXRModules/DeusEx/Classes/DXRDatacubes.uc
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
class DXRDatacubes extends DXRPasswordsBase abstract;

var safe_rule datacubes_rules[16];
var config float min_hack_adjust, max_hack_adjust;
var float min_hack_adjust, max_hack_adjust;

function CheckConfig()
{
local int i;
if( ConfigOlderThan(2,3,4,3) ) {
min_hack_adjust = 0.5;
max_hack_adjust = 1.5;
}
min_hack_adjust = 0.4;
max_hack_adjust = 1.5;

if(class'DXRMapVariants'.static.IsRevisionMaps(player()))
revision_datacubes_rules();
else
Expand Down Expand Up @@ -558,9 +557,9 @@ function RandoHacks()

function _RandoHackable(#var(prefix)HackableDevices h)
{
if( h.bHackable ) {
h.hackStrength = FClamp(rngrange(h.hackStrength, min_hack_adjust, max_hack_adjust), 0, 1);
h.hackStrength = int(h.hackStrength*100)/100.0;
if( h.bHackable && h.hackStrength>0 ) {
h.hackStrength = rngrange(h.hackStrength, min_hack_adjust, max_hack_adjust);
h.hackStrength = Clamp(h.hackStrength*100, 1, 100)/100.0;
h.initialhackStrength = h.hackStrength;
}
}
Expand Down Expand Up @@ -653,8 +652,8 @@ function MakeAllHackable(int deviceshackable)
if( h.bHackable == false && chance_single(deviceshackable) ) {
l("found unhackable device: " $ ActorToString(h) $ ", tag: " $ h.Tag $ " in " $ dxr.localURL);
h.bHackable = true;
h.hackStrength = FClamp(rngrange(1, min_hack_adjust, max_hack_adjust), 0, 1);
h.hackStrength = int(h.hackStrength*100)/100.0;
h.hackStrength = rngrange(1, min_hack_adjust, max_hack_adjust);
h.hackStrength = Clamp(h.hackStrength*100, 1, 100) / 100.0;
h.initialhackStrength = h.hackStrength;
}

Expand Down
20 changes: 10 additions & 10 deletions DXRModules/DeusEx/Classes/DXRDoors.uc
Original file line number Diff line number Diff line change
Expand Up @@ -205,11 +205,11 @@ function CheckConfig()
break;
}

min_lock_adjust=0.5;
min_lock_adjust=0.4;
max_lock_adjust=1.5;
min_door_adjust=0.5;
min_door_adjust=0.4;
max_door_adjust=1.5;
min_mindmg_adjust=0.35;
min_mindmg_adjust=0.3;
max_mindmg_adjust=1.2;

Super.CheckConfig();
Expand Down Expand Up @@ -251,14 +251,14 @@ function RandomizeDoors()
if(d.minDamageThreshold <= 5)
d.minDamageThreshold = 0;

if( d.bPickable ) {
d.lockStrength = FClamp(rngrange(d.lockStrength, min_lock_adjust, max_lock_adjust), 0, 1);
d.lockStrength = int(d.lockStrength*100)/100.0;
if( d.bPickable && d.lockStrength>0 ) {
d.lockStrength = rngrange(d.lockStrength, min_lock_adjust, max_lock_adjust);
d.lockStrength = Clamp(d.lockStrength*100, 1, 100)/100.0;
d.initiallockStrength = d.lockStrength;
}
if( d.bBreakable ) {
d.doorStrength = FClamp(rngrange(d.doorStrength, min_door_adjust, max_door_adjust), 0, 1);
d.doorStrength = int(d.doorStrength*100)/100.0;
d.doorStrength = rngrange(d.doorStrength, min_door_adjust, max_door_adjust);
d.doorStrength = Clamp(d.doorStrength*100, 1, 100)/100.0;
d.minDamageThreshold = rngrange(d.minDamageThreshold, min_mindmg_adjust, max_mindmg_adjust);
#ifndef injections
// without injections we can't augment the highlight window to show mindamagethreshold, so keep it simple for the player
Expand Down Expand Up @@ -427,8 +427,8 @@ function MakePickable(#var(DeusExPrefix)Mover d)
}
if( d.bPickable == false ) {
d.bPickable = true;
d.lockStrength = FClamp(rngrange(0.8, min_door_adjust, max_door_adjust), 0, 1);
d.lockStrength = int(d.lockStrength*100)/100.0;
d.lockStrength = rngrange(0.7, min_lock_adjust, max_lock_adjust);
d.lockStrength = Clamp(d.lockStrength*100, 1, 100)/100.0;
d.initiallockStrength = d.lockStrength;
}
}
Expand Down
6 changes: 3 additions & 3 deletions DXRModules/DeusEx/Classes/DXRFixup.uc
Original file line number Diff line number Diff line change
Expand Up @@ -259,12 +259,12 @@ function AnyEntry()
function ShowTeleporters()
{
local #var(prefix)Teleporter t;
local int show_teleporters;
local bool hide;

show_teleporters = class'MenuChoice_ShowTeleporters'.default.show_teleporters;
hide = ! class'MenuChoice_ShowTeleporters'.static.ShowTeleporters();

foreach AllActors(class'#var(prefix)Teleporter', t) {
t.bHidden = !(t.bCollideActors && t.bEnabled && show_teleporters>0);
t.bHidden = hide || !t.bCollideActors || !t.bEnabled;
t.DrawScale = 0.75;
}
}
Expand Down
25 changes: 17 additions & 8 deletions DXRModules/DeusEx/Classes/DXRLoadouts.uc
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ function CheckConfig()
local string temp;
local int i, s;
local class<Actor> a;
if( ConfigOlderThan(2,6,2,3) ) {
if( ConfigOlderThan(2,6,2,4) ) {
mult_items_per_level = 1;

for(i=0; i < ArrayCount(loadouts_order); i++) {
Expand Down Expand Up @@ -93,10 +93,10 @@ function CheckConfig()
item_sets[2].name = "Stick With the Prod Plus";
item_sets[2].player_message = "Stick with the prod!";
item_sets[2].bans = "Engine.Weapon,AmmoDart";
item_sets[2].allows = "WeaponProd,WeaponEMPGrenade,WeaponGasGrenade,WeaponMiniCrossbow,AmmoDartPoison,WeaponNanoVirusGrenade,WeaponPepperGun,WeaponRubberBaton";
item_sets[2].starting_equipments = "WeaponProd,AmmoBattery,WeaponRubberBaton";
item_sets[2].allows = "WeaponProd,WeaponEMPGrenade,WeaponGasGrenade,WeaponMiniCrossbow,AmmoDartPoison,WeaponNanoVirusGrenade,WeaponPepperGun,#var(package).WeaponRubberBaton";
item_sets[2].starting_equipments = "WeaponProd,AmmoBattery,#var(package).WeaponRubberBaton";
item_sets[2].starting_augs = "AugStealth,AugMuscle";
item_sets[2].item_spawns = "WeaponProd,30,WeaponMiniCrossbow,30,WeaponRubberBaton,20";
item_sets[2].item_spawns = "WeaponProd,30,WeaponMiniCrossbow,30,#var(package).WeaponRubberBaton,20";

item_sets[3].name = "Ninja JC";
item_sets[3].player_message = "I am Ninja!";
Expand All @@ -121,11 +121,11 @@ function CheckConfig()
item_sets[5].starting_equipments = "WeaponCrowbar";

item_sets[6].name = "Grenades Only";
item_sets[6].player_message = "Grenades Only";
item_sets[6].player_message = "Grenades Only!";
item_sets[6].bans = "Engine.Weapon";
item_sets[6].allows = "WeaponLAM,WeaponGasGrenade,WeaponNanoVirusGrenade,WeaponEMPGrenade";
item_sets[6].starting_equipments = "WeaponLAM,WeaponGasGrenade,WeaponNanoVirusGrenade,WeaponEMPGrenade";
item_sets[6].item_spawns = "WeaponLAM,50,WeaponGasGrenade,50,WeaponNanoVirusGrenade,50,WeaponEMPGrenade,50";
item_sets[6].allows = "WeaponLAM,WeaponGasGrenade,WeaponNanoVirusGrenade,WeaponEMPGrenade,#var(package).WeaponRubberBaton";
item_sets[6].starting_equipments = "WeaponLAM,WeaponGasGrenade,WeaponNanoVirusGrenade,WeaponEMPGrenade,#var(package).WeaponRubberBaton";
item_sets[6].item_spawns = "WeaponLAM,50,WeaponGasGrenade,50,WeaponNanoVirusGrenade,50,WeaponEMPGrenade,50,#var(package).WeaponRubberBaton,20";

item_sets[7].name = "No Pistols";
item_sets[7].player_message = "No Pistols";
Expand All @@ -144,6 +144,15 @@ function CheckConfig()
item_sets[10].bans = "Lockpick,Multitool";
item_sets[10].starting_augs = "AugStealth";

item_sets[11].name = "Explosives Only";
item_sets[11].player_message = "Explosives Only!";
item_sets[11].bans = "Engine.Weapon,Ammo762mm";
item_sets[11].allows = "WeaponGEPGun,WeaponLAW,WeaponLAM,WeaponEMPGrenade,WeaponGasGrenade,WeaponNanoVirusGrenade,WeaponAssaultGun,#var(package).WeaponRubberBaton";
item_sets[11].starting_equipments = "WeaponGEPGun,#var(package).WeaponRubberBaton";
item_sets[11].item_spawns =
"WeaponLAW,133,WeaponLAM,200,WeaponEMPGrenade,133,WeaponGasGrenade,133," $
"WeaponNanoVirusGrenade,133,#var(package).WeaponRubberBaton,20,AmmoRocket,200,AmmoRocketWP,200";

i=0;

randomitems[i].type = "Medkit";
Expand Down
Loading

0 comments on commit 30846e2

Please sign in to comment.