Teancum Posted May 13, 2016 Share Posted May 13, 2016 I'm trying to wrap up all the main code for the .exe/.dll, and there's one obstacle I need to conquer. I need it to read /GameData/dfmod after reading from/GameData/base. I thought of remapping the fs_cdpath cvar, but didn't know what trouble that might cause. I thought I'd check in to see if this has been done before. I don't want to reinvent the wheel here. Link to comment
Futuza Posted May 13, 2016 Share Posted May 13, 2016 Using the fs_cdpath should be fine, eg: +set fs_cdpath "C:\mystuff'" Link to comment
Teancum Posted May 13, 2016 Author Share Posted May 13, 2016 Thanks. I'm actually talking about hard coding it into the game so I don't have to do a command line/shortcut file. Link to comment
Raz0r Posted May 13, 2016 Share Posted May 13, 2016 It sounds like you just want fs_game dfmod...? Link to comment
Teancum Posted May 13, 2016 Author Share Posted May 13, 2016 Yeah, but I'll still need to use the base path as well. ***EDIT*** Turns out I just do something like: fs_basegame = Cvar_Get ("fs_basegame", "./dfmod", CVAR_INIT ); Link to comment
ensiform Posted May 13, 2016 Share Posted May 13, 2016 You would just need to set the default fs_game value to dfmod and presumably restrict it. Link to comment
Raz0r Posted May 13, 2016 Share Posted May 13, 2016 Yeah, but I'll still need to use the base path as well.Hm, one of us may be misunderstanding the issue. AFAIK the order of loading is as such: fs_basepath/base fs_basepath/fs_game fs_cdpath/base fs_cdpath/fs_game fs_homepath/base fs_homepath/fs_gameEither that, or it loads from "base" of basepath/cdpath/homepath and then <fs_game> of basepath/cdpath/homepath. i.e. fs_game is not on the same level as fs_basepath, fs_cdpath or fs_homepath Link to comment
Xycaleth Posted May 13, 2016 Share Posted May 13, 2016 There's also fs_basegame which acts as a secondary base folder. You can load an additional mod folder in addition to base and basegame. Link to comment
Futuza Posted May 13, 2016 Share Posted May 13, 2016 Thanks. I'm actually talking about hard coding it into the game so I don't have to do a command line/shortcut file.Is there a reason why? usually just having the compiler pass the necessary args is fine for most projects, unless this is for a final release build and you need it to grab some sort of library dlls or something. I mean sounds like you got it figured out, I'm just not sure whatever you're doing would really benefit from hard coding it in. And even for a final release, most mods just use a bat launcher or put everything in their own base folder. If you just want the mod folder, just do what ensiform suggested and change the default path. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now