Skip to content

fix: generated stub of quest::ICharacterConditionType - #220

Open
poirierlouis wants to merge 1 commit into
wopss:masterfrom
rayshader:fix/generated
Open

fix: generated stub of quest::ICharacterConditionType#220
poirierlouis wants to merge 1 commit into
wopss:masterfrom
rayshader:fix/generated

Conversation

@poirierlouis

Copy link
Copy Markdown
Contributor

No description provided.

@psiberx

psiberx commented Jun 26, 2026

Copy link
Copy Markdown
Collaborator

The problem with that field is that it has different names in different classes. Dumper picks a random one. The objectRef is the most common name that makes sense for all classes. This is why we have include/RED4ext/Scripting/Natives/questICharacterConditionType.hpp override for generated header.

@poirierlouis

Copy link
Copy Markdown
Contributor Author

Oh, so if I were to generate again, it would randomly pick another name?
We can keep objectRef but add a comment to let us know any changes there must be ignored?

@psiberx

psiberx commented Jun 26, 2026

Copy link
Copy Markdown
Collaborator

We could add it to .gitignore :) @wopss wdyt?

@wopss

wopss commented Jun 27, 2026

Copy link
Copy Markdown
Owner

I find objectRef to make more sense than attackerRef.

We could add it to .gitignore :) @wopss wdyt?

Do you mean to add the whole file to .gitignore? If so, why?

@psiberx

psiberx commented Jun 27, 2026

Copy link
Copy Markdown
Collaborator

Yes. If we add it to .gitignore, the file will stay in the repo in the current state, and git will ignore future changes, when it randomly switches to attackerRef for someone.

@wopss

wopss commented Jun 27, 2026

Copy link
Copy Markdown
Owner

If we do that, then the RED4EXT_ASSERT_SIZE might not be updated in the future. I don't see any issue with it being updated once in awhile.

@psiberx

psiberx commented Jun 27, 2026

Copy link
Copy Markdown
Collaborator

Good point about assert. Alternatively this case can be handled by dumper. I don't see any issue with updating the file either. But if it's not a mass update like after game patch, it's a waste of time trying to figure out why the field is suddenly changed, why SDK wasn't updated, etc. Not the first time it's happening.

@wopss

wopss commented Jun 27, 2026

Copy link
Copy Markdown
Owner

What about skipping the stub in the generated file?

@poirierlouis

Copy link
Copy Markdown
Contributor Author

Otherwise, I can definitely add a simple // 38 - ignore changes, don't commit (see PR#220).

You mean only keep #include and discard generated code in comments?

@psiberx

psiberx commented Jun 28, 2026

Copy link
Copy Markdown
Collaborator

What about skipping the stub in the generated file?

Just for this file?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants