Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FJ_CRE_VALIDITY on charbase.cre #245

Open
aquadrizzt opened this issue Jun 9, 2024 · 2 comments
Open

FJ_CRE_VALIDITY on charbase.cre #245

aquadrizzt opened this issue Jun 9, 2024 · 2 comments

Comments

@aquadrizzt
Copy link

aquadrizzt commented Jun 9, 2024

Is there a specific reason for

PATCH_IF ~%SOURCE_RES%~ STRING_EQUAL_CASE charbase BEGIN
    valid = 0
  END ELSE BEGIN

in fj_cre_validity? Changelog says it is at least 14 years old, so I assume it has something to do with PST? I haven't encountered any game breaking bugs from messing with CHARBASE.cre in PSTEE. Some weird behaviors, sure, but no crashes.

(At the very least, could it be changed to not fail silently?)

@FredrikLindgren
Copy link
Member

Pretty sure that's original by Nythrun. I'm not familiar with the reason.

Are you asking for a PRINT statement about charbase not being valid or something else? Presumably Nythrun felt there was good reason to fail the file and not knowing more about it I'm hesitant to remove the check, but I could certainly add a PRINT.

@aquadrizzt
Copy link
Author

aquadrizzt commented Sep 25, 2024

I'm sure Nythrun had his reasons at the time; I would honestly be surprised if the original PST didn't crash when messing with CHARBASE. However, I have not seen any such instance of modifications to CHARBASE.cre producing a crash in PSTEE (I've used it to, for example, make TNO a Fighter/Mage/Thief, give him new abilities, and change his initial stats).

I would like to ask if this could be changed from silent fail to normal functionality but with a non-warning console print. The main reason for this is that every creature modification function first runs fj_cre_validity, and thus these functions also all fail silently when used in this manner. Sure, working around this kind of implementation is trivial (CHARBAS.cre has no such restriction and I can just copy it over), but this seems like an incorrect use of a helper function - is fj_cre_validity for identifying whether a file is a valid creature file, or should it also impose guardrails to keep a modder from (potentially) breaking their install?

If you want to keep this restriction, I understand, but in that case I think a print warning is warranted.

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

No branches or pull requests

2 participants