Results 1 to 8 of 8

Thread: RWG output analyzer app

  1. #1
    Survivor mjrice's Avatar
    Join Date
    Dec 2018
    Posts
    96
    Rep Power
    1

    RWG output analyzer app

    I wrote a little app in c# to help me analyze various effects to the world generation resulting from things I was trying in my mods. I thought this might be helpful to others so I've posted it to github:

    https://github.com/mjrice/PrefabAnalyzer

    To use it, you will need to open it in Visual Studio Code, with c# and dotnet extensions all set up. You tell it what world you want to analyze by changing a line of code, then it spits the output to the console (there is no UI to speak of).

    One of the initial things I found interesting after playing with it, is that while Navezgane has far fewer prefabs than I could get in a typical RWG world, it had a greater variety of them. This makes sense, since they are hand-placed by the designers.

    With this tool in hand I think it will be easier to test changes to RWG insofar as decreasing the mundane repetition that vanilla seems to want to produce.

    UPDATE 3/10/19:

    I've made this app into a windows executable along with some additional features. I made a new repository for the project so that I could retain the original VS Code stuff in case anyone wants to play around with it. The new app is

    https://github.com/mjrice/RWGAnalyzerDeluxe

    And you can download just the binary executable via

    https://github.com/mjrice/RWGAnalyze...yzerDeluxe.exe

    Sample output:

    https://github.com/mjrice/RWGAnalyze...mpleOutput.PNG
    Last edited by mjrice; 03-10-2019 at 06:33 PM.

  2. #2
    Scavenger
    Join Date
    Feb 2019
    Posts
    36
    Rep Power
    0
    I'd really love to check this out, but I've never used Visual Studio before. I did find a download of it for Mac, but my game install is under Windows. Is it possible this could be compiled to an .exe to make it easier for people to use? If not, are you willing to provide a little more information on how to go about getting Visual Studio set up to run your code?

  3. #3
    Survivor mjrice's Avatar
    Join Date
    Dec 2018
    Posts
    96
    Rep Power
    1
    Thank you for the nudge, I would like to make it into a stand-alone app but I wasn't sure if anybody besides me was interested in that.

  4. #4
    Scavenger
    Join Date
    Feb 2019
    Posts
    36
    Rep Power
    0
    Your project here inspired me to try and tackle something similar to your project here, but using PHP. It took me a bit of poking around before I realized that parsing some of these numbers really was not all that difficult. Now, the density map you came up with.. that'll be a bit trickier to try and reproduce. I'm also not sure where you got the block size to convert to meters?

    http://7dtd.shouden.us/7dtd/rwg-♥♥♥♥...=Podedu+County

  5. #5
    Scavenger
    Join Date
    Feb 2019
    Posts
    36
    Rep Power
    0
    Quote Originally Posted by ShoudenKalferas View Post
    Your project here inspired me to try and tackle something similar to your project here, but using PHP. It took me a bit of poking around before I realized that parsing some of these numbers really was not all that difficult. Now, the density map you came up with.. that'll be a bit trickier to try and reproduce. I'm also not sure where you got the block size to convert to meters?

    http://7dtd.shouden.us/7dtd/rwg-♥♥♥♥...=Podedu+County
    I'm also curious how you pull the prefab group name? The best I could come up with was to parse the rule name out of the rwgmixer.xml file. But I realized last night that method isnt entirely fool-proof in situations like COMPOPACK where there is a second rwgmixer.xml file that would have to be parsed to understand the real-world prefab groups. I really wish the game saved the most recent rwgmixer.xm post-XPath processing, to the saved game directory. I'd appreciate any thoughts you have on this

  6. #6
    Survivor mjrice's Avatar
    Join Date
    Dec 2018
    Posts
    96
    Rep Power
    1
    EDIT: Ignore this version, just skip straight to the final version posted about below.

    I've possibly created a stand-alone version of the analyzer for Windows, which seems awkward to distribute but here goes:

    The source is on github

    https://github.com/mjrice/RWGAnalyzer

    But I think this link should let you install an executable version without using visual studio:

    https://rink.hockeyapp.net/apps/43ca...08b9aa0a2fb3ac

    I'd love to know if it works for anybody - I haven't ever distributed an app for Windows in this manner.

    Here are some extra instructions on how to proceed using the hockeyapp link above:

    1. follow the link, click download
    2. extract the zip file it downloads into a temp folder
    3. right-click on the "Add-AppDevPackage.ps1" file and then choose "run with powershell" (note you have to extract the files from the zip into a folder, you can't just run this from the opened zip file in windows 10).
    4. Follow the prompts to tell it yes, you really do want to install this app. Are you sure? Yes, you are sure.
    5. Stop for a moment and wonder why it is so difficult to distribute apps in windows.
    6. In your start menu there should now be a link to the app (RWGAnalyzer).
    Last edited by mjrice; 03-10-2019 at 06:31 PM.

  7. #7
    Survivor mjrice's Avatar
    Join Date
    Dec 2018
    Posts
    96
    Rep Power
    1
    See original post regarding update... Basically, I've made this project three times now, but I have learned some interesting stuff along the way. The latest version is still a c# project but uses WPF instead of UWP.. basically it looks nicer and I was able to add some new features including the ability to narrow the grid presentation of the world's POIs to particular types of locations (like traders). Also you can now adjust the grid size and it will colorize the output based on the average color of the biomes in that area.

    Capture.jpg
    Last edited by mjrice; 03-10-2019 at 06:30 PM.

  8. #8
    Survivor mjrice's Avatar
    Join Date
    Dec 2018
    Posts
    96
    Rep Power
    1
    New update today, now shows the percentage of the land area covered by each biome type.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •