*Author

Offline Sevs

  • Legendary Member
  • ******
  • Posts: 2007
  • Country: us
  • Reputation Power: 26
  • Sevs is a proud Wyrm taking wing for the first time.Sevs is a proud Wyrm taking wing for the first time.Sevs is a proud Wyrm taking wing for the first time.Sevs is a proud Wyrm taking wing for the first time.Sevs is a proud Wyrm taking wing for the first time.
  • My favorite element is Oxygen
  • Awards: Slice of Elements 3rd Birthday CakeWeekly Tournament WinnerWeekly Tournament Winner
Re: Game Coding Q&A https://elementscommunity.org/forum/index.php?topic=32442.msg416889#msg416889
« Reply #84 on: October 28, 2011, 08:14:27 am »
How does it send information when you play PvP?
"Elements is the greatest game ever made" - Abraham Lincoln

Offline XenocidiusTopic starter

  • Legendary Member
  • ******
  • Posts: 2696
  • Reputation Power: 49
  • Xenocidius is towering like an Amethyst Dragon over their peers.Xenocidius is towering like an Amethyst Dragon over their peers.Xenocidius is towering like an Amethyst Dragon over their peers.Xenocidius is towering like an Amethyst Dragon over their peers.Xenocidius is towering like an Amethyst Dragon over their peers.Xenocidius is towering like an Amethyst Dragon over their peers.Xenocidius is towering like an Amethyst Dragon over their peers.Xenocidius is towering like an Amethyst Dragon over their peers.Xenocidius is towering like an Amethyst Dragon over their peers.
  • Fear the Darkness ...
  • Awards: Slice of Elements 3rd Birthday CakeFavorite Community Member of 2011Weekly Tournament WinnerWinner of Design a Competition Competition
Re: Game Coding Q&A https://elementscommunity.org/forum/index.php?topic=32442.msg417132#msg417132
« Reply #85 on: October 28, 2011, 10:05:43 pm »
What's the AI's priority for discarding cards?
Basically, it goes through all the cards in its hand and assigns them a score based on this formula:

Score = (cost of card)/10 + suspicious

In general, suspicious is 1 if that creature was Nightmared last turn.

However, if the card is Ghost of the Past:

Score = 0

For each card, if its score > (random number between 0 and 1), it will discard it.

If once it has run through all its cards it has not found one to discard, it discards a random card.

Are the order of the cards in the deck predetermined at the beginning of the match, or decided randomly based on which cards are left at the time it is drawn?
Predetermined.

Slightly off topic, but I didn't want to create a new topic for this.
I was about to go to sleep, and suddenly became curious about the [deck] code. I've recently studied all these different types of codes, but haven't really done much application with it, in places like forums.

It seems pretty obvious that they were made by you people, but how? (if you don't mind, and if its not too long..) Can it be used in other forums if wished? Is it a long process of saving each card in the database, giving it a code name, and making sure that they come out as they would in-game?
Nope. Basically, the images are stored as (card code).png in the same directory. A program written by Planplan accesses them and creates an image when the [deck] tag is used. The image is then stored on the server. The tag itself is merely a simple combination of the [img] and [code] tags.

Also, this is for game coding questions, not forum coding questions.

How does it send information when you play PvP?
Through a server. I'll try to find some more information later.
Don't cry because it's over, smile because it happened.

Offline BluePriest

  • Legendary Member
  • ******
  • Posts: 3771
  • Reputation Power: 46
  • BluePriest is towering like an Amethyst Dragon over their peers.BluePriest is towering like an Amethyst Dragon over their peers.BluePriest is towering like an Amethyst Dragon over their peers.BluePriest is towering like an Amethyst Dragon over their peers.BluePriest is towering like an Amethyst Dragon over their peers.BluePriest is towering like an Amethyst Dragon over their peers.BluePriest is towering like an Amethyst Dragon over their peers.BluePriest is towering like an Amethyst Dragon over their peers.BluePriest is towering like an Amethyst Dragon over their peers.
  • Entropy Has You
  • Awards: Slice of Elements 5th Birthday Cake
Re: Game Coding Q&A https://elementscommunity.org/forum/index.php?topic=32442.msg417406#msg417406
« Reply #86 on: October 29, 2011, 02:05:14 pm »
This sig was interrupted by Joe Biden

Offline XenocidiusTopic starter

  • Legendary Member
  • ******
  • Posts: 2696
  • Reputation Power: 49
  • Xenocidius is towering like an Amethyst Dragon over their peers.Xenocidius is towering like an Amethyst Dragon over their peers.Xenocidius is towering like an Amethyst Dragon over their peers.Xenocidius is towering like an Amethyst Dragon over their peers.Xenocidius is towering like an Amethyst Dragon over their peers.Xenocidius is towering like an Amethyst Dragon over their peers.Xenocidius is towering like an Amethyst Dragon over their peers.Xenocidius is towering like an Amethyst Dragon over their peers.Xenocidius is towering like an Amethyst Dragon over their peers.
  • Fear the Darkness ...
  • Awards: Slice of Elements 3rd Birthday CakeFavorite Community Member of 2011Weekly Tournament WinnerWinner of Design a Competition Competition
Re: Game Coding Q&A https://elementscommunity.org/forum/index.php?topic=32442.msg417939#msg417939
« Reply #87 on: October 30, 2011, 02:08:40 pm »
Don't cry because it's over, smile because it happened.

Offline furballdn

  • Legendary Member
  • ******
  • Posts: 7573
  • Reputation Power: 86
  • furballdn is a mythical and divine giver of immortality, one of the Turquoise Nymphs.furballdn is a mythical and divine giver of immortality, one of the Turquoise Nymphs.furballdn is a mythical and divine giver of immortality, one of the Turquoise Nymphs.furballdn is a mythical and divine giver of immortality, one of the Turquoise Nymphs.furballdn is a mythical and divine giver of immortality, one of the Turquoise Nymphs.furballdn is a mythical and divine giver of immortality, one of the Turquoise Nymphs.furballdn is a mythical and divine giver of immortality, one of the Turquoise Nymphs.furballdn is a mythical and divine giver of immortality, one of the Turquoise Nymphs.furballdn is a mythical and divine giver of immortality, one of the Turquoise Nymphs.furballdn is a mythical and divine giver of immortality, one of the Turquoise Nymphs.furballdn is a mythical and divine giver of immortality, one of the Turquoise Nymphs.furballdn is a mythical and divine giver of immortality, one of the Turquoise Nymphs.furballdn is a mythical and divine giver of immortality, one of the Turquoise Nymphs.furballdn is a mythical and divine giver of immortality, one of the Turquoise Nymphs.furballdn is a mythical and divine giver of immortality, one of the Turquoise Nymphs.
  • Facetious trollnotmod
  • Awards: Epic 3 Card Winner - Clockwork GolemBest Recruiter of FriendsBest JournalistBest Chat PainterBattle - Slayer of The Great ChimeraBest Crafted Relic of Other
Re: Game Coding Q&A https://elementscommunity.org/forum/index.php?topic=32442.msg418331#msg418331
« Reply #88 on: October 31, 2011, 12:31:38 am »
What decides your oracle pet? Which ones are more likely to be your pet? What is the % that you get no pet?

Offline XenocidiusTopic starter

  • Legendary Member
  • ******
  • Posts: 2696
  • Reputation Power: 49
  • Xenocidius is towering like an Amethyst Dragon over their peers.Xenocidius is towering like an Amethyst Dragon over their peers.Xenocidius is towering like an Amethyst Dragon over their peers.Xenocidius is towering like an Amethyst Dragon over their peers.Xenocidius is towering like an Amethyst Dragon over their peers.Xenocidius is towering like an Amethyst Dragon over their peers.Xenocidius is towering like an Amethyst Dragon over their peers.Xenocidius is towering like an Amethyst Dragon over their peers.Xenocidius is towering like an Amethyst Dragon over their peers.
  • Fear the Darkness ...
  • Awards: Slice of Elements 3rd Birthday CakeFavorite Community Member of 2011Weekly Tournament WinnerWinner of Design a Competition Competition
Re: Game Coding Q&A https://elementscommunity.org/forum/index.php?topic=32442.msg418357#msg418357
« Reply #89 on: October 31, 2011, 01:20:41 am »
What decides your oracle pet? Which ones are more likely to be your pet? What is the % that you get no pet?
Each element has a default pet.

Other: -

:entropy Schrodinger's Cat
:death Virus
:gravity -
:earth Gnome Rider
:life Rustler
:fire Ash Eater
:water Chrysaora
:light Photon
:air Dragonfly
:time Deja Vu
:darkness Parasite
:aether Spark

It then has a 25% chance to pick a different, random pet. Immortal, Devonian Dragon and Fate Egg cannot be gotten as pets. If it does this the pet will be shown as '???'.

So the chance of getting no pet is around 8-9%, and can only happen if you get a Gravity or Other card.
Don't cry because it's over, smile because it happened.

Offline furballdn

  • Legendary Member
  • ******
  • Posts: 7573
  • Reputation Power: 86
  • furballdn is a mythical and divine giver of immortality, one of the Turquoise Nymphs.furballdn is a mythical and divine giver of immortality, one of the Turquoise Nymphs.furballdn is a mythical and divine giver of immortality, one of the Turquoise Nymphs.furballdn is a mythical and divine giver of immortality, one of the Turquoise Nymphs.furballdn is a mythical and divine giver of immortality, one of the Turquoise Nymphs.furballdn is a mythical and divine giver of immortality, one of the Turquoise Nymphs.furballdn is a mythical and divine giver of immortality, one of the Turquoise Nymphs.furballdn is a mythical and divine giver of immortality, one of the Turquoise Nymphs.furballdn is a mythical and divine giver of immortality, one of the Turquoise Nymphs.furballdn is a mythical and divine giver of immortality, one of the Turquoise Nymphs.furballdn is a mythical and divine giver of immortality, one of the Turquoise Nymphs.furballdn is a mythical and divine giver of immortality, one of the Turquoise Nymphs.furballdn is a mythical and divine giver of immortality, one of the Turquoise Nymphs.furballdn is a mythical and divine giver of immortality, one of the Turquoise Nymphs.furballdn is a mythical and divine giver of immortality, one of the Turquoise Nymphs.
  • Facetious trollnotmod
  • Awards: Epic 3 Card Winner - Clockwork GolemBest Recruiter of FriendsBest JournalistBest Chat PainterBattle - Slayer of The Great ChimeraBest Crafted Relic of Other
Re: Game Coding Q&A https://elementscommunity.org/forum/index.php?topic=32442.msg418366#msg418366
« Reply #90 on: October 31, 2011, 01:37:04 am »
What determines how much money you get from PVP?

Offline XenocidiusTopic starter

  • Legendary Member
  • ******
  • Posts: 2696
  • Reputation Power: 49
  • Xenocidius is towering like an Amethyst Dragon over their peers.Xenocidius is towering like an Amethyst Dragon over their peers.Xenocidius is towering like an Amethyst Dragon over their peers.Xenocidius is towering like an Amethyst Dragon over their peers.Xenocidius is towering like an Amethyst Dragon over their peers.Xenocidius is towering like an Amethyst Dragon over their peers.Xenocidius is towering like an Amethyst Dragon over their peers.Xenocidius is towering like an Amethyst Dragon over their peers.Xenocidius is towering like an Amethyst Dragon over their peers.
  • Fear the Darkness ...
  • Awards: Slice of Elements 3rd Birthday CakeFavorite Community Member of 2011Weekly Tournament WinnerWinner of Design a Competition Competition
Re: Game Coding Q&A https://elementscommunity.org/forum/index.php?topic=32442.msg418370#msg418370
« Reply #91 on: October 31, 2011, 01:52:46 am »
What determines how much money you get from PVP?
Good question is good.

First we must consider a variable called uberfactor, where:

uberfactor = ((your score) - (your opponent's score)) / ((absolute value of your score) + (absolute value of your opponent's score))

If you play in PvP1:

Electrum gained = 90 + floor((1 - uberfactor)*35)

If you play in PvP2:

Electrum gained = 150 + floor((1 - uberfactor)*35)

If you get an Elemental Mastery in PvP1 you gain an extra 20 electrum. If you get an Elemental Mastery in PvP2 you gain an extra 30 electrum.


For example, let's say I have 100000 score and you have -100000, and you beat me in PvP2.

uberfactor = (-100000 - 100000) / (100000 + 100000) = -1.

So you gain 150 + floor((1-(-1))*35) = 220 electrum.

If you got an EM you would gain 250 instead.
Don't cry because it's over, smile because it happened.

Offline Rutarete

  • Legendary Member
  • ******
  • Posts: 6505
  • Country: us
  • Reputation Power: 72
  • Rutarete frolics as one of the Phase Dragons, timeless and superior, gargantuan beasts of peerless wisdom.Rutarete frolics as one of the Phase Dragons, timeless and superior, gargantuan beasts of peerless wisdom.Rutarete frolics as one of the Phase Dragons, timeless and superior, gargantuan beasts of peerless wisdom.Rutarete frolics as one of the Phase Dragons, timeless and superior, gargantuan beasts of peerless wisdom.Rutarete frolics as one of the Phase Dragons, timeless and superior, gargantuan beasts of peerless wisdom.Rutarete frolics as one of the Phase Dragons, timeless and superior, gargantuan beasts of peerless wisdom.Rutarete frolics as one of the Phase Dragons, timeless and superior, gargantuan beasts of peerless wisdom.Rutarete frolics as one of the Phase Dragons, timeless and superior, gargantuan beasts of peerless wisdom.Rutarete frolics as one of the Phase Dragons, timeless and superior, gargantuan beasts of peerless wisdom.Rutarete frolics as one of the Phase Dragons, timeless and superior, gargantuan beasts of peerless wisdom.Rutarete frolics as one of the Phase Dragons, timeless and superior, gargantuan beasts of peerless wisdom.Rutarete frolics as one of the Phase Dragons, timeless and superior, gargantuan beasts of peerless wisdom.Rutarete frolics as one of the Phase Dragons, timeless and superior, gargantuan beasts of peerless wisdom.Rutarete frolics as one of the Phase Dragons, timeless and superior, gargantuan beasts of peerless wisdom.
  • Creativity should be nurtured.
  • Awards: Slice of Elements 6th Birthday CakeSlice of Elements 5th Birthday CakeSlice of Elements 4th Birthday CakeRuby Shard of DeckbuildingSlice of Elements 3rd Birthday Cake
Re: Game Coding Q&A https://elementscommunity.org/forum/index.php?topic=32442.msg418767#msg418767
« Reply #92 on: October 31, 2011, 11:06:47 pm »
What determines how much money you get from PVP?
Good question is good.

First we must consider a variable called uberfactor, where:

uberfactor = ((your score) - (your opponent's score)) / ((absolute value of your score) + (absolute value of your opponent's score))

If you play in PvP1:

Electrum gained = 90 + floor((1 - uberfactor)*35)

If you play in PvP2:

Electrum gained = 150 + floor((1 - uberfactor)*35)

If you get an Elemental Mastery in PvP1 you gain an extra 20 electrum. If you get an Elemental Mastery in PvP2 you gain an extra 30 electrum.


For example, let's say I have 100000 score and you have -100000, and you beat me in PvP2.

uberfactor = (100000 - (-100000)) / (100000 + 100000) = 1.

So you gain 150 + floor((1-1)*35) = 150 electrum.

If you got an EM you would gain 180 instead.
What is the floor? A method?
It is the greatest mystery of all...
Rutarete: Roo tah reh teh
[22:50] <Jyi> meaning gets lost in translation... even in the same language.
My Decks

Offline XenocidiusTopic starter

  • Legendary Member
  • ******
  • Posts: 2696
  • Reputation Power: 49
  • Xenocidius is towering like an Amethyst Dragon over their peers.Xenocidius is towering like an Amethyst Dragon over their peers.Xenocidius is towering like an Amethyst Dragon over their peers.Xenocidius is towering like an Amethyst Dragon over their peers.Xenocidius is towering like an Amethyst Dragon over their peers.Xenocidius is towering like an Amethyst Dragon over their peers.Xenocidius is towering like an Amethyst Dragon over their peers.Xenocidius is towering like an Amethyst Dragon over their peers.Xenocidius is towering like an Amethyst Dragon over their peers.
  • Fear the Darkness ...
  • Awards: Slice of Elements 3rd Birthday CakeFavorite Community Member of 2011Weekly Tournament WinnerWinner of Design a Competition Competition
Re: Game Coding Q&A https://elementscommunity.org/forum/index.php?topic=32442.msg418768#msg418768
« Reply #93 on: October 31, 2011, 11:07:52 pm »
Oh, sorry.

Floor simply means round down. (0.7 -> 0, 1.999999 -> 1), etc.
Don't cry because it's over, smile because it happened.

Offline BluePriest

  • Legendary Member
  • ******
  • Posts: 3771
  • Reputation Power: 46
  • BluePriest is towering like an Amethyst Dragon over their peers.BluePriest is towering like an Amethyst Dragon over their peers.BluePriest is towering like an Amethyst Dragon over their peers.BluePriest is towering like an Amethyst Dragon over their peers.BluePriest is towering like an Amethyst Dragon over their peers.BluePriest is towering like an Amethyst Dragon over their peers.BluePriest is towering like an Amethyst Dragon over their peers.BluePriest is towering like an Amethyst Dragon over their peers.BluePriest is towering like an Amethyst Dragon over their peers.
  • Entropy Has You
  • Awards: Slice of Elements 5th Birthday Cake
Re: Game Coding Q&A https://elementscommunity.org/forum/index.php?topic=32442.msg418974#msg418974
« Reply #94 on: November 01, 2011, 02:08:54 pm »
http://elementscommunity.org/forum/index.php/topic,33084.0.html
Thats a new link. Perhaps the link will make it easier to understand.
This sig was interrupted by Joe Biden

Offline Wolfunit

  • Full Member
  • ***
  • Posts: 429
  • Country: tt
  • Reputation Power: 5
  • Wolfunit is a Spark waiting for a buff.
  • Kongregate Chat + Forums Moderator
  • Awards: Slice of Elements 7th Birthday CakeSlice of Elements 4th Birthday CakeSlice of Elements 3rd Birthday Cake
Re: Game Coding Q&A https://elementscommunity.org/forum/index.php?topic=32442.msg419536#msg419536
« Reply #95 on: November 02, 2011, 07:53:15 pm »
I am not sure if this was asked already but my question is, How are cards picked for the bonus spin? Is it just like regular spins where it picks X amount of cards or is it from all the rares in-game except of cource nymphs/marks. Also from which pool are the cards picked  for the slot change (Where you can change a slot up to 3 times).
Hello, If you're a active player on Kongregate and in need of help you can leave a message on my profile which is qazzaq123. :D

 

blarg: Planplan