November 12 - Everyone ready for November Maxis Monthly? Details here
November 8 - Click here for this week's Friday Highlight!
November 8 - Join @SimGuruAzure and @SimGuruSteph for a Discover University deep dive livestream! Details here

Game Version from Script

I've been trying, without any success, to determine what the current Sims 4 game version is from script. Searching through the game script files hasn't really helped either. Is there a way to figure-out what the current game version is from the script-side, or is this something that is out of our reach?

Thanks!

Comments

  • SimGuruModSquadSimGuruModSquad Posts: 597 SimGuru
    Hey @Deaderpool,

    No python does not have access to the game version. It does know what packs are installed but that likely is not helpful for what you are trying to do. Are you wanting to add compatibility code for different versions of the game?

    -SGMS
  • DeaderpoolDeaderpool Posts: 187 Member
    edited November 2016
    Basically, I'm wanting to prohibit versions below the currently compatible version from running my mod. If it detects a version lower than what I know I support (City Life version), then I will display a notification saying it's incompatible and the mod will not work.

    And yeah, expansions don't really help. A user may not have bought CL but may be using the October update from EA (PC Version 1.24.102.1020 / Mac Version 1.24.102.1220). It's the 1.24.102 version that I care about.

    Thanks!
  • SimGuruModSquadSimGuruModSquad Posts: 597 SimGuru
    Hi @Deaderpool,

    Yeah unfortunately that information is not available to python currently. I really like this compatibly check idea and I'll add exposing this info to the list of things we would like to add. But can't guarantee anything.

    Thanks,
    SGMS
  • DeaderpoolDeaderpool Posts: 187 Member
    Thanks! Be great if it would happen!
  • KodekPLKodekPL Posts: 6 New Member
    I don't know how reliable that is and if other system wouldn't block it, but reading the 'GameVersion.txt' file from 'Documents/The Sims 4' folder should work. Never did it, but I am thinking about some compatibility checks too.
  • IngeJonesIngeJones Posts: 3,121 Member
    Can the python get outside the game space to look in the file system?
  • egwarhammeregwarhammer Posts: 5,749 Member
    KodekPL wrote: »
    I don't know how reliable that is and if other system wouldn't block it, but reading the 'GameVersion.txt' file from 'Documents/The Sims 4' folder should work. Never did it, but I am thinking about some compatibility checks too.

    The trouble there is, it's an editable text file. Unless EA can change that, it's not necessarily reliable.

    (I'm not smart enough tech-wise to figure that out... Deaderpool told me, when I asked him the same question.) ;)
  • IngeJonesIngeJones Posts: 3,121 Member
    Well if someone has been technically/moddy minded enough to edit that file, then they are probably capable of understanding why it's broken a mod that reads the file.
  • DeaderpoolDeaderpool Posts: 187 Member
    Better to get it directly from the game code rather than a text file which may be in different places on different users' machines. The folder that the mod is located in is an easy-enough to get to location in the file system. For some users, it's the main mod folder. For others, it's a folder beneath that. Others, a folder beneath that, etc. Sure, it can be coded to work its way up until it finds the root EA Sims 4 game folder and then read the text file, but that's a much messier way of trying to do it than just asking the game system (which knows the version because it CREATES the GameVersion.txt file).

    That not being an option, I may look at the alternatives, but I don't find the alternatives that attractive for the reason I mentioned above and also for the fact, like I had told EG, when you're trying to find the game version, it's better to get it from a source that can't be user-modified (or even deleted).
  • DeaderpoolDeaderpool Posts: 187 Member
    Been several years now so figured I'd follow-backup again on this. To my knowledge, it's still not possible from the Python side to get the game version as mentioned in the original post I did here.
  • SimGuruTwoLegsSimGuruTwoLegs Posts: 19 SimGuru
    Still no guarantees, but I've bumped it up on the tracker.
Sign In or Register to comment.
Return to top