Template talk:FakeSquare

From Ravenblack CityWiki

Jump to: navigation, search

The comments about the creation of the template were moved here from another talk page.


Same looking square screenshots

It could be done. Faking Screenshots by editing HTML, empty squares, same width/height, same browser. Good idea? --Cliff Burton Marco 17:42, 3 April 2012 (CEST)

Interesting idea! I see several alternatives to "true" game screenshots. One is (as you suggest) arranged screenshots of a HTML mockup of the game view. Another one that just struck me would be a wiki template which creates a table replicating the game view, with style et cetera. The hurdle in both cases would be the input. The building name, usually four visible street addresses, but sometimes visible city limits. Still it could be done. I think your idea is more practical, and therefore better. --deCarnac 18:06, 3 April 2012 (CEST)
Your idea is even better. Because... this way one can use the template (to be created) to change on sight. There are much more benefits using the template. It is independent from the fake screenshot creator, it looks the same on all browsers, it even looks the same for those who look at the wiki article, as well as the in-game look. Most people use the same browser for those two sites, I assume. --Cliff Burton Marco 23:59, 3 April 2012 (CEST)

Type, (Name), Streetname, Streetnumber, (Overcrowded), (Inhabitant)

{{Template:FakeSquare|type=pub|name=The Moon over Orion|street=Dogwood|number=78th|inhabitant=Cliff Burton}} --Cliff Burton Marco 23:59, 3 April 2012 (CEST)

In order to render the surrounding squares (with street signs) based on only one address, the template code (or perhaps a .js file used by it) would have to hold a complete streetname database to lookup the other street in. An alternative is to provide the two streetnames and the two streetnumbers explicitly:
Parameters: StreetnameWest, StreetnumberNorth, StreetnameEast, StreetnumberSouth, (Type), (Name), (Overcrowded), (Inhabitant)
Example: {{Template:FakeSquare|Dogwood|78th|Eagle|79th|type=pub|name=The Moon over Orion|inhabitant=Cliff Burton}}
Here, the first four arguments basically are the streetcorners NW and SE of the location. Unnamed for compactness, they can be retreived as {{{1}}} to {{{4}}}. Combining them will form all surrounding street signs. A parsing check of the street arguments can be made, looking for "City Limits" and rendering the proper squares as such. --deCarnac 13:48, 4 April 2012 (CEST)
You are right. Automagic is nice, but it costs so much more time. --Cliff Burton Marco 22:47, 4 April 2012 (CEST)
Naturally, I couldn't resist looking into the game html code and do some research for a template... If you like, I perhaps can create it in the days to come. Would you go with Template:FakeSquare or give it another name? I like "Fake" as it is very descriptive, and the result will show one game square surrounded by eight others. Alternative suggestions are "FakeScreenshot", "FakeBuildingLook", "FakeGameLook" or "FakeGameview". --deCarnac 16:09, 4 April 2012 (CEST)
If you are already prepared, I won't stop you from doing it. FakeSquare is it, I'd say. No one other than us will probably know what was the starter for it, which is to fake screenshots. --Cliff Burton Marco 22:47, 4 April 2012 (CEST)
WTF, I didn't notice that you already went almost the whole way. And excellent you went. Great stuff. That will help a lot making the wiki pages look more consistent. *thumbs up* --Cliff Burton Marco 22:54, 4 April 2012 (CEST)
Incredible! Unglaublich! If you like we could move the discussion about the creation of {{FakeSquare}} to it's talk page. Linked from here maybe. Thanks, buddy. I can't wait to clean up the first articles. Starting soon. --Cliff Burton Marco 02:07, 5 April 2012 (CEST)

Possible modifications

It struck me that the result may be a bit big. It could be shrunk a bit by reducing the table width from 450px, while changing the table font-size from "small" to a specific, lower value. Experimented at home with a tiny version of width 300px and font-size 9px, but that has a higher risk of becoming messy from long names. --deCarnac 09:45, 5 April 2012 (CEST)

Okay, no I have to give my mother a call to ask her if I have a twin that was given up for adoption. I had thought about that, too. But as you put so much time in it, I wouldn't dare to ask you. Yet. :D What we/you could try would be, to use percentage as size, based on the default 450px wide size. Could that work? --Cliff Burton Marco 12:57, 5 April 2012 (CEST)

Useful MediaWiki Extensions

I just implemented the two suggested Extensions. As there are no Exceptions thrown anymore, I assume it all works as you predicted :) I am sorry that I can not delve into it as much as I would right now. But you have my blessing in experimenting with the add ons. I am regularly looking over the recent changes in the wikilog. --Cliff Burton Marco 18:21, 4 June 2012 (CEST)

About the recent modifications

The recently implemented modifications (that uses the extensions Marco just installed) have reduced the street input to just the "SE of" address. The other streets (that previously had to be input manually) are now found automatically by matching the street name and number towards the template's arrays of valid street names. It then basically picks the next in line (index+1). The "number streets" are handled by the code exactly like the named streets since it was easier than converting strings/numbers back and forth and removing/adding order suffixes (st, nd, rd, th).

Error handling: If the street isn't recognized, the found array index is empty. The code adds +1 to that, and outputs the array's element 1 which is an error message. If the last streets i.e. those along the eastern or southern city limits are input, the array's trailing element (another error message) is output. Note that the first element (element 0) in each array is empty.

Since this template is intended to stand in for images, the float option was built in as well to make it easy to place neatly on the page. --deCarnacT·C 20:58, 4 June 2012 (CEST)

Personal tools