User talk:Aichon: Difference between revisions

From The Urban Dead Wiki
Jump to navigationJump to search
Line 160: Line 160:
::::Here is one way. Write a if template that assigns a 1 if a status is true and a 0 otherwise. For a given building type in a suburb, stack the templates left to right so the final output is a binary number. For example, if a suburb has 4 hospitals, you would have four status templates (tied to Danger) in a row, the output might be something like 0110. I have a series of counters (up to 10 bit) that you would send that string to get the final count for a suburb (it would return a 2 for the above example). See [[User:MHSstaff/Projects/Counters|here for the counter templates]].-[[MHS|<span style="color: Black">'''MHS'''</span>]][[User_Talk:MHSstaff|<span style="color: DarkBlue">'''staff'''</span>]] 20:25, 14 August 2012 (BST)
::::Here is one way. Write a if template that assigns a 1 if a status is true and a 0 otherwise. For a given building type in a suburb, stack the templates left to right so the final output is a binary number. For example, if a suburb has 4 hospitals, you would have four status templates (tied to Danger) in a row, the output might be something like 0110. I have a series of counters (up to 10 bit) that you would send that string to get the final count for a suburb (it would return a 2 for the above example). See [[User:MHSstaff/Projects/Counters|here for the counter templates]].-[[MHS|<span style="color: Black">'''MHS'''</span>]][[User_Talk:MHSstaff|<span style="color: DarkBlue">'''staff'''</span>]] 20:25, 14 August 2012 (BST)
:::::I wouldn't refer to that as binary, since, while it is 0s and 1s, it's simply a group of digits, rather than a binary representation of a number (i.e. in your example, if that were binary, it would mean that 6 hospitals were intact out of the 4 in the suburb :P). Anyway, I believe there are some ways that your code could be significantly condensed for these purposes if we change the way it works a bit (e.g. simply have it return the next value in the sequence if it's given a 1, and hard-code it with values for 0-98), which is the sort of thing I had in mind when I made my earlier comment, but even so, we'd need something akin to a 60- or 70-bit counter for every single suburb, then multiply that by the number of different status types. Yours only goes as high as 10-bit, unfortunately. You can see why I have reservations about suggesting that it's even possible. {{User:Aichon/Signature}} 20:42, 14 August 2012 (BST)
:::::I wouldn't refer to that as binary, since, while it is 0s and 1s, it's simply a group of digits, rather than a binary representation of a number (i.e. in your example, if that were binary, it would mean that 6 hospitals were intact out of the 4 in the suburb :P). Anyway, I believe there are some ways that your code could be significantly condensed for these purposes if we change the way it works a bit (e.g. simply have it return the next value in the sequence if it's given a 1, and hard-code it with values for 0-98), which is the sort of thing I had in mind when I made my earlier comment, but even so, we'd need something akin to a 60- or 70-bit counter for every single suburb, then multiply that by the number of different status types. Yours only goes as high as 10-bit, unfortunately. You can see why I have reservations about suggesting that it's even possible. {{User:Aichon/Signature}} 20:42, 14 August 2012 (BST)
::::::Yeah, the scale gets out of hand with this. When I made the counters, my thought was to have a map for each resource (hospital, NT, Police, etc), and then color each suburb based on the results of the counters using the danger reports. Different shades of pink for example (light to dark) for decreasing intact hospital infrastructure for example.-[[MHS|<span style="color: Black">'''MHS'''</span>]][[User_Talk:MHSstaff|<span style="color: DarkBlue">'''staff'''</span>]] 20:50, 14 August 2012 (BST)
::::That map is going to look pretty sweet when finished. Nice job.-[[MHS|<span style="color: Black">'''MHS'''</span>]][[User_Talk:MHSstaff|<span style="color: DarkBlue">'''staff'''</span>]] 20:35, 14 August 2012 (BST)
::::That map is going to look pretty sweet when finished. Nice job.-[[MHS|<span style="color: Black">'''MHS'''</span>]][[User_Talk:MHSstaff|<span style="color: DarkBlue">'''staff'''</span>]] 20:35, 14 August 2012 (BST)



Revision as of 19:50, 14 August 2012

Aichon:Talk
Aichon
ˈīˌkän :Talk