State of Decay 2
0 of 0

File information

Last updated

Original upload

Created by

EvilGrin

Uploaded by

evilgrin75

Virus scan

Safe to use

Tags for this mod

158 comments

  1. 1berliner
    1berliner
    • member
    • 0 kudos
    So, I thought I'd quickly share how to get this up and running again. But quite honestly, this might just be too much of a hassle for most of you.

    To quickly explain why it's no longer working: this script is using OCR to evaluate survivors, therefore it must capture the game window. Since the initial release of this script the games window name has been changed, which is why it can no longer find any window(s) to capture.

    Here are the steps you'll need to follow to get the script up and running again:

    1. Start the game
    2. Open a PowerShell window
    3. List currently active windows and their process ids: 
    Get-Process | Where-Object {$_.mainWindowTitle} | Format-Table Id, Name, mainWindowtitle -AutoSize
    4. Get the exact window name (it contains whitespace), from the output copy everything in between the single quotes (replace 9400 with your games process id):
    "'$((Get-Process -id 9400 -ErrorAction SilentlyContinue).MainWindowTitle)'"
    5. Download and start Recaf, a Java bytecode editor
    6. Load the "SoD2_ideal_community.jar"
    7. In the toolbar: "Search" -> "Strings", in the search field type "State of Decay 2", click search
    8. Within "<init>()V" find 'LDC "State of Decay 2"', right click and "Edit with assembler"
    9. Make out the "GameWindowName" reference and change the value (line 35) to the output from step 4 (remember: everything in between the single quotes, not including the single quotes)
    10. In the toolbar: "File" -> "Export program" and overwrite the existing file. In case something went wrong you can download the original file again.

    Now you can go ahead, configure the script to your liking and successfully start it.

    Personally I had a lot of issues with the script not resolving coordinates correctly, it seems to center the game window, but what it actually seems to need is the game window to be in the very top left corner.
    1. Rathearia
      Rathearia
      • supporter
      • 3 kudos
      Interesting, I tried this and still couldn't get it to recognize the window, I tried different things but it never would work. Window name in powershell is StateOfDecay2, also tried StateOfDecay2-Win64-Shipping. Dang
    2. Ninja2dan
      Ninja2dan
      • premium
      • 9 kudos
      I followed your instructions perfectly, but it's still not working. Keeps saying it can't find the window, even though the error message states the correct window name.

      It would be great if someone could get in contact with the author, and either request the file be updated, or get permission to upload an updated version.

      This program sounds like a really cool idea, would save a lot of headache and time.
    3. Nekoj
      Nekoj
      • member
      • 0 kudos
      I was able to get past this error message using you suggestion as a guideline. The version of Recaf I used needed to save the changes made to the LDC entry before exporting. This was done with a CTRL+S, then I could export the file. The window name for me had to be "StateOfDecay2 " (without quotes and with a space at the end).

      If this is not working, be sure to save the changes and include a space at the end of the window name in the LDC value.
  2. sircrow1313
    sircrow1313
    • member
    • 0 kudos
    Updated method, works but require some effort :)

    Hey, so beign completly honest, I'm lazy af, so of you want to make it work, you will need to do some steps, I recommend to use chat gpt along the way and you will be able to complete it in like 5 mins (+ the time to download the tools if you don't have it)

    This is a python script that will take a screen shot of your screen, if it's not the right Community Skill, It will press T, if It's the right skill it presses right arrow until if finds the 3 community skills that you want.

    Here's the pastebin with the script: https://pastebin.com/DGkUWRGw

    To make it work you will need: python 3, pip, and install some pip libraries (as a said, seems to be much, but really with chat gpt it will be 5 minutes)

    Then here's basic the tutorial:

    • Put your game on windowed mode, resolution 1280x960
    • The default 3 skills are my favorite set: lichenology, Recycling, Mechanics, If you want different ones, just go to the varible expected_word and edit it, don't worry about the order of the skills, the script will try to find them on any position
    • Open the game, create a new community, skip tutorial, generate you first 3 survivors
    • Run the program, then you have 2 seconds to select the game window and the program will start to randomize

    Common tips and mistakes:

    • If 2 seconds is too quick for you, just adjust on line 44 "time.sleep(2)" put how many seconds you want
    • If your pc is weaker and it's randomizing too fast, just edit line 64 for a longer time (current is 0.2 seconds)
    • If you want to run it on a different resolution, you will need to fin the right pixel position, I used this other python script with same libraries for it: https://pastebin.com/m0r47LE4
    • If your window name is not "StateOfDecay2" just go on line 39 and put the right window name, for me I just put the one that shows when you hover the game when it's open, but I play on windows store, so Steam can be a different name
    • If you are having any weird behaviour, try to look for the terminal feedback, It pritns every word read, also you can open the fold on VS Code and inside VS Code, open the screenshot that is beign saved, see if it's cropping the right spot. I recommend open the image on VS Code becasue it refreshes automatically the image when the program is running, awsome for debug.

    If you are a developer and want to make it a full program, feel free to use it, and if you want to contact me my discord is bolo422
    It's easy to add more stuff and more flexibility, but as I said, I'm lazy, maybe sometime in the future I will do.

    If I see that more people are looking for this, I will consider making a full software and making it available for the community, but If it's just for me, this is enough really, because I already have the development tools at hand, so making an executable, parametrized, scalable program would be waste of time, but if more people want, I can do it for yall.

    Tutorial: https://youtu.be/fwD98bRiQ5E?si=jdnyTNDg9jdRV_uC



    -  Bolo
  3. kaisigma32891
    kaisigma32891
    • supporter
    • 0 kudos
    can we get an update for this mod or maybe a simpler one
  4. endly
    endly
    • member
    • 0 kudos
    the most complicated mod i have ever stumbled upon in this site
  5. Aracngel981127
    Aracngel981127
    • member
    • 0 kudos
    No entiendo nada de como se usa esto dice que modifique el archivo SoD2_ideal_community pero a tengo q modificar en el archivo 

    Alguien sabe ???????
  6. Guardian4379
    Guardian4379
    • member
    • 0 kudos
    Gotta be honest, I'm a little bit braindead.... can anyone give me a little step by step tutorial on how to actually use this thing??
    1. NexusKara
      NexusKara
      • member
      • 0 kudos
      I don't think this mod is working anymore. Check out the community editor mod in the coming days. It will be updated for the current version soon and can do the same as this mod and more. 
    2. BlackSorra
      BlackSorra
      • supporter
      • 0 kudos
      The Community Editor mod got removed
    3. maximusseven7
      maximusseven7
      • member
      • 0 kudos
      community editor is reappeared & updated :)
      but I still...want this mod too
  7. lingtao
    lingtao
    • member
    • 0 kudos
    It is not working I have Java and  Microsoft Visual C runtime both installed and updated
    I only get message like theSoD2_ideal_community has terminated " , which then it asked me to close the console window lol 
    1. wearethebarons
      wearethebarons
      • supporter
      • 0 kudos
      bruh this mod was last updated back in 2018... there wont be any support for this mod lol
  8. dannopham
    dannopham
    • member
    • 0 kudos
    Hi everyone, 
    I operate this mod on pc and I see the problem. This trait is not write by English, so whenever I set up the trait by English in notepad, Batch File could not read it. 

    As the image below, you can see it in cmd.exe

    Please help me!

    https://imgur.com/a/Ip1OPP5
  9. mrsaberdz
    mrsaberdz
    • member
    • 0 kudos
    Doesn't work ??
    1. EyeofValor
      EyeofValor
      • member
      • 2 kudos
      No. It's ass backwards scripting.
  10. BountyGriefer
    BountyGriefer
    • member
    • 0 kudos
    Busted ass mod.