LackeyCCG

LackeyCCG Forum => Plugins & Plugin Creation Forum => Topic started by: Tigt on November 07, 2013, 09:17:34 PM

Title: Creating a checkerboard battlefield
Post by: Tigt on November 07, 2013, 09:17:34 PM
Hello, I'm creating a CCG that uses a battlefield delineated into squares, where the cards move around on, much like a chessboard.

I messed with the Gridsize definition for the plugin info, but the game will allow multiple cards on each square (say attaching a card to another), so fine control of movement is important.

So I'm now attempting to just have the background image of the table provide the gridlines, but given how the table scales depending on the user's screen and how they adjust the panels, I'm unsure how to go about doing that. Do you have some insight on how to best gridify the table, Trevor?

The initial test is 10x10 rectangular cells, but it would be ideal if users could swap out battlefields by using the Lackey appearance options.
Title: Re: Creating a checkerboard battlefield
Post by: Trevor on November 07, 2013, 11:26:46 PM
The table should show the piece on the right tiled in a way consistent to all viewers.
Title: Re: Creating a checkerboard battlefield
Post by: Tigt on November 10, 2013, 01:50:57 PM
Does that work for non-symmetrical playing fields?
Title: Re: Creating a checkerboard battlefield
Post by: Trevor on November 10, 2013, 03:28:41 PM
It should.

Note that there is an option in the appearance preferences to make your table playmat always face you, or always face the person in seat 1. (There is also the option at the plugin level to have all players on the same side of the table.)

If you have your own playmat, you might want it to always face you so you don't see it upside-down if you are not on the side of seat 1. If you have a playmat that you want to be more realistic (i.e., everyone sees it in the same place, regardless of where you're sitting), you would want to have that always face the person in seat 1.
Title: Re: Creating a checkerboard battlefield
Post by: Tigt on November 11, 2013, 12:56:12 PM
Man, you've got this on lock. One last question: is there a way to easily share playmats/battlefields via Lackey, like the soundshare feature or similar?
Title: Re: Creating a checkerboard battlefield
Post by: Trevor on November 12, 2013, 02:40:11 PM
Quote from: Tigt on November 11, 2013, 12:56:12 PM
Man, you've got this on lock. One last question: is there a way to easily share playmats/battlefields via Lackey, like the soundshare feature or similar?
/playmatsync
or just
/ps
for short.
Title: Re: Creating a checkerboard battlefield
Post by: Tigt on November 14, 2013, 10:03:33 PM
Alright, I lied about that being the last question. Is there a way to force the text label of a card to appear over it, even if there is an image in place? I'm using random images just for easy identification purposes, but in early playtesting the card text changes so often I'd rather just have the Lackey text info float over the zoomed-in card than making those changes in both the file and an image editor every time.
Title: Re: Creating a checkerboard battlefield
Post by: Gordon228 on November 14, 2013, 10:08:36 PM
there should be an option in the appearance section of preferences i think. Not sure if that is the right place where it would be but i do know it's in preferences.
Title: Re: Creating a checkerboard battlefield
Post by: Trundel on November 28, 2013, 08:19:27 AM
Quote from: Trevor on November 10, 2013, 03:28:41 PM
(There is also the option at the plugin level to have all players on the same side of the table.)

I've been looking without success for this option in the plugin tutorial. Can anyone point me in the right direction? I've been forcing my son to view the map upside down!
Title: Re: Creating a checkerboard battlefield
Post by: Tigt on January 08, 2014, 07:05:02 PM
Trundel's question was answered in another thread, but just for any future readers wondering the same question, the definition he wanted is:
<definition><kind>SITONSAMESIDE</kind><value>yes</value></definition>

I figured I'd use this topic again instead of making a new one, so pardon me if that's a bad idea.

Orientation of cards has ended up being an important part of gameplay, and I was wondering if there was some way to make a card rotate +90 degrees, instead of having four different buttons that set it to 0/90/180/270 orientations. Is there some sort of definition list that comes with the LackeyCCG installation? It seems this forum uncovers loads of features that aren't listed on the main site tutorials.

As a result of this, the double click function to tap/untap isn't quite as useful as it is with normal games. Is there a way to remap that? Say, to add 90 degrees every double click, or maybe to grey out/un-grey out the card to mark it as "exhausted?"
Title: Re: Creating a checkerboard battlefield
Post by: Trevor on January 08, 2014, 08:29:03 PM
Currently if a plugin defines a 90, a 180, or a 270, it changes what a double click does. If I recall, a double-click cycles through all of the rotations that a plugin defines. So if 2 are defined, its a toggle. At present, you can't explicitly define a double-click to be associated with a certain function, but that's a good idea to implement.
Title: Re: Creating a checkerboard battlefield
Post by: Tigt on January 12, 2014, 10:23:57 PM
Gotcha. I can get the behavior we want by defining all four states, then.

Is there an escape character for the plugininfo files? Or should I use alt codes?
Title: Re: Creating a checkerboard battlefield
Post by: Trevor on January 13, 2014, 03:04:49 AM
Quote from: Tigt on January 12, 2014, 10:23:57 PM
Gotcha. I can get the behavior we want by defining all four states, then.

Is there an escape character for the plugininfo files? Or should I use alt codes?

If you just have 0 and 180, it will toggle between those.

Not sure what you mean by escape characters and alt codes.
Title: Re: Creating a checkerboard battlefield
Post by: Tigt on January 13, 2014, 06:43:28 AM
I'm trying to save space by using ^ > v < for the buttons that would change card orientation, but using < and > will usually cause parsing errors in varieties of xml, which I assume plugininfo counts as.

EDIT: As it turns out, < and > do not cause parsing errors in plugininfo.txt.
Title: Re: Creating a checkerboard battlefield
Post by: Tigt on January 15, 2014, 02:34:04 PM
In this endeavor I found that Lackey trying to load plugininfo.txt when the txt file is encoded as UTF will cause it to choke and die.

You probably have no intention of supporting unusual symbols beyond the ASCII standard, but I thought you might want to know in order to have it show an error message instead of just crashing.
Title: Re: Creating a checkerboard battlefield
Post by: Tigt on January 15, 2014, 08:19:04 PM
Just ran into an interesting bug while testing this. Any idea what's going on, Trevor?

Screenshot of the problem (http://i.imgur.com/NQ3f973.png) -- Those little yellow things are some cards. The later the game progressed, the tinier they got.

EDIT: The bug happened on LackeyCCG 10-19-13, Mac OSX 10.6.8

Game log:
Your WAN IP is 208.102.214.1.
Your WAN IP is 208.102.214.1.
You are hosting a proxy game, so you must remain connected to the server.
Tigt loads a deck.
Tigt plays Firefighter from his Hand. (Hand: 0)
Tigt moves Firefighter from the table to the top of his Hand. (Hand: 1)
->Received request for images/avatars/SkullAvatarTwitterTransparent.png from Eldred.

Tigt sets everyone's table playmat to TCDTCG.jpg.
->Received request for images/backgrounds/TCDTCG.jpg from Eldred.
images/backgrounds/TCDTCG.jpg

Eldred loads a deck.
Tigt plays Firefighter from his Hand. (Hand: 0)
Eldred: time to see how much I suck at deckbuilding for this
Tigt: I have a feeling we BOTH do
Eldred plays Watergunner from his Hand. (Hand: 0)
Tigt draws 7 cards.
Eldred: alright idk if it's just me but this grid is too small on my screen
Tigt: futz with zoom and scale then
Tigt: scale shrinks the cards
Tigt: zoom shrinks everything
Tigt sets everyone's table scale to 57%.
Tigt sets everyone's table zoom to 105%.
Tigt: how's that
Tigt: it works for me
Eldred: hmm
Eldred: cards are still bigger than the grid boxes on my screen, where do I find scale/zoom?
Tigt: the + button on top
Tigt: press that for viewport options
Eldred: ahh
Eldred: well that's better
Eldred shuffles Eldred's Deck.
Eldred draws a card. (Deck: 55, Hand: 1)
Eldred draws a card. (Deck: 55, Hand: 2)
Eldred draws a card. (Deck: 55, Hand: 3)
Eldred draws a card. (Deck: 55, Hand: 4)
Eldred draws a card. (Deck: 55, Hand: 5)
Eldred draws a card. (Deck: 55, Hand: 6)
Eldred draws a card. (Deck: 55, Hand: 7)
Eldred: safe to say I will mulligan this
Tigt: yeah this is just a playtest so
Tigt: mulligan away
Eldred moves a card from his Hand to the bottom of his Deck. (Hand: 0, Deck: 55)
Eldred moves a card from his Hand to the bottom of his Deck. (Hand: 0, Deck: 55)
Eldred moves a card from his Hand to the bottom of his Deck. (Hand: 0, Deck: 55)
Eldred moves a card from his Hand to the bottom of his Deck. (Hand: 0, Deck: 55)
Eldred moves a card from his Hand to the bottom of his Deck. (Hand: 0, Deck: 55)
Eldred moves a card from his Hand to the bottom of his Deck. (Hand: 0, Deck: 55)
Eldred moves a card from his Hand to the bottom of his Deck. (Hand: 0, Deck: 55)
Eldred shuffles Eldred's Deck.
Eldred draws a card. (Deck: 55, Hand: 1)
Eldred draws a card. (Deck: 55, Hand: 2)
Eldred draws a card. (Deck: 55, Hand: 3)
Eldred draws a card. (Deck: 55, Hand: 4)
Eldred draws a card. (Deck: 55, Hand: 5)
Eldred draws a card. (Deck: 55, Hand: 6)
Eldred draws a card. (Deck: 55, Hand: 7)
Eldred moves a card from his Hand to the top of his Deck. (Hand: 0, Deck: 56)
Eldred moves a card from his Hand to the top of his Deck. (Hand: 0, Deck: 57)
Eldred moves a card from his Hand to the top of his Deck. (Hand: 0, Deck: 58)
Eldred moves a card from his Hand to the top of his Deck. (Hand: 0, Deck: 59)
Eldred moves a card from his Hand to the top of his Deck. (Hand: 0, Deck: 60)
Eldred moves a card from his Hand to the top of his Deck. (Hand: 0, Deck: 61)
Eldred moves a card from his Hand to the top of his Deck. (Hand: 0, Deck: 62)
Eldred shuffles Eldred's Deck.
Eldred draws a card. (Deck: 55, Hand: 1)
Eldred draws a card. (Deck: 55, Hand: 2)
Eldred draws a card. (Deck: 55, Hand: 3)
Eldred draws a card. (Deck: 55, Hand: 4)
Eldred draws a card. (Deck: 55, Hand: 5)
Eldred draws a card. (Deck: 55, Hand: 6)
Eldred draws a card. (Deck: 55, Hand: 7)
Eldred: that's better
Tigt randomly chooses a player: Tigt
Tigt: I guess I go first
Tigt changes the phase: Ready -> Go
Tigt plays Basic Drive from his Hand. (Hand: 6)
Tigt performs > on Firefighter.
Tigt performs v on Firefighter.
Tigt performs < on Firefighter.
Tigt performs ^ on Firefighter.
Tigt: you can doubleclick a card to get it to cycle through orientations
Tigt: just fyi
Eldred performs > on Watergunner.
Eldred performs ^ on Watergunner.
Eldred performs v on Watergunner.
Eldred performs ^ on Watergunner.
Eldred: neat
Tigt changes the phase: Go -> End
Tigt advances the turn. Current Turn: #1, Eldred's turn.
Eldred draws a card. (Deck: 54, Hand: 8)
Eldred advances the phase: Ready -> Go
Eldred plays Basic Drive from his Hand. (Hand: 7)
Eldred: oh wait I was upposed to have 8 cards at the start, I forgot
Tigt: you were yes
Eldred draws a card. (Deck: 53, Hand: 8)
Tigt: mtg reflexes
Eldred: yep
Eldred: also I think screwing with scale made the cards weird because your guy shrunk when you moved him
Eldred: and the drives are tiny
Tigt: huh
Tigt: well thank god for mouseover
Tigt: oh also there are some visual preferences you might want to update
Eldred performs < on Watergunner.
Eldred: hm
Eldred advances the phase: Go -> End
Eldred advances the turn.  Current Turn: #2, Tigt's turn.
Eldred: like what?
Tigt: Always show text over card image viewer
Eldred: oh yeah I did that
Tigt: alright you should be fine then
Tigt: so are you just
Tigt: facing left
Tigt: then
Eldred: sure, I guess
Tigt: okay
Tigt changes the phase: Ready -> Set
Tigt draws a card. (Deck: 52, Hand: 7)
Tigt changes the phase: Set -> Go
Tigt plays Basic Drive from his Hand. (Hand: 6)
Tigt makes Basic Drive face down.
Tigt makes Basic Drive face down.
Eldred: huh
Tigt makes Basic Drive face up.
Tigt makes Basic Drive face up.
Tigt: my bad
Tigt: okay
Tigt performs Exhaust (0 to 1) (+1) on Firefighter.
Tigt plays a face down card from his Hand. (Hand: 5)
Eldred: and I can exhaust my guy for drive too, is that still a thing?
Eldred: I'm guessing that's what you did
Tigt: oh no I think uh
Tigt: that exhausting is how you "enter combat"
Eldred: ah okay
Tigt: so you'll need to ready for a flurry of moves
Tigt: so yeah, flip a card over first, and then move it from your hand
Eldred: right
Eldred plays a face down card from his Hand. (Hand: 7)
Tigt: you can bluff by putting down a noncombat or whatever
Tigt makes Sidewinder Salamander face up.
Tigt makes Whirlpool Watusi face up.
Eldred makes Whirlpool Watusi face down.
Eldred: whoops
Eldred makes Whirlpool Watusi face up.
Tigt performs Exhaust (0 to 1) (+1) on Basic Drive.
Tigt performs Exhaust (0 to 1) (+1) on Basic Drive.
Eldred performs Exhaust (0 to 1) (+1) on Basic Drive.
Tigt: so you're moving out of range, then?
Eldred: yeah
Tigt: seems legit
Tigt moves Sidewinder Salamander from the table to the top of his Dump. (Dump: 1)
Eldred moves Whirlpool Watusi from the table to the top of his Dump. (Dump: 1)
Eldred: wait
Tigt: sup
Eldred: I don't keep a dodge like I would a block if successful, do I? Just making sure
Eldred: I assume not
Eldred: like, I mean it doesn't go back to my hand
Tigt: right
Eldred: okay
Eldred: alright so, that's your turn then?
Tigt: yeah I had to replace my mouse battery
Tigt: okay
Eldred: ah
Tigt changes the phase: Go -> End
Eldred: wasn't sure if you stepped out
Eldred advances the turn.  Current Turn: #3, Eldred's turn.
Eldred performs Exhaust (1 to 2) (+1) on Basic Drive.
Eldred: wait
Tigt: heh
Eldred: how do I unexhaust
Tigt: Ready
Eldred performs Blue-1 (2 to 1) (-1) on Basic Drive.
Eldred performs Blue-1 (1 to 0) (-1) on Basic Drive.
Eldred: of course
Eldred advances the phase: Ready -> Set
Tigt: I have yet to figure out how to do Ready All
Eldred draws a card. (Deck: 52, Hand: 8)
Eldred plays Basic Drive from his Hand. (Hand: 7)
Eldred advances the phase: Set -> Go
Eldred performs Exhaust (0 to 1) (+1) on Basic Drive.
Eldred performs Exhaust (0 to 1) (+1) on Basic Drive.
Eldred plays Watery Form from his Hand. (Hand: 6)
Eldred: these cards are getting tinier as I play more
Tigt: that's definitely weird
Eldred: that one is literally one pixel
Tigt: try adjusting your zoom?
Tigt sets everyone's table scale to 57%.
Eldred: this i s bizarre
Tigt sets everyone's table zoom to 108%.
Eldred: well my dude is growing but the other cards are staying the same size?
Tigt: so your own controls don't do anything?
Eldred: I mean that the zoom only apparently affects the size of that one card
Eldred: well wait no
Eldred: okay but it's still a lot bigger than the other cards no matter what I do with zoom/scale
Tigt: put in your hand and then back
Eldred moves Watergunner from the table to the bottom of his Hand. (Hand: 7)
Eldred plays Watergunner from his Hand. (Hand: 6)
Eldred: okay that
Eldred: worked somehow
Eldred moves Basic Drive from the table to the bottom of his Hand. (Hand: 7)
Eldred moves Basic Drive from the table to his Hand. (Hand: 8)
Eldred moves Watery Form from the table to his Hand. (Hand: 9)
Eldred plays Watery Form from his Hand. (Hand: 6)
Eldred plays Basic Drive from his Hand. (Hand: 6)
Eldred plays Basic Drive from his Hand. (Hand: 6)
Eldred: that was a bad idea with the other ones though
Eldred: they got smaller
Eldred: I literally cannot see Watery Form anymore
Tigt: hm.
Tigt: take a screenshot and send it to me
Tigt: I'll send a bug report
Eldred: alright gimme a sec to upload the cap
You have saved the game chat log to plugins/TCDTCG/logs/save.txt