It is currently 25 Apr 2024, 12:41
   
Text Size

development questions

Discuss Upcoming Releases, Coding New Cards, Etc.
PLEASE DO NOT REPORT BUGS HERE!

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

Re: development questions

Postby gmzombie » 17 Nov 2009, 22:04

all might not be lost...i think i have that xls file let me look. it was made by fran avalon i think.

edit: look at my sig for the site. it is at the top of the site
can I maze of ith your snowstorm?

http://home.comcast.net/~gmzombie/index.html old stuff in here. don't use this stuff right now till I get time to get back into it and readjust.
gmzombie
 
Posts: 857
Joined: 26 Feb 2009, 01:05
Location: Wyoming, Mi
Has thanked: 200 times
Been thanked: 51 times

Re: development questions

Postby jatill » 19 Nov 2009, 21:13

Here's the discussion I was thinking of. Not a ton of info, but it's a start. It's missing, for example, the "haste" bit.

viewtopic.php?f=25&t=902&p=9906#p9906

Other things I have noticed the reserved information controlling includes:
-Whether of not to sacrifice a card (ex: Qasali Pridemage)
-Whether or not to activate a card (ex: Aether Vial)
jatill
DEVELOPER
 
Posts: 2118
Joined: 24 Feb 2009, 16:35
Has thanked: 5 times
Been thanked: 17 times

Re: development questions

Postby joemuz » 22 Nov 2009, 22:24

jatill wrote:Here's the discussion I was thinking of. Not a ton of info, but it's a start. It's missing, for example, the "haste" bit.

viewtopic.php?f=25&t=902&p=9906#p9906

Other things I have noticed the reserved information controlling includes:
-Whether of not to sacrifice a card (ex: Qasali Pridemage)
-Whether or not to activate a card (ex: Aether Vial)
thanks for the info. it was interesting to see what is known about the RI. i've been looking over this for various cards and i too, am starting to see some of the patterns that the people from the original thread identified. however, i don't really think it's all to useful. do you? it hardly seems to make no difference that i can tell. (but what do i know :) ) anyway, where i used to spend about 30 minutes finding the ideal template card to use, i just look for a card with a similar ability and move on. i take enough time to code a card as is.
joemuz
 
Posts: 88
Joined: 12 Oct 2009, 17:06
Has thanked: 0 time
Been thanked: 0 time

Re: development questions

Postby Gargaroz » 26 Nov 2009, 16:34

And now, for something like the n00b questions...

1) I'm trying to code Acidic Slime from M10. My first try was to simply create a 2/2 Ooze creature that costs 3GG, and the I put in his code pointer the one of Creeping Mold (the effects is the same), but the result is creature that enters into play, do a Creeping Mold effect and then go immediately in the graveyard. Now I know I've to modify the Creeping Mold code in some way, but where (I'm not a C or Assembler programmer, too bad) ? After solving this problem, I'll have to insert the code for Deathtouch, AAAARGH !

Edit : just checking Mold Shambler code. This would be perfect, it will only need to remove the "maybe" part related to Kicker.

2) I cannot find the "Memory block allocations" thread, so I cannot figure out when inserting the new code for my Ooze :(
----
- Current / medium term task: adjusting the code for making Misdirection and such usable
- Long term task: inserting all the good stuff I left out from the "Golden Years" mod
Gargaroz
Programmer
 
Posts: 7097
Joined: 06 Nov 2009, 11:11
Has thanked: 82 times
Been thanked: 595 times

Re: development questions

Postby jatill » 29 Nov 2009, 14:01

Gargaroz wrote:2) I cannot find the "Memory block allocations" thread, so I cannot figure out when inserting the new code for my Ooze :(
If you're coding in C, you don't need to worry about that. Build.pl will tell you what your code pointer is. Check out the tutorial on the wiki for details.
jatill
DEVELOPER
 
Posts: 2118
Joined: 24 Feb 2009, 16:35
Has thanked: 5 times
Been thanked: 17 times

Re: development questions

Postby Gargaroz » 29 Nov 2009, 15:39

Ok, now I'm trying to code Sphinx of the Steel Wind.
The only 2 abilities that I cannot add via the editor are Vigilance and Lifelink, so I wrote this code is the following (I've only figured out, I don't exatcly know how to program in C). It gaves an error, please explain :(

Code: Select all
int card_sphinx_steel_wind(int player, int card, event_t event){
    lifelink(player, card, event);
    void vigilence(int player, int card, event_t event);
    return 0;
}
Last edited by Gargaroz on 29 Nov 2009, 15:50, edited 1 time in total.
----
- Current / medium term task: adjusting the code for making Misdirection and such usable
- Long term task: inserting all the good stuff I left out from the "Golden Years" mod
Gargaroz
Programmer
 
Posts: 7097
Joined: 06 Nov 2009, 11:11
Has thanked: 82 times
Been thanked: 595 times

Re: development questions

Postby jatill » 29 Nov 2009, 15:44

Gargaroz wrote:Ok, now I'm trying to code Sphinx of the Steel Wind.
The only 2 abilities that I cannot add via the editor are Vigilance and Lifelink, so my code is the following (I've only figured out, I don't exatcly know how to program in C) :

Code: Select all
int card_sphinx_steel_wind(int player, int card, event_t event){
    lifelink(player, card, event);
    void vigilence(int player, int card, event_t event);
    return 0;
}
Was there a question in there somewhere? Btw,

Code: Select all
void vigilence(int player, int card, event_t event);
should be just
Code: Select all
vigilence(player, card, event);
jatill
DEVELOPER
 
Posts: 2118
Joined: 24 Feb 2009, 16:35
Has thanked: 5 times
Been thanked: 17 times

Re: development questions

Postby Gargaroz » 29 Nov 2009, 15:52

Ah, Ok, thanx for the prompt reply !
By the way, the API page needs a restyling in order to be more n00b-friendly, otherwise n00bs like me will keep bugging you with simila questions. ;)
----
- Current / medium term task: adjusting the code for making Misdirection and such usable
- Long term task: inserting all the good stuff I left out from the "Golden Years" mod
Gargaroz
Programmer
 
Posts: 7097
Joined: 06 Nov 2009, 11:11
Has thanked: 82 times
Been thanked: 595 times

Re: development questions

Postby Gargaroz » 29 Nov 2009, 16:59

Now, this is very funny...
The correct keyword is "Vigilance" and the wiki has a typo, plus it request only two arguments.
----
- Current / medium term task: adjusting the code for making Misdirection and such usable
- Long term task: inserting all the good stuff I left out from the "Golden Years" mod
Gargaroz
Programmer
 
Posts: 7097
Joined: 06 Nov 2009, 11:11
Has thanked: 82 times
Been thanked: 595 times

Re: development questions

Postby jatill » 29 Nov 2009, 23:24

Gargaroz wrote:Ah, Ok, thanx for the prompt reply !
By the way, the API page needs a restyling in order to be more n00b-friendly, otherwise n00bs like me will keep bugging you with simila questions. ;)
Restyle away :)
jatill
DEVELOPER
 
Posts: 2118
Joined: 24 Feb 2009, 16:35
Has thanked: 5 times
Been thanked: 17 times

Re: development questions

Postby Gargaroz » 30 Nov 2009, 14:08

Ok, so finally I've figure out the coding process and the following 3 cards are ready :
* Sphinx Of The Steel Wind
* Acidic Slime
* Violent Ultimatum

I'm currently testing them a bit before the release while I plan some new cards to add (I'm sticking for T2 useful cards, as I need them to test my decks).

Now, question time !

Question 1 : how can I implement new mechanics, like Unhearth and Devour ? I saw I've to make them as separate function, like the cards, but how can I link them to the "Rules" red card ?

Question 2 : how can I add some of the Zendikar cards that are missing from the "best of" version ? I simply need to add the code and recompile ? Or are they already there, coded and ready ? I checked "ManalinkEH.asm", I saw the cards are already added, but with no code pointer, so ?
----
- Current / medium term task: adjusting the code for making Misdirection and such usable
- Long term task: inserting all the good stuff I left out from the "Golden Years" mod
Gargaroz
Programmer
 
Posts: 7097
Joined: 06 Nov 2009, 11:11
Has thanked: 82 times
Been thanked: 595 times

Re: development questions

Postby jatill » 30 Nov 2009, 14:33

Gargaroz wrote:Ok, so finally I've figure out the coding process and the following 3 cards are ready :
* Sphinx Of The Steel Wind
* Acidic Slime
* Violent Ultimatum

I'm currently testing them a bit before the release while I plan some new cards to add (I'm sticking for T2 useful cards, as I need them to test my decks).

Now, question time !

Question 1 : how can I implement new mechanics, like Unhearth and Devour ? I saw I've to make them as separate function, like the cards, but how can I link them to the "Rules" red card ?

Question 2 : how can I add some of the Zendikar cards that are missing from the "best of" version ? I simply need to add the code and recompile ? Or are they already there, coded and ready ? I checked "ManalinkEH.asm", I saw the cards are already added, but with no code pointer, so ?
1) Some rules, like Devour, just need to be written like normal code. After all, Devour is just a normal comes-into-play ability. Unearth is another story, though, because the game doesn't give cards in teh graveyard abilities. That's where the rules engine comes in. You'd need to add a new ability to the rules engine to look for cards with Unearth. The code is in game_startup.c. As a warning, coding unearth would be very tricky.

2) The code pointers should all be in Manalink.asm. Search for the card again. Every card has 2 records in that file. My question to you is, how were you planning on doing a release? It's been very long since anyone but me has been working on this project, so I haven't had to worry about conflicting releases. Right now I'm in the middle of changes to Magic.exe that won't be ready for several more weeks, so any other releases in the mean time would get clobbered by my version. Please PM me with your idea.

Thanks.
~jatill
jatill
DEVELOPER
 
Posts: 2118
Joined: 24 Feb 2009, 16:35
Has thanked: 5 times
Been thanked: 17 times

Re: development questions

Postby Gargaroz » 30 Nov 2009, 14:48

That "mixed" release would be only for my personal use, so no need to worry.
Now that I know that you're working on a new version of Magic.exe, I'm going to code only unreleased cards. As a general rule, I will stick only with T2 legal cards from M10 and Alara block, so if you will you can work on the rest.
Keep up the good work ! ;)

Edit : new question !
How the count_permanents_by_type(int, int, type_t) function works ? Why three parameters ? Are they (player, type, sub-type) ?
----
- Current / medium term task: adjusting the code for making Misdirection and such usable
- Long term task: inserting all the good stuff I left out from the "Golden Years" mod
Gargaroz
Programmer
 
Posts: 7097
Joined: 06 Nov 2009, 11:11
Has thanked: 82 times
Been thanked: 595 times

Re: development questions

Postby Gargaroz » 01 Dec 2009, 18:26

Devour finally implementes properly. However, I was forces to do some tricks, so I don't think the AI would never be able to use it properly.
So far, Tar Fiend and Mycoloth are ready and kicking.
Now I'm going to make Open The Vaults.
----
- Current / medium term task: adjusting the code for making Misdirection and such usable
- Long term task: inserting all the good stuff I left out from the "Golden Years" mod
Gargaroz
Programmer
 
Posts: 7097
Joined: 06 Nov 2009, 11:11
Has thanked: 82 times
Been thanked: 595 times

Re: development questions

Postby jatill » 01 Dec 2009, 19:41

Gargaroz wrote:How the count_permanents_by_type(int, int, type_t) function works ? Why three parameters ? Are they (player, type, sub-type) ?
If you look at functions.c, I think your question will be answered:

Code: Select all
int count_permanents_by_type(int player, int card, type_t type){
jatill
DEVELOPER
 
Posts: 2118
Joined: 24 Feb 2009, 16:35
Has thanked: 5 times
Been thanked: 17 times

PreviousNext

Return to Development

Who is online

Users browsing this forum: No registered users and 29 guests

cron

Who is online

In total there are 29 users online :: 0 registered, 0 hidden and 29 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 29 guests

Login Form