The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > Creative Discussions > Game Development > Resources > Scripts & Tutorials
Register New Account FAQ/Rules Chat Blogs Mark Forums Read

Notices

Scripts & Tutorials This forum is for scripts and code, as well as all kinds of tutorials, software, tools and so forth. Remember to give credit!
The thread revival limit does not apply here.



Reply
Thread Tools
  #151  
Unread February 23rd, 2013, 06:09 PM
p.claydon
Smoochum
 
Join Date: Jan 2011
how are things going? looking forward to seeing updates
Reply With Quote
  Click here to go to the next staff post in this thread.   #152  
Unread February 24th, 2013, 12:18 AM
Maruno's Avatar
Maruno
Lead Dev of Pokémon Essentials
 
Join Date: Jan 2008
Location: England
Gender: Male
Things are going fine, I suppose. Prizes are in, win conditions are in, lots of various other things are done too. I don't keep track of what I've done, but things are being tidied up a bit.

It would be nice to find a rulings pdf or something for the Base/Jungle/Fossil sets which describes various scenarios and answers what is supposed to happen (e.g. exactly when Gastly's Destiny Bond occurs, before or after the attack's extra effect if it has one?). It'd help with programming in the various card effects. Actually, rulings for other sets would be nice too, to make sure there were places for any new effects people might want to add.

Aside from effects related to specific attacks or cards, are there really only four factors to keep track of? By this I mean, 1 Energy Card limit per turn, 1 retreat limit per turn, 1 evolution per Pokémon per turn, and (for most Pokémon Powers) 1 Power use per Pokémon per turn. I can't think of any other general game mechanics that would need to be tracked like these are, which aren't specific to particular card effects.
__________________
Reply With Quote
  #153  
Unread February 24th, 2013, 04:58 PM
alphazeta126
Unhatched Egg
 
Join Date: Nov 2012
Location: Area 51
Gender: Male
Nature: Serious
Quote:
Originally Posted by Maruno View Post
Things are going fine, I suppose. Prizes are in, win conditions are in, lots of various other things are done too. I don't keep track of what I've done, but things are being tidied up a bit.
May I ask what you mean by win conditions? Does this just mean that the player will win after they get all prizes specified for the battle or that there will be special conditions to play by like Pokemon TCG 2 for the GameBoy?
Reply With Quote
  Click here to go to the next staff post in this thread.   #154  
Unread February 24th, 2013, 05:18 PM
Maruno's Avatar
Maruno
Lead Dev of Pokémon Essentials
 
Join Date: Jan 2008
Location: England
Gender: Male
You win if you take your last prize card. You lose if you don't have an Active Pokémon. You lose if you can't draw a card at the start of your turn. If multiple conditions occur at once (i.e. the first two), then the person who "wins most" wins (or it's a draw). That's it.

I've not played the TCG2 game, just the first one (and not very much). I don't intend to add any gimmick features in anyway.
__________________
Reply With Quote
  #155  
Unread February 24th, 2013, 05:45 PM
alphazeta126
Unhatched Egg
 
Join Date: Nov 2012
Location: Area 51
Gender: Male
Nature: Serious
Quote:
Originally Posted by Maruno View Post
You win if you take your last prize card. You lose if you don't have an Active Pokémon. You lose if you can't draw a card at the start of your turn. If multiple conditions occur at once (i.e. the first two), then the person who "wins most" wins (or it's a draw). That's it.

I've not played the TCG2 game, just the first one (and not very much). I don't intend to add any gimmick features in anyway.
Okay cool, thanks for the quick reply. By the way do you need any help creating new graphics? I saw in the earlier posts that you were thinking of changing them so that pixel size was not doubled. If so I can help. Just tell me what type of graphics I would have to make
Reply With Quote
  #156  
Unread February 25th, 2013, 09:40 PM
the__end's Avatar
the__end
Captain
 
Join Date: Apr 2010
Gender: Male
Quote:
Originally Posted by Maruno View Post
It would be nice to find a rulings pdf or something for the Base/Jungle/Fossil sets which describes various scenarios and answers what is supposed to happen (e.g. exactly when Gastly's Destiny Bond occurs, before or after the attack's extra effect if it has one?). It'd help with programming in the various card effects. Actually, rulings for other sets would be nice too, to make sure there were places for any new effects people might want to add.
Here is what you are looking for:
http://www.mediafire.com/?4379z78ci5q7poo

These could be useful too:
http://www.pojo.com/pokemon/rules/oldbasicrules.html
http://www.pojo.com/pokemon/rules/oldexpertrules.html

For the neo sets:
http://www.pojo.com/pokemon/rules/neorules1.pdf

The current rules:
http://assets23.pokemon.com/assets/c...s_rulebook.pdf
http://www.pocketmonsters.net/TCG_Tutorial

Hope i could help. :D
__________________

Reply With Quote
  Click here to go to the next staff post in this thread.   #157  
Unread February 25th, 2013, 11:48 PM
Maruno's Avatar
Maruno
Lead Dev of Pokémon Essentials
 
Join Date: Jan 2008
Location: England
Gender: Male
Quote:
Originally Posted by alphazeta126 View Post
Okay cool, thanks for the quick reply. By the way do you need any help creating new graphics? I saw in the earlier posts that you were thinking of changing them so that pixel size was not doubled. If so I can help. Just tell me what type of graphics I would have to make
Just up-rezzing the existing graphics would be fine, at least for the ones used in duels. The other existing screens could probably stand to be redesigned to some extent.


Quote:
Originally Posted by the__end View Post
Here is what you are looking for:
http://www.mediafire.com/?4379z78ci5q7poo
That's exactly what I was looking for! That'll be extremely useful. Your other links will be useful also.

So many rulings on Ditto...
__________________
Reply With Quote
  #158  
Unread February 25th, 2013, 11:55 PM
the__end's Avatar
the__end
Captain
 
Join Date: Apr 2010
Gender: Male
Quote:
Originally Posted by Maruno View Post
So many rulings on Ditto...
That's why it is not included in the gbc game.

EDIT
Changed a few pixel so the cards doesn't look so "round".


Replaced the Energy icons with better ones.
__________________


Last edited by the__end; February 26th, 2013 at 12:37 AM.
Reply With Quote
  #159  
Unread February 26th, 2013, 01:07 AM
alphazeta126
Unhatched Egg
 
Join Date: Nov 2012
Location: Area 51
Gender: Male
Nature: Serious
Quote:
Just up-rezzing the existing graphics would be fine, at least for the ones used in duels. The other existing screens could probably stand to be redesigned to some extent.
Just logged on and saw this response. I actually have an essay to work on right now but immediatley after that I will start on this.
Reply With Quote
  #160  
Unread March 2nd, 2013, 05:29 PM
fayt666's Avatar
fayt666
Unhatched Egg
 
Join Date: Jun 2011
Gender: Male
if ur lookin for sites that give all details on cards

http://www.serebii.net/card/base/

http://www.pokemon.com/us/pokemon-tr...game/database/

seribii has all cards with details.

pokemon.com focuses from ex to newest seen as alot original series cards were banned.
__________________
Reply With Quote
  #161  
Unread March 16th, 2013, 02:47 PM
●•ΛΣЯӨЩ•●'s Avatar
●•ΛΣЯӨЩ•●
Busy With Life.......
 
Join Date: Nov 2008
Location: In My HoUsE
Gender: Male
Nature: Bold
Send a message via Windows Live Messenger to ●•ΛΣЯӨЩ•● Send a message via Skype™ to ●•ΛΣЯӨЩ•●
This would certainly be interesting, compared to the normal Pokemon games, the TCG is also a great game when one gets the hold of it.
__________________

Reply With Quote
  #162  
Unread April 18th, 2013, 01:44 PM
TheDarkShark
Metal Headed Hacker
 
Join Date: May 2010
Location: Germany
Gender: Male
Nature: Calm
*blows away dust*
Sorry for reviving this thread (I'll assume these rules apply in this subforum, too, because no limit to thread revival is mentioned in the specific rules), just found it again.
Since you already said, you'd finish this definetly, I'll gladly state that I still have interest in this project. In fact, I think I might be able to help you with the AI, though I still haven't looked into Ruby. I'm probably the only one who recently read the entire thread, so I'm going to quote the particular part I'm talking about:

Quote:
Originally Posted by Maruno View Post
I really don't think such strategies need to be separated. It all boils down to "use the best cards", and what constitutes a "best card" depends on the environment (i.e. what other cards are in play, etc.). This can certainly become convoluted very quickly as the AI develops, as there'll be all sorts of checks and evaluations. This is especially true when you start thinking of combos.

Of course, the AI is going to cheat. That is, it'll make its choices while knowing about cards it shouldn't be able to know about (e.g. cards in the player's hand, which prize card is best to take, whether it'll draw something good because of Professor Oak). However, it won't influence the outcomes of coin flips or whatever, so it'll be fair that way. I think making the AI omniscient is the only way it can be made to stand a chance against players.

As for how the AI will actually work, I have a vague idea. At the start of its turn, it looks around the duel and lists everything it is able to do (play a card from the hand, use an in-play effect such as a Pokémon Power, retreat, etc.), and then assign a desirability value to it. Calculating this value for each action depends a lot on the environment, and is the convoluted part. Once all the values are calculated, it will do the most desirable action and repeat (recalculating the values for what's left). Once there's nothing left to do, it will attack if possible and desirable - the good thing is that an attack is always the last thing in a turn (and there's always just 1 attack per turn), which makes it a bit simpler.

It sounds simple when I write it in just one paragraph, and some actions will always be desirable (e.g. play Bill) and some will never be worth using (e.g. Mankey's Pokémon Power, as the AI will know all those cards via cheating anyway). However, when is the best time to play Energy Removal, and which Pokémon/energy should be hit by it? How about Super Energy Removal, which involves a cost to the user and may not be worth it (and if so, which card should the AI pay)? There's a huge amount of thought that needs to go into the AI for even a single effect, and I think that such thought needs to be done in order to make the AI worthwhile.

Tuning can come much later, e.g. deciding the threshold desirability value below which an action shouldn't be done, and how much randomness to involve in the choices.

As you can see, any emergent "strategy" will depend entirely on the make-up of the deck. It can only depend on the cards you've got available ("work with what you've got"), and it's up to the AI calculations for each card to decide how useful (and therefore desirable) it is. The overall behaviour of the AI will simply look like what it does the most, which depends on what it's got (e.g. an energy-controlling strategy will appear if there are a lot of energy-controlling effects in the deck). I don't think there's any need to include deck-specific AI profiles (particularly as it would tend to rail-road and hurt decks which could sometimes benefit from profiles they don't have), and instead throw every situational calculation into the one AI used for everything.
This reminds me a lot of Dragon Age's threat system, which basically makes each individual enemy attack the character that poses the greatest threat to them. If you're interested in it, as some kind of reference, a better explanation can be found here.
Why do I think this is relevant? Well, depending on the game's difficulty settings, the equipped armor and weapons increase the threat, making enemies on lower difficulties more likely to attack your tank. Let's think this idea through a little bit:

Let's say there's a number of variables that scale the desirability of each action. This could be used to individualize the playstyle of characters and adjust the AI to the deck. Assume, for instance, the previously discussed evolution-/base-decks, where evolving pokémon and getting energy on base-pokémon should have different priorities. If there's two floats named evolution and baseEnergy, respectively, these could be set in the PBS-entries. In the evolution themed deck, you'd set evolution=1.1 and baseEnergy=0.8. The desire to play an energy on a base pokémon would be multiplied by 0.8, and the desire to evolve a pokémon by 1.1.
Of course, you'd need more variables (and better names), but I'm pretty sure this would pay off, since you'd have to do a lot less fine tuning (except for standard values, when the user doesn't set them for the deck).

To simplify the decision on what trainer card to play, you could also categorize them and apply values. Let's say both Bill and Professor Oak are in the category deckspeed (that's what this kind of cards are used for in YGO, anyways), Bill would have the value 20 and Professor Oak would have the value 40 (arbitrary example, don't count on me for the exact balancing). If you assume a float deckspeedPriority, similar to the previous evolution and baseEnergy variables, the cards would get assigned the proper desire. If deckspeedPriority=1.5, playing Bill would stand at 30 desire, and Professor Oak would stand at 60.
I'll admit though, that this is not optimal, since Professor Oak makes you toss all cards in your hand, so the desire should be decreased depending on what cards the CPU player currently has. Applying multiple properties to a card might help. To keep the example going, assume Professor Oak had the properties deckspeed 70 and toss 0, where 0 basically means all. The desire to play Professor Oak would then be 70 * 1.5 = 105, reduced by an appropriate amount of desire, depending on the number of cards.

If you want actual strategy, as in playing combos of cards that work well together, consider having the user specify them for the deck. If none are specified you're fine. However, if the AI's supposed to wait for this card in the deck before playing that card, the desire to play that card would be drastically reduced, maybe by the priority of the combo.

All of these are ideas I came up with while brainstorming, haven't really done much more thinking, though. I know, they look like a lot of extra work, but please consider them at least.
__________________
There are two things every Rom-Hacker should learn:
1. Don't give away everything you know!

Reply With Quote
  Click here to go to the next staff post in this thread.   #163  
Unread April 18th, 2013, 06:51 PM
Maruno's Avatar
Maruno
Lead Dev of Pokémon Essentials
 
Join Date: Jan 2008
Location: England
Gender: Male
This section's description says the thread revival limit doesn't apply in here, so don't worry about that.

Your first suggestion, defining a deck with one or more keywords that are used to alter AI calculations of how/when cards should be used (including as parts of combos), is reasonable enough. It'll be fiddly to insert those alterations into the scripts to actually produce the desired style, of course, but that's a matter of balancing and tweaking. Any rail-roading (forcing one style when another would be more preferable) would probably not be too blatant, because if another style really is more preferable, the effect of the defined style won't be enough to override it. Again, that's a balancing issue.

Your second suggestion, categorising cards by their effects, doesn't seem that useful. Every unique card effect has its own function code, and the calculations for how/when to use it can depend on that. Basically, the effect function codes already serve as a kind of categorising, albeit a very fine one. Similar effects will have similar desirability calculations; it's not hard to copy-paste. While this does make the AI for using a card hardcoded, I really don't think that's a problem. In the end, the code's going to be the same as using card keywords, and in fact function code-based calculations can allow greater customisation of a card's AI since you can easily edit the AI for just a single unique effect. So no, this idea doesn't convince me.

There's currently no AI at all. I'd prefer to get something simple in first and then possibly modify it later, than worry about loads of different subtleties from the beginning. The AI style keywords are definitely one of the "ignore for now" things, but I've written it down.
__________________
Reply With Quote
  #164  
Unread 4 Weeks Ago, 11:29 AM
TheDarkShark
Metal Headed Hacker
 
Join Date: May 2010
Location: Germany
Gender: Male
Nature: Calm
Well, the mechanisms I suggested are only tweaks to the original idea, so implementing the simpler version first is only reasonable.

Hardcoding AI for every single card seems really tedious to me, though, even if it's only copy/paste. Other than using keywords, I can only think of reflection to calculate their desirability, which would give you a really tedious, hard to understand AI code (depending on how well reflection is implemented in Ruby, if it is in at all). I won't judge you for refusing to do this, especially since this is a kit for other game developers. Maybe hard code really is the best option, though I usually don't like to think that way.

If currently no AI is implemented, what are you currently working on and what have you achieved in the 2 months since your last post here? Have you progressed at all, seeing as people's interest in this has decreased recently? Not trying to be rude, just curious.
__________________
There are two things every Rom-Hacker should learn:
1. Don't give away everything you know!

Reply With Quote
  This is the last staff post in this thread.   #165  
Unread 4 Weeks Ago, 01:49 PM
Maruno's Avatar
Maruno
Lead Dev of Pokémon Essentials
 
Join Date: Jan 2008
Location: England
Gender: Male
I know that hardcoding is frowned upon and harder to change. However, it's simpler to do, will be pretty straightforward to edit anyway in this case, and this is only a small little project of mine which was never intended to be massively customisable, so I don't need to worry about it.

I never learnt the names of things like reflection (which Ruby has); all I know is how to use them. I use reflection to check whether a particular attack or trainer effect exists, and if so, to call it. However, I might as well just make one huge method to do all the desirability calculations for a particular kind of action (play trainer, play energy, retreat, use Power are all different things), like Essentials does for using moves - it'd be practically the same thing as using reflection anyway, and good enough for this project.

I've done very little since whenever my last update was; I've drifted back to working on Essentials a bit since then. I don't keep a change log for this, so I couldn't list what I've done. I've looked through the rulings posted above and clarified exactly how the various card effects should work, and I've done a little background work for them (e.g. making an array which remembers what an attack's result was, for the purpose of Mirror Move and Leech Life, etc.). I've fiddled with prize cards. I've generally been tweaking things to work smoother or better, and been planning out what else needs doing. A lot of what I've been doing is incomplete, and there's not much to show off.

This project was only ever a "because I felt like it" thing. Because I like sharing, it'll (probably) be available for anyone to use, but that's not specifically a guideline for the project, nor is making it easy to customise. I'm just doing what I want to do, and if it happens to be user-friendly, that's just a bonus.
__________________
Reply With Quote
Reply
Quick Reply

Sponsored Links


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are UTC. The time now is 10:38 PM.


Style by Perdition Haze, artwork by Sa-Dui.
Like our Facebook Page Follow us on TwitterMessage Board Statistics | © 2002 - 2013 The PokéCommunity™, pokecommunity.com.
Pokémon characters and images belong to Pokémon USA, Inc. and Nintendo. This website is in no way affiliated with or endorsed by Nintendo, Creatures, GAMEFREAK, The Pokémon Company, Pokémon USA, Inc., The Pokémon Company International, or Wizards of the Coast. We just love Pokémon.
All forum styles, their images (unless noted otherwise) and site designs are © 2002 - 2013 The PokéCommunity / PokéCommunity.com.
PokéCommunity™ is a trademark of The PokéCommunity. All rights reserved. Sponsor advertisements do not imply our endorsement of that product or service. User posts belong to the user.