v50 Steam/Premium information for editors
  • v50 information can now be added to pages in the main namespace. v0.47 information can still be found in the DF2014 namespace. See here for more details on the new versioning policy.
  • Use this page to report any issues related to the migration.
This notice may be cached—the current version can be found here.

Editing Talk:Main Page/Quote/archive1

Jump to navigation Jump to search

Warning: You are not logged in.
Your IP address will be recorded in this page's edit history.


The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.

Latest revision Your text
Line 94: Line 94:
 
:I can't find any recent changes to the code of the selector, and given that the first selector works, it's hard to blame a syntax error either.  The mainpage does a weird thing to guarantee the quotes are different, passing |1 to the page as a parameter or...something.  Someone who knows wikicode may know what's going on. --[[User:Corona688|Corona688]] 15:13, 20 November 2008 (EST)
 
:I can't find any recent changes to the code of the selector, and given that the first selector works, it's hard to blame a syntax error either.  The mainpage does a weird thing to guarantee the quotes are different, passing |1 to the page as a parameter or...something.  Someone who knows wikicode may know what's going on. --[[User:Corona688|Corona688]] 15:13, 20 November 2008 (EST)
  
::The problem is a bit deeper. {{tl|rand}} and {{tl|rand2}} use the mod function inside a #expr to mod the current timestamp and return a number in a specified range. The mod function is returning negative values for large inputs (this is a bug). Since it seems I can't guarantee a positive number will have a positive mod, I don't know how to modify the templates to make sure they keep returning positive numbers. <br><br>Smaller inputs would be nice, but I need it to vary with time, and those are the ones that are blowing it up. Also, I don't have absolute value or any binary number operations, so those methods are out. Absolute value would be available with a newer version of parser functions, but convincing [[user:senso|Senso]] is an obstacle there. I'm really not sure how to remedy this. Anyone have ideas? [[User:VengefulDonut|VengefulDonut]] 19:43, 20 November 2008 (EST)
+
::The problem is a bit deeper. [[template:rand]] and [[template:rand2]] use the mod function inside a #expr to mod the current timestamp and return a number in a specified range. The mod function is returning negative values for large inputs (this is a bug). Since it seems I can't guarantee a positive number will have a positive mod, I don't know how to modify the templates to make sure they keep returning positive numbers. <br><br>Smaller inputs would be nice, but I need it to vary with time, and those are the ones that are blowing it up. Also, I don't have absolute value or any binary number operations, so those methods are out. Absolute value would be available with a newer version of parser functions, but convincing [[user:senso|Senso]] is an obstacle there. I'm really not sure how to remedy this. Anyone have ideas? [[User:VengefulDonut|VengefulDonut]] 19:43, 20 November 2008 (EST)
  
 
::: I say divide the end result before modulusing by 4. That'll still give pseudo-random numbers, just less often, and might work until a better fix rears its not-so-ugly head. --[[User:GreyMario|GreyMaria]] 20:12, 20 November 2008 (EST)
 
::: I say divide the end result before modulusing by 4. That'll still give pseudo-random numbers, just less often, and might work until a better fix rears its not-so-ugly head. --[[User:GreyMario|GreyMaria]] 20:12, 20 November 2008 (EST)

Please note that all contributions to Dwarf Fortress Wiki are considered to be released under the GFDL & MIT (see Dwarf Fortress Wiki:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!

Please sign comments with ~~~~

To protect the wiki against automated edit spam, we kindly ask you to solve the following CAPTCHA:

Cancel Editing help (opens in new window)

Templates used on this page: