Skip to content

Commit

Permalink
Merge pull request #134 from Die4Ever/develop
Browse files Browse the repository at this point in the history
v1.5.5 finalizing balance
  • Loading branch information
Die4Ever authored Mar 27, 2021
2 parents 539eb69 + d779521 commit 32b791a
Show file tree
Hide file tree
Showing 15 changed files with 183 additions and 19 deletions.
6 changes: 6 additions & 0 deletions DXRBalance/DeusEx/Classes/DartFlare.uc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
class DXRDartFlare injects DartFlare;

defaultproperties
{
DamageType=FlareFlamed
}
5 changes: 3 additions & 2 deletions DXRFixes/DeusEx/Classes/Carcass.uc
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,10 @@ function DropKeys()
item = Inventory;
while( item != None ) {
nextItem = item.Inventory;
if( item.IsA('NanoKey') ) {
if( item.IsA('NanoKey') || item.bDisplayableInv ) {
DeleteInventory(item);
item.DropFrom(Location);
class'DXRActorsBase'.static.ThrowItem(self, item);
item.Velocity *= vect(-2, -2, 3);
}
item = nextItem;
}
Expand Down
50 changes: 48 additions & 2 deletions DXRFixes/DeusEx/Classes/ScriptedPawn.uc
Original file line number Diff line number Diff line change
@@ -1,24 +1,70 @@
class ScriptedPawn merges ScriptedPawn;
// doesn't work with injects due to use of Self

var int flareBurnTime;

function PlayDying(name damageType, vector hitLoc)
{
local DeusExPlayer p;
local Inventory item, nextItem;
local bool gibbed, drop, melee;

gibbed = (Health < -100) && !IsA('Robot');

if( gibbed ) {
p = DeusExPlayer(GetPlayerPawn());
class'DXRStats'.static.AddGibbedKill(p);
}

item = Inventory;
while( item != None ) {
nextItem = item.Inventory;
melee = item.IsA('WeaponProd') || item.IsA('WeaponBaton') || item.IsA('WeaponCombatKnife') || item.Isa('WeaponCrowbar') || item.IsA('WeaponNanoSword') || item.Isa('WeaponSword');
drop = (item.IsA('NanoKey') && gibbed) || (melee && !gibbed);//don't give the melee weapon if we're getting gibbed, that would make the game easier and this is supposed to be a QoL change not a balance change
drop = (item.IsA('NanoKey') && gibbed) || (melee && !gibbed) || (gibbed && item.bDisplayableInv);
if( drop ) {
class'DXRActorsBase'.static.ThrowItem(self, item);
item.Velocity *= vect(-1, -1, 1.3);
if(gibbed)
item.Velocity *= vect(-2, -2, 2);
else
item.Velocity *= vect(-1.5, -1.5, 1.5);
}
item = nextItem;
}

_PlayDying(damageType, hitLoc);
}

function TakeDamageBase(int Damage, Pawn instigatedBy, Vector hitlocation, Vector momentum, name damageType,
bool bPlayAnim)
{
local name baseDamageType;
local DeusExPlayer p;

if (damageType == 'FlareFlamed') {
baseDamageType = 'Flamed';
} else {
baseDamageType = damageType;
}

_TakeDamageBase(Damage,instigatedBy,hitLocation,momentum,baseDamageType,bPlayAnim);

if (bBurnedToDeath) {
p = DeusExPlayer(GetPlayerPawn());
class'DXRStats'.static.AddBurnKill(p);
}

if (damageType == 'FlareFlamed') {
flareBurnTime = 3;
}
}

function UpdateFire()
{
_UpdateFire();
if (flareBurnTime > 0) {
flareBurnTime -= 1;
if (flareBurnTime == 0) {
ExtinguishFire();
}
}
}
2 changes: 1 addition & 1 deletion DXRModules/DeusEx/Classes/DXREntranceRando.uc
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@ function GenerateConnections(int missionNum)
{
_GenerateConnections(missionNum);
if(ValidateConnections()) {
if( attempts > 20 ) warning("GenerateConnections("$missionNum$") succeeded but took "$attempts$" attempts! seed: "$dxr.seed);
if( attempts > 40 ) warning("GenerateConnections("$missionNum$") succeeded but took "$attempts$" attempts! seed: "$dxr.seed);
return;
}
}
Expand Down
8 changes: 4 additions & 4 deletions DXRModules/DeusEx/Classes/DXRMissions.uc
Original file line number Diff line number Diff line change
Expand Up @@ -797,8 +797,8 @@ function CheckConfig()
i++;

important_locations[i].map_name = map;
important_locations[i].location = vect(-4336.000000, -150, -176.000000);//storage closet
important_locations[i].rotation = rot(0, -16384, 0);
important_locations[i].location = vect(-4096.000000, -816.000000, -128.000000);//storage closet
important_locations[i].rotation = rot(0, 32768, 0);
i++;

important_locations[i].map_name = map;
Expand All @@ -812,8 +812,8 @@ function CheckConfig()
i++;

important_locations[i].map_name = map;
important_locations[i].location = vect(-320.000000, -784.000000, 32.000000);//engine control room
important_locations[i].rotation = rot(3800, 16384, 0);
important_locations[i].location = vect(-288.000000, -432.000000, 96.000000);//engine control room
important_locations[i].rotation = rot(-16384, 16384, 0);
i++;

map = "11_paris_cathedral";
Expand Down
11 changes: 9 additions & 2 deletions DXRModules/DeusEx/Classes/DXRReduceItems.uc
Original file line number Diff line number Diff line change
Expand Up @@ -202,17 +202,24 @@ function SetMaxCopies(class<DeusExPickup> type, int percent)
local DeusExPickup p;
foreach AllActors(class'DeusExPickup', p) {
if( ! p.IsA(type.name) ) continue;
p.maxCopies = float(p.default.maxCopies) * float(percent) / 100.0 * 0.75;
p.maxCopies = float(p.default.maxCopies) * float(percent) / 100.0 * 0.8;
if( p.NumCopies > p.maxCopies ) p.NumCopies = p.maxCopies;
}
}

function SetMaxAmmo(class<Ammo> type, int percent)
{
local Ammo a;
local int demo_add;

demo_add = dxr.Player.SkillSystem.GetSkillLevel(class'SkillDemolition');

foreach AllActors(class'Ammo', a) {
if( ! a.IsA(type.name) ) continue;
a.MaxAmmo = float(a.default.MaxAmmo) * float(percent) / 100.0 * 0.75;
a.MaxAmmo = float(a.default.MaxAmmo) * float(percent) / 100.0 * 0.8;
if( AmmoEMPGrenade(a) != None || AmmoGasGrenade(a) != None || AmmoLAM(a) != None || AmmoNanoVirusGrenade(a) != None )
a.MaxAmmo += demo_add;

if( a.AmmoAmount > a.MaxAmmo ) a.AmmoAmount = a.MaxAmmo;
}
}
Expand Down
9 changes: 9 additions & 0 deletions DXRModules/DeusEx/Classes/DXRSkills.uc
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,16 @@ function RandoSkill(Skill aSkill)

function RandoSkillLevelValues(Skill a)
{
local string add_desc;
RandoLevelValues(a, min_skill_str, max_skill_str, a.Description);

if( SkillDemolition(a) != None ) {
add_desc = "Each level increases the number of grenades you can carry by 1.";
}

if( add_desc != "" && InStr(a.Description, add_desc) == -1 ) {
a.Description = a.Description $ "|n|n" $ add_desc;
}
}

function string DescriptionLevel(Actor act, int i, out string word)
Expand Down
16 changes: 15 additions & 1 deletion DXRModules/DeusEx/Classes/DXRStats.uc
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,16 @@ static function AddDeath(DeusExPlayer p)
IncDataStorageStat(p,'DXRStats_deaths');
}
static function AddBurnKill(DeusExPlayer p)
{
IncStatFlag(p,'DXRStats_burnkills');
}
static function AddGibbedKill(DeusExPlayer p)
{
IncStatFlag(p,'DXRStats_gibbedkills');
}
function int GetDataStorageStat(name valname)
{
local DataStorage datastorage;
Expand All @@ -196,7 +206,7 @@ function int GetDataStorageStat(name valname)
function AddDXRCredits(CreditsWindow cw)
{
local int fired,swings,jumps,deaths;
local int fired,swings,jumps,deaths,burnkills,gibbedkills;
cw.PrintHeader("In-Game Time");
Expand All @@ -219,6 +229,8 @@ function AddDXRCredits(CreditsWindow cw)
fired = dxr.Player.FlagBase.GetInt('DXRStats_shotsfired');
swings = dxr.Player.FlagBase.GetInt('DXRStats_weaponswings');
jumps = dxr.Player.FlagBase.GetInt('DXRStats_jumps');
burnkills = dxr.Player.FlagBase.GetInt('DXRStats_burnkills');
gibbedkills = dxr.Player.FlagBase.GetInt('DXRStats_gibbedkills');
deaths = GetDataStorageStat('DXRStats_deaths');

cw.PrintHeader("Statistics");
Expand All @@ -228,6 +240,8 @@ function AddDXRCredits(CreditsWindow cw)
cw.PrintText("Jumps: "$jumps);
cw.PrintText("Nano Keys: "$dxr.player.KeyRing.GetKeyCount());
cw.PrintText("Skill Points Earned: "$dxr.Player.SkillPointsTotal);
cw.PrintText("Enemies Burned to Death: "$burnkills);
cw.PrintText("Enemies Gibbed: "$gibbedkills);
cw.PrintText("Deaths: "$deaths);

cw.PrintLn();
Expand Down
4 changes: 2 additions & 2 deletions DXRando/DeusEx/Classes/DXRActorsBase.uc
Original file line number Diff line number Diff line change
Expand Up @@ -204,9 +204,9 @@ static function ThrowItem(Actor a, Inventory item)
{
if( Pawn(a) != None )
Pawn(a).DeleteInventory(item);
item.DropFrom(a.Location);
item.DropFrom(a.Location + VRand()*32);
// kinda copied from DeusExPlayer DropItem function
item.Velocity = vector(a.rotation) * 300 + vect(0,0,220);
item.Velocity = vector(a.rotation) * 300 + vect(0,0,220) + VRand()*32;
}

function bool SkipActorBase(Actor a)
Expand Down
8 changes: 5 additions & 3 deletions DXRando/DeusEx/Classes/DXRBase.uc
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ function float rngexp(float min, float max, float curve)
return pow(f, curve);
}

function RandoLevelValues(Actor a, float min, float max, out string Desc)
function bool RandoLevelValues(Actor a, float min, float max, out string Desc)
{
local Augmentation aug;
local Skill sk;
Expand Down Expand Up @@ -137,9 +137,11 @@ function RandoLevelValues(Actor a, float min, float max, out string Desc)

s = "(" $ word $ ": " $ s $ ")";
if( InStr(Desc, s) == -1 )
if( InStr(Desc, s) == -1 ) {
Desc = Desc $ "|n|n" $ s;
return true;
}
return false;
}
function string DescriptionLevel(Actor a, int i, out string word)
Expand Down
11 changes: 11 additions & 0 deletions DXRando/DeusEx/Classes/HUDObjectBelt.uc
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
class DXRHUDObjectBelt injects HUDObjectBelt;

function UpdateObjectText(int pos)
{
local int i;

//Update all belt texts (So that ammo counts are shown correctly)
for (i=0; i<ArrayCount(objects); i++) {
if(objects[i] != None) objects[i].UpdateItemText();
}
}
68 changes: 68 additions & 0 deletions DXRando/DeusEx/Classes/HUDObjectSlot.uc
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
class DXRHUDObjectSlot injects HUDObjectSlot;

var String ammoText;

event DrawWindow(GC gc)
{
Super.DrawWindow(gc);

// Don't draw any of this if we're dragging
if ((item != None) && (item.Icon != None) && (!bDragging))
{
// Text defaults
gc.SetAlignments(HALIGN_Center, VALIGN_Center);
gc.EnableWordWrap(false);
gc.SetTextColor(colObjectNum);

if (ammoText!="") {
gc.SetAlignments(HALIGN_Left, VALIGN_Center);
gc.DrawText(slotIconX+2, itemTextPosY-8, slotFillWidth, 8, ammoText);
gc.SetAlignments(HALIGN_Center, VALIGN_Center);

}
}
}

function bool ShouldDisplayAmmo(DeusExWeapon weapon)
{
if ( weapon.AmmoType == None || weapon.AmmoName == class'AmmoNone' ) {
return False;
}

if (weapon.bHandToHand == True) {
return False;
}

if (weapon.IsA('WeaponNanoVirusGrenade') ||
weapon.IsA('WeaponGasGrenade') ||
weapon.IsA('WeaponEMPGrenade') ||
weapon.IsA('WeaponLAM'))
{
return False;
}

return True;
}


function UpdateItemText()
{
local DeusExWeapon weapon;

super.UpdateItemText();

ammoText = "";
// If this is a weapon, show the number of remaining rounds
weapon = DeusExWeapon(item);
if (weapon != None)
{
if (weapon.IsA('WeaponShuriken'))
{
if (weapon.AmmoType.AmmoAmount > 1)
itemText = CountLabel @ weapon.AmmoType.AmmoAmount;
} else {
if (ShouldDisplayAmmo(weapon))
ammoText = string(weapon.AmmoType.AmmoAmount);
}
}
}
2 changes: 1 addition & 1 deletion DXRando/DeusEx/Classes/MenuSelectDifficulty.uc
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ function BindControls(bool writing, optional string action)
f.skills_independent_levels = 100;
f.minskill = 50;
f.maxskill = 400;
f.ammo = 30;
f.ammo = 35;
f.medkits = 50;
f.biocells = 30;
f.lockpicks = 30;
Expand Down
Binary file modified DeusEx.u
Binary file not shown.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ There are also settings for

For the randomized passwords, you can copy-paste from the Goals/Notes screen.

I've also made some balance tweaks. Hacking computers now uses bioelectric energy. The healing aug gives less health. Level 1 of the speed aug has been buffed, but max level remains the same. Dragon's Tooth Sword now does much less damage, but if you aim for the head you can still kill most enemies in 1 hit. Thowing knives deal more damage, and their speed and range increase with your low tech skill. Spy Drone aug has improved speed and the emp blast now also does explosive damage. Fire extinguishers now stack in your inventory. Also the PS20 has been upgraded to the PS40 and does significantly more damage. Paul is now mortal during the raid in mission 4, so you need to help him fight! Also the swimming, enviro, and demolition skills are now 20% cheaper.
I've also made some balance tweaks. Hacking computers now uses bioelectric energy. The healing aug gives less health. Level 1 of the speed aug has been buffed, but max level remains the same. Dragon's Tooth Sword now does much less damage, but if you aim for the head you can still kill most enemies in 1 hit. Thowing knives deal more damage, and their speed and range increase with your low tech skill. Spy Drone aug has improved speed and the emp blast now also does explosive damage. Fire extinguishers now stack in your inventory. Also the PS20 has been upgraded to the PS40 and does significantly more damage. Paul is now mortal during the raid in mission 4, so you need to help him fight! Also the swimming, enviro, and demolition skills are now 20% cheaper. Demolition skill allows you to carry more grenades at once. Gibbed enemies now drop all their items. Flare darts now set enemies on fire for 3 seconds.

### Recommended tweaks for running Deus Ex on modern computers

Expand Down

0 comments on commit 32b791a

Please sign in to comment.