def __init__(self) -> None: self.ScalingObject = unrealsdk.FindObject( "ConstantAttributeValueResolver", "GD_Balance_HealthAndDamage.HealthAndDamage.Att_UniversalBalanceScaler:ConstantAttributeValueResolver_0" ) self.Options = [ Options.Slider( Caption="BL2 Scaling", Description= "The game's base scaling value (multiplied by 100). 113 means every level the numbers get 13% higher.", StartingValue=113, MinValue=0, MaxValue=500, Increment=1, IsHidden=Game.GetCurrent() != Game.BL2), Options.Slider( Caption="TPS Scaling", Description= "The game's base scaling value (multiplied by 100). 111 means every level the numbers get 11% higher.", StartingValue=111, MinValue=0, MaxValue=500, Increment=1, IsHidden=Game.GetCurrent() != Game.TPS) ] self.ScalingSlider = cast( Options.Slider, self.Options[1 if self.Options[0].IsHidden else 0])
def __init__(self) -> None: self.OffsetSlider = Options.Slider( Caption="Level Offset", Description= ("A constant offset applied to the intended enemy levels, before any randomization." ), StartingValue=0, MinValue=-50, MaxValue=50, Increment=1) self.MinSlider = Options.Slider( Caption="Max Decrease", Description=( "The maximum amount an enemy's level can be randomly decreased." " Note that a level cannot be decreased below 0."), StartingValue=5, MinValue=0, MaxValue=50, Increment=1) self.MaxSlider = Options.Slider( Caption="Max Increase", Description= "The maximum amount an enemy's level can be randomly increased.", StartingValue=5, MinValue=0, MaxValue=50, Increment=1) self.Options = [self.OffsetSlider, self.MinSlider, self.MaxSlider]
class BackpackManager(SDKMod): Name: str = "Backpack Manager" Author = "FromDarkHell" Description: str = "Customize the size of your character's backpack on the fly!" Version: str = "1.1" Types: ModTypes = ModTypes.Gameplay SaveEnabledState: EnabledSaveType = EnabledSaveType.LoadWithSettings BackpackSize: Options.Slider = Options.Slider( "Backpack", "Change the size of your character's backpack<br>Default is 39", 39, 0, 200, 1) Options = [BackpackSize] @Hook("WillowGame.WillowHUD.CreateWeaponScopeMovie") def _GameLoad(self, caller: unrealsdk.UObject, function: unrealsdk.UFunction, params: unrealsdk.FStruct) -> bool: PC = unrealsdk.GetEngine().GamePlayers[0].Actor if PC and PC.Pawn: PC.Pawn.InvManager.InventorySlotMax_Misc = self.BackpackSize.CurrentValue return True def ModOptionChanged(self, option, newValue) -> None: if option == self.BackpackSize: PC = unrealsdk.GetEngine().GamePlayers[0].Actor if PC and PC.Pawn: PC.Pawn.InvManager.InventorySlotMax_Misc = newValue
def __init__(self) -> None: self.MinDamageSlider = Options.Slider( Description= "The minimum amount of zeros a damage number has to have before it is logged to console.", Caption="Minimum Zeros", StartingValue=6, MinValue=0, MaxValue=40, Increment=1) self.Options = [self.MinDamageSlider]
def __init__(self) -> None: super().__init__() self._DurationOption = Options.Slider( Caption=f"{self.Name} Duration", Description= ("The duration of the effect." " If the duration is longer than the interval, additional redemptions will restart" " the duration timer."), StartingValue=self.Duration, MinValue=0, MaxValue=600, Increment=1) self.Options.append(self._DurationOption)
def __init__(self) -> None: """ Creates the effect - make sure to call this method if you overwrite it. Does not take args. """ super().__init__() self._IntervalOption = Options.Slider( Caption=f"{self.Name} Interval", Description= ("The minimum interval between activations, in seconds." " If the reward is redeemed twice within the interval, it will only activate a" " second time once it expires."), StartingValue=self.Interval, MinValue=0, MaxValue=600, Increment=1) self.Options.append(self._IntervalOption) self._Queue = []
def __init__(self) -> None: self.MultiplierSlider = Options.Slider( Caption="Multiplier", Description="The amount to multiply spawns by.", StartingValue=1, MinValue=1, MaxValue=25, Increment=1) self.SpawnLimitSpinner = Options.Spinner( Caption="Spawn Limit", Description= ("How to handle the spawn limit." f" {SpawnLimitType.Standard}: Don't change it;" f" {SpawnLimitType.Linear}: Increase linearly with the multiplier;" f" {SpawnLimitType.Unlimited}: Remove it."), StartingValue=SpawnLimitType.Linear.value, Choices=[t.value for t in SpawnLimitType], ) self.OldMultiplier = self.MultiplierSlider.CurrentValue self.Options = [self.MultiplierSlider, self.SpawnLimitSpinner] self.CurrentPopMaster = None self.OriginalLimit = 100
def SetDefaultOptions(self) -> None: self.DetailedOption = Options.Boolean( "Detailed Part Names", "Should part names include the weapon and part type they're for rather than just" " the manufacturer.", False) self.FontSizeOption = Options.Slider( "Font Size", "What font size should the parts text use. Decrease this if text is getting cut off.", 14, 8, 24, 1) self.RemoveOption = Options.Boolean( "Remove Descriptions", "Should the default descriptions be removed to create more space for the part" " descriptions.", False) self.Options = [ self.DetailedOption, self.FontSizeOption, self.RemoveOption, ItemClassOption( "Weapons", "WillowWeapon", (PartOption("Accessory", True, ("Accessory1PartDefinition", )), PartOption("2nd Accessory", False, ("Accessory2PartDefinition", )), PartOption("Barrel", True, ("BarrelPartDefinition", )), PartOption("Body", False, ("BodyPartDefinition", )), PartOption("Element", False, ("ElementalPartDefinition", )), PartOption("Grip", True, ("GripPartDefinition", )), PartOption("Material", False, ("MaterialPartDefinition", )), PartOption("Sight", True, ("SightPartDefinition", )), PartOption("Stock", True, ("StockPartDefinition", )), PartOption("Type", False, ("WeaponTypeDefinition", ))), ), ItemClassOption("Shields", "WillowShield", ( PartOption("Accessory", False, ("DeltaItemPartDefinition", )), PartOption( "Battery", True, ("BetaItemPartDefinition", )), PartOption("Body", True, ("AlphaItemPartDefinition", )), PartOption( "Capacitor", True, ("GammaItemPartDefinition", )), PartOption("Material", False, ("MaterialItemPartDefinition", )), PartOption("Type", False, ("ItemDefinition", )), PartOption( "Extras", True, ("EpsilonItemPartDefinition", "ZetaItemPartDefinition", "EtaItemPartDefinition", "ThetaItemPartDefinition"), "Should parts in slots that aren't normally used be shown if they contain a part." ))), ItemClassOption("Grenades", "WillowGrenadeMod", (PartOption("Accessory", False, ("DeltaItemPartDefinition", )), PartOption("Blast Radius", True, ("ZetaItemPartDefinition", )), PartOption("Child Count", True, ("EtaItemPartDefinition", )), PartOption("Damage", False, ("EpsilonItemPartDefinition", )), PartOption("Delivery", True, ("BetaItemPartDefinition", )), PartOption("Material", False, ("MaterialItemPartDefinition", )), PartOption("Payload", False, ("AlphaItemPartDefinition", )), PartOption("Status Damage", False, ("ThetaItemPartDefinition", )), PartOption("Trigger", True, ("GammaItemPartDefinition", )), PartOption("Type", False, ("ItemDefinition", )))), ItemClassOption("Class Mods", "WillowClassMod", ( PartOption("Specialization", True, ("AlphaItemPartDefinition", )), PartOption("Primary", True, ("BetaItemPartDefinition", )), PartOption( "Secondary", True, ("GammaItemPartDefinition", )), PartOption("Penalty", True, ("MaterialItemPartDefinition", )), PartOption("Type", False, ("ItemDefinition", )), PartOption( "Extras", True, ("DeltaItemPartDefinition", "EpsilonItemPartDefinition", "ZetaItemPartDefinition", "EtaItemPartDefinition", "ThetaItemPartDefinition"), "Should parts in slots that aren't normally used be shown if they contain a part." ))), ItemClassOption( "Relics", "WillowArtifact", ( PartOption("Body", False, ("EtaItemPartDefinition", )), PartOption("Upgrade", True, ("ThetaItemPartDefinition", )), # These are the various relic enable effect parts # There isn't really a pattern to them so go with the slot name PartOption("Alpha", False, ("AlphaItemPartDefinition", )), PartOption("Beta", False, ("BetaItemPartDefinition", )), PartOption("Gamma", False, ("GammaItemPartDefinition", )), PartOption("Delta", False, ("DeltaItemPartDefinition", )), PartOption("Epsilon", False, ("EpsilonItemPartDefinition", )), PartOption("Zeta", False, ("ZetaItemPartDefinition", )), PartOption("Type", False, ("ItemDefinition", )), PartOption( "Extras", True, ("MaterialItemPartDefinition", ), "Should parts in slots that aren't normally used be shown if they contain a part." )), IsHidden=Game.GetCurrent() != Game.BL2), ItemClassOption( "Oz Kits", "WillowArtifact", ( PartOption("Body", False, ("EtaItemPartDefinition", )), PartOption("Upgrade", True, ("ThetaItemPartDefinition", )), # These are the various relic enable effect parts # There isn't really a pattern to them so go with the slot name PartOption("Alpha", False, ("AlphaItemPartDefinition", )), PartOption("Beta", False, ("BetaItemPartDefinition", )), PartOption("Gamma", False, ("GammaItemPartDefinition", )), PartOption("Delta", False, ("DeltaItemPartDefinition", )), PartOption("Epsilon", False, ("EpsilonItemPartDefinition", )), PartOption("Zeta", False, ("ZetaItemPartDefinition", )), PartOption("Type", False, ("ItemDefinition", )), PartOption( "Extras", True, ("MaterialItemPartDefinition", ), "Should parts in slots that aren't normally used be shown if they contain a part." )), IsHidden=Game.GetCurrent() != Game.TPS) ]