Page 1 of 1

Noob development question

PostPosted: 17 Dec 2013, 18:30
by jatill
Is there a document somewhere about how to do manalink development?
I want to add a challenge, but I may have forgotten everything about everything!

Specifically, what tools do I need to use to compile the code, and what commands do I run? Who do I give that code to when I'm done, etc?

PS: My idea is to have a challenge reward where all your future challenges will be played in reverse (i.e. last match first). The challenge itself should be somehow 'reverse' based, but I haven't figured that part out yet.

Re: Noob development question

PostPosted: 23 Dec 2013, 04:13
by Korath
Bog-standard mingw development environment will do it, either under msys or cygwin. (I use cygwin, but can't recommend it unless you're looking for a full unix environment under windows anyway.) The previous recommendation was to use camelbox, but that only includes enough of a dev environment to compile xs modules and most of its C toolchain is many, many years out of date.

Development is done through git. I've been hesitant to make our remote repository public - the usual free git hosts won't accept us because this is a reverse-engineering project, and the only static ip I have access to put it on has a very low bandwith connection and can't handle frequent cloning - but pm me a public key and I'll give you read access. Write access is Gargaroz's call, or you can send either him or me changes via git format-patch.

Re: Noob development question

PostPosted: 12 Jan 2014, 16:12
by jatill
I was hoping to follow the instructions here:
http://www.slightlymagic.net/wiki/Codin ... C_Tutorial

But I get this error when running make (cannot find cards /alara_reborn.o). Which steps need to change if I use mingw instead? Does everything else basically stay the same?

Re: Noob development question

PostPosted: 12 Jan 2014, 16:39
by jatill
jatill wrote:I was hoping to follow the instructions here:
http://www.slightlymagic.net/wiki/Codin ... C_Tutorial

But I get this error when running make (cannot find cards /alara_reborn.o). Which steps need to change if I use mingw instead? Does everything else basically stay the same?
I had to remove a bunch of duplicate definitions, but one I did that, things seem to be going swimmingly. I can do things again! Hurray!

I'm going to make some small bug changes, but I'll a little too lazy right now to deal with git. Can I just send someone txt files directly?

Re: Noob development question

PostPosted: 12 Jan 2014, 17:00
by jatill
First changes. Correct a couple of the cards in the shandalar challenge, and make the challenges reward work for Planeswalker Decimation.

void challenge_mode_upkeep(int from_vanguard){
...
else if( challenge_round == 39 ){
get_card(CARD_ID_LEVIATHAN);
get_card(CARD_ID_SERENDIB_EFREET);
}
else if( challenge_round == 40 ){
get_card(CARD_ID_SAVANNAH_LIONS);
get_card(CARD_ID_ELDER_LAND_WURM);
}
else if( challenge_round == 41 ){
get_card(CARD_ID_GOBLIN_BALLOON_BRIGADE);
get_card(CARD_ID_MANA_FLARE);
}
else if( challenge_round == 42 ){
get_card(CARD_ID_FUNGUSAUR);
get_card(CARD_ID_SYLVAN_LIBRARY);
}
else if( challenge_round == 43 ){
get_card(CARD_ID_HYPNOTIC_SPECTER);
get_card(CARD_ID_GREED);
}
else if( challenge_round == 44 ){
get_card(CARD_ID_THE_ABYSS);
get_card(CARD_ID_PLATINUM_ANGEL);
}
else if( challenge_round == 45 ){
get_card(CARD_ID_BLACK_VISE);
get_card(CARD_ID_THE_RACK);
}
else if( challenge_round == 46 ){
get_card(CARD_ID_IVORY_TOWER);
get_card(CARD_ID_IVORY_TOWER);
}
else if( challenge_round == 47 ){
get_card(CARD_ID_BLOOD_MOON);
get_card(CARD_ID_TITANIAS_SONG);
}
else if( challenge_round == 48 ){
get_card(CARD_ID_HONDEN_OF_CLEANSING_FIRE);
get_card(CARD_ID_HONDEN_OF_SEEING_WINDS);
get_card(CARD_ID_HONDEN_OF_LIFES_WEB);
get_card(CARD_ID_HONDEN_OF_NIGHTS_REACH);
get_card(CARD_ID_HONDEN_OF_INFINITE_RAGE);
get_card(CARD_ID_DRAGON_ENGINE);
}
...
// free scorpion
if( gauntlet_round < 70 && ( god_mode() || is_unlocked(HUMAN, 0, EVENT_CAN_CAST, 31)) ){
int card_added = add_card_to_hand( HUMAN, get_internal_card_id_from_csv_id( CARD_ID_PIT_SCORPION ) );
put_into_play(HUMAN, card_added);
}

// Archenemy's power
if( gauntlet_round < 70 && ( god_mode() || is_unlocked(HUMAN, 0, EVENT_CAN_CAST, 38)) ){
generate_special_tokens_by_id(HUMAN, -1, HUMAN, CARD_ID_ARCHENEMY, 1, 88, 0);
}

// Back to '95
if( gauntlet_round < 70 && ( god_mode() || is_unlocked(HUMAN, 0, EVENT_CAN_CAST, 39)) ){
generate_special_tokens_by_id(HUMAN, -1, HUMAN, (CARD_ID_BLACK-1)+get_deck_color(HUMAN, HUMAN), 1, 88, 0);
}

// Face the Hydra reward
if( gauntlet_round < 70 && ( god_mode() || is_unlocked(HUMAN, 0, EVENT_CAN_CAST, 28)) ){
// hydra
//generate_token_by_id(player, CARD_ID_THE_SLAYER);
}

Re: Noob development question

PostPosted: 12 Jan 2014, 17:19
by Korath
Literally the only part of that page that's correct is the first two paragraphs of the "How the program works" section. Most of the rest only ever worked by accident; in particular, the advice to copy your source tree into your compiler's installation directory is jaw-dropping.

In any case, the problem you're currently running into is that Gargaroz left the contents of the src/functions/ and src/cards/ directories out of the CrIAv1 patch. No src/cards/alara_reborn.c file means you can't build src/cards/alara_reborn.o. I haven't checked v2 yet.

Re: Noob development question

PostPosted: 12 Jan 2014, 17:28
by Korath
jatill wrote:I'm going to make some small bug changes, but I'll a little too lazy right now to deal with git. Can I just send someone txt files directly?
Not unless you expect us to cease development, send you up-to-date source, do nothing else until you're finished, and then manually apply your changes. It's just not practical.