It is currently 19 Apr 2024, 14:51
   
Text Size

Adding cards to manalink, please help

Continuing Development of MicroProse's Magic: The Gathering!

Moderators: BAgate, drool66, Aswan jaguar, gmzombie, stassy, CCGHQ Admins

Adding cards to manalink, please help

Postby lujo » 19 Nov 2015, 11:42

I would like to add cards to manalink. I know some are impossible, but the ones I would like to add almost certainly aren't and were most likely skipped because noone who could add them could see the point or their significance. I do, so I'm willing to add them and don't consider any ammount of work to do it a hassle at all.

I've been told this:

Korath wrote:Getting a card into Manalink involves:
  1. Verifying the Manalink.csv row (if it's already there) or creating it (if it isn't).
  2. Collecting all the artwork.
  3. Creating a ct_all.csv line.
  4. Unless the card exactly duplicates another in all respects, including all the numbers that don't come from the csv rows, assigning a function address and writing the card's function. The latter can range from trivial (Penumbra Kavu) to tedious (Memnarch) to extremely difficult (Circular Logic) to flatly impossible (Cavern of Souls).
  5. Do all of the above for the card's alternate form if it changes card type (like a manland) or flips (Kamigawa block) or is double-sided (Innistrad block/Magic Origins), and do it all again for any tokens it makes if it's not a token type that's already in Manalink (Kavu tokens aren't).
  6. Wait for a Manalink release.
And if anyone could answer a few questions for me I would happily sit there and add a lot of cards to manalink.

1) Verifying/Creating a Manalink.csv row - I know what this means, but I don't know how it's done properly. I've read Korath has something to recreate it from data pulled off gatherer (or something), access to that would help.

Where is the row supposed to go, too? Do I just add it at the end?

I've found http://www.slightlymagic.net/wiki/Guide_to_CSV_editing
and: http://www.slightlymagic.net/wiki/Manal ... Definition

But if there's a simple and relatively fool-proof way of doing this or a techinque or something clueing me on that would help a lot.

2) Collecting the artwork - from where, exactly? I know several potential sources and I've made some for missing cards in Forge by hand before. Where is the art usually acquired? If it needs any processing and resizing and someone knows the exact parameters that would also be helpful.

3) Creating a ct_all.csv line - again, I understand what this means, but again, where exactly do I create this row, at the end or somewhere else? I've edited it for fiddling with cards in Shandalar before, but never for adding new stuff.

4) Writing the cards function - I suppose adding cards which just combine elements of existing cards, or are similar except in terms of power/toughness and other parameters can be done without this. But if this has to be done, where? How? In what language? Where are the other card functions written so that I can compare?

5) This I understand, unless there's something about it I don't know about.

and 6) Is there and solid reason to not add missing cards to manalink? Like there being a limit to how many cards can be in there? Anything else I should know?

7) Does anyone have a complete list of things that aren't in manalink with stuff marked as impossibles for reasons a tech-illiterate noob couldn't be able to know?

---

If anyone can help me with those questions all it means is that a bunch of cards that got overlooked or noone could be bothered to spend 20 minutes on adding them will be added to Manalink. This then also means that there's a chance they get added to Shandalar, too. I believe this is in everyones interest?

Thanks
Last edited by lujo on 19 Nov 2015, 12:11, edited 1 time in total.
---

My Shandalar deck pack folder is avaliable here:Dropbox
Leave feedback on particular decks here: Google doc
Ask for instructions, give feedback and complaints here: Thread
User avatar
lujo
 
Posts: 557
Joined: 20 Nov 2013, 13:17
Has thanked: 224 times
Been thanked: 70 times

Re: Adding cards to manalink, please help

Postby Korath » 19 Nov 2015, 12:11

User avatar
Korath
DEVELOPER
 
Posts: 3707
Joined: 02 Jun 2013, 05:57
Has thanked: 496 times
Been thanked: 1106 times

Re: Adding cards to manalink, please help

Postby lujo » 19 Nov 2015, 12:51

That was very helpful!

Is it possible to get that pearl script that transforms a line into something more easily readable anywhere?

And does anyone know the exact procedure used to get arts in general? As I said, I can think of several, I just don't know which one is expected to be used for this. As far as I understood getting the required arts for stuff was considered "a hassle", but it wouldn't be one for me if I just knew this.
---

My Shandalar deck pack folder is avaliable here:Dropbox
Leave feedback on particular decks here: Google doc
Ask for instructions, give feedback and complaints here: Thread
User avatar
lujo
 
Posts: 557
Joined: 20 Nov 2013, 13:17
Has thanked: 224 times
Been thanked: 70 times

Re: Adding cards to manalink, please help

Postby Korath » 19 Nov 2015, 12:59

Perl script. Pathologically Eclectic Rubbish Lister, not broken beta mana stone. It's in the Manalink distribution, magic_updater/xml.pl for Manalink.csv and magic_updater/xct.pl for ct_all.csv.

Art: viewforum.php?f=15
User avatar
Korath
DEVELOPER
 
Posts: 3707
Joined: 02 Jun 2013, 05:57
Has thanked: 496 times
Been thanked: 1106 times

Re: Adding cards to manalink, please help

Postby lujo » 20 Nov 2015, 11:33

Right, I got Feast of the Unicorn in, because I could find where it's code address was in ManalinkEh.asm, and everything else was simple (and, well, already done).

How do I find where the address for Penumbra Kavu is, as it's not in ManalinkEh.asm? And if it's unassigned how do I assign one? That's the one thing I can't figure out.
---

My Shandalar deck pack folder is avaliable here:Dropbox
Leave feedback on particular decks here: Google doc
Ask for instructions, give feedback and complaints here: Thread
User avatar
lujo
 
Posts: 557
Joined: 20 Nov 2013, 13:17
Has thanked: 224 times
Been thanked: 70 times

Re: Adding cards to manalink, please help

Postby Korath » 20 Nov 2015, 20:40

:roll:
User avatar
Korath
DEVELOPER
 
Posts: 3707
Joined: 02 Jun 2013, 05:57
Has thanked: 496 times
Been thanked: 1106 times

Re: Adding cards to manalink, please help

Postby lujo » 20 Nov 2015, 22:04

Yes I am indeed that laughably stupid when it comes to this sort of thing. But the even sillier thing is that if this is explained to me properly I actually can sink truly retarded amount of time and effort into things other folks wouldn't. I spent the last 2 days trying to figure it out, installed perl, looked around the outdated wiki, looked at your instructions until I had a headache, redownloaded every possible patch and stuff just in case I'm missing something in my instalation (took hours, but at least now I got swanky graphics, lol), looked around the forums and still couldn't figure it out. It's probably right in front of me, too.

Please? A world where I'm doing stuff noone can be bothered to do instead of writing pointless textwalls would be an awesome one.
---

My Shandalar deck pack folder is avaliable here:Dropbox
Leave feedback on particular decks here: Google doc
Ask for instructions, give feedback and complaints here: Thread
User avatar
lujo
 
Posts: 557
Joined: 20 Nov 2013, 13:17
Has thanked: 224 times
Been thanked: 70 times

Re: Adding cards to manalink, please help

Postby Korath » 20 Nov 2015, 23:47

Lujo. This isn't a matter of wagging a finger at your monitor and saying "Penumbra Kavu - I CHOOSE YOU!".

Nobody is going to teach you C in the space of a couple forum posts. You're certainly not going to learn software architecture well enough to contribute anything but the most trivial of cards to a system as complex as MTG short of a master's degree in software engineering, or at least enough decades of hobbyist tinkering that you can fake it.

That you're able to stumble across the occasional card like Feast of the Unicorn which is already implemented, completely untested, and happens to work right, but isn't enabled, is a result of people faking it. The real danger here is that the next non-enabled, already-implemented, completely untested card you stumble across like Feroz's Ban sort of works in trivial cases but not in more complex ones like casting creatures from a graveyard, due to people faking it poorly.

What happens then is that one of the people who are both capable of and willing to work competently with Manalink - and there haven't been more than three of them at a time in the world since about 2005 - has to either re-disable your card, redo it entirely, or redo most of it and then support it for forever (almost always a worse choice than the first two).

We're willing to answer questions when there is even the slightest implication that doing so will eventually save labor. But you don't even know enough to know what you don't know. And worse, every attempt to reason with you has been met with more of your continuous stream of belittling insults. I don't need my ego stroked, but I've dropped clients paying me four figures a day for being less abusive than you have, and I've been pretty tempted to do the same here.
User avatar
Korath
DEVELOPER
 
Posts: 3707
Joined: 02 Jun 2013, 05:57
Has thanked: 496 times
Been thanked: 1106 times

Re: Adding cards to manalink, please help

Postby lujo » 21 Nov 2015, 00:53

Ok, how about if I can explain what I don't know?

Because I'm not looking to even attempt to add things like Feroz Ban. I choose the Penumbra Kavu, because it has only one ability, there are 3 cards with that ability in already, and it would allow me to see if I have understood your instructions about how tokens are added, as I was unhappy about what I learned from the Feast of the Unicorn experience (as it was obvious all the work had been done already).

When you explained how to edit ct_all.csv in order to test out things on my end you told me everything... except that I was supposed to run "manalink_updater" afterwards. And that was all that I was missing there. I think the situation might be the same here, and every other situation that confused me so far was like that.

I can do .csv rows fine enough, as long as the card is simple enough and I have a reference point.
I can do arts very easily, get them all to show, etc.
I can apply changes using the updater.
I can tell what I need to do to code if I have a reference point. (So tweaking Penumbra Bobcat code to make it Penumbra Kavu code is something I can do).

I don't know exactly where new card code is supposed to go. The wiki says one thing and you said something like that too, the card folder in the manalink src points to another, but that could even be intuitive.

What's confusing me and making me unable to practice and see what I can and can't do is that I don't know where the "code address" is assigned and how. What the wiki implies is that the code address was generated automatically after following a procedure which I could follow, but you said in another place that it's grossly outdated (and that it was also wrong). EDIT: I suppose the function of the outdated stuff might be replaced by things present in the .src but I just don't know what to click on in what order like with the magic_updater. There's no readme.

You can explain what I don't know easily enough - if you wanted to port Penumbra Kavu and someone handed you everything the card needs except the code adress, what would you do? What would you click on in the src or elsewhere, which files would you edit in which program resulting in what? (I'm just using Penumbra Kavu as an example).

Past that point, there's a very simple way for me to know whether I can port a card or not - if that's not enough understanding to do it, I can't do it, move on to another card. If this results in trivial cards - trivial to enable always still means doing all the drudgery, and doesn't mean useless.
---

My Shandalar deck pack folder is avaliable here:Dropbox
Leave feedback on particular decks here: Google doc
Ask for instructions, give feedback and complaints here: Thread
User avatar
lujo
 
Posts: 557
Joined: 20 Nov 2013, 13:17
Has thanked: 224 times
Been thanked: 70 times

Re: Adding cards to manalink, please help

Postby Aswan jaguar » 21 Nov 2015, 09:34

lujo, your willing to help out is certainly welcomed but what you don't understand is that the simple cards or cards that have their function already implemented that you want are a lot easier for Korath or Gargaroz to implement and can do so the right way, just by fulfilling your card requests.Certainly easier than trying to teach you how to code.Even if you manage to insert the cards to your local machine it is a hassle for coders to insert them to the constantly "updated files" that are only on git.repository.Add these reasons to all the points Korath has mentioned.
Not to mention that Korath infact hasn't ask for help with cards not even from experienced programmers,yet.
Korath said:
(If you are a programmer: PM me. I'm not yet looking for help programming cards in duel; but I could use a hand reverse-engineering the Shandalar-specific parts of the game. There's a current decompilation in the source zip as src/exe_shandalar.c. And if anyone's ever successfully shoehorned opengl into the middle of a mess of legacy gdi calls before, I'd really like to talk to you.)
and a big part in his every update post has so many things Korath asks for help by non-programmers (and we non-programmers haven't offered that much help):
How you can help, even if you're not a programmer | Open
Test cards. Obviously. I'm especially interested in:
Regressions - things that used to work in original Shandalar, or in previous releases, but don't in this release.
Cards the AI plays exceptionally poorly.
Cards the AI doesn't cast at all.
Please report bugs and feature requests at the bugtracker linked at the top of the screen. Please don't annoy the nice people over in the Manalink bug forum; while I'm sure there'll be overlapping problems, most everything that's wrong with this won't be applicable to that.
Figure out what needs to be done to reliably get wizard animations to play.
Suggest better permanents to give the AI in dungeons and castles than like Greed and Leviathan and Crusade. These are configurable in Shandalar.ini; once someone lists a complete set of all 20, with enough discussion to show they've playtested them (not just guesses like "Font of Fortunes oughtta work pretty well"), I'll make them the default.
Redesign the card pricing formula. I like to think that the function base_sell_price() in src/shandalar/replace_functions.cpp is more or less legible even to a nonprogrammer, but if not, there's a simpler restatement of it here.
Help build decks for the AI enemies. There's some progress in this thread (starting at this post), but my experience with them so far has been hit-or-miss. In a lot of cases, the late-game enemy decks are less difficult than the early-game ones; they have objectionably-large numbers of off-color cards; and/or their mana bases are insufficient. (If you think getting mana-screwed isn't any fun, try recovering from it as the AI starting at just 10 life.) They're a whole lot better than what I can come up with, but I'm still not comfortable distributing any of them as the default. No AI decks are replaced in the NB1 standard download, and the only one replaced in TH3 is Merfolk Shaman (and that only because some Shandalar installations include copies of High Tide, which wasn't added until NB1). To run the standalone deckbuilder limited to cards programmed in Shandalar, run Shandalar with

Code: Select all
shandalar.exe --deckbuilder

In Nomad's Bazaar and later, you can test decks with the --enemy-deck and --player-deck command-line options. Basic usage is "shandalar.exe -e decks" to run duels with both the player and enemy decks chosen at random from the "decks/" subdirectory. For details on the syntax, run

Code: Select all
shandalar.exe --help

Design new Lair types. (Example: A variant of Oasis of Muldoon named "Mercenary's Outpost", where instead of trading a card you own for 5 life in your next duel, you instead trade it to get it in play for free at the start of your next duel.)
Suggest placement for more new sounds in Duel (adding them to Adventure Mode is a bit trickier for now). Even better if you can make them yourself, though in that case I'll need the full provenance of your source samples for listing in DuelSounds/sounds.txt.

Many people will be happy with your deck building work but you have to be patient and follow the coders pace and way of doing things.

You can ask for cards you need to be inserted comment how important are for decks or synergy with others if you like but insults like you don't know what you are doing,saying,you coded this but not that card which doesn't make any sense at all or any other insults are not accepted and we really don't want to hear them again so please keep it to yourself.
---
Trying to squash some bugs and playtesting.
User avatar
Aswan jaguar
Super Tester Elite
 
Posts: 8078
Joined: 13 May 2010, 12:17
Has thanked: 730 times
Been thanked: 458 times

Re: Adding cards to manalink, please help

Postby Korath » 21 Nov 2015, 10:29

I'm perfectly happy to have people programming for Manalink. Not my project.

I believe the point is to get cards into Manalink because I've stated that putting non-Manalink cards into Shandalar is much, much lower priority. That's not because a Manalink implementation is any actual help. (It usually isn't; Shandalar and Manalink have quite different APIs when not working directly on the engine, and that's in fact the #1 reason why I'm reimplementing all cards in Shandalar instead of just making its duel spawn a Manalink instance, as I originally intended.)

It's because
  1. there's an extremely limited number of non-Manalink cards I can add before I have to distribute a new magic.exe and cards.dat;
  2. a new magic.exe and cards.dat would break compatibility with Manalink;
  3. a new magic.exe and cards.dat would close to double the size of each Shandalar download, and quite likely put it over the attachment size limit;
  4. I'm not remotely close to running out of cards to program;
  5. a ct_all.csv that's already been tested by many people in the wild saves me a couple minutes per card.
The last is a very distant fifth compared to the other four reasons. And a ct_all.csv row that hasn't been widely tested isn't going to save me any time at all: I'd have to do just as much doublechecking on it as I would with one that was autogenerated by script.

---

Manalink cards by convention go in src/cards/name-of-the-set-it-was-first-released-in.c. So src/cards/apocalypse.c, probably right near the top next to card_penumbra_bobcat() and card_penumbra_wurm(). Cut, paste, and pray will approximate the card as well as the other two. (Which isn't very. Among other reasons, they make their tokens before they actually die; and if they're sacrificed, when they make their tokens they're actually both on the battlefield and in your graveyard at the same time. If there's something on the battlefield that triggers when the token's created, chaos ensues. Look into this_dies_trigger() for the most robust way we've come up with to deal with that.) Then declare _card_penumbra_kavu as an extern in ManalinkEh.asm and add a jmp to it immediately after the others. A jmp instruction is five bytes long, so it'll be at the address five higher than the last defined in there. Then rebuild, test, and crash immediately because there's no Kavu token either.
User avatar
Korath
DEVELOPER
 
Posts: 3707
Joined: 02 Jun 2013, 05:57
Has thanked: 496 times
Been thanked: 1106 times

Re: Adding cards to manalink, please help

Postby lujo » 21 Nov 2015, 13:52

Ok, thank you for this. I was, however aware of most of this. (Including what would happen if I somehow forgot to add the token, too, because you said this was crashing Brindle Shoat a while ago. I did say "if somebody gave you everything that's needed" :) . I wasn't aware of the exact problems with the enabled Penubra cards, but it looked like a good place to test the process of enabling anything at all. In case noone noticed, my criteria for "working properly" is considerably higher than average, rather than lower - that's the root of what makes me obnoxious and unpleasant.) This does confirm I did everything right, it's the same thing as with editing .csv's - I don't know what I'm supposed to click on to rebuild it.

That's the only thing that confuses me. I thought I didn't understand what's supposed to be done to assign a code address - but it turns out I just couldn't test whether I understood it or not, because I couldn't rebuild. There's something that looks like it does that in the /src/cards, which needs perl to run, and there are several executables in the src folder.

So what, in purely mechanical physical real world actions does "Then rebuild" step consist of? "You click on X then maybe Y then move file z to somewhere..." Just for illustration, if there was a file comedically labeled "If you've put the code in the right place and added the two lines to the .asm click this thing" that did everything in the "then rebuild" step, I could not only have tested it but it wouldn't have crashed.

Things you'd think would be confusing me aren't, it's just that "compile" and "build" is something you'd think everyone's capable of understanding but most people don't (I also think I do understand but don't know how to perfom it). I wrote a ton of bug free code for a rather extensive Fallout 2 mod once conventions and where stuff is got explained to me (wasn't hard), but compiling things was always done by someone else (I'd just send stuff over using tortoise). :(

I can also semi-conclude that something in the src does it, simply from the way you explain it, and also because the speed at which you guys port new cards (read about it in the patch logs) implies that it's been optimized to that point. I can even tell at a glance what isn't it. That's why I kept going on about what's in my way being "simple", because... what's in my particular way IS simple, I don't know how what you're using to build is supposed to be operated and the last thing I compiled/build/whatevertheactualtermis was in junior high. That was code to run an award winning robot, but it's been a long time ago and I just didn't keep up.

So, please? "then rebuild" = ?. As stupid as it looks.
---

My Shandalar deck pack folder is avaliable here:Dropbox
Leave feedback on particular decks here: Google doc
Ask for instructions, give feedback and complaints here: Thread
User avatar
lujo
 
Posts: 557
Joined: 20 Nov 2013, 13:17
Has thanked: 224 times
Been thanked: 70 times

Re: Adding cards to manalink, please help

Postby Korath » 21 Nov 2015, 16:23

User avatar
Korath
DEVELOPER
 
Posts: 3707
Joined: 02 Jun 2013, 05:57
Has thanked: 496 times
Been thanked: 1106 times

Re: Adding cards to manalink, please help

Postby lujo » 21 Nov 2015, 17:04

Oh, cmon. You know that's not what I asked, unless what you mean by that is that the procedure is:

- Edit the appropriate .c file in \cards
- Edit manalinkeh.asm in \src
- Click "Make" in the src folder
- Add previous card address + 5 as address to appropriate.csv
- do magic_updater stuff, move updated files to \program
- card is in and is linked with the code

If that's it, then I just messed up somewhere else (which i can check), or I'm missing a file or some software. If that's not it, then i'm missing a step, and I can't know which one, but someone certainly does.

---

Ok, thank you for at least letting me know that it's not me but it's actually the builder. I wasn't looking for builder problems before, because I believed people when they said the whole thing was complicated and inpenetrable so I thought I was making blunders with the process and didn't want to even attempt to discover things by trying random stuff but rather ask people who're supposed to know. I apologize if I didn't know how to ask. Found what was wrong on my own, then searched the forums for mentions of that, turns out even folks who now have "developer" as a tag ran into the same problem. I also think I know exactly what you have to tell someone who doesn't have experience with compilers but would like to fiddle with manalink for their own sake.

Now I'm curious if I can actually solve the problem with no help, which would be a hoot. Unfortunately it might turn out that I need access to the repository, or at least the latest manalink source code, depending on whether my source code has the same problem that some other people had before.
Last edited by lujo on 21 Nov 2015, 23:25, edited 1 time in total.
---

My Shandalar deck pack folder is avaliable here:Dropbox
Leave feedback on particular decks here: Google doc
Ask for instructions, give feedback and complaints here: Thread
User avatar
lujo
 
Posts: 557
Joined: 20 Nov 2013, 13:17
Has thanked: 224 times
Been thanked: 70 times

Re: Adding cards to manalink, please help

Postby dingbat1 » 21 Nov 2015, 23:18

Lujo,

I know you mean well, but, they (meaning Korath) don't want you to do it. The big concern is that, because you're not a developer, you don't know whether something really is as easy as it looks. While you may be correct most of the time, it's highly probable you'll mess up a few times (even if you're right 99% of the time, that's still one problem per hundred cards). If a card is badly implemented, this will cause problems down the line, and may result in more work than if the card had never been implemented at all.

I understand that you want to help, but sometimes the best way is to not help at all. On the flip side, Korath now knows that if he ever needs grunt-work done, he can ask you for help. (As a matter of fact, a prior post indicated that there are things that you can do to help, which may not be as obvious and gratifying as adding new cards, but are still useful)
dingbat1
 
Posts: 106
Joined: 08 Apr 2015, 13:48
Has thanked: 1 time
Been thanked: 33 times

Next

Return to ManaLink 3.0

Who is online

Users browsing this forum: No registered users and 25 guests


Who is online

In total there are 25 users online :: 0 registered, 0 hidden and 25 guests (based on users active over the past 10 minutes)
Most users ever online was 4143 on 23 Jan 2024, 08:21

Users browsing this forum: No registered users and 25 guests

Login Form