Updated various templates

Post any bugs, problems or feature requests here.
Mercury
Mercury
Brend
Brend

Updated various templates

Post Mercury » Mon Jun 04, 2012 10:32 pm
User avatar
Mercury
Storyteller
 
Updated various templates, two bugs posted on Brends user page at his request.

The following templates are now up to date:

  • Character
  • Race
  • System
  • Star
  • Star Class
  • Planet
  • Planet Type
  • Moon
  • Moon Type
  • Climate
  • Special Option
  • Technology
  • Faction
  • Union Member
  • Super Power
Post Brend » Tue Jun 05, 2012 12:34 am
User avatar
Brend
 
Thanks for the bug reports.

"We need a better way to get the page id then [[]] as this doesn't work for links that use the pagename" This is because you can't just write wiki syntax inside wiki syntax. And that's what you tried there. [[]] is really just a link to the current page (try it yourself, it's not special -- heck, it's not even in a plugin O_o).

The templates don't work by manipulating wiki source and replacing strings. Each @@something@@ is actually a distinct piece of wiki syntax, and these can not be nested in links. (The fact that they work in headers is because templates use special template-headers.)

What you want can only be done with string manipulation, and this is something that's just not available yet. Implementing this is on the todo list, but with a low priority -- the same goes for manipulating internal wiki links into the template (e.g. a ic:{faction}_bookkeeping link).


"Inline if statements in templates don't work, but to make an if inside a table cell you cannot add a newline." I know that if statements don't work in tables -- this is forced on me by the way dokuwiki handles tables. But what I don't understand is the 'inline' in the 'inline if'? Maybe you have some expectations that I did not anticipate... Please elaborate =)
Post Mercury » Tue Jun 05, 2012 9:34 pm
User avatar
Mercury
Storyteller
 
For example:

| Skills | @@Skills@@ <if bananenplukker>en @@bananenplukker@@</if> |

or

The skills of this character are @@Skills@@ <if bananenplukker>en @@bananenplukker@@</if> but they can actually do much more.
Post Brend » Tue Jun 05, 2012 11:58 pm
User avatar
Brend
 
Ah yes. This is a bit of an issue with the wiki -- a piece of syntax is either block, or inline.

As it is, the if is a block element, because this is the only way other elements are allowed inside it (such as a table). Since two pieces of syntax can not be the same, there would be a conflict between the block and inline if syntax. Because of this, no inline if has been added yet.

I will put an inline 'if' element on the todo list; but it will have a different syntax out of necessity.
Post Brend » Wed Jun 06, 2012 4:50 pm
User avatar
Brend
 
While working on something else I noticed that the table cel with the [D, T] links is too large, forcing the other cell (the on with the player or controller data) to be too small. This is basically because the rest of the table contains a key,value pairs (the key column is small).

I haven't thought up a way to remedy this issue; I would really like to keep the [D, T] links...
Post Mercury » Wed Jun 06, 2012 6:21 pm
User avatar
Mercury
Storyteller
 
Can we right-align them without putting them in a table at all?

Also, there are still some templates to sort out, but these are beyond my expertise, requiring strange nesting and such (ex: Jedi). How do we handle these?
Post Brend » Wed Jun 06, 2012 10:36 pm
User avatar
Brend
 
Leave those to me -- I like fixing them up.
Post Brend » Thu Jun 07, 2012 2:49 pm
User avatar
Brend
 
As part of the template update, I will be updateing all zone entries and all population segments.

Zone entries finished :)

Population finished :)

Now for some explanation: I've added a 'On_ref' field to all zones and population that is actually on a defined planet. This will help us later on, as we start creating more automated tooling.
Post Brend » Thu Jun 07, 2012 5:58 pm
User avatar
Brend
 
I've updated all templates except the jedi character ones. I will get to those before the end of the turn.

I've also added a trade template. Use it by prefixing an exclamation mark (i.e. '!') in front of the 'trade' in <data trade #name of trade> entries.
Post Brend » Sat Jun 09, 2012 3:07 pm
User avatar
Brend
 
The jedi templates have been converted.

Because we have a new data plugin, some things can be done with less work. I've already changed everyones force level+attributes entry.

There is another thing you could change on your jedi page to make things simpler later on. If you see a 'Character_ref: name' just replace the name with "[[]]". For example: "Character_ref: Shebi Ajava" becomes "Character_ref: [[]]"

Return to Technical

cron