This looks amazing. I reinstalled Stalker 2 and removed all mods due to the last update. I will look into using this. This could either be revolutionary for modding this game or fail completely. I hope its the first!
It's a great tool and I've been converting some mods I use into your format but I've noticed a few things you might want to look into:
1. This probably doesn't matter too much but AES is unnecessary now AFAIK (GSC removed the pak encryption).
2. I don't see a changelog (or any log) being produced and I do have that enabled in both appsettings and appsetting.Mine. I wonder if it has something to do with hardcoded paths because I got a file not found error at first (bad path) and I noticed that it was showing a file path from your system. Maybe it's something else but either way that doesn't seem great.
3. I haven't checked each generated cfg yet but when it processed my mods I saw a few instanced of this error: "Failed to find the structure's bounds...". Otherwise it seemed to work fine and it showed no failures. I don't know if this is an issue but maybe worth looking into. I can send you my "mods" if that will help.
Edit: so I just checked and it did indeed skip the changes it failed on. It's strange because everything looks correct (here's the mod). Also, it would be nice if it actually showed them as failures at the end.
Again, thanks for making this. It should really help to quickly update mods when new patches affect those files (and obviously compatibility).
1. Yeah, haven't noticed that the encryption was removed. So that param is optional now. 2. Fixed that issue. The config file could not be fully applied previously. 3. Fixed that case. The thing is, I was relaying on the fact that all the structs start with ' : struct.begin', but the amount of config files and lines in them is so huge that the devs can make some typos like writing ': struct.begin'. Without starting space. At first, I didn't understand why that exact line to modify magically doesn't process. Also, if a similar case appears, the mod will be marked as failed to process.
I've pushed version 0.0.2 so you can try it out.
I'm pretty sure there are still some corner cases and bugs, but we will hunt them down.
Also, if you have some mods converted to JSON you could share them so I can add them to the mods archive
As for converting mods: I'm actually currently attempting to create a Python automation script for this where I give it both the original and modified file and it outputs only differences in your JSON format. So far it kind of works, though only in simple testing. It also doesn't support to many types of changes yet (I've only really tested modify so far) but this is the output from some random changes I made to ObjPrototypes (link).
Honestly I haven't tried running it through your tool yet so I don't know if it's an issue, but for now I'm treating every value as a string so I don't need to care about type and they get copied over as is. I am a little bit out of my depth so we'll see how it goes but I'll let you know (if you're interested) if it turns out well after I get it to a more finished state and do some proper tests.
Yeah, sure. Let me know how it goes. I was thinking of a mod converter, but it seems complicated to implement some of the actions like replace. But replace can be skipped for now, I guess. It will generate a much larger JSON but it should work. Perhaps I'd need to implement some found structures caching to speed things up because now it has more straightforward logic. Modern CPUs are fast enough not to notice a difference, though.
Type safety shouldn't be a problem and you can treat everything like strings.
Hello, great app and idea. Replaced almost all mods with JSON but can't create a mod to reduce stamina costs. There is a structure in the structure and did not understand how to write it correctly, several variables.
can you explain a bit more on how this fixes overwriting, so say i am converting some nexus pak to the json style you refer to and i make it into a json pak mod from this, how do the other paks still work if they arent json pak whats overwriting what... idk how else to question that
Just read github's readme post. There r all explained ;)
But if u need a more clear explication, this tool will always extract official game's config files and change them with the modifications u did into JSON format files. So, it will look for the param u change in your json, search this param into original file, and chenge the value to the one u defined at ur json file. After the tool will create a .pak file that u can place to ur ~mods inside game's folder and use the mod.
It is great cause if the file changed (have some update, new params and all) this tool will search only the one u specified on ur json file and change. So it will always keeps the config files updated. Much faster ay to manage and updates mods.
But, as it works, u need all mods converted to json to this tool work. I'm sure many mod's authors will be pleasured to give the json too. I can not see any trouble to this ;)
Works great for cfg files, but i am pretty sure it will not work with mod that changes assets...
Btw, great job dmcooller !!! Very nice way to manage the mods :D
the part saying to make all mods json makes more sense now when i look at it, and yeah ill just wait till is ee more mods with this can not wait!!!! thanks for this utility for modding this is the way :)
@joewalabel Good explanation, man. Thanks. Regarding the assets update, it won't work now, but I guess it's possible to implement. But more research is needed @MkHaters Yeah, it would be good to have more mods with JSON support. I just can't convert everything myself
you need to make yourself these json. understand what a mod does (e.g. increase carry weight value), write the same attribute and value in the json file, etc.
Great job, I'm working on the configurator myself now, but with more emphasis on parsing the original .cfg files. I've already mastered parsing all available 150,000 .cfg files, this week I'll be working on the ability to easily edit.
Hmm. Interesting. I was first thinking of a similar app, but I decided to create some mod applier with control over what you change because I'm not a fan of adding a file to my game that changes unknown stuff. Previously, I was extracting cfg files from mods and looked at diffs to verify I wouldn't break anything, lol. Now, it's much more manageable.
21 comments
1. This probably doesn't matter too much but AES is unnecessary now AFAIK (GSC removed the pak encryption).
2. I don't see a changelog (or any log) being produced and I do have that enabled in both appsettings and appsetting.Mine. I wonder if it has something to do with hardcoded paths because I got a file not found error at first (bad path) and I noticed that it was showing a file path from your system. Maybe it's something else but either way that doesn't seem great.
3. I haven't checked each generated cfg yet but when it processed my mods I saw a few instanced of this error: "Failed to find the structure's bounds...". Otherwise it seemed to work fine and it showed no failures. I don't know if this is an issue but maybe worth looking into. I can send you my "mods" if that will help.
https://i.imgur.com/5e1JJdu.png
https://i.imgur.com/lX6Fppb.png
Edit: so I just checked and it did indeed skip the changes it failed on. It's strange because everything looks correct (here's the mod). Also, it would be nice if it actually showed them as failures at the end.
Again, thanks for making this. It should really help to quickly update mods when new patches affect those files (and obviously compatibility).
1. Yeah, haven't noticed that the encryption was removed. So that param is optional now.
2. Fixed that issue. The config file could not be fully applied previously.
3. Fixed that case. The thing is, I was relaying on the fact that all the structs start with ' : struct.begin', but the amount of config files and lines in them is so huge that the devs can make some typos like writing ': struct.begin'. Without starting space. At first, I didn't understand why that exact line to modify magically doesn't process. Also, if a similar case appears, the mod will be marked as failed to process.
I've pushed version 0.0.2 so you can try it out.
I'm pretty sure there are still some corner cases and bugs, but we will hunt them down.
Also, if you have some mods converted to JSON you could share them so I can add them to the mods archive
As for converting mods: I'm actually currently attempting to create a Python automation script for this where I give it both the original and modified file and it outputs only differences in your JSON format. So far it kind of works, though only in simple testing. It also doesn't support to many types of changes yet (I've only really tested modify so far) but this is the output from some random changes I made to ObjPrototypes (link).
Honestly I haven't tried running it through your tool yet so I don't know if it's an issue, but for now I'm treating every value as a string so I don't need to care about type and they get copied over as is. I am a little bit out of my depth so we'll see how it goes but I'll let you know (if you're interested) if it turns out well after I get it to a more finished state and do some proper tests.
Type safety shouldn't be a problem and you can treat everything like strings.
idk how else to question that
There r all explained ;)
But if u need a more clear explication, this tool will always extract official game's config files and change them with the modifications u did into JSON format files. So, it will look for the param u change in your json, search this param into original file, and chenge the value to the one u defined at ur json file. After the tool will create a .pak file that u can place to ur ~mods inside game's folder and use the mod.
It is great cause if the file changed (have some update, new params and all) this tool will search only the one u specified on ur json file and change. So it will always keeps the config files updated. Much faster ay to manage and updates mods.
But, as it works, u need all mods converted to json to this tool work. I'm sure many mod's authors will be pleasured to give the json too. I can not see any trouble to this ;)
Works great for cfg files, but i am pretty sure it will not work with mod that changes assets...
Btw, great job dmcooller !!! Very nice way to manage the mods :D
thanks for this utility for modding
this is the way :)
@MkHaters Yeah, it would be good to have more mods with JSON support. I just can't convert everything myself
Passring example:
Group ParentGroup Property Description ValueType Value RowContent
AISettings MaxHideWeaponWarningFollowDistanceFloat1000.fMaxHideWeaponWarningFollowDistance =1000.f
AISettingsHideWeaponWarningBarkDelayFloat10.fHideWeaponWarningBarkDelay = 10.f
AISettingsFlashlightTimeOfDayOnInt22FlashlightTimeOfDayOn = 22
AISettingsFlashlightTimeOfDayOffInt5FlashlightTimeOfDayOff = 5
AISettingsFlashlightInteractDurationInt5FlashlightInteractDuration = 5
AISettingsPreyLighterOnVisibilityCoefDouble2.0PreyLighterOnVisibilityCoef = 2.0
AISettingsPreyLighterOffVisibilityCoefDouble1.0PreyLighterOffVisibilityCoef = 1.0
AISettingsMinALifeSpawnDistanceInt5000MinALifeSpawnDistance = 5000
AISettingsMinALifeDespawnDistanceInt60000MinALifeDespawnDistance = 60000
AISettingsMaxAgentsCountInt40MaxAgentsCount = 40
AISettingsDistanceToSwitchToWalkInDouble700.0DistanceToSwitchToWalkIn = 700.0
AISettingsDistanceToSwitchToWalkOutDouble900.0DistanceToSwitchToWalkOut = 900.0
AISettingsForceRunInsteadSprintDistanceFromPathStartDouble200.0ForceRunInsteadSprintDistanceFromPathStart = 200.0
AISettingsForceRunInsteadSprintDistanceToPathEndDouble1200.0ForceRunInsteadSprintDistanceToPathEnd = 1200.0
AISettingsForceRunInsteadSprintDistanceToNextPortalDouble150.0ForceRunInsteadSprintDistanceToNextPortal = 150.0
AISettingsForceRunInsteadSprintPortalRotationAngleThresholdDouble10.0ForceRunInsteadSprintPortalRotationAngleThreshold = 10.0
AISettingsTimeToSkipLairPeacefulSpawnAfterMemberDiesDouble10.0TimeToSkipLairPeacefulSpawnAfterMemberDies = 10.0