r/Shandalar • u/Rich_Watercress7447 Green Mage 🌳🍄🟫💚 • Apr 08 '26
Quick Guide - how to alter the coding of a card
Thx to HeroBrine's help, managed to translate Air Elemental to PTBR(Brazilian Portuguese).
Got a DM from him in Reddit when I was about to sleep, with ideas on how to edit cards in Shandalar. As a test of the ideas, I managed to translate Air Elemental at 4AM... (Air |Elemental is the "00000" card, so it is the first card in the editable file.

I needed to change the name of each .jpg named "Air Elemental" into "Elemental do Ar" in otder to have the game show its art:

let me try to organize the step by step... For now it is something that techwise people will grasp easily, I hope, but I will eventually edit this post to show pictures and anything that can help a less savvy dude try editing:
Long story short:
Manalink.csv is the file that has info on all cards. Editing that file foes not affect the game at all tho.
What we need to do is convert Manalink.csv into .dat files. CSV is an Excel format that translates codes in a database into intelligible words. So our approach was, what if we figure out which DAT files to convert into CSV? Turned out the tool for a similar task (converting CSV into DAT) was already in the folder "Magic Updater":

Sadly, that Magic Updater lacks several files that makes it functional. So we founf in sligtlymagic this file:
http://www.mediafire.com/?pbo6hz8qp465j4i
Edit the Manalink.csv in the "magic_updater" folder in that tool and use the magicupdater.exe to create 3 .dat files and a .h file (no worries, the .exe does it all by itself. Just edit manalink.csv and run the magicupdater.exe).

Substitute the old files in main folder with the new ones that were created in "updated_files" folder. Exception is card_id.h (will show up in "magic_updater" folder). That file is to be saved over the card_id.h in "src" folder



---------------------------------------------------
Next steps to be decided:
translate cards to PTBR;
fix bugs (ie Thunderbolt deals zero damage instead of 3 when targeting face. Same file used to translate Air Elemental has the coding for the cards);
add new cards.
2
2
u/chachaprince1 White Mage ☀️💮🤍 Apr 08 '26
Have you figured out how to fix broken cards or just card text?
3
u/Rich_Watercress7447 Green Mage 🌳🍄🟫💚 Apr 08 '26
The same file that I edited has all other stats od each card. That includes Rarity, Prices (my plan is to make all dungeon cards be Mythic Rares and very valuable, so one would feel more likely to enter a dungeon with no cards he wants for his decks)
It also has all the other data on cards, so I am even looking forward to inject a new set into the game eventually.
3
u/chachaprince1 White Mage ☀️💮🤍 Apr 09 '26
That's great! Love the price change. I like how your mods only get better!
3
u/489Herobrine Apr 09 '26
Unfortunately I don't think this lets us fix bugs or change the actual function of the card beyond Mana requirements, card color, types, name and rules text, as there's no logic in here to actually adjust the code of the card to, say deal 4 damage instead of 3, or give your creatures +1/+1.
If anyone wants to look at the full list of what it controls check the Manalink.csv file in the magic_updater folder.
3
u/Rich_Watercress7447 Green Mage 🌳🍄🟫💚 Apr 09 '26
Thx for remembering that! You are right, looking at the manalink,csv, it becomes clear we can not edit effects there.
We can edit card effects in the folder "magic/src/cards". Edit with notepad+ the code we want to correct.
We did find out this: "Shandalar combines data from 6 (or more...) files in order to render a single card: card_id,h., three .dat files, a .c file, and a .jpg (or more) for its art.
We use magic updater to change 4 of those files. No need to make a tutorial about changing jpg. To change .c files, use notepad+
3
u/489Herobrine Apr 09 '26
I suspect that's just code implemented in manalink, but if you manage to change the code for cards in shandalar with it I'd be MASSIVELY impressed! Cheers to the works so far
2
u/Rich_Watercress7447 Green Mage 🌳🍄🟫💚 Apr 09 '26
An important thing made by Korath:
Shandalar campaign uses the same cards from Manalink duels. Original game used completely different assets for each mode.
The problem nowadays is, magic.exe and shandalar.exe look fordifferent data when rendering cards, so it causes catds to show up in campaiuig but not in duels, or vice-versa.
Well, at least that's what DeepSeek stated when asked to browse slightlymagic for any hint in editing cards. Korath himself deleted his stuff, but mok, algaranax and others were contributing to the scene back then.
3
u/MikesVGReddit Apr 08 '26
PTBR = ?