Esempio n. 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])
Esempio n. 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
Esempio n. 3
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
Esempio n. 4
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)
Esempio n. 5
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
Esempio n. 6
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 = []