Now before we begin you are going to need to optionally download 1 program:
Lua Edit 2010 If you don't want to download it, make sure you have a text editing program like Notepad that will allow you to make Lua script files.
Now on to the tutorial. Open your blank text program, preferably Lua Edit as your first choice.
Now on the first line, paste this onto it;
--NAME
Debug.SetAIName("OPPONENT")
Debug.ReloadFieldBegin(DUEL_ATTACK_FIRST_TURN+DUEL_SIMPLE_AI)
Debug.SetPlayerInfo(0,YOURLP,0,0)
Debug.SetPlayerInfo(1,OPPONENTLP,0,0)
Debug.ReloadFieldEnd()
Debug.ShowHint("Win in this turn!")
aux.BeginPuzzle()
Now let me explain what each of these lines means.
--NAME is what the name of the Duel Puzzle will be, don't confuse this with the name of the file.
You can change this from --NAME to --TROLOL or --DuelPuzzleTest
Debug.SetAIName("OPPONENT") will be the name of your opponent, just change the OPPONENT to whatever you want. Make sure the name has quotes before and after it, it has to look like this: "Bob" not Bob.
It can be "Jack" or "Chuck Norris" or even "Bilbo Baggins".
Debug.ReloadFieldBegin(DUEL_ATTACK_FIRST_TURN+DUEL_SIMPLE_AI) is the properties of the Duel Puzzle. No need to change anything here.
Debug.SetPlayerInfo(0,YOURLP,0,0) is the amount of life points you will start off with. Replace the YOURLP with any number of like points you want to start with in the Duel Puzzle.
Debug.SetPlayerInfo(1,OPPONENTLP,0,0) is the amount of life points your opponent will start off. Replace the OPPONENTLP with any number of life points you want the opponent to start with in the Duel Puzzle.
Debug.ReloadFieldEnd()Do not change this at all.
Debug.ShowHint("Win in this turn!") This is the message that shows up in a a dialog box when the Duel Puzzle starts, you can change the WIN IN THIS TURN to whatever you want. It has to be a in quotes like this: "WIN" not WIN.
aux.BeginPuzzle()Do not change this at all.
Now we are done with the easy part.
Now think of all cards you want used in this Duel Puzzle.
Type one of these per card you want to add:Debug.AddCard(A,0,0,LOCATION_B,0,C)
Replace the A with the card's ID number, the 8 digit number in the bottom left of Yu-gi-oh cards, if you don't know the ID number, look for the card in the Ygopro deck constructor and it's ID number will appear in the section above where the effect would normally be on the left, like this:
Replace the B with the location of the card. You can change this to GRAVE or DECK or HAND or EXTRA or REMOVED or MZONE or SZONE. GRAVE is the Graveyard, DECK is the deck, HAND is the hand, EXTRA is the extra deck, MZONE is for Monster Cards on the field, SZONE is for Spell and Traps on the field.
Replace the C with the position. You can replace it with FACEUP_ATTACK, FACEUP_DEFENCE, FACEDOWN_DEFENCE, POS_FACEDOWN, POS_FACEUP.
If a Monster is in the MZONE, it can be POS_FACEUP_ATTACK or POS_FACE_UP DEFENCE or POS_FACEDOWN_DEFENCE.
If a card is in the GRAVE, it can be POS_FACEUP or POS_FACEDOWN
If a card is in the EXTRA, it can be POS_FACEDOWN
If a card is in the DECK, it can be POS_FACEDOWN
If a card is in the HAND, it can be POS_FACEDOWN
If a Monster is in the REMOVED, it can be POS_FACEUP_ATTACK
Be careful when putting a card in the deck. The order you put the cards in the Deck location will be reverse in the puzzle.
For example, the first you card you put in the deck will be the bottom card of the deck.
If I am going to use 1 card, it is going to look like this:
--NAME
Debug.SetAIName("OPPONENT")
Debug.ReloadFieldBegin(DUEL_ATTACK_FIRST_TURN+DUEL_SIMPLE_AI)
Debug.SetPlayerInfo(0,YOURLP,0,0)
Debug.SetPlayerInfo(1,OPPONENTLP,0,0)
Debug.AddCard(11112222,0,0,LOCATION_MZONE,0,POS_FACEUP_ATTACK)Debug.ReloadFieldEnd()
Debug.ShowHint("Win in this turn!")
aux.BeginPuzzle()
And for 2 cards:
--NAME
Debug.SetAIName("OPPONENT")
Debug.ReloadFieldBegin(DUEL_ATTACK_FIRST_TURN+DUEL_SIMPLE_AI)
Debug.SetPlayerInfo(0,YOURLP,0,0)
Debug.SetPlayerInfo(1,OPPONENTLP,0,0)
Debug.AddCard(11112222,0,0,LOCATION_MZONE,0,POS_FACEUP_ATTACK)Debug.AddCard(22221111,0,0,LOCATION_SZONE,0,POS_FACEDOWN)Debug.ReloadFieldEnd()
Debug.ShowHint("Win in this turn!")
aux.BeginPuzzle()
If you want to make one of these cards to be on your opponent's side, change the ,0,0, to ,1,1 After you put the ID number of the card and before the Location.So I would change Debug.AddCard(11112222
,0,0,LOCATION_MZONE,0,POS_FACEUP_ATTACK) to Debug.AddCard(11112222
,1,1,LOCATION_MZONE,0,POS_FACEUP_ATTACK)
Now to change the Field Zone it shows up in, we change the ,0, after the Location and before the Position to the number of the zone. So if I change the 0 to 1 the card will show up like this:
And if I change the 0 to 2 or 1 to 2 it will look like this:
The Zones are numbered like this:
5 Is the Field Spell Zone.
0-4 is the Numbes for the MZONE and SZONE. For cards in locations other than MZONE and SZONE, you can leave the Field Zone number as 0.
Everything in the black square would be 0,0 or my side of the field.
Everything in the blue circle is 1,1 or the opponent's side of the field.Now you have just made your first Duel Puzzle! Once your done with the Duel Puzzle, name it whatever you wish but make sure it's a Lua file and not any other kind of file. Make sure to save it in the
single folder in your
Ygopro folder.
Hope I explained this simple enough for people wanting to make their own Puzzles. Credit to
Tea82 for information.
~Jack