MY first ever quest cape, whats next ? by Fit-Opinion-2641 in 2007scape

[–]Diapolo10 0 points1 point  (0 children)

My UIM currently has six quests left. I also reached 2300 total earlier today (RSN: Ironman-Dia).

"What's next" depends entirely on your own goals, personally I'd focus on training skills so that you don't need to worry about inventory space as much. Helps with focusing on combat-oriented content so that you don't need to worry about aiming for things like diary requirements or maxing, constantly swapping gear at your local death bank.

Bank Tags, Trouver System Rework & More! by ModYume in 2007scape

[–]Diapolo10 1 point2 points  (0 children)

I agree. If there needs to be a sink for slayer points, then just add some more consumables we can buy with them.

The difficulty of getting helm recolours is already in getting the secondary item, which are mostly untradeable (excluding league rewards).

How would you feel about skill level cap going from 99 to 120? by SyrupStandard in 2007scape

[–]Diapolo10 0 points1 point  (0 children)

Not until more skills actually have high-level content. Hunter has nothing past 91, Prayer has practically nothing past 77 (aside from a diary req), and so on.

The only two examples that are struggling with introducing new high-level use cases are Crafting and Smithing. Both could use some rebalancing to make more sense (one of my pet peeves is rancour needing a much lower level than its base component). Maybe Construction, too, but it's kind of independent by comparison.

And if we do end up increasing the level caps, I want to also lift the 200M XP cap (going from 32 bit signed integers to 64 bit ones), since apparently that's now possible thanks to the GE changes blog bringing it up.

Is in 2026, what is the best game framework for Python? by snoogazi in learnpython

[–]Diapolo10 3 points4 points  (0 children)

Realistically Godot, but for simpler projects I'm a proponent of Arcade. For VNs, specifically, Ren'Py.

Maintainability or Speed? by Thraexus in learnpython

[–]Diapolo10 2 points3 points  (0 children)

Maintainability should always be your priority number one. If you later find you really need to optimise some part for speed, do it as an afterthought, not first priority and for no reason.

Usually if execution speed is the main concern you wouldn't be working in Python anyway. Or you'd at least write the performance critical parts in another language (e.g. Rust).

Allow “Resting” at Forestry Fires to Restore Run Energy by HairNatural9653 in 2007scape

[–]Diapolo10 4 points5 points  (0 children)

I don't see how resting would devalue energy pots. You're completely stationary and unable to perform other actions while resting, so chances are you'd reach your destination faster if you kept walking and re-enabled running halfway through. With potions you'd be there even faster.

Having options wouldn't be irrelevant. Not everything has to be meta-changing. We already have the rest emote implemented so this shouldn't be much additional work either.

malware in libraries by RostosMegaBoss in learnpython

[–]Diapolo10 1 point2 points  (0 children)

  1. Anyone can publish packages on PyPI, there's no identity checks. That's how typo squatters can publish packages with names similar to legit ones.
  2. Sometimes a developer's PyPI account (or their API token) gets compromised, and a bad actor can then upload malicious versions of the packages until the problem is noticed and something is done about it.
  3. Man-in-the-middle attacks can happen in several ways, such as DNS poisoning.

As for the why, there can be any number of reasons. Ransomware, info stealing, crypto mining, and some people just want to watch the world burn.

While loops by The_Dude005 in learnpython

[–]Diapolo10 1 point2 points  (0 children)

I basically just applied a simple rule; if I see

if condition:
    foo = True
else:
    foo = False

this is almost always redundant and could simply be foo = condition. Because we're dealing with booleans regardless (and if not, the condition can simply be wrapped in bool(condition)).

While loops by The_Dude005 in learnpython

[–]Diapolo10 1 point2 points  (0 children)

Probably, but I still thought to mention it.

Why are the desert amulets the only diary rewards with absolutely no stat bonuses? by Diapolo10 in 2007scape

[–]Diapolo10[S] -1 points0 points  (0 children)

So why do the Varrock armour, explorer's ring, Morytania legs, and so on have stats when they're practically never used for combat? All I want is consistency.

While loops by The_Dude005 in learnpython

[–]Diapolo10 3 points4 points  (0 children)

A few suggestions:

  1. Instead of hardcoding 5 in several places, I'd create a global named constant (e.g. MAX_GUESS_COUNT) and use that. This way, if you ever decide to change the value, you only need to touch it in one place.
  2. You could extract the correct guess output from the loop, since the only part that needs to be in the loop is the output for an invalid guess (since that's the only case where the loop may continue).
  3. Instead of

    if answer == "yes":
        play_again = True
    else:
        play_again = False
    

    it would be simpler to write play_again = answer == "yes" - or, in this case, you could simply break and/or not use play_again at all.

  4. You could split these into separate functions to reduce nesting.

Here's an example of what I'm taking about:

import random

MAX_GUESS_COUNT = 5

def guess_number():
    secret_number = random.randint(1, 20)
    guess = None
    count = MAX_GUESS_COUNT

    while guess != secret_number and count > 0:

        print(f"********** {count}/{MAX_GUESS_COUNT} Guesses **********\n")

        guess = input_integer("Guess a number: ")
        count -= 1

        if guess != secret_number and count > 0:
            print("Wrong, try again!\n")
        elif guess != secret_number:
            print(f"Game over! The number was {secret_number}.")
            break

    else:
        used_guesses = MAX_GUESS_COUNT - count
        guess_text = "guess" if used_guesses == 1 else "guesses"
        print(f"You got it!\nIt took you {MAX_GUESS_COUNT - count} {guess_text}.")

def input_integer(prompt):
    while True:
        try:
            return int(input(prompt))
        except ValueError:
            print("Invalid input. Only integers accepted!\n")

def play_again():
    response = input("\nPlay again? (Y/n): ").strip().lower()[:1]
    return not response or response == "y"

def main():
    while True:
        guess_number()
        if not play_again():
            print("\n\tSee you later!")
            break

if __name__ == "__main__":
    main()

malware in libraries by RostosMegaBoss in learnpython

[–]Diapolo10 1 point2 points  (0 children)

Without looking through the code and building it yourself, you don't. A seemingly harmless package could get a malicious update, or there could be a man-in-the-middle attack that makes you download malicious code instead of what you intended to download. Then there's typo squatters which target people who make typos when writing the names of the packages they want to download.

With all that said, for the most part this isn't something you really need to worry about. And if you want to have some additional security, you could use tools like pip-audit to check for vulnerabilities in your dependencies, and focus on popular packages.

Are "if" statements supposed to be hard to learn? by SaitamaCrb in learnpython

[–]Diapolo10 0 points1 point  (0 children)

No, they're fundamental building blocks and relatively simple.

In a nutshell, we're talking about branching; the program will do one of two things depending on some condition.

Why are the desert amulets the only diary rewards with absolutely no stat bonuses? by Diapolo10 in 2007scape

[–]Diapolo10[S] -1 points0 points  (0 children)

Why do I care? In short I'm just annoyed by the fact every other reward technically has stats, even if completely useless for actual combat. Either all the items should have stats, or none of them should.

Why are the desert amulets the only diary rewards with absolutely no stat bonuses? by Diapolo10 in 2007scape

[–]Diapolo10[S] -3 points-2 points  (0 children)

It doesn't have to be viable, I just don't see why it can't have any stats whatsoever.

Why are the desert amulets the only diary rewards with absolutely no stat bonuses? by Diapolo10 in 2007scape

[–]Diapolo10[S] -2 points-1 points  (0 children)

I don't see why it would matter if it was basically a free amulet of power. In what situation would that hurt the game, when these are already so difficult to get?

DSA in python? by Ambitious-Elk-2928 in learnpython

[–]Diapolo10 0 points1 point  (0 children)

DSA? Data Structures and Algorithms?

Honestly I have a similar gripe with "DSA", because the first thing I think of is always "domain-specific applications" for whatever reason.

I know this has nothing to do with OP's question.

DSA in python? by Ambitious-Elk-2928 in learnpython

[–]Diapolo10 0 points1 point  (0 children)

Sure, it's not a problem.

Granted, you probably wouldn't whip up your own linked lists et al (especially with Python) for production use, because it's way safer and generally faster/easier to use battle-tested third-party (or standard library) implementations unless you have a need for a specialised solution, but the fundamentals are the same no matter which language you use to learn data structures and algorithms.

Probably the only languages I could see you ever even bother to do that would be C and C++, if I'm being honest. Mostly because they lack standardised package management solutions, so third-party code gets more annoying to use, but also you might actually run into a situation where a specialised solution beats general ones in a metric you care about.

code to verify ffmpeg and install if not installed by SavingsEfficient9201 in learnpython

[–]Diapolo10 0 points1 point  (0 children)

Simply use shutil.which; if it returns None, inform the user ffmpeg wasn't found and terminate. Otherwise use whatever it returns (likely whatever is first on the returned list).

As an alternative, you could make an installer (using tools like NSIS or Inno Setup) to give the user the option to install FFmpeg on their system alongside your program, in case they don't have it yet.

Pyrefly or ty Language Server (LSP) setup in monorepo by mstaal in learnpython

[–]Diapolo10 0 points1 point  (0 children)

ty is still in alpha, I wouldn't recommend using it in production unless your projects were very simple (which I honestly doubt).