Request: Remove warnings and add more customization please #246
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
OldButImportant
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
software-migration-backups/Dumper-7-17-05-2026#246
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
So i have been into this repo for a few days now and its really amazing and well written.
Thanks for that!
I made a Fork where I applied all of my requests already but the implementation is really "ugly" and a more rather quick solution to my needs now.
Keep in mind I am fairly new to this Project, so I was a little bit careful in changing existing stuff to not break things.
Just in the middle of writing the Issue, I saw that you already have seen my fork and left a comment there.
Customizations requests:
I e.g. dont want to have all the .cpp files in the same directory than the .hpp files.
I added a rather ugly way to make an
includeandsourcefolder but it fits myproject where I plan to use the dumped SDK and i can simply copy&paste the CppSDK
folder (which i renamed too).
Also neat would be to rename the SDK.hpp to a custom name too.
directory, instead of using
C:/.... It would be neat if that could be customizable.I dont want to create a PR for that, because you see my changes? I wouldnt want to
have them too haha.
experience what certain settings will change on the output and why that would be useful.
To clarify. I have no exp with linux c++ but I want to change that sooner or later during my API
development for the PalServer, to support native Linux servers without having them to install
wine or proton. If not usable for linux, could there be a future change?
the PalServer, contains classes that are not used at all, bcs they are obviously for the gameclient.
classes and functions that are e.g. for the UserInterface. I would like to append a list of strings
that will prevent those classes to be generated at all. If thats not too hard to implement ofc.
(Still getting overwhelmed to try to dig deeper into the dumper but I want to focus more on
project that will depend on the dumper. So I am asking you here.)
Warnings:
Disclaimer: I have been able to fix all warnings on /W3 for now but most changes are more ugly to achieve it.
I have several Ideas on how to change that overall:
Probably not the desired way but some code pieces def. should have a bigger size.
Common cases I saw where
for int i loops. the index var is an int but the condition is compared to an unsigned value.Example and here the Fixed Version
implementation is the best but i would claim it decent enough.
size the underlaying enum type can actually hold, which results into a massive spam of overflow warnings.
My solution is really bad for this and is a more or less frequent solution. I added enough comments for you to follow
my thoughts
I add an example enum to emphasize more what I am talking about: my current solution writes the _MAX overflow beneath it as an
inline constexpr. But i am not sure if the _MAX fieldsis actually used by the engine or required to be inside the enum. another thought was changing the enum class type
to a bigger size but that could cause to misalignments?
using UnderlayingType = doublesupport.I tested the code by compiling with
using UnderlayingType = floatand it did not cause a warning.the dumper defines a class and later references this class as struct type. Those mostly occured with:
FProperty,FFieldandFStructPropertywhen they are used in fields like:TFieldPath<struct FProperty>Here and example: My fix for that is extremely shit but I gave up to find out how i can check if the
Member-param in is a class type. I could not figure that one out. so i was hoping you have a better solution for that.my "Fix"
Last Words:
I hope I did not forget anything here to mention. The most important things for me are that all the warnings are removed properly.
Sorry for my OCD but i must obey them xD
The Dumper is really amazing and does the Job really well. I really appreciate all the work that has been done here.
I made the Fork to fit my needs but also as an Example where I could tackle the problems and give you a faster
insight. I also made it a solution to fill this Issue with examples and provide a detailed report/request.
I hope you have a great day/weekend!
Customization Requests:
I haven't been asked for that yet and it's certainly not impossible.
That could probably be done in a nicer fashion with std::filesystme, and if not it should be an option in
Settings::CppGeneratorFrom my point of view all of the settings are pretty much self explanatory and a quick description is provided in the comment above. Do you have any example of what is unclear?
Linux
No, right now the entire SDK generator assumes the availability of the windows api, and pretty much all of the Offset-finder code (for GObjects, GNames, AppendString, GWorld, ProcessEvent) assumes that the dumper is running on an x64 machine. In theory that portion should be portable to linux, but it contains too many windows specific things. For example, it heavily uses windows structs for sections, imports and memory validity.
In theory yes, but it would be a lot of work. There would need to be different memory interfaces and different offset-finders per system depending on what information is available, what the instruction-set of the underlaying processor is and what other information is available.
Filters for some base-classes to exclude should be possible, but I'm not sure how much fun that would be in terms of dependencies. Because what if a non-excluded class contains a pointer to an excluded class? Keep the excluded class? Well, then I'd also need to keep the base class of the excluded class and all of the member the excluded class contained. Or references to the excluded class could be replaced by a
void*or padding, but that would still be kinda weird to implement.I think a feature like this requires a lot more consideration than I want to do right now.
Warnings
Fixing integer overflow/underflow warnings
Using uint64_t everywhere is kinda shitty. static_casts do the job, at least when it's not desirable to switch the type of the variable to a more fitting type. The conversion from
wchar_tstrings tocharstrings was done incorrectly (and stills is on main), but is fixed on the Unicode-Names branch. The reason this branch hasn't been merged back into main is that the name-validation (to filter out invalid names) doesn't properly support utf8 yet. I've written a library (unfinshed) that handles different encodings properly that will be used once ready.Extending the size on enums is not a solution as it needs to match the game. Removing the
_MAXvalue seems like a sufficient solution. I've never seen anyone use that anyways. A setting can be addedSettings::CppGenerator::bKeepEnumMAXValues = false.Nope, there is no reason to use
floatwhenUnderlayingTypeexists, it was just added later on and not all occurrences offloatwere replaced.I'm not sure if I was moved to a parallel universe, but I'm pretty sure I fixed the class/struct missmatch 3 times already, yet somehow never did.
On your last words:
Issues with requests like this are welcome, at least if they are properly formulated like yours. Removing the warnings is kinda cool and I don't see any strong reason against it. I'm always happy when other people contribute to this project.
Feel free to open pull requests for all kinds of different features and fixes. If there's any issue with code quality, formatting or anything else I will let you know.
Also feel free to message me on discord (
fischsalat) on anything, for a faster communication.