Conversation
Haven't tried in vkquake, but tried adapting to qs - see attached patch:
The |
The qs version of your patch: patch_qs.txt |
Thank you! I think I've implemented all your changes, except for one that I wasn't sure about: I've noticed that the overflow warning in I've also tested the QS patch on a fresh 0.93.3 codebase, with the localization file copied to both As for the zip support, I completely agree, and I tried to keep this patch as simple as possible. For true localization we'd also have to add UTF-8 support, UI integration, and maybe per-map localization files, but those are different issues for another time. |
Not intentional, I missed it I guess. BTW, why did you changed the error into a warning? (haven't yet tested)
Ah, I totally missed the quakefs behavior to load from gamedir, not basedir: moving the localization file under id1 works.
Yes: That alone makes the whole localization code here non-functional: you want to add it for reference purposes? |
👍
I wanted to add this mostly for compatibility with the re-release (with only a small bit of manual user intervention), but I think it can also serve as a good first step towards true localization. Even without UTF-8, basic support for Italian, French, Spanish, German, latinized Russian etc. could be added relatively easily in the future. It wouldn't be as comprehensive as what the NightDive engine offers, but it also wouldn't be a whole lot of extra code. |
Pushed the three minimal changes with your name. Please rebase. |
ac0aac5
to
9de9cff
Compare
Wtih the three minimal parts in, which avoids the errors and the
Leaving the decisions to @Novum |
BTW, someone posted a link to achievement thing on sf.net/qs site; for reference, |
EDIT: Disregard, I see now that localization changes were not yet commited. Personally I do not see an issue with a little manual user intervention regarding this. Documenting how to do it should suffice. After manually patching in the changes, it works great.
|
I think this should be kept in, because without this, all the centerprint messages show up as stuff like "$map_skill_hard" ingame. Yes it does take a bit more effort for an end user (extracting the strings file from the QuakeEx.kpf, which is just a renamed zip file), but it's preferable to not having readable strings at all. Unless you would like to hardcode the English strings directly into the engine.... |
@andrei-drexler Do you happen to have a patch file handy for all of your proposed changes here? |
Sure, here it is (a neat trick that I only learned recently - you can append |
Oh nice, I didn't know that. Thanks! Just wanted this for reference. |
@andrei-drexler Hmm, while the localization stuff works, for some reason the messages which are displayed when completing an episode still show their variable names:
|
For the Setting aside the savegame issue (which QS doesn't have anyway), even if the maps are technically playable, they're still less enjoyable IMO because of the missing localization - seeing |
I wonder whether QSS has the issue
I see your points, I do. If we are to apply the localization though, we
Either way, it still is problematic when e.g. you have a network play: I still wonder what @Novum has to say on the matter? |
I would think that the localization stuff is mostly for client-side messages. That said, even with this current approach, it is hard coded to look for the loc_english.txt file. Not sure if it can be made more generic to just look for While I am definitely in favor of having something which works as a stop-gap just to play the rerelease content, I have to wonder if there is a better way of going about it. |
It should work, I've just tested on e1m7 (and also in the new campaign earlier) |
@andrei-drexler Odd. I have no idea why these specific variables aren't localizing on my end when everything else works fine. I'm using a new pakfile I created which includes all of the updated models, and while I can't think of any obvious reason why that would affect this, its possible I'm missing something there. EDIT: removed my custom pakfile from the equation, same issue. UPDATE: I manually applied your patch again from a new git clone of this repo and it appears to be working. This error is still curious though, happens as soon as you beat the base game:
|
Good catch, fixed in 787ab3f |
We also need some dummy
|
Oh, you're right, I saw that too a couple of times, but I was always in the middle of something else and never got to it. 2fd8993 |
9de9cff
to
a85d87f
Compare
Hit this in hipnotic:
|
Seems to always happen when gremlins steal your weapon
Save file: s4.sav.zip |
1c9d6bd
to
79f5de5
Compare
Rebased (since there were changes to vkquake.pak on master) and pushed 79f5de5. It looks like the old .ent.orig files in the repo had newlines added at the end, the versions I committed don't, they're straight from the bsp's (since we're crc-ing them, after all).
Just trying to make it easier for new players whose first contact with Quake was the re-release (which does show the new expansions in the UI) and might not know about the game command. |
In the new commit, they have a nul-terminator at the end instead of newline:
Well, if someone is wanting to play rerelease using qs or vkquake, it means they either can't run the rerelease as is and/or don't care about rerelease's new features, either way mentioning that is unnecessary: qs has documentation for the game command (feel free to mention it in vk vrsion if you want, though.) |
OK, the ents in the pak do contain a nul terminator and the crcs orig files that you |
I've used |
No need to add extra complexity I guess. |
Hmm. I have mixed feelings about this, but I think it would be a good idea to be able to CRC .ent files extracted with bsputil and have them match if nothing's changed. And it seems bsputil doesn't include the NUL. |
Well, if the only change will be |
Unfortunately, it seems bsputil writes files in text mode, so there will be newline differences anyway... |
Ugh. That can happen on windoze.. just dos2unix the extracted files. (BTW, your generated pak has all the files in dos cr/lf mode..) |
OK, I think the following should be good, and we can go back to old orig files, diff --git a/Quake/gl_model.c b/Quake/gl_model.c
index d15bebf..f8ed30c 100644
--- a/Quake/gl_model.c
+++ b/Quake/gl_model.c
@@ -801,12 +801,14 @@ void Mod_LoadEntities (lump_t *l)
char basemapname[MAX_QPATH], entfilename[MAX_QPATH];
char *ents;
int mark;
- unsigned int path_id, crc;
+ unsigned int path_id;
+ unsigned int crc = 0;
if (! external_ents.value)
goto _load_embedded;
- crc = CRC_Block(mod_base + l->fileofs, l->filelen);
+ if (l->filelen > 0)
+ crc = CRC_Block(mod_base + l->fileofs, l->filelen - 1);
mark = Hunk_LowMark();
q_strlcpy(basemapname, loadmodel->name, sizeof(basemapname)); |
And it did, that's how I found the issue :(
Sure, just that I was hoping other users could extract a crc-matching file with bsputil without any manual intervention, but it seems manual intervention is a recurring theme...
Ouch, I was wondering why they were bigger... I guess that's what
Alright. |
Don't worry about that, you finalize everything else, I will regenerate the pak |
To verify each other's results, with the nul-terminator removed the crcs I found are: |
If you're already taking care of the ents/paks (thank you, I've rebooted but it looks like you're already ahead), I'm not sure what's left to do besides the readme tweaks :)
Confirmed. |
Pushed f9156f1 to git master: make sure all are OK (and that ents are identified correctly at runtime) |
And pushed the default.cfg patch as cbd25e6 |
79f5de5
to
d948039
Compare
I checked, and all the ent files load correctly. I also force-pushed the rerelease branch back to the commit before the default_cfg change. |
Merged the rest, i.e. the localization stuff. Let's do any further improvement in master (or with new pull requests if necessary.) |
Alright, thank you for helping out with all this, and thanks to everyone else that tested the in-progress code and offered feedback! |
Now pushed the patch to QS, too. |
I've only looked at this very briefly earlier, but there seemed to be significant differences when I compared the entity list from a rerelease map to the old version - at the very least the order of the entities has changed, so I'm not sure we can safely take the new fog/waterlevel values and apply them to the old entity files to produce a new pak. Plus, I really think z-fighting should be dealt with by the renderer - after all, the same maps with the same problematic entities don't have this issue in the new engine. |
This fixes crashes with the 2021 re-release and adds basic support for localized strings so that the new maps display proper messages instead of text id's. Localization data is read from a
loc_english.txt
file in the mod directory, in the same format as the files in thelocalization
folder in thererelease/QuakeEX.kpf
zip archive. Currently the files need to be copied manually - adding code to read zip files just for this feature seemed like feature creep, and can be added later if necessary.@sezero, I'm hoping this can also be merged into QS, can you please have a look?