Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v2.6.2 #679

Merged
merged 5 commits into from
Apr 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions DXRCore/DeusEx/Classes/DXRBase.uc
Original file line number Diff line number Diff line change
Expand Up @@ -227,8 +227,6 @@ simulated function bool RandoLevelValues(Actor a, float min, float max, float we

wet = FClamp(wet, 0, 1);

oldseed = SetGlobalSeed(" RandoLevelValues " $ a.class.name );

aug = #var(prefix)Augmentation(a);
sk = #var(prefix)Skill(a);

Expand Down Expand Up @@ -260,6 +258,8 @@ simulated function bool RandoLevelValues(Actor a, float min, float max, float we
removals = 1;
len += removals;

oldseed = SetGlobalSeed(" RandoLevelValues " $ a.class.name );

// choose random points within the 0-1 range, with an extra point so we can remove the median
for(i=0; i < len; i++) {
v = rngexp(0, 100, 1.4) / 100.0;// should this be using a 1.4 curve?
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=2;
minor=6;
patch=2;
build=7;//build can't be higher than 99
build=8;//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
1 change: 1 addition & 0 deletions DXRModules/DeusEx/Classes/DXRAugmentations.uc
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,7 @@ simulated function RandoAug(Augmentation a)
// 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
SetGlobalSeed("RandoAug " $ a.class.name);
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
68 changes: 35 additions & 33 deletions DXRModules/DeusEx/Classes/DXRLoadouts.uc
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ struct _loadouts
var int item_spawns_chances[10];// the % spawned in each map, max of 300%
};

var _loadouts _item_sets[20];
var _loadouts __item_sets[20];

struct RandomItemStruct { var string type; var int chance; };
struct _RandomItemStruct { var class<Inventory> type; var int chance; };
Expand Down Expand Up @@ -147,11 +147,13 @@ function CheckConfig()
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].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";
"WeaponLAW,75,WeaponLAM,100,WeaponEMPGrenade,75,WeaponGasGrenade,75," $
"WeaponNanoVirusGrenade,75,#var(package).WeaponRubberBaton,20,AmmoRocket,100,AmmoRocketWP,100,Ammo20mm,100";

i=0;

Expand Down Expand Up @@ -249,10 +251,10 @@ function AddBan(int s, string type)

if( type == "" ) return;

for(i=0; i < ArrayCount(_item_sets[s].ban_types); i++) {
if( _item_sets[s].ban_types[i] == None ) {
for(i=0; i < ArrayCount(__item_sets[s].ban_types); i++) {
if( __item_sets[s].ban_types[i] == None ) {
a = GetClassFromString(type, class'Inventory');
_item_sets[s].ban_types[i] = class<Inventory>(a);
__item_sets[s].ban_types[i] = class<Inventory>(a);
return;
}
}
Expand All @@ -265,10 +267,10 @@ function AddAllow(int s, string type)

if( type == "" ) return;

for(i=0; i < ArrayCount(_item_sets[s].allow_types); i++) {
if( _item_sets[s].allow_types[i] == None ) {
for(i=0; i < ArrayCount(__item_sets[s].allow_types); i++) {
if( __item_sets[s].allow_types[i] == None ) {
a = GetClassFromString(type, class'Inventory');
_item_sets[s].allow_types[i] = class<Inventory>(a);
__item_sets[s].allow_types[i] = class<Inventory>(a);
return;
}
}
Expand All @@ -281,10 +283,10 @@ function AddStart(int s, string type)

if( type == "" ) return;

for(i=0; i < ArrayCount(_item_sets[s].starting_equipment); i++) {
if( _item_sets[s].starting_equipment[i] == None ) {
for(i=0; i < ArrayCount(__item_sets[s].starting_equipment); i++) {
if( __item_sets[s].starting_equipment[i] == None ) {
a = GetClassFromString(type, class'Inventory');
_item_sets[s].starting_equipment[i] = class<Inventory>(a);
__item_sets[s].starting_equipment[i] = class<Inventory>(a);
return;
}
}
Expand All @@ -297,10 +299,10 @@ function AddAug(int s, string type)

if( type == "" ) return;

for(i=0; i < ArrayCount(_item_sets[s].starting_augs); i++) {
if( _item_sets[s].starting_augs[i] == None ) {
for(i=0; i < ArrayCount(__item_sets[s].starting_augs); i++) {
if( __item_sets[s].starting_augs[i] == None ) {
a = GetClassFromString(type, class'Augmentation');
_item_sets[s].starting_augs[i] = class<Augmentation>(a);
__item_sets[s].starting_augs[i] = class<Augmentation>(a);
return;
}
}
Expand All @@ -313,11 +315,11 @@ function AddItemSpawn(int s, string type, int chances)

if( type == "" ) return;

for(i=0; i < ArrayCount(_item_sets[s].item_spawns); i++) {
if( _item_sets[s].item_spawns[i] == None ) {
for(i=0; i < ArrayCount(__item_sets[s].item_spawns); i++) {
if( __item_sets[s].item_spawns[i] == None ) {
a = GetClassFromString(type, class'Actor');
_item_sets[s].item_spawns[i] = a;
_item_sets[s].item_spawns_chances[i] = chances;
__item_sets[s].item_spawns[i] = a;
__item_sets[s].item_spawns_chances[i] = chances;
return;
}
}
Expand Down Expand Up @@ -346,7 +348,7 @@ function AnyEntry()
// TODO: fix being given items from conversations for other mods
/*foreach AllObjects(class'ConEventTransferObject', c) {
l(c.objectName @ c.giveObject @ c.toName);
if( c.toName == "JCDenton" && is_banned(_item_sets[loadout], c.giveObject) ) {
if( c.toName == "JCDenton" && is_banned(__item_sets[loadout], c.giveObject) ) {
l(c.objectName @ c.giveObject @ c.toName $ ", clearing");
c.toName = "";
c.toActor = None;
Expand Down Expand Up @@ -377,12 +379,12 @@ function bool _is_banned(_loadouts b, class<Inventory> item)

function bool is_banned(class<Inventory> item)
{
return _is_banned( _item_sets[loadout], item);
return _is_banned( __item_sets[loadout], item);
}

function class<Inventory> get_starting_item()
{
return _item_sets[loadout].starting_equipment[0];
return __item_sets[loadout].starting_equipment[0];
}

function bool ban(DeusExPlayer player, Inventory item)
Expand All @@ -391,7 +393,7 @@ function bool ban(DeusExPlayer player, Inventory item)

if(IsMeleeWeapon(item) && Carcass(item.Owner) != None && player.FindInventoryType(item.class) != None) {
return true;
} else if ( _is_banned( _item_sets[loadout], item.class) ) {
} else if ( _is_banned( __item_sets[loadout], item.class) ) {
if( item_sets[loadout].player_message != "" ) {
//item.ItemName = item.ItemName $ ", " $ item_sets[loadout].player_message;
player.ClientMessage(item_sets[loadout].player_message, 'Pickup', true);
Expand Down Expand Up @@ -486,8 +488,8 @@ function bool StartedWithAug(class<Augmentation> a)
{
local class<Augmentation> aclass;
local int i;
for(i=0; i < ArrayCount(_item_sets[loadout].starting_augs); i++) {
aclass = _item_sets[loadout].starting_augs[i];
for(i=0; i < ArrayCount(__item_sets[loadout].starting_augs); i++) {
aclass = __item_sets[loadout].starting_augs[i];
if( aclass == None ) continue;
if( aclass == a ) return true;

Expand All @@ -512,8 +514,8 @@ function AddStartingEquipment(DeusExPlayer p, bool bFrob)
local DeusExWeapon w;
local int i, k;

for(i=0; i < ArrayCount(_item_sets[loadout].starting_equipment); i++) {
iclass = _item_sets[loadout].starting_equipment[i];
for(i=0; i < ArrayCount(__item_sets[loadout].starting_equipment); i++) {
iclass = __item_sets[loadout].starting_equipment[i];
if( iclass == None ) continue;

if( class<DeusExAmmo>(iclass) == None && class'DXRActorsBase'.static.HasItem(p, iclass) )
Expand All @@ -523,8 +525,8 @@ function AddStartingEquipment(DeusExPlayer p, bool bFrob)
if( bFrob && item != None ) item.Frob( p, None );
}

for(i=0; i < ArrayCount(_item_sets[loadout].starting_augs); i++) {
aclass = _item_sets[loadout].starting_augs[i];
for(i=0; i < ArrayCount(__item_sets[loadout].starting_augs); i++) {
aclass = __item_sets[loadout].starting_augs[i];
if( aclass == None ) continue;
class'DXRAugmentations'.static.AddAug( p, aclass, dxr.flags.settings.speedlevel );
}
Expand Down Expand Up @@ -664,10 +666,10 @@ function SpawnItems()

reducer = DXRReduceItems(dxr.FindModule(class'DXRReduceItems'));

for(i=0;i<ArrayCount(_item_sets[loadout].item_spawns);i++) {
aclass = _item_sets[loadout].item_spawns[i];
for(i=0;i<ArrayCount(__item_sets[loadout].item_spawns);i++) {
aclass = __item_sets[loadout].item_spawns[i];
if( aclass == None ) continue;
chance = _item_sets[loadout].item_spawns_chances[i];
chance = __item_sets[loadout].item_spawns_chances[i];
if( chance <= 0 ) continue;

chance /= 3;
Expand Down
2 changes: 1 addition & 1 deletion DXRando/DeusEx/Classes/DXRandoCrowdControlEffects.uc
Original file line number Diff line number Diff line change
Expand Up @@ -1320,7 +1320,7 @@ function ScriptedPawn findOtherHuman(bool bAllowImportant) {
num = 0;

foreach AllActors(class'ScriptedPawn',p) {
if (class'DXRActorsBase'.static.IsHuman(p.class) && p!=player() && !p.bHidden && !p.bStatic && p.bInWorld && p.Orders!='Sitting') {
if (class'DXRActorsBase'.static.IsHuman(p.class) && p!=player() && !p.bHidden && !p.bStatic && p.bInWorld && p.Orders!='Sitting' && !p.Region.Zone.IsA('SkyZoneInfo')) {
if (!p.bImportant || bAllowImportant){
humans[num++] = p;
}
Expand Down
Binary file modified DeusEx.u
Binary file not shown.
Binary file modified GMDXRandomizer.u
Binary file not shown.
Binary file modified HXRandomizer.u
Binary file not shown.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ If you don't know what Deus Ex Randomizer is, then here's our old trailer which
* 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 Changes mode: 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.
* 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.
* Serious Sam mode - same as the normal game but with 10x as many enemies. The player has increased health and takes reduced damage to compensate.
* Speedrun mode - speedrun with fewer resets while still being able to enjoy higher difficulties. And a built in splits viewer!
* Entrance Randomization - changes what level each teleporter takes you to, but keeps it within the same mission
Expand All @@ -81,6 +81,7 @@ If you don't know what Deus Ex Randomizer is, then here's our old trailer which
* No Swords - for people who think the sword and Dragon's Tooth Sword are OP
* No Overpowered Weapons - bans pistols, swords, and the GEP Gun
* By the Book - bans lockpicks and multitools
* Explosives Only
* If you opt-in to Online Features (which is disabled by default, check the Rando menu)
* Your in-game events will also contribute to [our bot on Mastodon (which is an open source and community-run version of Twitter)](https://botsin.space/@DXRandoActivity)
* [Death Markers](https://github.com/Die4Ever/deus-ex-randomizer/wiki/Death-Markers) - see where other players have died!
Expand Down
Binary file modified RevRandomizer.u
Binary file not shown.
Binary file modified VMDRandomizer.u
Binary file not shown.