for example if i replaced a text file in a game with a symlink to a modified version of that text file somewhere else on the machine, would the game still be able to read the file?

  • themoonisacheese@sh.itjust.works
    link
    fedilink
    arrow-up
    8
    ·
    9 months ago

    Mostly yes. It’s trivial for a program to know what is and isn’t a symlink, but in general you can do that, also you can do it with folders.

    Some games may care (for example that’s a big no-no for anticheats) but in general it works just fine.

  • bionicjoey@lemmy.ca
    link
    fedilink
    arrow-up
    4
    ·
    9 months ago

    The only reason the answer wouldn’t be “yes” is if for some reason the developers of that software or game specifically wrote in a check for whether or not a certain file is a symlink and coded the software to behave differently under those circumstances. There are almost no good reasons to do that.

  • Tarquinn2049@lemmy.world
    link
    fedilink
    arrow-up
    2
    ·
    9 months ago

    While ssd’s were still expensive, I used symlinks alot to solve problems for friends where games and launchers would only put stuff on their main drive. I had a friend using a 64 gig ssd for windows 10, he had so many symlinks I ended up drawing a chart for myself so I could more easily visualize them in case anything needed to be modified or repaired later.

    Most of the time they were set and forget. But every now and then they did need to be repaired, usually from user error. I do recommend keeping a hand written reminder if you plan on doing a bunch of them. Just so much nicer to have a less-fallible record of them when you do need to work on them.

  • lurch (he/him)@sh.itjust.works
    link
    fedilink
    arrow-up
    2
    ·
    9 months ago

    There could be a problem, if the game runs in some sort of sandbox, VM or emulator. For example, if the target of the link is outside of the environment the game can see, the link will look broken for it.