From StrategyWiki, the video game walkthrough and strategy guide wiki
Jump to navigation Jump to search

Grid Lines[edit]

Shouldn't these tables have grid lines? It's often hard to which lines up with which (especially with the isms for the later games). --Notmyhandle 19:12, 8 January 2007 (CST)

I was hoping that I might be able to do some magic with the templates, where they automatically alternated between white and gray backgrounds, but variables can't be maintained between template usage (they aren't static). There are two solutions, neither of which are very elegant. One is to add grid lines, but I find them visually distracting. The other is to alternate each of the moves between two templates, one with a white background, and the other with a gray, but that requires drastic revisions to the existing lists. I'll have to look in to other possibilities. I'd like to be able to improve all of the move lists by making one single change to the templates, that's why I created them. I'm just having trouble finding a good way to do it. Procyon 19:26, 8 January 2007 (CST)
Yeah I understand. I didn't notice it wasn't a table until I went to add stuff. --Notmyhandle 19:46, 8 January 2007 (CST)
No, it actually is a table. The move header template starts the table, and the move footer template ends it. That's the only reason why the move footer template is required. Procyon 19:51, 8 January 2007 (CST)
Might I suggest an optional |color= parameter? -- Prod (Talk) 20:10, 8 January 2007 (CST)
That would be another way to go about it, but that would still require a massive amount of revising. Prod, maybe you would know if it's possible to do what I was thinking of. I wanted to have a flag that the template could read. If it was 0, the background would be white, and that instance of the template would set the flag to 1. Then when the next template was invoked, it would read the flag and see that it was a 1, so the background would be gray, and that instance would set the flag back to 0, and so on. If that were possible, no revising would be necessary. But it doesn't seem like variables can be used statically throughout a page for the templates to use :( Frankly, I'm not even sure that you can make variable assignments in wiki. Procyon 20:19, 8 January 2007 (CST)
Well, I do know that you can pass information (like passing the url truncation string to the url parameter in my url experiment yesterday), but reading it is another thing. --Notmyhandle 20:27, 8 January 2007 (CST)
They're stack variables, Notmyhandle, not static variables. I'm afraid I don't think what you're aiming for is possible without installing some heavyweight wikisyntax plugins, which I don't think we should do. Sorry, Procyon. :-( --DrBob (Talk) 00:26, 9 January 2007 (CST)
Even if they're stack, they exist for longer than a moment. They COULD be used if there was a way to use them, since there's no if, else, etc. commands; a.k.a. not a programming language. Too bad we can't use PHP on here otherwise I'd take care of business. KAPOW KYAAAH! --Notmyhandle 00:39, 9 January 2007 (CST)
Actually, there are if, else, and switch (case) statements, it's just that they only operate on variables sent into the template. If the templates can be used recursively, you could call each successive template as part of the previous one, but that would make a mess :P. -- Prod (Talk) 10:28, 9 January 2007 (CST)
You could give recursion a go, but it would probably end in tears. --DrBob (Talk) 11:02, 9 January 2007 (CST)
Well look, we set a flag in the main template (the start of the table) that says 0 right? Then we just have the if statements within the special move template that determines 0 or 1 and applies the correct color. Doesn't seem so hard... --Notmyhandle 12:43, 9 January 2007 (CST)