News:

A forum for users of LackeyCCG

Main Menu

Counter Accounting Counts!

Started by VladShadeu, July 04, 2010, 02:32:40 AM

Previous topic - Next topic

VladShadeu

So, I was wondering if there was a way to get one card function to do more than one thing. You see, I have one counter that boosts one stat, and one that boosts another, and one that boosts a third. However, some effects put two or three of these on at once, and just to make things easier I'd like to have a button that adds all three. Is this possible? If so, how do I write the card function?

Trevor

No, you need to add each counter separately. Remember that even though some things could be implemented, in many cases it's not worth the additional complication to the interface for the rare times the functions would be useful.

innuendo

Trevor this is easy to add, quickly off the top of my head:

CARDFUNCTION5:"COMBINEFUNCTION" "Name" [number of functions following] [function 1 number] [function 2 number] [etc]

So just like transfer cards you can have so many of them, and they just take [number of functions following] and do them one after the other.  This is not only useful it's very easy to do.

His above example would look something like

CARDFUNCTION0:"ADDCOUNTERRED" "Power" 1 1 .1
CARDFUNCTION1:"ADDCOUNTERGREEN" "Strength" 1 1 .1
CARDFUNCTION2:"ADDCOUNTERBLUE" "Might" 1 1 .1
CARDFUNCTION3:"COMBINEFUNCTION" "All Up" 3 0 1 2


That doesn't seem hard at all to make one function call another.  This doesn't add any complexity to the interface at all and I honestly see no reason why it couldn't be added.

moselekm

To play the devil's advocate.  Time is time.  Code = Lots of time, no matter what.  Or how small it is.

And Trevor isn't exactly doing this for anything but pure satisfaction of making a small group of people happy.  I am sure he has to do other things to keep his life afloat.  Like college or work.  Or both.  So honestly.  If it's not something several games would use, it has no point in being added in Lackey.  Not until Trevor gets more support at least.  Financially speaking.

BUT this is all assumptions.

innuendo

I agree, but the reason he said he wouldn't add it isn't because "it's going to take too much time" but because "it would add too much to the interface"

I was providing an easy solution to the problem he said he had with the initial suggestion.

VladShadeu

Okay, to Trevor, yes, I understand that I'm just one person... okayy.... thanks for the help...

As to innuendo, cool idea, yeah, functions calling functions would work pretty well, but it ain't my code so I don't have a say.

Quote from: moselekm on July 04, 2010, 01:55:53 PM
To play the devil's advocate.  Time is time.  Code = Lots of time, no matter what.  Or how small it is.
So honestly.  If it's not something several games would use, it has no point in being added in Lackey.

Devil's advocate TO THE devil's advocate  8) :
YuGiOh: Flipping cards from face down defence into face up attack, which is used fairly frequently if I remember that far back
Magic and others: Rolling the dice to see who goes first and drawing your opening cards, nice time saving opening feature, also, you could untap all and draw at the same time. And, although it would be kinda small and pointless, it could shave a few seconds off of lifelink.

Trevor

I see that there is utility in the ability to combine functions. In many cases, I think it would be a bad choice. For example, someone suggested combining shuffle+draw as a single function. The problem is, you would still need a "just shuffle" and "just draw" functions. So adding and additional function, which can be don with other methods, is going to clutter up the interface. Why not make a function to draw a shuffle and draw 2 cards? Why not make a function to shuffle and draw 3 cards? You need to stop that sort of thinking before your GUI explodes and is unusable. I could implement the ability and TRUST that pluton makers will adhere to good design practices, but I fear many people would abuse combination functions, to the detriment of all players. So I am leaning towards simply not giving people the opportunity to make so bad choices, and unfortunately the RARE time combination functions are warranted people will have to be slightly inconvenienced.

I actually think I will eventually make it an option, but for the immediate future, I have much more important things to fix and implement. Thank you for the suggestion. It gave me some ideas on how I will design plugin format 3.0.

VladShadeu

Well yeah Trev, I was acknowledging that it would be a really bad idea sometimes, but there are quite a few plugins that are almost WRITTEN around those multi functions. But yeah, like I said, you got better stuff to do. Thanks for listening and for making Lackey such a great resource!  ;D ! See I'm a good little suck up lol...  ;D

Just Mick

Quote from: Trevor on July 05, 2010, 12:10:09 AM
I see that there is utility in the ability to combine functions. In many cases, I think it would be a bad choice. For example, someone suggested combining shuffle+draw as a single function. The problem is, you would still need a "just shuffle" and "just draw" functions. So adding and additional function, which can be don with other methods, is going to clutter up the interface. Why not make a function to draw a shuffle and draw 2 cards? Why not make a function to shuffle and draw 3 cards? You need to stop that sort of thinking before your GUI explodes and is unusable. I could implement the ability and TRUST that pluton makers will adhere to good design practices, but I fear many people would abuse combination functions, to the detriment of all players. So I am leaning towards simply not giving people the opportunity to make so bad choices, and unfortunately the RARE time combination functions are warranted people will have to be slightly inconvenienced.

I actually think I will eventually make it an option, but for the immediate future, I have much more important things to fix and implement. Thank you for the suggestion. It gave me some ideas on how I will design plugin format 3.0.

What about the little macro buttons like Draw6/Draw7/Draw8 and so on... would it not be easy to let a button be able to do series of commands in a row? Then let players add whatever they need. I could see problems if you need more than just 2 flavors of counters (ie. Red/Green) but for all I know that is just a a limitation/feature of a given plugin.

Design wise you don't want to start combining stuff, but a macro makes perfect sense. Also very very much I would like to be able to bind keys to the macros... so I can hit a key to do "in response" for example. Because I can't exactly hover over the "in response" button because the mouse is needed to preview what cards are being played (if you're like me and don't know every card by name etc.)