stardustdrgn
2013-09-19T21:22:39Z
UserPostedImage
UserPostedImage
UserPostedImage
UserPostedImage
UserPostedImage
UserPostedImage
please [:cry:]
2013-09-20T10:28:42Z
I strongly suggest you to learn to program your own cards, because programming and testing them is rather time-consuming, and not something people will normally do for others out of pure kindness. That being said, I will provide you with the script of the last card only as is the easiest, so you can learn from the example and script the others yourself:


-----------------------------------
------- MIRACLE ANGEL DRAGON ------
-----------------------------------
function c7060065.initial_effect(c)

	-- Once per turn, you can resurrect a monster from your Graveyard
	--------------------------------------------------------------------
	local e1=Effect.CreateEffect(c)
	e1:SetDescription(aux.Stringid(7060065,0))
	e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
	e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
	e1:SetType(EFFECT_TYPE_IGNITION)
	e1:SetCountLimit(1)
	e1:SetRange(LOCATION_MZONE)
	e1:SetCost(c7060065.spcost)
	e1:SetTarget(c7060065.sptg)
	e1:SetOperation(c7060065.spop)
	c:RegisterEffect(e1)

	-- This card gains 300 ATK for every LIGHT monster in either player's Graveyard
	---------------------------------------------------------------------------------
	local e2=Effect.CreateEffect(c)
	e2:SetType(EFFECT_TYPE_SINGLE)
	e2:SetCode(EFFECT_UPDATE_ATTACK)
	e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
	e2:SetRange(LOCATION_MZONE)
	e2:SetValue(c7060065.atkval)
	c:RegisterEffect(e2)
end
------------------------------------------------------------------------------------------------------------------------------------
function c7060065.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
	if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end
	Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
end
function c7060065.filter(c,e,tp)
	return c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c7060065.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
	if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c7060065.filter(chkc,e,tp) end
	if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
		and Duel.IsExistingTarget(c7060065.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
	Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
	local g=Duel.SelectTarget(tp,c7060065.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
	Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c7060065.spop(e,tp,eg,ep,ev,re,r,rp,chk)
	local c=e:GetHandler()
	local tc=Duel.GetFirstTarget()
	if c:IsFaceup() and c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) then
		Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
	end
end
------------------------------------------------------------------------------------------------------------------------------------
function c7060065.atkval(e,c)
	return Duel.GetMatchingGroupCount(Card.IsAttribute,c:GetControler(),LOCATION_GRAVE,LOCATION_GRAVE,nil,ATTRIBUTE_LIGHT)*300
end
------------------------------------------------------------------------------------------------------------------------------------
end

The 1st effect is taken straight from "Lumina, Lightsworn Sorceress". The 2nd from "Colossal Fighter". Open their files, and compare the corresponding effects. See how little did I have to change their effects to match those of "Miracle Angel Dragon".
Truth is, most effects already have a real-life similar effect on a Yu-Gi-Oh! TCG card, and so with some searching, you can easily make your own effects by slightly editing and taking effects from a variety of cards.

PD: I suppose the card is properly scripted, but I didn't properly test it, so try it for yourself.
stardustdrgn
2013-09-20T15:49:55Z
Ok i want to learn this script language but where i can find lessons to be professional I know some languages like c,c++,javascript and I'm good in these languages maybe they will help me a little bit??
2013-09-20T16:45:58Z
There is no tutorial or reference page that I know of, apart from 'utility.lua' and 'constants.lua' inside the 'script' folder in YGOPro. I learned everything on my very own, by reading and learning from the existing card files, but that took me a lot of time and dedication. Knowing other scripting languages will definitely help to understand it better, as it did to me.

You aren't the 1st to express desire for such a tutorial, or some way to learn. Maybe I should think about doing such a thing.
Fawkey
2013-09-20T18:30:50Z
2013-09-20T18:45:08Z
It's good as an introduction, but it's pretty basic and won't get you far if you don't learn more. Of special importance are the parameters called upon each function, basically (e,tp,eg,ep,ev,re,r,rp) which I still have to see somewhere explained in detail. Something like "target player" is rather difficult to understand depending on what effects are you coding.

Also, while there is reference lists for all codes and effect types, those are viewable on 'constant.lua'. However, standard functions like "Duel.IsExistingMatchingCard", "Duel.SelectReleaseGroup", etc. aren't explained or referenced anywhere. The only current way is to examine the card files of already scripted cards and learn the hard way.
YuGiOhMoDDeR
2013-09-20T18:56:12Z
all functions are explained in source code on github project  with all parameters required for certain function

(e,tp,eg,ep,ev,re,r,rp) parametres mean :

e: The effect itself
tp: effect of the player
eg: event group, the event involves deck
ep: event player, players involved in the event
ev: event value, event involving parameters
re: reason effect, the effect of triggering event
r: reason, reason for the event description
rp: reason, players trigger event

hope this helps 🙂
2013-09-20T19:08:02Z
Where exactly? The base folder contains no useful files for that, under 'script' there is exactly the same in any YGOPro 'script' folder (which only contains the card files and 'utility.lua', 'constant.lua' - they don't explain anything), under 'textures' there are only images, under the other folders there are files that I guess may contain the declarations of such functions, but don't explain in detail anything. In fact, most of them are bare walls of text, with no comments whatsoever.

Hope I'm mistaken, though. It would be nice to have such a thing.


EDIT: That (list explaining "e","rp", etc.) helps a bit, though most of them I already somewhat figured in making >100 custom cards of my own. Still, I find the definition and use of some a little hazy depending on the situation.
YuGiOhMoDDeR
2013-09-20T19:10:01Z
Quote:

Where exactly?



under folder "ocgore" .. theres c++ code of all functions and their parametres
2013-09-20T19:15:48Z
That is hardly useful for learning from zero, not counting you have to: (1) know c++, not required at all to program card effects in YGOPro and (2) take the time to search, read, and understand what does the programmed function. There should be a tutorial about full LUA scripting, and a reference page for each function, telling what each parameter serves for and expects, possible uses and variations, examples...

Instead, there's only a begginer's tutorial to creating a .lua file and very basic knowledge about it, reference lists for constants, and the coded functions in c++ for anyone wanting to decipher them. All in all, there is no real practical tutorial to fully learn how to program your custom cards in YGOPro, no matter how difficult the effect.
YuGiOhMoDDeR
2013-09-20T19:24:11Z
yea, its not easy :/ and no need to know C++, since all parameters use basic name as "playerid","location1","location2","count" etc

example

Quote:


/**
* \brief Duel.GetFieldGroupCount
* \param playerid, location1, location2
* \return Integer
*/

stardustdrgn
2013-09-21T09:39:25Z
another question i have scripted blue-eyes baby dragon how can i add it to my game ??