It is currently 27 Apr 2024, 15:37
   
Text Size

Im trying to make a card work and im looking for some help

Moderator: CCGHQ Admins

Im trying to make a card work and im looking for some help

Postby ezpot » 26 Mar 2024, 13:37

well the thing is there are 2 cards that have similar effects, the cards in question are UNDERREALM_LICH and TOMORROW_AZAMIS_FAMILIAR , the first one does work and the effect "If you would draw a card, instead look at the top three cards of your library, then put one into your hand and the rest into your graveyard" the second one is identical but instead to put them in the graveyard you put them on the bottom of your library.

now to the point, the code for the lich is something like this:
| Open
<TRIGGER value="DREW_CARD" simple_qualifier="controller" pre_trigger="1">
if S_DredgeAbilityTrigger(EffectController()) then
MTG():OverrideEvent()
return true
end
return false
</TRIGGER>
<RESOLUTION_TIME_ACTION>
local answerDC = EffectDC():Make_Targets(0)
local queryDC = EffectDC():Make_Chest(1)
local player = EffectController()
for i=0,(3-1) do
local card = player:Library_GetNth(i)
if card ~= nil then
queryDC:Set_CardPtr(i, card)
else
break
end
end
if answerDC ~= nil and queryDC ~= nil then
player:SetItemCount( 1 )
for i=0,(1-1) do
player:SetItemPrompt( i, "CARD_QUERY_CHOOSE_A_CARD_TO_PUT_INTO_YOUR_HAND" )
end
player:ChooseItemsFromDC( queryDC, answerDC )
end
</RESOLUTION_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
local answerDC = EffectDC():Get_Targets(0)
if answerDC ~= nil then
local count = answerDC:Count()
for i=0,count-1 do
local card = answerDC:Get_CardPtr(i)
if card ~= nil then
card:PutInHand()
end
end
end
</RESOLUTION_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
local queryDC = EffectDC():Get_Chest(1)
if queryDC ~= nil then
local num_cards = queryDC:Count()
for i=0,num_cards-1 do
local card = queryDC:Get_CardPtr(i)
if card ~= nil then
card:PutInGraveyard()
end
end
end

and the code for the one that does not work is:
| Open
<TRIGGER value="DREW_CARD" simple_qualifier="controller" pre_trigger="1">
MTG():OverrideEvent()
return true
</TRIGGER>
<RESOLUTION_TIME_ACTION>
local answerDC = EffectDC():Make_Targets(0)
local queryDC = EffectDC():Make_Chest(1)
local player = EffectController()
for i=0,(3-1) do
local card = player:Library_GetNth(i)
if card ~= nil then
queryDC:Set_CardPtr(i, card)
else
break
end
end
player:ChooseItemFromDC( "CARD_QUERY_CHOOSE_A_CARD_TO_PUT_INTO_YOUR_HAND", queryDC, answerDC )
</RESOLUTION_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
local target = EffectDC():Get_Targets(0) and EffectDC():Get_Targets(0):Get_CardPtr(0)
if target ~= nil then
target:PutInHand()
end
</RESOLUTION_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
local queryDC = EffectDC():Get_Chest(1)
local num_cards = queryDC:Count()
for i=0, num_cards-1 do
local card = queryDC:Get_CardPtr(i)
if card ~= nil then
card:PutOnBottomOfLibrary()
end
end


as everyone can see the code is almost identical, except for the dredge trigger and the part of put on graveyard or bottom of library, things i tryed are copypasting all the lich code except the part of the bottom of library, even at some point i even copypasted the code of the graveyard to see if it would work but even so, the lich works and when i draw a card i can select one and the rest goes to the graveyard as normal and the azami familiar does not work even with the same code of the lich, when its time for me to draw a card the game simple stops, it does not crash or even close, it does not even give me any script log it just hangs there waiting for something that never happens that is my draw step for eternity, if any one can enlight me of what could be the problem and give me some pointers i really would appreciate it, thx in advance.
ezpot
 
Posts: 8
Joined: 01 Mar 2024, 22:48
Has thanked: 10 times
Been thanked: 0 time

Re: Im trying to make a card work and im looking for some he

Postby ezpot » 05 Apr 2024, 11:49

At the end i managed the card to work properly, cant say what was the exact cause for it not working but i recreated the card from scratch using the lich card code and it worked....

Now changing the topic, i know probably no one is gonna read this but well i started to make some cards using the tutorials of this site, for now i only made a few and tested them and seemed to work properly on my end, im no coder, im no artist, probably the few i made were the easiest of all of the set i picked but i just want some kind of validation from someone to see if what i did is an acceptable work and i should continue or stop.

Edit: i found a problem while creating the new cards, for example i made some cards with the attribute "bargain" work, somewhat with the kicker function they do what they should do, the problem is that ingame even if i change the query tags and all that it stills say "kicker" even if i change the qualifier to bargain the game doesnt recognice it, so is there anything i can do to change it?
Attachments
Wilds of eldraine.rar
(339.21 KiB) Downloaded 169 times
ezpot
 
Posts: 8
Joined: 01 Mar 2024, 22:48
Has thanked: 10 times
Been thanked: 0 time

Re: Im trying to make a card work and im looking for some he

Postby san4wc » 07 Apr 2024, 18:52

I have made some changes to your code based on my style, feel free to compare. I have no coding background and I am self taught based on the cards from community wad. One important advice is always test your own cards after you code.

You have to be mindful of mtg layers, please read the following link for details (https://mtg.fandom.com/wiki/Layer). Your code might still work for Cooped up and Archon of the Wild Rose for certain scenarios. A Tale for the Ages will definitely not work as the filter did not have a filter_id for the CONTINUOUS_ACTION.

An obvious problem with the Archon of the Wild Rose code is that your creatures enchanted by an opponent's aura will also be 4/4 but it should not. However i am unmotivated to find a way to fix this scenario. MTG is a complicated game and when i code cards, i only consider the scenarios based on the CPU decks that i use. The above problem will never occur in my games as none of my CPU decks will ever put an aura on my creatures as they will have better removal.

Another advice is no cards should be impossible as long as you are willing to accept workarounds and take time testing yourself. The fantastic coders for the community wad have laid a good foundation for >10000 cards for reference.

Unfortunately i have no intention of helping to code further so please do not expect me to help for other cards. It took me at least 3 years of self-testing to understand how to code for dotp2014. My only motivation for coding was because i wanted to play with certain cards and since i am my own boss, i will not hear any insults or complaints to code and fix cards. I am certain my codes will be considered bad by experts which is why i code for personal use.

Good luck.
Attachments
Wilds of eldraine mod.zip
(3.6 KiB) Downloaded 135 times
san4wc
 
Posts: 8
Joined: 16 Nov 2017, 12:02
Has thanked: 5 times
Been thanked: 3 times

Re: Im trying to make a card work and im looking for some he

Postby ezpot » 07 Apr 2024, 22:05

thx for taking your time to see them and the pointers in coding.

its the first time im doing something like this and doing it just for fun and play with new cards, i noticed yesterday the problem witch the archon, at the moment i posted the cards tested them only in my deck and didnt noticed the problem till i was on the opposite perspective, im trying to fix it, at my pace, probably the solution is in the code of another card of the community wad.

About workarounds i noticed that some new cards have some function similar to old ones, for example the "bargain" atribute i mentioned on the edit of my first post, at first i believed it was imposible but the "kicker" function was really similar so i used it as a workaround, the cards in question do what they should , the problem its that i cant change the ingame display of "kicker", atm im struggling with the "celebration" cards, again probably the key for them is in the code for "landfall" i just need to figure a way to make them count nonlandpermanents instead of lands.

I understand not wanting to help further, just by doing what you did, taking a moment to look a them and the feedback was enough to make me happy, now i know that even if the cards i did are not perfect they are still playable in some scenarios , and it give me the neccesary motivation to continue, so thx again.
ezpot
 
Posts: 8
Joined: 01 Mar 2024, 22:48
Has thanked: 10 times
Been thanked: 0 time

Re: Im trying to make a card work and im looking for some he

Postby san4wc » 09 Apr 2024, 12:07

Surprisingly i actually coded a card with "bargain" sometime ago. Here is the code for it, it looks complicated and i might be unable to explain everything. Everytime i code a complicated mechanic, i forget about how i did it the next week.

Here are some comments:
I use EffectDC():Set_Int/Get_Int(x, x) to tell the card to check whether a cost is paid when an effect is resolving. I usually refer to this old post viewtopic.php?f=109&t=20167&p=209636&hilit=response_source%3D+1#p209636. When the card is bargained, it will set_int. When it is resolving, it will get_int to see whether the effect is "bargained".

I have an option for THALIA_GUARDIAN_OF_THRABEN written in the code. The main reason is the DOTP14 engine limitation do not apply Thalia's effect when some cards are casted without paying its mana cost. Obviously some other cards have similar effect too but since i will not use them, i do not write them in as it complicates the code.

Lastly i have a storm counter coded it for my specific deck. Feel free to remove it but i left it in if it helps to teach something.

I also realized i coded another bargain card earlier on and it is differently coded compared to Beseech the Mirror. I will change it when there is a problem but when i tested it, it was also perfect based on the deck i used. It actually might be easier to code depending on the "bargain" card effect but it is mechanically wrong based on mtg rules. I attached it to show that there is no one specific code for the same mechanic. One thing to note, i never code for planeswalkers as i noticed that the planeswalkers code slows down the CPU. I basically had to recode every card that i use if it has any planeswalkers code in it.

I have no intention of coding for "celebration" as the cards seems bad. A guess will be using the code "interrogation:Set.....". Look for similar cards in the community wad that uses code interrogation. I hate coding so i do not code mechanics that i will not have fun with and i got a headache just thinking how to code for "celebration". It is definitely possible but it will take hours of trial and error for me which i hate.

It is great that you are attempting to learn, it will take time and i got the above knowledge through my own trial and error.
Attachments
Bargain.zip
(3.27 KiB) Downloaded 148 times
san4wc
 
Posts: 8
Joined: 16 Nov 2017, 12:02
Has thanked: 5 times
Been thanked: 3 times

Re: Im trying to make a card work and im looking for some he

Postby etphonehome » 09 Apr 2024, 22:24

Hi, i Recoded the Bargain effect (Your is missing the Token option). I think it's pretty decent (probably not fully compatible with mtg rules). Here is "Beseech the mirror" for comparison with your version

I'm still working on my version of DOTP2014. The problem with DOTP2014 are inumerous, mainly there are hundreds/thousands of badly coded cards.

We can create new cards, but i already Debugged hundreds and hundred of badly coded cards. I'm checking and correcting all Migookman (about 5000 cards). There are a lot of badly coded cards with this guy. I'm finishing Letter "R" from his cards, Another month and i probably debugged all his cards.

After i end checking his cards i'll probably start coding cards from newer sets.

My version is not compatible with Community DOTP2014. I changed and removed non working cards and effects.

I manly use my version as a game to play against a decent AI, only using working cards, using my "Type 5 Format" game and using my random generation deck (with about 14.000 chosen cards).

I don't have patient to create decks and i prefer to play against random generated decks for a more balanced duel and not playing against overpowered decks. Both decks i create to play, one for me and the other to the AI, are created using the same rules.

In my "Type 5 Format", at the start of the game, each player draws 5 random nonland cards from the deck. Then, at the beginning of each turn, the active player choses a basic land card from his deck and put it into play, then draws a nonland card (lands are kept at the bottom of deck, so you never draw a land card).

This way, losing the game because you need lands and only draw nonland cards, or draw nonlands cards when you need lands, it's over.


If you want, i can share the latest version of my work. I really need people to test it and find bugged cards.

<?xml version="1.0"?>
<CARD_V2 ExportVersion="1">
<FILENAME text="BESEECH_THE_MIRROR_CW" />
<CARDNAME text="BESEECH_THE_MIRROR" />
<TITLE>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Beseech the Mirror]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Implorer le miroir]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Suplicarle al espejo]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Appell an den Spiegel]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Implorare lo Specchio]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[鏡に願いを]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Beseech the Mirror]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Beseech the Mirror]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Rogar ao Espelho]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="zh-CN"><![CDATA[恳求魔镜]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="zh-HK"><![CDATA[Beseech the Mirror]]></LOCALISED_TEXT>
</TITLE>
<MULTIVERSEID value="100629583" />
<ARTID value="BESEECH_THE_MIRROR" />
<ARTIST name="Cynthia Sheppard" />
<CASTING_COST cost="{1}{B}{B}{B}" />
<TYPE metaname="Sorcery" />
<EXPANSION value="WOE" />
<RARITY metaname="M" />
<UTILITY_ABILITY qualifier="Additional">
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Bargain |(You may sacrifice an artifact, enchantment, or token as you cast this spell.)|]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Négociation]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Negociar.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Feilschen]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Negoziare]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[協約]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Bargain]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Bargain]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Negociar]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="zh-CN"><![CDATA[加码]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="zh-HK"><![CDATA[Bargain]]></LOCALISED_TEXT>
<COST type="Generic">
<PREREQUISITE>
return true
</PREREQUISITE>
<RESOLUTION_TIME_ACTION>
local filter = ClearFilter()
filter:SetZone( ZONE_BATTLEFIELD, EffectController() )
filter:Add( FE_CONTROLLER, OP_IS, EffectController() )
local subfilter = filter:AddSubFilter_Or()
subfilter:Add( FE_TYPE, OP_IS, CARD_TYPE_ARTIFACT )
subfilter:Add( FE_TYPE, OP_IS, CARD_TYPE_ENCHANTMENT )
subfilter:Add( FE_IS_TOKEN, true )
EffectController():ChooseItem( "CW_CARD_QUERY_CHOOSE_ARTIFACT_ENCHANTMENT_TOKEN_TO_SACRIFICE", EffectDC():Make_Targets(0), QUERY_FLAG_MAY + QUERY_FLAG_AI_COMPLEX )
</RESOLUTION_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
local my_sacrifice = EffectDC():Get_Targets(0):Get_CardPtr(0)
if my_sacrifice ~= nil and EffectController() ~= nil then
EffectController():Sacrifice( my_sacrifice )
EffectDC():Set_Int(1, 1)
else
EffectDC():Set_Int(1, 0)
end
</RESOLUTION_TIME_ACTION>
</COST>
</UTILITY_ABILITY>
<SPELL_ABILITY>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Search your library for a card, exile it face down, then shuffle. If this spell was bargained, you may cast the exiled card without paying its mana cost if that spell’s mana value is 4 or less. Put the exiled card into your hand if it wasn’t cast this way.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Cherchez une carte dans votre bibliothèque, exilez-la face cachée, puis mélangez. Si ce sort a été négocié, vous pouvez lancer la carte exilée sans payer son coût de mana si la valeur de mana de ce sort est inférieure ou égale à 4. Mettez la carte exilée dans votre main si elle n’a pas été lancée de cette manière.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Busca en tu biblioteca una carta, exíliala boca abajo y luego baraja. Si este hechizo fue negociado, puedes lanzar la carta exiliada sin pagar su coste de maná si el valor de maná de ese hechizo es de 4 o menos. Pon la carta exiliada en tu mano si no fue lanzada de esta manera.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Durchsuche deine Bibliothek nach einer Karte, schicke sie verdeckt ins Exil und mische danach. Falls um diesen Zauberspruch gefeilscht wurde, kannst du die ins Exil geschickte Karte wirken, ohne ihre Manakosten zu bezahlen, falls der Manabetrag jenes Zauberspruchs 4 oder weniger ist. Nimm die ins Exil geschickte Karte auf deine Hand, falls sie nicht auf diese Weise gewirkt wurde.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Passa in rassegna il tuo grimorio per una carta, esiliala a faccia in giù, poi rimescola. Se questa magia è stata negoziata, puoi lanciare la carta esiliata senza pagare il suo costo di mana se il valore di mana di quella magia è pari o inferiore a 4. Se non è stata lanciata in questo modo, aggiungi la carta esiliata alla tua mano.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[あなたのライブラリーからカード1枚を探し、裏向きで追放する。その後、ライブラリーを切り直す。この呪文が協約されているなら、その追放されたカードを、それの呪文としてのマナ総量が4以下であるなら、マナ・コストを支払うことなく唱えてもよい。これによりそれを唱えなかったなら、その追放されたカードをあなたの手札に加える。]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Search your library for a card, exile it face down, then shuffle. If this spell was bargained, you may cast the exiled card without paying its mana cost if that spell’s mana value is 4 or less. Put the exiled card into your hand if it wasn’t cast this way.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Search your library for a card, exile it face down, then shuffle. If this spell was bargained, you may cast the exiled card without paying its mana cost if that spell’s mana value is 4 or less. Put the exiled card into your hand if it wasn’t cast this way.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Procure em seu grimório um card, exile-o com a face voltada para baixo e depois embaralhe. Se esta mágica foi negociada, você pode conjurar o card exilado sem pagar seu custo de mana se o valor de mana daquela mágica for igual ou inferior a 4. Coloque o card exilado em sua mão se ele não tiver sido conjurado dessa forma.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="zh-CN"><![CDATA[从你牌库中搜寻一张牌,将它牌面朝下地放逐,然后洗牌。若此咒语已加码,则如果所放逐之牌施放时的咒语之法术力值等于或小于4,你便可以施放该牌,且不需支付其法术力费用。如果未以此法施放该牌,则将所放逐的牌置于你手上。]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="zh-HK"><![CDATA[Search your library for a card, exile it face down, then shuffle. If this spell was bargained, you may cast the exiled card without paying its mana cost if that spell’s mana value is 4 or less. Put the exiled card into your hand if it wasn’t cast this way.]]></LOCALISED_TEXT>
<RESOLUTION_TIME_ACTION>
local filter = ClearFilter()
local effectController = EffectController()
filter:SetZone( ZONE_LIBRARY, effectController )
effectController:ChooseItem("SPL_CARD_QUERY_CHOOSE_CARD_TO_EXILE", EffectDC():Make_Targets(0))
</RESOLUTION_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
local card_to_exile = EffectDC():Get_Targets(0):Get_CardPtr(0)
if card_to_exile ~= nil then
local DelayDC = EffectDC():Make_Chest(0)
DelayDC:Set_CardPtr(0, card_to_exile)
DelayDC:Protect_CardPtr(0)
card_to_exile:ExileFaceDown()
end
</RESOLUTION_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
EffectController():ShuffleLibrary()
</RESOLUTION_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
local exiled_card = EffectDC():Get_Chest(0):Get_CardPtr(0)
local effectController = EffectController()
if effectController ~= nil and exiled_card:GetConvertedManaCost() &lt;= 4 and EffectDC():Get_Int(1) == 1 then
effectController:BeginNewMultipleChoice()
effectController:AddMultipleChoiceAnswer( "SPL_CARD_QUERY_CAST_THIS_SPELL_WITHOUT_PAYING_ITS_MANA_COST", effectController:CanCastSpellForFree( exiled_card ))
effectController:AddMultipleChoiceAnswer( "CARD_QUERY_CASCADE_DO_NOT_CAST" )
effectController:AskMultipleChoiceQuestion( "SPL_CARD_QUERY_MC_CAST_THIS_SPELL", exiled_card )
else
exiled_card:PutInHand()
end
</RESOLUTION_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
local exiled_card = EffectDC():Get_Chest(0):Get_CardPtr(0)
local result = EffectController():GetMultipleChoiceResult()
if exiled_card ~= nil then
if result == 0 and EffectController():CanCastSpellForFree(exiled_card) then
EffectController():CastSpellForFree(exiled_card)
else
exiled_card:PutInHand()
end
end
</RESOLUTION_TIME_ACTION>
</SPELL_ABILITY>
<AI_BASE_SCORE score="600" zone="ZONE_HAND" />
<AUTHOR><![CDATA[Pedro Almeida]]></AUTHOR>
<EDITORS><![CDATA[Pedro Almeida]]></EDITORS>
<DATE><![CDATA[09-04-24]]></DATE>
</CARD_V2>
If you're into coding cards i must recommend you to use:
Notepad ++, install XML pugin if needed and activate "Enable XML syntax auto-check" and in menu|language, activate XML.


notepadplusplus.jpg


and DnGrep, a software to help you search for similar text in existing cards.


DnGrep.jpg




Bye
Attachments
BESEECH_THE_MIRROR_CW.rar
(3.21 KiB) Downloaded 165 times
etphonehome
 
Posts: 299
Joined: 21 May 2020, 12:50
Has thanked: 270 times
Been thanked: 39 times

Re: Im trying to make a card work and im looking for some he

Postby ezpot » 10 Apr 2024, 02:22

wow, thanks a lot guys, i was using "kicker" but now i see the key was "additional" i was really annoyed cause even if the cards were working as intended i was unable to get rid of the ingame "kicker" sign as i showed on the screenshot i posted on the discord the other day, i could cast them with or without sacrificing the correct targets, and even the effects seemed to work, and the querys were saying the correct things asking me to sacrifice artifact enchantment or tokens and i could select them well, even the effects of the cards were working well but the moment i tryed to change that "kicker" for something else the cards stopped working, the first part of the code is sublime and its what made possible for me to correct all my bargain cards so thank you both guys.

Im using your version of the game etphonehome , the one you posted on another post, its just that a was tired of playing the game with always the same cards and wanted to give coding new ones a try, im using notepad++ with xml pluging, and i really apreciatte the DnGrep advice cause im always wasting a lot of time looking trought the code of similar cards in the builder.
ezpot
 
Posts: 8
Joined: 01 Mar 2024, 22:48
Has thanked: 10 times
Been thanked: 0 time

Re: Im trying to make a card work and im looking for some he

Postby etphonehome » 10 Apr 2024, 21:23

HI

I took some time and coded "celebration" ability. I sent you two cards that you can use as example.

ARMORY_MICE
ARMORY_MICE.jpg


LADY_OF_LAUGHTER
LADY_OF_LAUGHTER.jpg



Bye
Attachments
Celebration 2 cards example.rar
(4.57 KiB) Downloaded 164 times
etphonehome
 
Posts: 299
Joined: 21 May 2020, 12:50
Has thanked: 270 times
Been thanked: 39 times

Re: Im trying to make a card work and im looking for some he

Postby ezpot » 10 Apr 2024, 23:32

thx a lot, was struggling a lot with the mice one, i was trying to use landfall but with nonland permanents, it seemed to count them but for some reason was unable to get the +0/+2, then i was trying the interrogation method suggested by san4wc in his last post, again it seemed the nonland permanents where being counted but was still unable to get the +0/+2, now i see what i was doing wrong with this example so thx a lot man i really apreciatte it.
ezpot
 
Posts: 8
Joined: 01 Mar 2024, 22:48
Has thanked: 10 times
Been thanked: 0 time

Re: Im trying to make a card work and im looking for some he

Postby san4wc » 11 Apr 2024, 14:24

I actually wrote a long reply of why my card was coded a certain way however i realize it is useless due to different philosophy so i deleted it.

Weird that the comment of "pretty decent (probably not fully compatible with mtg rules)" can be offensive to me as i never intended to share my code originally and that comment gives the impression that i need your help to code the card better. I did not ask to be graded. I know how to code the way you have coded, but i choose not to do it for this card as i had a specific deck in mind and wanted to streamline the decision making. I guess i should not have shared anything if it was not perfect for others to critique. I am still improving but "beseech the mirror" was definitely not a card i needed help with.

I acknowledge some community cards are buggy but I am grateful to all the previous coders as they have spent their time to code without any reward. Personally, i have coded all the cards i have used for my decks so i am not bothered by bugs since i can fix them. My philosophy is i want to play with all the new powerful cards in mtg (companions, adventure, initiative etc) and i will accept any workarounds as long as the outcome works based on mtg rules. I am alone in this aspect so explains my inactivity in the community.

Good luck on your coding journey.
san4wc
 
Posts: 8
Joined: 16 Nov 2017, 12:02
Has thanked: 5 times
Been thanked: 3 times

Re: Im trying to make a card work and im looking for some he

Postby etphonehome » 11 Apr 2024, 15:40

Hi “san4wc”

First of all, my response was to help “ezpot” and not yourself, as you wrote yourself:

“i code for personal use”
“I have no intention of coding for "celebration" as the cards seems bad.”
“I hate coding”
“i am my own boss”
“i will not hear any insults or complaints to code and fix cards”
“however i realize it is useless due to different philosophy”


I know you’re very capable of coding your own cards and all the abilities you like and the way you like.

As you said, and I totally agree, we have different philosophies:

I’m not a boss, I’m a team player and I like to play it that way;
I love coding;
I don’t mind to ear other people’s opinion and advices, and when I need help, I don’t mind to ask others for help.
I code for my personal use and I to share my work with others that might find it useful.


“…the comment of "pretty decent (probably not fully compatible with mtg rules)" can be offensive to me as i never intended to share my code originally…”

Mtg has some rules, as you probably know by now. I was commenting on my own code and not the code you shared, although they’re very similar.


If you read the rules:

- Bargain represents an optional additional cost. A spell cast with that additional cost paid is "bargained."[3]
-If you copy a bargained spell, the copy is also bargained.
- If a card or token enters the battlefield as a copy of a permanent that's already on the battlefield, the new permanent isn't bargained, even if the original was.


That’s why I wrote “probably not fully compatible with mtg rules”


When I can, I’m here to help people that likes to code some new cards. I myself need help sometimes.

I think you have some community trauma and although I’m a healthcare worker, I’m not the type you need…

If you ever need help, if I can, I’ll be glad to help you or any other person in need. I’m no master in coding, I’m not a programmer, I’m a healthcare worker and I code cards for fun.
If I ever need help, I’ll be glad that someone help me too.

Bye
etphonehome
 
Posts: 299
Joined: 21 May 2020, 12:50
Has thanked: 270 times
Been thanked: 39 times

Re: Im trying to make a card work and im looking for some he

Postby san4wc » 11 Apr 2024, 16:10

One advice, try not to diagnose people with trauma haphazardly. You have criticized other coders even though they have helped in the WAD. Yes, their buggy cards causes you inconvenience but your words is quite demeaning towards them given it is a volunteer activity.

You are misinterpreting alot of things but i have also not explain clearly on my end so i am not perfect either. You are not superior to others that you can educate them how to live or behave. Perhaps i should not have commented if it causes you distress, apologies if that is the situation.

Here are some common coding errors people might face as i will not be contributing at all after this comment (some error might not be valid for your situation as my community wad was from June 2019 so it might have been fixed):

1. Every token needs to have a unique multiverse ID. Not having a unique multiverse id will lead to crashes. On the safe side, just make sure every card coded has a unique multiverse id.

2. If you are coding for transformed cards, you must make sure that the ids are unique. Additionally, the back face of the transformed card should have a negative sign in ARTID value (e.g -STALACTITE_STALKER instead of STALACTITE_STALKER) if you want the art to appear.

3. I will always code : EffectDC():Get_Targets(x) and EffectDC():Get_Targets(x):Get_CardPtr(x). Leaving out the "EffectDC():Get_Targets(x) and" will lead to error codes when DOTP2014 is closed. It does not affect gameplay but it is just irritating when the error pops up.

4. The RSN manual mana function is excellently designed however one potential bug will be that the (FE_IS_TOKEN) code might try to choose the manual mana if mana is floating since it is recognized as a token. If your code do not have a "may" option for selection, there is a potential for softlock. You will know it when it occurs.

5. For mana producers that uses manual mana (e.g tinder wall), make sure the following is added as some cards do not have it. Change the mana color depending on the situation. Not having it might lead to crashes especially if you are only using basic lands:
<STATIC_ABILITY>
<CONTINUOUS_ACTION layer="0">
RSN_ClearCanProduceMana()
RSN_MarkCanProduceMana( "{R}" )
</CONTINUOUS_ACTION>
</STATIC_ABILITY>
<TRIGGERED_ABILITY forced_skip="1" replacement_effect="1">
<TRIGGER value="BEGINNING_OF_STEP" pre_trigger="1" />
<RESOLUTION_TIME_ACTION>
RSN_ClearProducedMana()
</RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>

6. All token used in the deck must have the proper token_registration. For example for cards that produce treasure tokens, make sure there is the following since you are producing multiple mana even though you are also producing a treasure token. Likewise make sure all mana producers have the token mana registered.
e.g
<TOKEN_REGISTRATION reservation="1" type="TOKEN_TREASURE_MOD" />
<TOKEN_REGISTRATION reservation="1" type="RSN_TOKEN_MANA_W" />
<TOKEN_REGISTRATION reservation="1" type="RSN_TOKEN_MANA_U" />
<TOKEN_REGISTRATION reservation="1" type="RSN_TOKEN_MANA_B" />
<TOKEN_REGISTRATION reservation="1" type="RSN_TOKEN_MANA_R" />
<TOKEN_REGISTRATION reservation="1" type="RSN_TOKEN_MANA_G" />

7. Finally no cards are impossible to code as long as you are willing to persevere and innovate. The main reason why i do not share my codes is because my codes have alot of workarounds which people will not accept. Too many people have criticized the previous coders for imperfect coding which have left me disgusted. This is strictly a volunteer activity so please appreciate those who have helped previously.
Last edited by san4wc on 11 Apr 2024, 16:56, edited 1 time in total.
san4wc
 
Posts: 8
Joined: 16 Nov 2017, 12:02
Has thanked: 5 times
Been thanked: 3 times

Re: Im trying to make a card work and im looking for some he

Postby etphonehome » 11 Apr 2024, 16:36

HI

"You are not superior to others that you can educate them how to live or behave."


I'm not and i never felt that way. But i'm not inferior as some other people seem to feel. I feel like i'm equal to everyone! [-X

And, did i ever told anyone how to live or behave (except my 4 year old kid)? :?: :?: :?:


I never meant to disregard anyone's work, but to correct Migookman's bad coded cards (if that's the guy you're refering to), correcting his work will take me more than 6 months working everyday some hours. :(

But also, his well coded cards, will spare me some YEARS!!! :D

So, THANK YOU MIGOOKMAN! =D>

HONESTLY!
etphonehome
 
Posts: 299
Joined: 21 May 2020, 12:50
Has thanked: 270 times
Been thanked: 39 times

Re: Im trying to make a card work and im looking for some he

Postby etphonehome » 11 Apr 2024, 17:37

HI "san4wc"

THX for the tips.

3. I will always code : EffectDC():Get_Targets(x) and EffectDC():Get_Targets(x):Get_CardPtr(x). Leaving out the "EffectDC():Get_Targets(x) and" will lead to error codes when DOTP2014 is closed. It does not affect gameplay but it is just irritating when the error pops up.

Is there a way you can support this affirmation? I never read anything about it.

THX
etphonehome
 
Posts: 299
Joined: 21 May 2020, 12:50
Has thanked: 270 times
Been thanked: 39 times

Re: Im trying to make a card work and im looking for some he

Postby ezpot » 11 Apr 2024, 20:21

I just want to say i never intended to start a war of arguing with this thread, i originally started this thread cause i didnt know what was the diferencce of underrealm lich working and tomorrows azami familiar not working even with both using similar code, i recon that the post was there days but no one bothered to reply, i know that the community is not as active as it was on his peak days so i undestranded it, still wanted that card in my deck so i fiddled with the code till some day it worked.

Then i thinked i played this game for years and im always using the same cards , if i fixed one card why not try to make new ones, i literally had 0 idea of coding, just read the tutorials on this site and started doing new cards i started with some ones that seemed easy, still belive me that even these cards took me days of trial & error to made them work and even before posting them here was really doubtfull for the what if no one see them, what if the ppl say the art is not good, or even worse things, was at a point where i didnt even know i should continue or stop, the unique thing that i knew was that if i didnt posted them here i would never know if they were acceptable, so i posted them here, contrary to my expectations there was no witch hunting , a few days later i only saw that san4wc took his time to see them and even gave me some genuine constructive feedback that really made me happy, i have to say that at the time of his reply i didnt even know about the layer system or id references, he even provided his own version of my cards and pointed me to some mistakes i did like with the archon, i compared his cards with mine and tried to recode mine using the layers and id references and then they were working even better that before.

At that point i was honestly stuck on a loop of trial & error with a prototype of working "bargain" card that used "kicker" , but i was not happy with the game that was showing "kicker" every time i used those cards, i tryed multiple things i originally believed that the qualifier=additional was originally for cards of the type as an additional cost this or that, and even though he stated clearly that he had no further intention on assisting further the next time i entered here , there was his reply and some explanation and examples, that same day i made my archons glory prototype bargain card lose the ugly sign of kicker, i could not select tokens to sacrifice but i was really happy, then after feeling that happinnes and fixing my archons glory card and some others, i was gonna enter here to give my thx then i saw etphonehome post with another example with really similar code that let me sacrifice tokens , i could not be more thankfull to both of you and i could not received a better birthday gift than that.

Other problem i was having at that time was the "celebration" cards, had a prototype armory mice in the work, and i was stuck in a loop of putting the card in the deck, starting the game, bringing permanents seeing the card make some magic circle effects like when you use a landfall card but nothing more happened, quitting the game, changing some line of code, restarting the game and retry , i tryed the landfall method, at first, then the interrogation method that i remembered that san4wc mentioned, but nothing seemed to work, i genuinelly passed 10 straight hours just like that, starting an quitting the game and changing code, then at sunrise when i was about to give up for that day just checked here again, and here was again etphonehome saving my life, that same armory mice that refused to work no matter how many times i tryed magically was working, and at that point was extatic and euphoric, happiness is not enought to describe the feeling of satisfaction that was experimenting at that same moment, and thats my entire point of view about all this.

In just a few days with the help and guidance of both you guys i made exist cards that wherent there for me for years, and im steadly progressing and adding more and more making my game more and more fun and for that i cannot be more thankfull to both of you, for me both of you are fellow helpers, fellow senior coders, and above all that, fellow MTG DOTP2014 game enjoyers, so taking all that in to account i ask cant we really all get along a leave aside the little diferences please? i sicenerely say sorry if anything i said offended both of you or caused the start of the arguing, just want to say that the world we live is a really sad place as it is, in my case i lost a beloved one not long ago, and i have sickness attacking me around every corner so i never lived a healthy life, nothing good is gonna come from getting mad cause of arguing one with another...
ezpot
 
Posts: 8
Joined: 01 Mar 2024, 22:48
Has thanked: 10 times
Been thanked: 0 time

Next

Return to 2014

Who is online

Users browsing this forum: No registered users and 41 guests


Who is online

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

Login Form