Project Perfect Mod Forums
:: Home :: Get Hosted :: PPM FAQ :: Forum FAQ :: Privacy Policy :: Search :: Memberlist :: Usergroups :: Register :: Profile :: Log in to check your private messages :: Log in ::


The time now is Thu Mar 28, 2024 11:42 pm
All times are UTC + 0
Finding game path and installed mods programmatically?
Moderators: Global Moderators
Post new topic   Reply to topic Page 1 of 1 [4 Posts] Mark the topic unread ::  View previous topic :: View next topic
Author Message
jonwil
Rocket Infantry


Joined: 24 Jul 2005

PostPosted: Wed Jul 01, 2020 3:05 am    Post subject:  Finding game path and installed mods programmatically? Reply with quote  Mark this post and the followings unread

Does anyone know of a way to identify the game path programmatically (e.g. reading something from registry) or how I can identify the installed mods and their paths programmatically?

Back to top
View user's profile Send private message
Banshee
Supreme Banshee


Also Known As: banshee_revora (Steam)
Joined: 15 Aug 2002
Location: Brazil

PostPosted: Wed Jul 01, 2020 4:36 am    Post subject: Reply with quote  Mark this post and the followings unread

That is... not... easy at all. The easiest solution is to ask the user. Really. But if this is not an option....



Steam:

1) You need to find out where Steam is originally installed.

Registry -> HKEY_CURENT_USER/SOFTWARE/VALVE/Steam

Then, read SteamPath.


2) In Steam Install directory, look for config directory. There is a file called config.vdf.

It is a text file, but you shouldn't bother about most of its content.

Focus on anything like BaseInstallFolder_X (where X is a number). Then, get the installation directory there. Then look for "1213210" and check if you find it before the next BaseInstallFolder_.

3) From that you add steamapps/CnCRemastered to the directory you have found and voila!


Origin:

Note: I do not have C&C: Remastered Edition on Origin, so I'll try to emulate it for another game and you may need to figure out how to use this information to find C&C Remastered there.


1) Find Origin game's directory.

Go to the current user directory on Windows (I.e.: C:\Users\MyUser

Inside it, look for AppData\Roaming\Origin\local.xml

And there's a line there that should give you the dir on Settings -> <Setting type="10" key="DownloadInPlaceDir" value="TheDirectoryIsHere!!!!"/>


2) Go to that directory and add \CnCRemastered to it.


And I guess this is it.

Good luck.

Back to top
View user's profile Send private message Visit poster's website Skype Account
jonwil
Rocket Infantry


Joined: 24 Jul 2005

PostPosted: Wed Jul 01, 2020 12:46 pm    Post subject: Reply with quote  Mark this post and the followings unread

config.vdf on my system has no BaseInstallFolder at all.

Back to top
View user's profile Send private message
Banshee
Supreme Banshee


Also Known As: banshee_revora (Steam)
Joined: 15 Aug 2002
Location: Brazil

PostPosted: Wed Jul 01, 2020 12:52 pm    Post subject: Reply with quote  Mark this post and the followings unread

Weird...

Mine starts with is something like

Code:
"InstallConfigStore"
{
   "Software"
   {
      "valve"
      {
         "Steam"
         {
            "BaseInstallFolder_1"      "C:\\SteamLibrary"

Back to top
View user's profile Send private message Visit poster's website Skype Account
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [4 Posts] Mark the topic unread ::  View previous topic :: View next topic
 
Share on TwitterShare on FacebookShare on Google+Share on DiggShare on RedditShare on PInterestShare on Del.icio.usShare on Stumble Upon
Quick Reply
Username:


If you are visually impaired or cannot otherwise answer the challenges below please contact the Administrator for help.


Write only two of the following words separated by a sharp: Brotherhood, unity, peace! 

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © phpBB Group

[ Time: 0.1607s ][ Queries: 11 (0.0077s) ][ Debug on ]