anUser Posted March 8, 2013 Share Posted March 8, 2013 Given enough space in a function, could it be possible to create a reference to a new variable in DGC.ini created by us? If not, can any of those ini variables be accessed from anywhere, so some of them could be cannibalized into something else? Link to comment Share on other sites More sharing options...
johnnylump Posted March 8, 2013 Share Posted March 8, 2013 (edited) I doubt creating a new variable would work. That stuff is read into the exe by modpatcher, and I don't think it's robust enough to create a new variable in the exe. Truly I don't know for sure. As for your other proposal, that should work. Excellent idea! If you look through the upks, you'll find references to DGC.ini variables; that should provide you the hex necessary for the reference. However, if you are replacing an integer with that variable reference, it will likely move you into rescripting, as variable references are going to be many bytes longer than an integer reference, and you'll need to find those bytes by deleting something else within the function. Some functions can give up bytes more easily than others. It may ultimately be easier to just edit the upks to the integer setting you want. Edited March 8, 2013 by johnnylump Link to comment Share on other sites More sharing options...
EliotVU Posted March 8, 2013 Share Posted March 8, 2013 New variables can be added in non-native classes although that would be a hard task to do and not to mention this would change the file size causing the package to non-function. It's also possible to make existing variables configurable so long the class is configurable too. Link to comment Share on other sites More sharing options...
anUser Posted March 8, 2013 Author Share Posted March 8, 2013 ok, so besides being defined on the DGC.ini those variables must exist as well in some class? so I cannot use them as a kind of global?Which class is configurable? I'm missing something... Link to comment Share on other sites More sharing options...
EliotVU Posted March 8, 2013 Share Posted March 8, 2013 Yes they have to either exist in C++ or UnrealScript both are possible. Any class with config(INI_NAME_HERE) is configurable. When you open an ini file you can see these sections like [Package.ClassName] this tells the engine for which class the variables are configured. Link to comment Share on other sites More sharing options...
johnnylump Posted March 8, 2013 Share Posted March 8, 2013 I defer to EliotVU! :) Link to comment Share on other sites More sharing options...
anUser Posted March 8, 2013 Author Share Posted March 8, 2013 Ok, thanks. So in conclusion, creating new variables it's a mess, and canibalizing existing ones it's ok as long as they're used inside the class they were configured for, isn't it? I think some mods could make use of this to allow more user customization, and as a workaround to bring back to life those combat related constants the game seems to ignore by replacing them for such references to other variables we can change. Now that I think of it, there was an edit by drakous79 on ufos that already did that... since he used the variable for what it was originally intended for I didn't thought of it this way, but man, we can use the variables the way we please! ... how dumb I feel realizing such an obvious thing ... :) Link to comment Share on other sites More sharing options...
Recommended Posts