Talk:Gene Modification
From SOTS
| Description: | Allows you to genetically modify the characteristics of your colonists to improve population growth on alien worlds. |
|---|---|
| Research Category: | BioTechnology |
| Research Cost: | Research Points |
| Required Technology: | None |
| Races Allowed: | Hiver, Human, Liir, Morrigi, Tarka, Zuul |
| Effect: | Increases population growth rate. |
| Notes: | |
| Version: | This information valid for |
| New Technologies Available | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Technology | Research Cost | Chance of Availability | |||||||||
| Hiver | Human | Liir
| Tarka
| ||||||||
| Atmospheric Adaptation | 16,000 | 100 | 100 | 100
| 100
| ||||||
| Plague | 35,000 | 100 | 100 | 100
| 100
| ||||||
| Suspended Animation | 4,000 | 100 | 90 | 100
| 90
| ||||||
Deemed ready. Please roll out as and when you can :)
--silvaril 09:38, 21 March 2007 (PDT)
So here I've taken the template bits I learned doing the Ship Section template and applied it to the Technology templates.
examples deleted
The "Blank=" was in there to try and test which bits of whitespace accumulated in the previous column rather than being cleaned up by the same code which cleans up empty rows.
The reason that the table fields aren't being aligned is that each column being skipped because that race does not have that section is placing a blank in the preceding column.
Thus the research cost has 3–4 blanks, one for each skipped column, being appended to it by the following #if statements.
--silvaril 14:00, 20 March 2007 (PDT)
New, Improved Waking Up, Now with Shower and Coffee...
The additional white space is caused by <CR/LF> additions to the previous column by #if statements that return nothing instead of data.
It seems the cleanup code is not sufficiently recursive, despite having a number of ways to insert such space in Wiki-code.
The first couple of <CR/LF> get cleaned up, but the code then seems to assume that further <CR/LF> are desirable white space and so lets them through.
The last good idea I had last night was to include "Blank=" into the template so that I didn't have to save it with every modification I wanted to make, but could just run tests on attempts to cancel the <CR/LF> by previewing the page multiple times... :)
So what I need is some method of telling Wiki to NOT add a <CR/LF> and return that in "Blank="
Going to work now, back much later...
--silvaril 15:13, 20 March 2007 (PDT)
- Writer2 got around a similar whitespace issue with the leadsto template by using the Template:Nl. Check out the Template talk:Leadsto page to see the discussion. I'm going to try and add the nulls to the if statements and see if that helps. If not, I'm thinking that having a dynamic race name column might be more trouble than it's worth. I don't mind inputting zeros for the races that don't get a particular tech. But I still like the modular tech and chances rows. It's easier to make column additions to this template. Looking at the leadsto template and knowing that we need to add the Zuul column to all that makes me cringe. :) --Nspace 15:39, 20 March 2007 (PDT)
- Well, that worked mostly. There still is an issue that I haven't figured out yet with the vertical spacing as you can see above. There is still a single <CR/LF> being added to the last filled in column to the left of the first empty column. I'm still thinking that we could skip the dynamic race name column and be fine. --Nspace 16:07, 20 March 2007 (PDT)
And valign=top to the rescue ;)
Ta muchly for the added cerebral input and work!!
Just gonna poke the template to see what falls out...
example deleted
--silvaril 23:52, 20 March 2007 (PDT)
And if the altogether template is used:
example deleted
So is this more what you had in mind NSpace?
--silvaril 00:41, 21 March 2007 (PDT)
- :) No, I was thinking of not using the # if statements at all in the Template:Techleadsraces (now Template:Technology) and Template:Techandchances, but still using the Template:Techleadsraces (now Template:Technology) and Template:Techandchances because I like how easy they are to modify. But you got the alignment issues worked out, which was my biggest reason for not using the # if statements. The few other reasons I wouldn't use the # if statements are just my personal preferences and they wouldn't make any difference in displaying or editing for the end user. Anyway, I like it. :) --Nspace 09:03, 21 March 2007 (PDT)

