mjrice Posted February 15, 2019 Share Posted February 15, 2019 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/RWGAnalyzerDeluxe/blob/master/RWGAnalyzerDeluxe/bin/x64/Release/RWGAnalyzerDeluxe.exe Sample output: https://github.com/mjrice/RWGAnalyzerDeluxe/blob/master/SampleOutput.PNG Link to comment Share on other sites More sharing options...
ShoudenKalferas Posted February 27, 2019 Share Posted February 27, 2019 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? Link to comment Share on other sites More sharing options...
mjrice Posted February 27, 2019 Author Share Posted February 27, 2019 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. Link to comment Share on other sites More sharing options...
ShoudenKalferas Posted February 28, 2019 Share Posted February 28, 2019 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-analyzer.php?WorldName=Podedu+County Link to comment Share on other sites More sharing options...
ShoudenKalferas Posted February 28, 2019 Share Posted February 28, 2019 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-analyzer.php?WorldName=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 Link to comment Share on other sites More sharing options...
mjrice Posted March 3, 2019 Author Share Posted March 3, 2019 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/43ca97ea3d064a499e08b9aa0a2fb3ac 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). Link to comment Share on other sites More sharing options...
mjrice Posted March 10, 2019 Author Share Posted March 10, 2019 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. Link to comment Share on other sites More sharing options...
mjrice Posted March 16, 2019 Author Share Posted March 16, 2019 New update today, now shows the percentage of the land area covered by each biome type. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.