YGOPRO Forum

Welcome Guest! To enable all features please try to register or login.
32 Pages123>»
Options
Go to last post Go to first unread
Jackmoonward  
#1 Posted : Wednesday, December 12, 2012 1:43:31 AM(UTC)
Jackmoonward

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 12/7/2012(UTC)
Posts: 644

Thanks: 13 times
Was thanked: 255 time(s) in 158 post(s)
Now before we begin, you will have to download 2 programs.
Sqlite Expert Personal
and
Lua Edit 2010
if you don't want Lua Edit you can use Notepad or any basic text editor program.


Update!

Video tutorial added for adding cards to Ygopro:


Video tutorial added for scripting cards in Ygopro Part 1!


Open the cards.cdb in your Ygopro folder with Sqlite.
UserPostedImage
Change the tab from Databases to Data.
UserPostedImage
Then on the left side click on "texts" under "cards" and "datas", then click the green + under the Data tab.
UserPostedImage then UserPostedImage
Double Click on one of the null areas that appear from pressing that.
UserPostedImage
Now start typing in the info.
UserPostedImage
Remember that everytime you want to edit or confirm something click the green check mark shown here:
UserPostedImage

The Id is the 8 digit number on the bottom left corner of a card, come up with a random number and make sure no other card has the same ID number, *For example Dark Magician is 46986414* Make sure you remember this number!

The name is the name of the card.
The description is everything it says on it's effect.
Press spacebar one time in string 1 all the way to string 16, if you don't then Ygopro will never open and crash.

Press ok and change from "texts" to "datas" on the left.
Press the green + like last time and double click one of the null areas . The ID is the same as what you put in the "texts".
For the OT: 1=Ocg, 2=Tcg, 3=Ocg & Tcg, 4=Anime.
Alias is if it has more than 1 artwork or has an effect that says "this card's name is.." like A Legendary Ocean, otherwise leave this as 0. If you want a better explanation of the alias section, click here:

Warning, if your card is not a monster, Put 0 for ATK, DEF, Level, Race, and Attribute.
Setcode is the archetype number, thanks to Angel and Jakester390 for the list of setcode numbers and explanations:

Basic Set Codes currently run from numbers 1 to 513, with quite a few gaps. If an set code does not come up on the database, it should be fine to use (1 exception is 258, which is something related to Evil Hero Fusions). For monsters that are in only 1 Archetype should be given their set code, or if custom, a blank set code from 1 to (presumably) 4095. The basic archetypes, and their hex values are as follows:

There are also Extension Archetypes, which include R-Genex, X-Saber, and other archetypes that have their own support but are considered part of the including Archetype (e.g. All R-Genex are Genex monsters). These codes are a four digit hexadecimal code created by appending a hexadecimal number (that is 1-9,A,B,C,D,E,or F) to 1 or 2 0s and the hexadecimal set code of the containing Archetype. (For example R-Genex Monsters, which are considered Genex, have a set code of 1002 which is 1 appended to 00 appended to the Genex Set code of 2)
R-Genex
1 (Hexidecimal Number) 00 (Spacing) 2 (Genex Set Code)= 1002

Gem-Knight
1 (Hexidecimal Number) 0 (Spacing) 47 (Gem- Set Code)= 1047

Known extension Archetypes and their hexadecimal counterparts are as follows:


Monsters that are members of two Archetypes are a little trickier to understand. In order to make a monster to be considered in two archetypes both hexidecimal set codes of the archetypes must be lengthened to 4 digits. So a 1 digit Set code like Genex (0x2) would have 3 zeros before it (becoming 0x0002), and a set code that is already 4 digits like Gem-Knight (0x1047) would remain that length. The two numbers are then appended to each other in either order: (so a Gem-Knight Genex monster would be either 0x00021047, which the excess zeros are removed becoming 0x21047 or 0x10470002). Known Dual Archetype cards are:


Type is the type of card, *For example 33 is Effect Monster, 17 is Normal Monster, 2 is Normal Spell, etc.
Here is a list of all type numbers provided by Angel:

ATK is the attack points, DEF is the defense points. Level is the amount of stars under it's name.
Race is the type of monster, *For example 256 is Rock and 1 is Warrior*.
Here is a list of all monster races provided by Angel:

Attribute is the element of the monster.
Here is a list of all attributes a monster can have provided by Angel:

And category can be left at 0 without worries. Category is an easier way to find the card in the deck constructor, like searching for cards that have a destroy effect or stop attacks.
Now the card should be in the game once you click ok and save.

If you want a simpler based explanation of CDB, click here: Angel's Tutorial and thank him for finding the values for Setcodes, types, races, and attributes.

Now we are going to add the picture for our card. Make sure you have it in card form like this:


And not like this:

You can use websites like YugiohCardMaker or card creating programs for pictures.

Now open your card picture in a picture editing program like Paint or Gimp.
Shrink the picture to these dimensions; 177 by 254 pixels, make sure not to maintain the aspect ratio.
This is going to be your big picture.
Save the picture with it's name being the ID Number of the card. So if you put the ID number as 11112222 in the Cdb, then the picture will be named 11112222.jpg.
Save the picture in your pics folder located in your Ygopro folder.
After you have done that, shrink the picture one more time and make it 44 by 64 pixels.
This is going to be your small picture.
Then save it in your thumbnail folder in your pics folder in your Ygopro folder with the same name as the big picture.
If you are making a field spell card you will only need 1 picture, open the field folder in your pics folder in your Ygopro folder.
Open one of the field spell pictures in there and make your picture look the same size as the other field spell pictures. The name of the picture will be the ID number again. The field spell picture, unlike the normal pictures must be .png files and not .jpg files.

Now we are done with the easy part.
Warning, if your monster is a Normal Monster, then you can skip this part
It is time to program the card effect. If you don't get this right on your first try then don't worry as almost no one understands Lua files the first time.

Open a blank Lua Edit 2010.
On the first line type:
--XXX And replace the XXX with the card name so this would look like this:


Then go to the next line and type:
function cXXXXXXXX.initial_effect(c)
And replace the Xs with the ID number of the card.
So it will look like this:
function c11112222.initial_effect(c)


Now look at the effect of your monster, now count how many effects it has. I will use Wisel Attack 5's effect for this example.

This card cannot be Normal Summoned or Set.
This card cannot be Special Summoned except by Tributing 1 face-up "Wisel Attack 3".
If you do not control a face-up "Meklord Emperor" monster, destroy this card.
Double all Battle Damage a "Meklord Emperor" monster you control inflicts to your opponent.
Also, during battle between an attacking "Meklord Emperor" monster you control and a Defense Position monster whose DEF is lower than the ATK of the attacking monster, inflict the difference as Battle Damage to your opponent.
Once during your turn, when a "Meklord Emperor" monster declares an attack, you can negate the activation of an opponent's Trap Card and destroy it.

This card has 6 effects.
1. It cannot be Normal Summoned or Set.
2. It has to be Special Summoned (from your hand) by tributing a face-up "Wisel Attack 3".
3. It will destroy itself if a "Meklord Emperor" monster is not on the field.
4. It doubles all Battle Damage a "Meklord Emperor" you control will do to the opponent.
5. It gives "Meklord Emperor" monsters you control to do piercing damage if battling an opponent's monster.
6. It can negate and destroy 1 trap your opponent controls whenever a "Meklord Emperor" monster you control declares an attack once during your turn.

So we are going to need to type 1 of these per effect:

local eX=Effect.CreateEffect(c)

The X is replaced by the order of the effect. So since the Cannot be Normal Summoned or Set effect is first, the X is replaced with a 1.

So your blank lua file will look like this:
--CARDNAME
function c11112222.initial_effect(c)
--defup
local e1=Effect.CreateEffect(c)

Your effect may look different than mine if it has more than 1 effect.
So if it has 2 effects it will look like this:

function c11112222.initial_effect(c)
--defup
local e1=Effect.CreateEffect(c)
--destroy
local e2=Effect.CreateEffect(c)

Now for every card effect a card has, we need details for it.
So say my card says: "This card gains 500 DEF for every other Machine-type monster you control."
I would look for a card that increases it's DEF by for every (something) on the field.
First thing that comes to mind is Amazoness Paladin and Machine King.
A few problems is Amazoness Paladin gains 100 ATK instead of DEF for every Amazoness on your side.
And Machine King gains 100 ATK instead of DEF for every Machine-Type on the field.
So we need to open both of these with a text editor program like Lua Edit or Notepad.

The Lua file for Machine King is:




And Amazoness Paladin:


Now we can examine their effects. But before that allow me to explain what these "e1:Set" things mean.
e1:SetType(EFFECT_TYPE_SINGLE) is the type of effect, since it is only 1 effect; the type is (EFFECT_TYPE_SINGLE).
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) is the property of the effect that says it will only affect one place, this is basically here so that it doesn't confuse the effect with affecting other locations.
e1:SetCode(EFFECT_UPDATE_ATTACK) Is literaly going to update the system on the ATK point values of a card(s).
e1:SetRange(LOCATION_MZONE) Means where the effect is coming from, since Paladin is a monster it is coming from the Monster Zone or MZONE, if it's a Spell or Trap it's SZONE and so on.
e1:SetValue(c47480070.val) Is how much the ATK is going up by. Since we can't put filters or values normally in the "e"s, we need to put a .val in there to tell it to keep looking for the value. the c47480070 is there to make sure this value isn't confused with other cards that have to do with ATK values.
And lastly the c:RegisterEffect(e1) is the string that registers and gives the ok for the effect. It is basically what seperates the e1 from e2 effects and e3 from e5 like a period in a sentence.
If you are done with all the "e" effects, put the magic word "end" after the last c:RegisterEffect(e) to verify.

So if I want my monster to increase it's DEF by 500 for every Machine-Type on the field, I need to borrow a couple of things from these cards. We need to change the --atkup to --defup, change the UPDATE_ATTACK to UPDATE_DEFENCE, change the c47480070.val to whatever the id of my card is.
The end result should look like this:

--CARDNAME
function c11112222.initial_effect(c)
--defup
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(c11112222.val)
c:RegisterEffect(e1)
end
And we have now done the e1 effect of our card!
If you have more than 1 effect for your card then you will keep adding "e" lines to the card.
e1, e2, e3, depending on how many effects it has like I said before.

Now we aren't done. We need to tell the system by how much the DEF points will go up and why is it going up.
We are going to need to borrow again.

function c47480070.val(e,c)
return Duel.GetMatchingGroupCount(c47480070.filter,c:GetControler(),LOCATION_MZONE,0,nil)*100
end
function c47480070.filter(c)
return c:IsFaceup() and c:IsSetCard(0x4)

The function cXXXXXXXX.val effect is the value that it will go up and for having a certain number of things to increase it by. The (e,c) are the peripherals in the .val, e=Effect, and c=Card. Other cards have other peripherals in this like tp=target player, chk=check and so on.
Duel.GetMatchingGroupCount is the specified Group we have to have for this effect to do anything, it points to the filter first which I will explain later, c:GetControler() is the controller of this effect. LOCATION_MZONE is the Monster Zone, and the ,0 is there to tell which side it means, 0 and 1 are usually switched in these cases but try different things out until it works.

The function cxxxxxxxx.filter is what the val will go by to allow the effect through as a literal filter.
From what the filter says: c:IsFaceup() meaning for it to gain 500 it needs to be face-up on the field, and c:IsSetCard(0x4) means it has to be this specific SetCode in the cdb, 0x4 is hex for what the SetCode number is in cdb so just google "0x4 to decimal" to find the actual number. so 0x4 as a decimal is 4 and 4 is the Setcode for the Amazoness archetype in the Cdb. So we need to change this to being Machine-Type instead of an Amazoness. We can borrow that from Machine King.

So instead of c:IsSetCard(0x4) we change it to c:IsRace(RACE_MACHINE)
Now our card should look like this.

--CARDNAME
function c11112222.initial_effect(c)
--defup
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(c11112222.val)
c:RegisterEffect(e1)
end
function c11112222.val(e,c)
return Duel.GetMatchingGroupCount(c11112222.filter,c:GetControler(),LOCATION_MZONE,0,nil)*500
end
function c11112222.filter(c)
return c:IsFaceup() and c:IsRace(RACE_MACHINE)

Save it as cXXXXXXXX.lua in your script folder in your Ygopro folder and replace the Xs with the Id number.

We have now programmened our first card! Different effects will look different ways and even the simplest of effects can be tricky.

So now that you know the basics of Lua effects. Say you want a more advanced effect like an ignition effect or trigger effect instead of a basic continuous effect or passive effect like "This card gains 500 DEF for each face-up Machine-Type on the field" to "Once per turn you can increase this card's DEF by 500 for each face-up Machine-Type monster you control" or even "When you Normal Summon a Machine-Type monster(s), increase this card's DEF by 500."

First allow me to explain, in Yu-gi-oh, all card effects have a time and place to be activated or used.
We decide what has to be happening by a .condition effect. And the time or timing of the effect with an eX:SetType effect where the X is replaced by whatever number of effect this is like I explained before.

We divide these timings by what is called a Spell Speed, or just the speed of the effect.
Spell Speeds have 3 categories;

Spell Speed 1, which is the slowest and has to be activated by your decision. These card effects cannot be activated in response to any other effects. Speed Spell 1 are the cards that usually start a Chain link 1, which a chain is cards activating in response to each other.
All of these types of cards fall under Spell Speed 1:
Normal/Field/Continuous/Equip & Ritual Spell Cards
Flip/Ignition and Trigger Effects
Ignition-like & Trigger-like Effects

Spell Speed 2, which is the second slowest and second fastest. You can chain to Spell Speed 2 cards with these but you cannot chain to Spell Speed 3 cards at the same time. These are cards that can start a Chain Link 1 or add up to an already started chain up to Chain Link 2,3,4 or higher if possible.
All of these types of cards fall under Spell Speed 2:
Quick-Play Spell Cards
Normal & Continuous Trap Cards
Quick Effects
Quick-like Effect

Spell Speed 3, these are the fastest effects out of the 3. You can't start a Chain Link 1 with these cards but you can always start a Chain link 2 or higher with these, if a Chain Link involving a Spell Speed 3 effect happens then the only way to keep responding to the effect is with Spell Speed 3 effects and nothing else. Spell Speed 3 effects can activate even before a monster is summoned to the field or a card effect is activated.
All of these types of cards fall under Spell Speed 3:
Counter Trap Cards.

These effects can usually be associated with the hint timing or Set Type of the effect.
But if we have an effect that says "Once per turn you can.."
the type of effect would look like this:
e1:SetType(EFFECT_TYPE_IGNITION)
and the amount of times we can use this effect would look like:
e1:SetCountLimit(1)
And if we want to increase the amount of times we can use this effect, we just change the (1) to (2) so we can use it 2 times per turn or even 3 if we want by changing it to (3) or even have no limit by not putting a CountLimit.
^This is an example of a Spell Speed 1 Effect.

If we have an effect that says "When you.." or "When" in general
the type of effect would look like this:
e1:SetType(EFFECT_TYPE_TRIGGER_O)
^This is an example of a Spell Speed 1 Effect.

For example, an effect that would say "During either player's turn.."
the type of effect would look like this:
e1:SetType(EFFECT_TYPE_QUICK_O)
^This is an example of a Spell Speed 2 Effect.

If we have an effect that would say "When a monster would be summoned" or "When a card would be activated" usually the type of effect would look like this:
e1:SetType(EFFECT_TYPE_ACTIVATE)
^This is an example of a Spell Speed 3 Effect.

If you want to see more Type of effects for different cards, look through Lua files of cards with similar timing like "During the battle phase" or "When your opponent would.." to get a better understanding of how Speed timing effects work.

~Jack

Edited by user Thursday, August 15, 2013 7:17:53 AM(UTC)  | Reason: 8/15/13 Video Tutorial on scripting added!

Go here to vote for the next cards in Jackpro 1.5:
http://www.tehmadhouse.tk
Youtube:
http://www.youtube.com/user/jackmoonward
thanks 29 users thanked Jackmoonward for this useful post.
FLASH on 12/12/2012(UTC), Chaos Pancake on 12/12/2012(UTC), sinakis on 12/14/2012(UTC), Tea82 on 12/14/2012(UTC), Percival18 on 12/14/2012(UTC), ytterbite on 12/18/2012(UTC), ZONE7 on 12/27/2012(UTC), Agashiru_Jason on 1/8/2013(UTC), Darkmagician248 on 1/23/2013(UTC), _Less on 4/13/2013(UTC), striker10 on 4/17/2013(UTC), LuxYami on 5/4/2013(UTC), Charly12 on 5/7/2013(UTC), a.x.l on 5/9/2013(UTC), Ludsama on 5/25/2013(UTC), Dranken on 5/31/2013(UTC), Clarity on 7/7/2013(UTC), ProjectLeviamon on 8/5/2013(UTC), RaiZZZ19 on 8/30/2013(UTC), rasselle on 9/4/2013(UTC), Fawkey on 9/11/2013(UTC), Ultimate_Nova_X on 9/13/2013(UTC), technodoomedone on 9/20/2013(UTC), Naz Zuki on 2/4/2014(UTC), Ice on 2/19/2014(UTC), elitalianoverde on 3/6/2014(UTC), Mudkip on 3/11/2014(UTC), Lisandra_brave on 3/25/2014(UTC), sanshy on 4/17/2014(UTC)
FLASH  
#2 Posted : Wednesday, December 12, 2012 8:36:42 AM(UTC)
FLASH

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 12/5/2012(UTC)
Posts: 701

Thanks: 217 times
Was thanked: 1094 time(s) in 314 post(s)
very nice work jack

hope you add tutorial about making duel puzzle
UserPostedImage
see you all soon , time for my military service :D
Dharc4000  
#3 Posted : Wednesday, December 12, 2012 11:41:21 AM(UTC)
Dharc4000

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 12/10/2012(UTC)
Posts: 344

Thanks: 2 times
Was thanked: 54 time(s) in 38 post(s)
This works for passive effect monsters however you may need to add on to this tutorial for monsters that "activate" or "trigger" as well as optional trigger effects
UserPostedImage
Chaos Pancake  
#4 Posted : Wednesday, December 12, 2012 5:42:01 PM(UTC)
Chaos Pancake

Rank: Advanced Member

Groups: Registered
Joined: 12/3/2012(UTC)
Posts: 108

Thanks: 10 times
Was thanked: 39 time(s) in 23 post(s)
Awesome work I was waiting for someone to do a post like this! I would appreciate it if you updated this from time to time with more information as you can! Perhaps you could collaborate with someone to make it easier?
Jackmoonward  
#5 Posted : Thursday, December 13, 2012 12:51:51 AM(UTC)
Jackmoonward

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 12/7/2012(UTC)
Posts: 644

Thanks: 13 times
Was thanked: 255 time(s) in 158 post(s)
Originally Posted by: Dharc4000 Go to Quoted Post
This works for passive effect monsters however you may need to add on to this tutorial for monsters that "activate" or "trigger" as well as optional trigger effects


-Updated-
Go here to vote for the next cards in Jackpro 1.5:
http://www.tehmadhouse.tk
Youtube:
http://www.youtube.com/user/jackmoonward
Jackmoonward  
#6 Posted : Thursday, December 13, 2012 12:54:11 AM(UTC)
Jackmoonward

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 12/7/2012(UTC)
Posts: 644

Thanks: 13 times
Was thanked: 255 time(s) in 158 post(s)
Originally Posted by: Chaos Pancake Go to Quoted Post
Awesome work I was waiting for someone to do a post like this! I would appreciate it if you updated this from time to time with more information as you can! Perhaps you could collaborate with someone to make it easier?


I intend to, I just hope this makes people be a bit more patient with people like Percy who has to do this layout for every card in the game. And can you be a bit more specific by collaborate?

~Jack
Go here to vote for the next cards in Jackpro 1.5:
http://www.tehmadhouse.tk
Youtube:
http://www.youtube.com/user/jackmoonward
Jackmoonward  
#7 Posted : Thursday, December 13, 2012 1:01:42 AM(UTC)
Jackmoonward

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 12/7/2012(UTC)
Posts: 644

Thanks: 13 times
Was thanked: 255 time(s) in 158 post(s)
Originally Posted by: FLASH Go to Quoted Post
very nice work jack

hope you add tutorial about making duel puzzle


I've never attempted to look at how you make a duel puzzle let alone make one but I can try.

~Jack
Go here to vote for the next cards in Jackpro 1.5:
http://www.tehmadhouse.tk
Youtube:
http://www.youtube.com/user/jackmoonward
Tea82  
#8 Posted : Friday, December 14, 2012 1:36:13 PM(UTC)
Tea82

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 12/4/2012(UTC)
Posts: 729

Thanks: 1696 times
Was thanked: 142 time(s) in 103 post(s)
Amazing tutorial for sure and i bet this tutorial help many people who interesting to make their custom cards!! Now if there are poeple who still have difficulties to do this(lol guys jack already expain everything) they also try this one too: http://www.mediafire.com/?v1rz5pcw26vkee4

I hope i give an extra help with my tutorial!! Good luck guys and make your own custom cads!! I just can't wait to see your first released cards!!
Percival18  
#9 Posted : Friday, December 14, 2012 2:33:49 PM(UTC)
Percival18

Rank: Administration

Groups: Administrators, Registered, Registered Users, Subscribers
Joined: 11/25/2012(UTC)
Posts: 1,203

Thanks: 53 times
Was thanked: 813 time(s) in 286 post(s)
Awesome! Great job.

This topic has been stickied.

Edited by user Friday, December 14, 2012 2:34:54 PM(UTC)  | Reason: Not specified

thanks 1 user thanked Percival18 for this useful post.
Jackmoonward on 12/14/2012(UTC)
Jackmoonward  
#10 Posted : Friday, December 14, 2012 8:09:52 PM(UTC)
Jackmoonward

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 12/7/2012(UTC)
Posts: 644

Thanks: 13 times
Was thanked: 255 time(s) in 158 post(s)
Originally Posted by: Percival18 Go to Quoted Post
Awesome! Great job.

This topic has been stickied.


Thanks! I didn't expect this topic to get as much popularity as it did.

~Jack
Go here to vote for the next cards in Jackpro 1.5:
http://www.tehmadhouse.tk
Youtube:
http://www.youtube.com/user/jackmoonward
Dharc4000  
#11 Posted : Friday, December 14, 2012 9:07:54 PM(UTC)
Dharc4000

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 12/10/2012(UTC)
Posts: 344

Thanks: 2 times
Was thanked: 54 time(s) in 38 post(s)
Originally Posted by: Jackmoonward Go to Quoted Post
Originally Posted by: Percival18 Go to Quoted Post
Awesome! Great job.

This topic has been stickied.


Thanks! I didn't expect this topic to get as much popularity as it did.

~Jack


Well its generally teaching people how to help in the production of YGOPRO so of course it would be popular.
UserPostedImage
Alistering  
#12 Posted : Friday, December 14, 2012 11:26:09 PM(UTC)
Alistering

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 12/3/2012(UTC)
Posts: 299

Thanks: 73 times
Was thanked: 25 time(s) in 17 post(s)
Originally Posted by: Tea82 Go to Quoted Post
Amazing tutorial for sure and i bet this tutorial help many people who interesting to make their custom cards!! Now if there are poeple who still have difficulties to do this(lol guys jack already expain everything) they also try this one too: http://www.mediafire.com/?v1rz5pcw26vkee4

I hope i give an extra help with my tutorial!! Good luck guys and make your own custom cads!! I just can't wait to see your first released cards!!


Wow, this is great expression bro thanks for all.
Angel  
#13 Posted : Saturday, December 15, 2012 3:23:55 AM(UTC)
Angel

Rank: Member

Groups: Registered
Joined: 12/12/2012(UTC)
Posts: 14

Thanks: 1 times
Was thanked: 2 time(s) in 2 post(s)
I'm trying to write a synchro summon condition but it's really impossible as I can see :s this language seems to be kind of limited (or maybe it's due to the core).

Quote:
--synchro summon
aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsCode,2000000012,2000000004),aux.NonTuner(nil),1)
c:EnableReviveLimit()


That's to summon with tuners of an unprogrammed archetype I'm doing, so I'm targeting specific cards. Even though by logic it would choose between the card 2000000012 and 2000000004, it only reads the first number and it's not working as I would like it to do.

Any help?
Jackmoonward  
#14 Posted : Saturday, December 15, 2012 3:45:21 AM(UTC)
Jackmoonward

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 12/7/2012(UTC)
Posts: 644

Thanks: 13 times
Was thanked: 255 time(s) in 158 post(s)
Originally Posted by: Angel Go to Quoted Post
I'm trying to write a synchro summon condition but it's really impossible as I can see :s this language seems to be kind of limited (or maybe it's due to the core).

Quote:
--synchro summon
aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsCode,2000000012,2000000004),aux.NonTuner(nil),1)
c:EnableReviveLimit()


That's to summon with tuners of an unprogrammed archetype I'm doing, so I'm targeting specific cards. Even though by logic it would choose between the card 2000000012 and 2000000004, it only reads the first number and it's not working as I would like it to do.

Any help?


Can you specify exactly what the Synchro Condition is? Ygopro is VERY specific when reading Lua files. It's raged at me once for forgetting to put a 1 somewhere.

~Jack
Go here to vote for the next cards in Jackpro 1.5:
http://www.tehmadhouse.tk
Youtube:
http://www.youtube.com/user/jackmoonward
Angel  
#15 Posted : Saturday, December 15, 2012 5:02:06 AM(UTC)
Angel

Rank: Member

Groups: Registered
Joined: 12/12/2012(UTC)
Posts: 14

Thanks: 1 times
Was thanked: 2 time(s) in 2 post(s)
Originally Posted by: Jackmoonward Go to Quoted Post
Originally Posted by: Angel Go to Quoted Post
I'm trying to write a synchro summon condition but it's really impossible as I can see :s this language seems to be kind of limited (or maybe it's due to the core).

Quote:
--synchro summon
aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsCode,2000000012,2000000004),aux.NonTuner(nil),1)
c:EnableReviveLimit()


That's to summon with tuners of an unprogrammed archetype I'm doing, so I'm targeting specific cards. Even though by logic it would choose between the card 2000000012 and 2000000004, it only reads the first number and it's not working as I would like it to do.

Any help?


Can you specify exactly what the Synchro Condition is? Ygopro is VERY specific when reading Lua files. It's raged at me once for forgetting to put a 1 somewhere.

~Jack


Let's say the text reads like this:

1 "Magnet Warrior" Tuner + 1 or more non-Tuner monsters

And 2000000004 is a Tuner named "Magnet Warrior 1" and 2000000012 is another Tuner named "Magnet Warrior 2"

By writing this
Quote:
--synchro summon
aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsCode,2000000004),aux.NonTuner(nil),1)
c:EnableReviveLimit()


the system will only take in account "Magnet Warrior 1" as a tuner monster for the synchro summon, and by doing the first code I posted, it will only take in account "Magnet Warrior 2" (2000000012), since I can't add archetypes to existing cards (in theory) I thought in putting them as specific cards, but my attempt failed and I would like to know if there is a way to do it.
Jackmoonward  
#16 Posted : Saturday, December 15, 2012 5:39:01 AM(UTC)
Jackmoonward

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 12/7/2012(UTC)
Posts: 644

Thanks: 13 times
Was thanked: 255 time(s) in 158 post(s)
Originally Posted by: Angel Go to Quoted Post
Originally Posted by: Jackmoonward Go to Quoted Post
Originally Posted by: Angel Go to Quoted Post
I'm trying to write a synchro summon condition but it's really impossible as I can see :s this language seems to be kind of limited (or maybe it's due to the core).

Quote:
--synchro summon
aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsCode,2000000012,2000000004),aux.NonTuner(nil),1)
c:EnableReviveLimit()


That's to summon with tuners of an unprogrammed archetype I'm doing, so I'm targeting specific cards. Even though by logic it would choose between the card 2000000012 and 2000000004, it only reads the first number and it's not working as I would like it to do.

Any help?


Can you specify exactly what the Synchro Condition is? Ygopro is VERY specific when reading Lua files. It's raged at me once for forgetting to put a 1 somewhere.

~Jack


Let's say the text reads like this:

1 "Magnet Warrior" Tuner + 1 or more non-Tuner monsters

And 2000000004 is a Tuner named "Magnet Warrior 1" and 2000000012 is another Tuner named "Magnet Warrior 2"

By writing this
Quote:
--synchro summon
aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsCode,2000000004),aux.NonTuner(nil),1)
c:EnableReviveLimit()


the system will only take in account "Magnet Warrior 1" as a tuner monster for the synchro summon, and by doing the first code I posted, it will only take in account "Magnet Warrior 2" (2000000012), since I can't add archetypes to existing cards (in theory) I thought in putting them as specific cards, but my attempt failed and I would like to know if there is a way to do it.


Oh I understand what your trying to say. When doing a Synchro filter like this, you gotta specify by the Setcode number for "Magnet Warrior" in Hex instead of the actual Id Number. Instead of --synchro summon
aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsCode,2000000004),aux.NonTuner(nil),1)
it should be
--synchro summon
aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0xSC),aux.NonTuner(nil),1)

Find the number of whatever you put for the setcode in the cdb for the archetype "Magnet Warrior" and convert from a decimal to hex, a quick google search of "2 to hex" or something along those lines will help. Keep in mind, no other archetype can have the same Setcode number as your archetype, otherwise this can lead to crashes and confusion in effects. Also for a card to be counted as a Magnet Warrior, it has to have the same setcode number as every other Magnet Warrior in the archetype. All Fabled monsters are 53 and in hex this means 0x35 and all Wind-up monsters are 88 and in hex this means 0x58.

Fabled Levaithan says 1 Fabled Tuner + 1 Non-tuner
and it's synchro requirement in the lua says:
--synchro summon
aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0x35),aux.NonTuner(nil),1)
The 0x35 in there is the setcode for Fabled like I said before.

~Jack
Go here to vote for the next cards in Jackpro 1.5:
http://www.tehmadhouse.tk
Youtube:
http://www.youtube.com/user/jackmoonward
Angel  
#17 Posted : Saturday, December 15, 2012 6:57:06 AM(UTC)
Angel

Rank: Member

Groups: Registered
Joined: 12/12/2012(UTC)
Posts: 14

Thanks: 1 times
Was thanked: 2 time(s) in 2 post(s)
Originally Posted by: Jackmoonward Go to Quoted Post

Oh I understand what your trying to say. When doing a Synchro filter like this, you gotta specify by the Setcode number for "Magnet Warrior" in Hex instead of the actual Id Number. Instead of --synchro summon
aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsCode,2000000004),aux.NonTuner(nil),1)
it should be
--synchro summon
aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0xSC),aux.NonTuner(nil),1)

Find the number of whatever you put for the setcode in the cdb for the archetype "Magnet Warrior" and convert from a decimal to hex, a quick google search of "2 to hex" or something along those lines will help. Keep in mind, no other archetype can have the same Setcode number as your archetype, otherwise this can lead to crashes and confusion in effects. Also for a card to be counted as a Magnet Warrior, it has to have the same setcode number as every other Magnet Warrior in the archetype. All Fabled monsters are 53 and in hex this means 0x35 and all Wind-up monsters are 88 and in hex this means 0x58.

Fabled Levaithan says 1 Fabled Tuner + 1 Non-tuner
and it's synchro requirement in the lua says:
--synchro summon
aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0x35),aux.NonTuner(nil),1)
The 0x35 in there is the setcode for Fabled like I said before.

~Jack


Thank you... well I guess there's no solution to my problem :s see, there is not a "Magnet Warrior" archetype so I will have to modify the old cards for this. I was planning to make a card with 2 setcodes, Hmmm is there a way to make a card to have 2 archetypes? Jeez, this thing has a lot of limitations... I don't remember any card with an effect like that.

So, making a card that search for monsters with "Warrior" in its name would be impossible to create since I cannot put 2 or more setcodes in the same card...
Jackmoonward  
#18 Posted : Saturday, December 15, 2012 7:25:52 AM(UTC)
Jackmoonward

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 12/7/2012(UTC)
Posts: 644

Thanks: 13 times
Was thanked: 255 time(s) in 158 post(s)
Originally Posted by: Angel Go to Quoted Post
Originally Posted by: Jackmoonward Go to Quoted Post

Oh I understand what your trying to say. When doing a Synchro filter like this, you gotta specify by the Setcode number for "Magnet Warrior" in Hex instead of the actual Id Number. Instead of --synchro summon
aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsCode,2000000004),aux.NonTuner(nil),1)
it should be
--synchro summon
aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0xSC),aux.NonTuner(nil),1)

Find the number of whatever you put for the setcode in the cdb for the archetype "Magnet Warrior" and convert from a decimal to hex, a quick google search of "2 to hex" or something along those lines will help. Keep in mind, no other archetype can have the same Setcode number as your archetype, otherwise this can lead to crashes and confusion in effects. Also for a card to be counted as a Magnet Warrior, it has to have the same setcode number as every other Magnet Warrior in the archetype. All Fabled monsters are 53 and in hex this means 0x35 and all Wind-up monsters are 88 and in hex this means 0x58.

Fabled Levaithan says 1 Fabled Tuner + 1 Non-tuner
and it's synchro requirement in the lua says:
--synchro summon
aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0x35),aux.NonTuner(nil),1)
The 0x35 in there is the setcode for Fabled like I said before.

~Jack


Thank you... well I guess there's no solution to my problem :s see, there is not a "Magnet Warrior" archetype so I will have to modify the old cards for this. I was planning to make a card with 2 setcodes, Hmmm is there a way to make a card to have 2 archetypes? Jeez, this thing has a lot of limitations... I don't remember any card with an effect like that.

So, making a card that search for monsters with "Warrior" in its name would be impossible to create since I cannot put 2 or more setcodes in the same card...


You can make your own archetype of cards. And I THINK you can have a card have 2 setcodes but I would need to get back to you on that. Also, you can have more than 1 search effect and filter for cards. The setcode is not necessarily based on the name of the card but more of the group it belongs. Take a Venn diagram and overlap 3 circles. Now you have 1 circle for Nordic ascendants, Nordic Beast, and Nordic Alfar. all 3 of them have different setcodes but they still count as Nordic monsters in general. Look at the Lua for Gleipnir, the Fetters of Fenrir, Nordics are split in to 4 Setcodes/ Archetypes yet this trap can still add them any one of them to the hand. It's not limited foresay but hard to put together like solving a jigsaw puzzle on your first try.

~Jack
Go here to vote for the next cards in Jackpro 1.5:
http://www.tehmadhouse.tk
Youtube:
http://www.youtube.com/user/jackmoonward
Angel  
#19 Posted : Saturday, December 15, 2012 7:59:45 AM(UTC)
Angel

Rank: Member

Groups: Registered
Joined: 12/12/2012(UTC)
Posts: 14

Thanks: 1 times
Was thanked: 2 time(s) in 2 post(s)
Originally Posted by: Jackmoonward Go to Quoted Post

You can make your own archetype of cards. And I THINK you can have a card have 2 setcodes but I would need to get back to you on that. Also, you can have more than 1 search effect and filter for cards. The setcode is not necessarily based on the name of the card but more of the group it belongs. Take a Venn diagram and overlap 3 circles. Now you have 1 circle for Nordic ascendants, Nordic Beast, and Nordic Alfar. all 3 of them have different setcodes but they still count as Nordic monsters in general. Look at the Lua for Gleipnir, the Fetters of Fenrir, Nordics are split in to 4 Setcodes/ Archetypes yet this trap can still add them any one of them to the hand. It's not limited foresay but hard to put together like solving a jigsaw puzzle on your first try.

~Jack


Wowow, this is what I actually wanted to know :D so, you are not sure how to implement it?
Vendetta  
#20 Posted : Wednesday, December 26, 2012 4:47:41 AM(UTC)
Vendetta

Rank: Member

Groups: Registered
Joined: 12/12/2012(UTC)
Posts: 22

Was thanked: 1 time(s) in 1 post(s)
Jack, this is awesome and you should feel awesome! I tried but i couldn't get my card to work :( Too much complication

Users browsing this topic
OceanSpiders 2.0
32 Pages123>»
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Notification

Icon
Error