File information

Last updated

Original upload

Created by

Rae

Uploaded by

Ra3mon

Virus scan

Safe to use

About this mod

A NGE update/port of a rewrite of a mod that restores Gwent cards that were "lost in development". Upgrade through console for pre-existing games. Backward compatible, only original CDPR work.

Requirements
Permissions and credits
Changelogs
"Gwent restore... rewrtitten" (GRR) is a mod that was made by Maciej Polanski, it was, in his word, "inspired by recent update by adamaskoff of old mod that was an update of just older mod."

The new NGE update seemed to have broken the mod, ish, with its new GOG cards, Geralt, Ciri and Roach. I updated/merged the gwintManager.ws script in the old mod, with the one that is in the next-gen update. This should also fix any save files that were corrupted by obtaining a GOG card with the old mod enabled!

As well as 2 XML files, gameplay/items/def_gwint_cards_final.xml and gameplay/items_plus/def_gwint_cards_final.xml

The original author's script, modGwintRestoreRewritten.ws, remains completely untouched. And their methods of replacing cards and gwintManager behaviours remain practically the same.

As such I will copy and paste the old description here for information. Unfortunately they closed their account so I couldn't really contact them for a blessing and update to their old depository. However all credits go to them for figuring things out and comprehensively explain everything in their original mod.

To use the commands one would need the debug console, which can be found here.

Installation is quite straightforward, place modGwentRestoreNGE in your Mods folder within Witcher 3.

Versions(pick one):

1.0s: Manual version, Vanilla compatible, you'll need to run the commands yourself, grrUpdateSafe is backwards-compatible and grrUpdateRisky isn't.
1.0a: Auto Magic version, NON-Backwards compatible with Vanilla. Automatically run the commands when Gwent menu is open. Thanks to byblomod
for the original version.


What this mod is about? (small technical talk)
Internally, "cards-items" that player can loot or win are totally different entities then "cards-gwent" used in Gwent(GwintManager class). When players finds a card-item, card is added to Inventory as invisible item, then a new card-gwent is added to GwintManager. Theoretically, this should be 1:1 mapping. But it looks that person handling Northen and Nilfgard decks got lost and a few cards-items are mapped to one card-gwint (making stacked cards), while other cards-gwint are unused.
Also, naming conventions of card-items is "xxx; xxx2; xxx3" while pictures naming convention is "xxx; xxx_1; xxx_2". This created some pictures miss-assignments. GRR tries to iron this out, while refraining form adding any non-CDPR stuff.

Vanilla mode (100% backward compatible)
After mod installed, AI opponents starts using restored cards. Balance is untouched, because those are alternative versions of old cards, just with new pictures. AI decks are not saved, but generated each time. So if mod uninstalled, restored cards safely disappear without leaving any traces.

Player is not given any restored cards, because such save game would not be 100% identical to vanilla. Player may replace his stacked cards for restored ones, using console command described below. This is main difference against old mods, where starting a new game made player receive restored cards - so return to vanilla was not 100% sure.
Player may see new fixed pictures on some cards (e.g. poor infantry) - this disappears if mod uninstalled.

Command "grrUpgradeSafe" (still backward compatible)
GRR allows player automatically replace cards with alternative versions with added console command: grrUpgradeSafe

This replaces some cards in GwintManager with alternative versions, that always existed in The Witcher 3. Saved game still is backward compatible, but not identical. If mod uninstalled, replaced cards will stay as separate cards (not stacked) and most will return to common base picture.

This function can be called safely multiple times. And should be, to replace next looted cards.
Calling this function is advised way of using this mod.

Command "grrUpgradeRisky" (non backward-compatible)
Cards for alternative Blue Stripes and second Siege Tower existed only as pictures, so are created in this mod - thus aren't backward compatible. Player may replace his base Blue Stripes cards and receive a free new Siege Tower with console command: grrUpgradeRisky

Such game, if saved, is not compatible with vanilla. Gwent will be broken without GRR, because its code can not handle non-existing cards.
Adding restored cards to player can not be reverted (as far as I know) because of poor implementation in native code of GwintManager class.

Some more technical talk
I am not sure 100% - but it looks that for any received card, GwintManaged generates an entry in its internal array, storing card Id and number of cards.
Removing card decrements that number, but an entry itself is never
removed. So, while this may sounds strange, removed card "still exists in the database, 0 pieces of it". This still counts as "exists" and breaks Gwent. So once cards are added
and saved, will never be removed. No problem with "safe" cards, that exists also in vanilla. But no compatibility for "risky" ones.

Mod adds more commands player may use (on his own risk) to manage cards using GRR: grrAdd(Id), grrRemove(Id),grrVanilla. Last one tries to restore vanilla state - but mind above reservations. Also, I suppose that having saved card that "exists, 0 pieces of it" may introduce an instability to game.

All manipulations GRR does are inside GwintManager, i.e. apply to "cards-gwint" only. GRR is not affecting a game world
("cards-items") at all, and is not expected to affect "Gwent Colletor" achievement in any way. People looking for solutions to theirs problems with mentioned achievement, should rather use standard functions "addCardByName(name)" or "additem(name)". Names of cards can be found at the end of file "content0\scripts\game\gui\menus\gwintManager.ws", inside functions converting name of "card-item" to Id's of "card-gwent".

Reference sheet - upgrades GRR does
3x gwint_card_poor_infantry -> gwint_card_poor_infantry[125]; gwint_card_poor_infantry2[126]; gwint_card_poor_infantry3[127]
3x gwint_card_crinfrid      -> gwint_card_crinfrid[130]; gwint_card_crinfrid2[131]; gwint_card_crinfrid3[132]
3x gwint_card_kaedwen       -> gwint_card_kaedwen[150]; gwint_card_kaedwen2[151]; gwint_card_kaedwen3[152]
2x gwint_card_catapult      -> gwint_card_catapult[140]; gwint_card_catapult2[141];
4x gwint_card_impera_brigade-> gwint_card_impera_brigade[245] [...246...247...] gwint_card_impera_brigade4[248]
3x gwint_card_nausicaa      -> gwint_card_nausicaa[250]; gwint_card_nausicaa2[251]; gwint_card_nausicaa3[252]

3x gwint_card_blue_stripes  -> gwint_card_blue_stripes[160]; gwint_card_blue_stripes2[161]; gwint_card_blue_stripes3[162]
0x                          -> gwint_card_siege_tower2[171]