Example #1
0
    def __init__(self) -> None:
        # Hopefully I can remove this in a future SDK update
        self.Author += "\nVersion: " + str(self.Version)  # type: ignore

        self.ScalingObject = unrealsdk.FindObject(
            "ConstantAttributeValueResolver",
            "GD_Balance_HealthAndDamage.HealthAndDamage.Att_UniversalBalanceScaler:ConstantAttributeValueResolver_0"
        )

        self.Options = [
            OptionsWrapper.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=not self.IS_BL2),
            OptionsWrapper.Slider(
                Caption="TPS Scaling",
                Description=
                "The game's base scaling value (multiplied by 100). 113 means every level the numbers get 13% higher.",
                StartingValue=111,
                MinValue=0,
                MaxValue=500,
                Increment=1,
                IsHidden=self.IS_BL2)
        ]

        self.ScalingSlider = cast(OptionsWrapper.Slider,
                                  self.Options[0 if self.IS_BL2 else 1])
Example #2
0
    def __init__(self) -> None:
        # Hopefully I can remove this in a future SDK update
        self.Author += "\nVersion: " + str(self.Version)  # type: ignore

        self.MultiplierSlider = OptionsWrapper.Slider(
            Caption="Multiplier",
            Description="The amount to multiply spawns by.",
            StartingValue=1,
            MinValue=1,
            MaxValue=25,
            Increment=1)
        self.SpawnLimitSpinner = OptionsWrapper.Spinner(
            Caption="Spawn Limit",
            Description=("How to handle the spawn limit."
                         " Standard: Don't change it;"
                         " Linear: Increase linearly with the multiplier;"
                         " Unlimited: Remove it."),
            StartingChoice="Linear",
            Choices=("Standard", "Linear", "Unlimited"),
        )
        self.OldMultiplier = self.MultiplierSlider.CurrentValue

        self.Options = [self.MultiplierSlider, self.SpawnLimitSpinner]

        self.CurrentPopMaster = None
        self.OriginalLimit = None
Example #3
0
    def SetDefaultOptions(self) -> None:
        self.Options = []
        self.OptionsDict = {}

        for boolOption in self.BOOL_OPTIONS:
            name = boolOption[0]
            boolValue = boolOption[2]
            descrip = boolOption[1]

            self.Options.append(
                OptionsWrapper.Boolean(Caption=name,
                                       Description=descrip,
                                       StartingValue=boolValue))
            self.OptionsDict[boolOption[0]] = boolOption[2]

        for optionCategory in self.ALL_OPTIONS:
            relics = optionCategory[0] == "Relic Parts"
            ozKits = optionCategory[0] == "Oz Kit Parts"
            hidden = (relics and not self.IS_BL2) or (ozKits and self.IS_BL2)

            self.Options.append(
                OptionsWrapper.Slider(Caption=optionCategory[0],
                                      Description="Category Header",
                                      StartingValue=0,
                                      MinValue=0,
                                      MaxValue=0,
                                      Increment=1,
                                      IsHidden=hidden))

            for option in optionCategory[1]:
                name = option[0]
                value = int(option[2])

                if ozKits:
                    name = self.translateTPS(name, True)

                # Check if we have a description override
                descrip = "Should the part be shown in the description or not."
                if len(option) == 4:
                    descrip = cast(Tuple[str, str, int, str], option)[3]

                self.Options.append(
                    OptionsWrapper.Spinner(Caption=name,
                                           Description=descrip,
                                           StartingChoice=["Hidden",
                                                           "Shown"][value],
                                           Choices=["Hidden", "Shown"],
                                           IsHidden=hidden))
                self.OptionsDict[name] = value
Example #4
0
    def __init__(self) -> None:
        self.Author += "\nVersion: " + str(self.Version)  # type: ignore

        self.Options = []
        for rSet in RestrictionSets.ALL_RESTRICTION_SETS:
            self.Options.append(
                OptionsWrapper.Slider(Caption=rSet.Name,
                                      Description="",
                                      StartingValue=0,
                                      MinValue=0,
                                      MaxValue=0,
                                      Increment=1))
            self.Options += rSet.Options
Example #5
0
    def __init__(self) -> None:
        super().__init__()

        self._DurationOption = OptionsWrapper.Slider(
            Caption=f"{self.Name} Duration",
            Description=
            ("The duration of the effect."
             " If the duration is longer than the interval, addtional redemptions will restart "
             " the duration timer."),
            StartingValue=self.Duration,
            MinValue=0,
            MaxValue=600,
            Increment=1)
        self.Options.append(self._DurationOption)
Example #6
0
    def __init__(self) -> None:
        self.Options = []
        self.ArtifactOptionMap = {}
        self.FlashNameOptionMap = {}
        for manu in ALL_MANUFACTURERS:
            canBeShown = (IS_BL2 and manu.InBL2) or (not IS_BL2 and manu.InTPS)
            option = OptionsWrapper.Boolean(
                Caption=manu.Name,
                Description=f"Should you be able to equip {manu.Name} items.",
                StartingValue=True,
                IsHidden=not canBeShown,
                Choices=self.AllowChoices)
            self.Options.append(option)

            # Just to prevent bandit and scav from overwriting each other
            if canBeShown:
                if manu.Artifact is not None:
                    self.ArtifactOptionMap[manu.Artifact] = option
                self.FlashNameOptionMap[manu.FlashLabelName] = option

        self.AllegianceRelicsOption = OptionsWrapper.Boolean(
            Caption="Allegiance Relics",
            Description=
            ("Should you be able to equip allegiance relics. You will only be able to equip ones"
             " that boost manufacturers you're already allowed to equip."),
            StartingValue=False,
            IsHidden=not IS_BL2,
            Choices=self.AllowChoices)

        self.ItemsOption = OptionsWrapper.Boolean(
            Caption="Always Allow Items",
            Description="Let items be equipped regardless of manufacturer.",
            StartingValue=False)

        self.Options.append(self.AllegianceRelicsOption)
        self.Options.append(self.ItemsOption)
Example #7
0
    def __init__(self) -> None:
        self.Options = []
        self.RarityOptionMap = {}
        for rarity in ALL_RARITIES:
            canBeShown = (IS_BL2 and rarity.InBL2) or (not IS_BL2
                                                       and rarity.InTPS)
            option = OptionsWrapper.Boolean(
                Caption=rarity.Name,
                Description=f"Should you be able to equip {rarity.Name} items.",
                StartingValue=True,
                IsHidden=not canBeShown,
                Choices=self.AllowChoices)
            self.Options.append(option)

            # Just to prevent seraph/glitch from overwriting each other
            if canBeShown:
                self.RarityOptionMap[rarity.Value] = option
Example #8
0
    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 = OptionsWrapper.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 = []
Example #9
0
    def __init__(self) -> None:
        self.Options = []
        self.WeaponOptionMap = {}
        self.ItemOptionMap = {}
        for type in ALL_WEAPON_TYPES + ALL_ITEM_TYPES:
            canBeShown = (IS_BL2 and type.InBL2) or (not IS_BL2 and type.InTPS)
            option = OptionsWrapper.Boolean(
                Caption=type.Name,
                Description=f"Should you be able to equip {type.Name}.",
                StartingValue=True,
                IsHidden=not canBeShown,
                Choices=self.AllowChoices)
            self.Options.append(option)

            # Just to prevent relics/oz kits from overwriting each other
            if canBeShown:
                if isinstance(type, WeaponType):
                    self.WeaponOptionMap[type.Value] = option
                else:
                    self.ItemOptionMap[type.Class] = option