News:

A forum for users of LackeyCCG

Main Menu

Help Needed...

Started by Orange-kun, June 28, 2011, 01:07:04 PM

Previous topic - Next topic

Orange-kun

HELP....

So I've been working on a plugin. I made all the spreadsheet files required and they're in .xlsx format. When I saved them as tab delimited text using Microsoft Excel, I always face problem. For example, card names would mysteriously get surrounded by "". Same for Rules Text. In some cases, there won't be any tabs between points which ought to have tabs between them. @_@

I'm using windows 7 and Microsoft Excel 2010. Any help/advice would be appreciated.

Orange-kun

Sorry for the double post, but it seems I found a way to fix the problem for the most part. Simply clicking on the spreadsheet, pressing Ctrl+A, then Ctrl+C, and pasting it into a text file seems to make it work.

The problem that persists is the one related to line breaks in the cells of the "Rules Text' column. For example, if a card's Rules Text is:
Power Attacker +4000

Double Breaker


Such a cell ends up leading to the creation of another creature "Double Breaker", even though Double Breaker was meant to be part of the rules text. Any way to work around this, or will I have to edit all the databases? @_@

Cyrus

I'd suggest avoiding line breaks in general in your spreadsheets. Not sure if that's a 100% rule, but I know that whenever I've left breaks in I've had to edit them out later.

Saethori

#3
Using an excel program and saving as tab-delimited text is really the best way to go about it. Cases of areas which "should have tabs but don't" is a purely visual issue, because in usual text, tabbing simply moves to preset intervals rather than moving a fixed distance, so it's possible for it to simply go one space and look like it's missing.

As for the excess quotation mark problem... not much to be done about that from the Excel side, so I always just go into the text files with Notepad and find-replace of all "s with nothing.

Of course, when done with these, it's always good to load up Lackey and see if the files show up in there all right.

Orange-kun

#4
Ah thanks. Removed the linebreaks, loaded the databases. There were some errors but I fixed them.

I only have one problem now.

There are 3 zones in the plugin I'm working on. Basically, its a plugin made by some1 else but its outdated, and I heavily edited it. This problem is there in the original plugin too.

The 3 zones are Deck, Hand and Graveyard. Turn Over is a necessary function because it lets us turn over and view some cards when its needed in the game (duelmasters), because most of the time, there are cards present facedown in the shieldzone (which i keep part of the main table. Making a separate zone for it wouldn't have been neat, and this works pretty well). and so their identity isn't known.

If you turn over a card present on the field, the opponent is alerted. But it so happens that we can also turn over cards present in the Deck, but I notice that opponent isn't alerted when this happens. Nothing is typed on the chat window. I was wondering how to make it so that opponent is notified when card is turned over in deck zone. Any help is appreciated.

Here's the plugin.info code:

PLUGINVERSION:"1.0"

SUPERZONE0:"Deck" 0 0

ZONE0:"Hand" 1 0
ZONE1:"Deck" 0 0
ZONE2:"Graveyard" 1 1

PHASE0:"Start"
PHASE1:"Draw"
PHASE2:"Mana"
PHASE3:"Summon"
PHASE4:"Attack"
PHASE5:"End"

GENERALFUNCTION0:"ALLYOURCARDSMAKERIGHT0DEGREES" "Untap All" 1
GENERALFUNCTION1:"DRAWCARD" "Draw" 1
GENERALFUNCTION2:"PREVIOUSPHASE" "Previous Phase" 0
GENERALFUNCTION3:"NEXTPHASE" "Next Phase" 0
GENERALFUNCTION4:"TRANSFERCARD" "Shield" 0 -1 1 T -2 1 D
GENERALFUNCTION5:"ROLLD6" "Roll D6" 1
GENERALFUNCTION6:"SPAWNCARD" "Spawn Card" 0
GENERALFUNCTION7:"NEXTTURN" "Next Turn" 0
GENERALFUNCTION8:"ROLLD20" "RollD20" 0
GENERALFUNCTION9:"ALLYOURCARDSMAKERIGHT90DEGREES" "TapAll" 0
GENERALFUNCTION10:"FLIPCOIN" "Flip Coin" 0

CARDFUNCTION0:"MAKERIGHT0DEGREES" "Untap" 1
CARDFUNCTION1:"MAKERIGHT90DEGREES" "Tap" 1
CARDFUNCTION2:"REMOVECOUNTERGREEN" "Green-1" 1
CARDFUNCTION3:"ADDCOUNTERGREEN" "Green+1" 1 .9 .04
CARDFUNCTION4:"REMOVECOUNTERRED" "Red-1" 1
CARDFUNCTION5:"ADDCOUNTERRED" "Red+1" 1 .7 .04
CARDFUNCTION6:"EDITNOTE" "Edit Note" 1 .4 .95
CARDFUNCTION7:"TURNOVER" "Turn Over" 0
CARDFUNCTION8:"TOGGLETURNALLIMMUNITY" "Doesn't Untap" 0
CARDFUNCTION9:"CHANGEOWNER" "Take Control" 0
CARDFUNCTION10:"CLEARCARD" "Clear" 1

COLUMN0:"Name" 1
COLUMN1:"Set" 1
COLUMN2:"ImageFile" 0
COLUMN3:"Civilization" 1
COLUMN4:"Type" 1
COLUMN5:"Race" 1
COLUMN6:"Cost" 1
COLUMN7:"Power" 1
COLUMN8:"Rules Text" 1
COLUMN9:"Flavor Text" 1
COLUMN10:"Rarity" 1
COLUMN11:"Collector Number" 1
COLUMN12:"Artist" 1


ISYOURFACEDOWNVISIBLE:"no"

CARDBACK0:"cardback"




EDIT: Doesn't seem to be the deck alone. Performing Turn Over in any zone [other than the main... table?] doesn't create a text alert in chat window.


Orange-kun

poke poke


Is this something coded wrong in the plugin.info or is this a lackey bug?

Saethori

It shouldn't be possible to flip cards in a deck unless that deck were shown to the person flipping them, so I'm not entirely sure where the problem lies. I do see that it doesn't create a text alert... but at the same time, under what circumstances would flipping cards not in play actually matter?

On an unrelated note, it's probably best to make Rules Text the last text field for cards, as that tends to get the longest...

Orange-kun

The stuff after the rules text doesn't matter for the game, so I arranged it after the rules text in the list.

And about flipping cards not in play not being important... that would be a problem. Cards in deck don't turn over in the conventional method, but when i click turn over and bring mouse over the card, I can see its image at the place in the screen where card images are shown... although the card APPEARS as still upside down in the deck.

Basically, this allows people to play in a way where they know what they're going to draw next.

Also, even if it doesn't matter for the game, I think I really need the Turn Over function such that it creates appropriate text notifications no matter which zone the card is turned over at (e.g it just says a card was turned over in a zone X where zone X isn't supposed to be visible to opp., and card Y was turned over in zone Z where Z would be a zone visible to opp.)

So perhaps I could try requesting for this card function if this isn't how the current Turn Over works.