a place for all your custom card needs you can post scripts pics and request for card to be made also please donate to the funding for a new server made for custom card duels
 
HomePortalCalendarFAQSearchMemberlistUsergroupsRegisterLog in

Share | .
 

 how to code cards ebook draft

View previous topic View next topic Go down 
AuthorMessage
outlaw1994

avatar
Admin
Admin

Member Title : Red-Eyes Lord
Posts : 797
Join date : 2013-07-09
Age : 23
Location : bundaberg qld australia

PostSubject: how to code cards ebook draft   Fri May 30, 2014 3:24 pm

hey everyone im workin on an ebook to help people learn to code cards this is the first chapter. im trying to make it very easy to understand and use heres a download link for the first chapter ik there are a few mistakes as this is only a draft so i havent looked over it yet but if you guys can review and say how helpful it is or whats wrong id be grateful
mediafire.com view/ue8seiulh20r71a/book.pdf
Back to top Go down
View user profile http://mackpro.userboard.net
AoO

avatar


Member Title : Noob4ever
Posts : 241
Join date : 2014-04-25
Location : I only know that it is dark :/

PostSubject: Re: how to code cards ebook draft   Fri May 30, 2014 3:50 pm

Ok, first of all it is a really cool idea, that you want to write an ebook about adding cards to ygopro or rather mackpro^^

Your book design looks really cool and it is good that you named all the tools you need at the beginning. (Here I have a question: You mentioned a CD, that will be included in this book. Does that mean, that you also make it to a real book or will these programms be included in the download of the book??).

It is also good, that you explain how to add cards with examples (here: Darkness greed), because these cards can be used as a base for the trial and error method^^
(Here I have another question: Do you intend to also explain how to trial and error??)

What you can improve is, that you extend your explanations, how to add cards to your database, because just saying to add this or this number is a bit to less.
I don't know whether it is just a short example and you will explain that in the later chapter, but
it would be helpfull, if you add a table somewhere, where all numbers for all types, races, etc. that you have to put in the folder "data".

Last but not least the part with scripting. Same thing like above it is really helpfull to:
1. Add a table somewhere, where all effect categories, effect types, etc  with a little explanation         stands.
2. To explain the syntax of a lua script. You can explain for example, that the first big function             invokes the smaller functions below by call their name in the corresponding bracket, so that
    the structure of a script will be more clearly.
    I am programming at my school with java for example and I can say, that after I get the syntax of     java, I really improved my programming skills.


To keep a long story short: 
Really great draft with a good design and structure (btw, if your book will get bigger a table of                                                                               content would be nice Smile ).
The examples are also very good not to mention the picutures Wink 
I recommended to explain more of the syntax of scripting and to explain a little bit more.^^

Great work so far, I really looking forward for the book^^

_________________

Keep going, keep experiencing, keep learning AND: NEVER STOP!! >.<

Yugioh Custom Cards/ Decks/ Duels: https://www.youtube.com/channel/UCPil2ljKCm4HBhNT7wcNl-Q
Back to top Go down
View user profile
outlaw1994

avatar
Admin
Admin

Member Title : Red-Eyes Lord
Posts : 797
Join date : 2013-07-09
Age : 23
Location : bundaberg qld australia

PostSubject: Re: how to code cards ebook draft   Fri May 30, 2014 4:20 pm

i was actually planning on the last chapter being a complete recap of the book plus all the info like functions and numbers and stuff is gonna be in a big table at the end of the book about the cd i am planning on trying to get this published with a cd included but when i release the full version online it will have an iso file of the cd with the download also as you get further in the book the scripts get harder and harder and there will be activity's that can be done to improve your coding skill in the last few chapters they will show how to make complete archetypes this will probaly be a pretty big book once done it wouldnt suprise me if it gets to be a couple hundred pages im already up to page 52 and not even half finished it yet lol so hope that answers some questions for you oh and about the table of contents i will add that at the end as i might rearrange chapters and stuff so if i do a TOC now id have to spend more time rewriting it everytime i change something oh and sorry about this wall of text xD
Back to top Go down
View user profile http://mackpro.userboard.net
AoO

avatar


Member Title : Noob4ever
Posts : 241
Join date : 2014-04-25
Location : I only know that it is dark :/

PostSubject: Re: how to code cards ebook draft   Fri May 30, 2014 4:53 pm

Your ideas sounds good to me Smile 
Do you mean with "activites" to do some kind of exercisces??

BTW: No worries, if you write like walls, at least its good to read instead of stuff that are wrote by Franz Kafka (author), who writes one sentence through a whole site of a book XD

_________________

Keep going, keep experiencing, keep learning AND: NEVER STOP!! >.<

Yugioh Custom Cards/ Decks/ Duels: https://www.youtube.com/channel/UCPil2ljKCm4HBhNT7wcNl-Q
Back to top Go down
View user profile
outlaw1994

avatar
Admin
Admin

Member Title : Red-Eyes Lord
Posts : 797
Join date : 2013-07-09
Age : 23
Location : bundaberg qld australia

PostSubject: Re: how to code cards ebook draft   Fri May 30, 2014 5:03 pm

lol the activities will be like a script with parts missing that you gotta fill in yourself to get it to work starting at chapter 2 theres one at the end of each chapter that will test what you learnt in that chapter. not only will adding these improve your skills but it will completely test you to see if you learnt anything at all
Back to top Go down
View user profile http://mackpro.userboard.net
AoO

avatar


Member Title : Noob4ever
Posts : 241
Join date : 2014-04-25
Location : I only know that it is dark :/

PostSubject: Re: how to code cards ebook draft   Fri May 30, 2014 5:04 pm

kk, Thanks^^
lol can't wait for the book XD

_________________

Keep going, keep experiencing, keep learning AND: NEVER STOP!! >.<

Yugioh Custom Cards/ Decks/ Duels: https://www.youtube.com/channel/UCPil2ljKCm4HBhNT7wcNl-Q
Back to top Go down
View user profile
StormWing0




Member Title : Over Creative Card Ideas
Posts : 451
Join date : 2013-07-14
Age : 25
Location : Tacoma, WA

PostSubject: Re: how to code cards ebook draft   Sat May 31, 2014 3:38 am

This should be interesting to see.

_________________
Own Archetypes being worked on: RoseHarpie, OrbLit, Crystal Elemental (No cards yet on the last one).

Current Hamachi Room that isn't full:
Name: StormWing120V3
Pass: 1234

Discord Channel: Instant Invite Let me know if this fails to work right.  If it fully works it'll replace the Hamachi above.

Keep in mind these below are just estimates and even if it says 100% it only means what is needed for the main dueling deck is done
RoseHarpie 50% finished but no code or images
OrbLit 80% finished some images but no code
Crystal Elemental 0% finished
Back to top Go down
View user profile
TGAP-Trixie

avatar


Member Title : Trixie does not even...
Posts : 273
Join date : 2014-04-17

PostSubject: Re: how to code cards ebook draft   Sat May 31, 2014 6:31 am

I guess I'll add notes here I might wanna touch up on/ ask about as I read them.

One thing I wanted to say, and it's just a small one, but could you clarify what the strings do in sqlite? I wouldn't know how to explain it, but if you do, after that you could say "Just leave them empty, for now". Unless that part is just for the beginners then that's ok to not clarify at that point, as long as it's covered in an intermediate (preferably)-expert(this info should be known by then) level book.

Next note, maybe it would be best if you give a link/hyperlink to the setcodes/race codes/archetype (I seem to remember there was a doc with just that info but I think it was taken down) before step 4 on page 5. Actually just refer them to the table you mentioned at the end for the codes. Also on this note, if you could explain cards in double archetypes and sub-archetypes. That's something I personally would like to know  Surprised . I personally found the tutorial by jackmoonward very confusing on that part.

Page 6 I think is really well made and easy to read. I was thinking that you could say you can name functions anything you wanted, in case you have two effects and both effects require a target function, but that would best be covered in an intermediate level book.

No one (or hardly anyone maybe) knows what most of those parameters do (e,c, tp, etc.). If you could possibly get an answer about that from Percival or someone who does, that would be most helpful. 

Now those activities; that's an interesting idea. This is gonna be C#, C++ all over again xD.
Back to top Go down
View user profile
outlaw1994

avatar
Admin
Admin

Member Title : Red-Eyes Lord
Posts : 797
Join date : 2013-07-09
Age : 23
Location : bundaberg qld australia

PostSubject: Re: how to code cards ebook draft   Sat May 31, 2014 6:37 am

lol as i said this is the beginner chapter for people who are straight up new to coding and adding cards in chapter 2 the card being made is a card called soul link which will teach some more basic stuff like loops math increase atk and destroying cards as the chapter progress they will become more about what each variable does and what strings do and so on but for beginners you dont want to overload them on everything at the start its easier for them to start small and learn as they progress through the book
Back to top Go down
View user profile http://mackpro.userboard.net
outlaw1994

avatar
Admin
Admin

Member Title : Red-Eyes Lord
Posts : 797
Join date : 2013-07-09
Age : 23
Location : bundaberg qld australia

PostSubject: Re: how to code cards ebook draft   Sat May 31, 2014 6:44 am

oh and in case yous were wondering the effect of the soul link card in the second chapter is
Target 2 face-up Monsters you control. Each Monster targeted by this effect gains ATK equal to half the ATK of the other Monster targeted by this effect. When a Monster targeted by this effect leaves the field: Destroy the other Monster targeted by this effect.
oh also i renamed the book to ygopro apprentice as the old name was too plain and basic
Back to top Go down
View user profile http://mackpro.userboard.net
overcold_ice

avatar


Member Title : Overfrost!
Posts : 21
Join date : 2014-06-02

PostSubject: Re: how to code cards ebook draft   Tue Jun 03, 2014 8:47 pm

For references:

  • All constants: constant.lua (inside the script folder).
  • Function list: interpreter.cpp.
  • What functions (actually) do: libxxx.cpp, found here.
  • Additional functions list: utility.lua (inside the script folder).

For the third point, there are 'libduel.cpp', 'libcard.cpp', 'libgroup.cpp', etc.

For those nasty, long, confusing, and might be irritating parameters; as far as I can see, what everyone needs are 'e' (effect), 'tp' (You, as in card texts), 're' ('something' effect, rarely used, but mostly used among those rarely used stuffs), 'rp' ('something' player, same like 're'), 'chk' (check, 0 means that the program still checks whether an effect can be activated or not), 'chkc' (check 'card?', I suspect this has to do something with RE-targeting). Those 'r' series are for everything not yours, and not this card's. Their uses are pretty much effect type/event dependent. And actually, you can rename them to your heart content, you can't change their order though (basic coding stuffs, I haven't tried this though; but I have seen a same-purpose parameter that got named differently in different functions, 're' and 'te', used for chain limit stuffs to be exact).

For someone who hasn't know, everything in the script folder is one. So, if you separate your functions in a script for one card to different files, it's fine. This is useful for an effect that all cards in an archetype shares, for example.

Also, in YGOPro 1.033.0 V4 (latest update atm), Percy made a new folder called 'expansions'. Any card database in it will be merged with the main database. And you can also drop .zip files there, that contains a 'pics' folder and a 'script' folder (exactly the same as the original folders, and works the same way). They will be merged with their respective original folders as well. From what I have tested, no matter what the name of the databases and the .zip files, they got piled to one (along with their original counterparts). I haven't tested a 'pics' only .zip files, or the other. And how they got overwritten (original vs expansions, expansions vs expansions).

_________________
_____________+ overcold_ice
Back to top Go down
View user profile
TGAP-Trixie

avatar


Member Title : Trixie does not even...
Posts : 273
Join date : 2014-04-17

PostSubject: Re: how to code cards ebook draft   Thu Jun 05, 2014 7:39 am

What do you mean everything in the script folder is one?
I also noticed the expansion thing and wondered what that was for. I assumed it was for custom cards. I'm guessing if you test with just a pics folder, it won't get added into ygopro until you add it into a cdb file.
Back to top Go down
View user profile
overcold_ice

avatar


Member Title : Overfrost!
Posts : 21
Join date : 2014-06-02

PostSubject: Re: how to code cards ebook draft   Thu Jun 05, 2014 9:17 am

By one, I mean something like this is fine:
Code:
--this is file_one_init.lua
function c12345678.initial_effect(c)
  local e=Effect.CreateEffect(c)
  --something
  e:SetCost(myGlobalStuffs.cost1)
  e:SetOperation(c12345678.operation)
end
--end of file
Code:
--this is file_one_func.lua
function c12345678.operation(e,tp,eg,ep,ev,re,r,rp)
--[[
  do usual stuffs
]]--
end
--end of file
Code:
--this is my_global_stuffs.lua
myGlobalStuffs={}
--this makes myGlobalStuffs.something possible
--this MIGHT not be required though

myGlobalStuffs.cost1(e,tp,eg,ep,ev,re,r,rp,chk)
--[[
  do usual stuffs
]]--
end
--end of file
And from those example above, most possibly, naming the files as 'cXXXXXXXX.lua' is not required. Instead, the function 'cXXXXXXXX.initial_effect(c)' is required.

If the original database has your custom cards, and the pics and/or scripts are in the expansions folder, it will still works as if the pics/scripts were in their respective original folders. Basically, everything inside that expansions folder is moved into their original places.

_________________
_____________+ overcold_ice
Back to top Go down
View user profile
Project Leviamon

avatar


Member Title : Busy with high school sadly
Posts : 320
Join date : 2013-08-03
Age : 18
Location : Digital World

PostSubject: Re: how to code cards ebook draft   Sat Jul 26, 2014 12:15 am

I feel like it's a bit too straight forward. I feel like it should be more like Jack's tutorial which tells you to look for a card with similar effect and modify it, and lists all the categories and locations.

I can help you if you want.

_________________
Not the best at scripting, but will help if I can. Really busy lately tho :/


Youtube Channel

Dark Army vs Elemental Dragons

Planned Archetypes:
-Persona Card
-Dark Army
-Elemental Dragons
-END (tons and tons of cards made in card maker)
-Chained Dragons (lost in a computer meltdown, will redo eventually)
-RWBY (thinking of making these)
Back to top Go down
View user profile http://www.pokecommunity.com/member.php?u=364458
outlaw1994

avatar
Admin
Admin

Member Title : Red-Eyes Lord
Posts : 797
Join date : 2013-07-09
Age : 23
Location : bundaberg qld australia

PostSubject: Re: how to code cards ebook draft   Sat Jul 26, 2014 2:01 am

I wanted To make the first chapter very simple as an intro to scripting it gets a lot more detailed and challenging as you go further into the book I haven't been able to work on this for a while because it was stored on my laptop which I still haven't got back it back yet(starting to get really pissed off about that)
Back to top Go down
View user profile http://mackpro.userboard.net
thatjacksonboy




Member Title : ScrapKing
Posts : 8
Join date : 2014-10-06

PostSubject: Re: how to code cards ebook draft   Fri Nov 07, 2014 10:52 pm

outlaw1994 wrote:
hey everyone im workin on an ebook to help people learn to code cards this is the first chapter. im trying to make it very easy to understand and use heres a download link for the first chapter ik there are a few mistakes as this is only a draft so i havent looked over it yet but if you guys can review and say how helpful it is or whats wrong id be grateful
mediafire.com view/ue8seiulh20r71a/book.pdf
so i need the info on how to create a synchro i know how to do a xyz but for some reason i can summon my synchro monster i create
Back to top Go down
View user profile
Marc1




Posts : 43
Join date : 2013-08-03

PostSubject: Re: how to code cards ebook draft   Thu Mar 12, 2015 12:36 am

Hi outlaw,

   Are you still working on this ebook?
Back to top Go down
View user profile
Sponsored content





PostSubject: Re: how to code cards ebook draft   

Back to top Go down
 

how to code cards ebook draft

View previous topic View next topic Back to top 
Page 1 of 1

 Similar topics

-
» My new Class Cards.
» Rhino cards?
» My first cards
» My Birthday cards
» spellcaster deck ( without banned cards)

Permissions in this forum:You cannot reply to topics in this forum
Mackpro :: News :: News and Announcements-