Talk:Clothing: Difference between revisions

From The Cataclysm: Dark Days Ahead Wiki
Jump to navigation Jump to search
(cleared all the outdated entries and added a new one)
Line 10: Line 10:
--[[User:Kenoxite|Kenoxite]] ([[User talk:Kenoxite|talk]]) 01:09, 6 June 2013 (PDT)
--[[User:Kenoxite|Kenoxite]] ([[User talk:Kenoxite|talk]]) 01:09, 6 June 2013 (PDT)


== New parameters for existing and new entries ==
== Whole section updated to 0.8 ==


Due to the new way things are calculated and new parameters found in armor.json, this whole page should be revised and new items correctly inputted from now on.
This and all the related pages have been finally updated to the information found in the armor.json file from v0.8.


Bash and cut protection isn't defined in the items themselves, but they're calculated based on their material composition and thickness.
The item lists are now easier to update. You just have to embed the item page in the desired list.


There's also a new "coverage" parameter.
I've also moved all the sections to their respective pages, while providing a new sidebar (and a links list in this same page, below) to access them. This is done to reduce the usual server load created by this page, which with this last update has grown even bigger.


=== For the entries on this page ===
Thanks to [[user:‎Grizzlyadamz]] for all the help.


'''Examples'''
--[[User:Kenoxite|Kenoxite]] ([[User talk:Kenoxite|talk]]) 06:33, 6 October 2013 (PDT)
 
Socks should be updated from this:
<nowiki>{{row/{{PAGENAME}}|socks|70|100|C_SHOES|COTTON|null|1|1|-5|0|0|0|0|0|10|0|mfb(bp_feet)
|"Socks. Put 'em on your feet."}}</nowiki>
 
to this (notice the new coverage and thickness parameters):
<nowiki>{{row/{{PAGENAME}}|socks|70|100|C_SHOES|COTTON|null|1|1|-5|0|0|0|0|0|10|0|mfb(bp_feet)
|"Socks. Put 'em on your feet."|coverage=80|thickness=1}}</nowiki>
 
Although they aren't used anymore, the old bash and cut protection values can be left as is. In any case, if you don't want them to be theredelete their values, but don't delete the parameters themselves.
 
I mean, you can do this (notice the protection values are deleted and being left empty):
<nowiki>{{row/{{PAGENAME}}|socks|70|100|C_SHOES|COTTON|null|1|1|-5|0|0|||0|10|0|mfb(bp_feet)
|"Socks. Put 'em on your feet."|coverage=80|thickness=1}}</nowiki>
 
'''but do not do this''' (notice the protection parameters have been totally removed):
<nowiki>{{row/{{PAGENAME}}|socks|70|100|C_SHOES|COTTON|null|1|1|-5|0|0|0|10|0|mfb(bp_feet)
|"Socks. Put 'em on your feet."|coverage=80|thickness=1}}</nowiki>
 
All this is because of the way the row template is reading the parameters. Instead of using named ones (such as the new thickness and coverage) it relies on the position they are passed. If you remove them, then the count is altered, and any parameter after them will be read wrong. This is legacy from the old Whales wiki, from which this page was originally ported, tweaked and expanded upon. Eventually, this will be streamlined one way or another (if anybody is up for it, go ahead!) but, as of now, that's the way we must do things, as confusing as they might be.
 
=== For the standalone item pages ===
These parameters aren't needed anymore (as they're auto-calculated based on materials and thickness): bashprotect, cutprotect
 
And these are needed now: thickness, coverage
 
As before, you can leave the bashprotect and cutprotect parameters there, but they won't be used. Unlike the row entries, here you are free to delete them if you want to.
 
See [[kevlar vest]], [[leather jacket]] and [[flotation vest]] for examples.
 
--[[User:Kenoxite|Kenoxite]] ([[User talk:Kenoxite|talk]]) 05:08, 1 October 2013 (PDT)
 
== Row entries now use named parameters ==
 
That's it. No more "Is that 0 for encumbrance or for EP? Did I put that in the wrong place?". Each parameter is now named, so you can clearly see what is what when updating or adding new entries. This also means that you could place the parameters in any order you want without breaking the internet.
 
I've had to deal with regular expressions for this, using Notepad++ built-in regex search/replace tool.
 
 
Below there's the regular expressions I used, for future reference and as a guide when updating other tables from section that also need this. For anybody else, remember to update both the page AND the row template with the new parameters.
 
For entries with hints, search for:
 
<code>^(\{\{row\/\{\{PAGENAME\}\}\|)(.*?\|)(.*?\|)(.*?\|)(.*?\|)(.*?\|)(.*?\|)(.*?\|)(.*?\|)(.*?\|)(.*?\|)(.*?\|)(.*?\|)(.*?\|)(.*?\|)(.*?\|)(.*?\|)(.*?)\r\n^(\|)"(.*?)"(.*?\{\{hint\|.*?\}\})</code>
 
And for those without hints, search for:
 
<code>^(\{\{row\/\{\{PAGENAME\}\}\|)(.*?\|)(.*?\|)(.*?\|)(.*?\|)(.*?\|)(.*?\|)(.*?\|)(.*?\|)(.*?\|)(.*?\|)(.*?\|)(.*?\|)(.*?\|)(.*?\|)(.*?\|)(.*?\|)(.*?)\r\n^(\|)"(.*?)"</code>
 
Replace in both cases with:
 
<code>\1name=\2rarity=\3price=\4color=\5mat1=\6mat2=\7volume=\8weight=\9bashdmg=${10}tohit=${11}encumbrance=${12}enviprotect=${15}warmth=${16}storage=${17}cover=${18}</code>
 
 
Finally, a normal replace (no regex) to add missing parameters with default values.
 
Search for:
 
<code>)}}</code>
 
and replace with:
 
<code>)|coverage=0|thickness=1}}</code>
 
--[[User:Kenoxite|Kenoxite]] ([[User talk:Kenoxite|talk]]) 04:12, 3 October 2013 (PDT)

Revision as of 13:33, 6 October 2013

Power armor section

The original description was written as if someone like this guy was explaining this whole power armor thing to grunts. Seeing that this was clearly military gear created used by military personnel I thought it was both fitting and fun. It was intended to be both humorous and informative.

But first after the removal of the hints, that helped expand and clarify the tone and purpose of this whole joke and now with the latest rewrite, I don't think this section works anymore. The tone is all over the place and the humorous intent is diluted and extremely unclear, which leads to even more confusion.

TBH I rather have the whole text in the power armor description section streamlined with the rest of the wiki (so, aseptic and purely descriptive) than what we have now.

EDIT: I just wanted to clarify that this is nothing personal, neither from my part nor towards KA101's edit. I just was trying to explain why I think it worked before and IMO it doesn't now. And, as I said, I think the better course of action would be to simply streamline this section "for the greater good" and to simplify further edits.

--Kenoxite (talk) 01:09, 6 June 2013 (PDT)

Whole section updated to 0.8

This and all the related pages have been finally updated to the information found in the armor.json file from v0.8.

The item lists are now easier to update. You just have to embed the item page in the desired list.

I've also moved all the sections to their respective pages, while providing a new sidebar (and a links list in this same page, below) to access them. This is done to reduce the usual server load created by this page, which with this last update has grown even bigger.

Thanks to user:‎Grizzlyadamz for all the help.

--Kenoxite (talk) 06:33, 6 October 2013 (PDT)