10.xhtml 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <!--
  3. h t t :: / / t /
  4. h t t :: // // t //
  5. h ttttt ttttt ppppp sssss // // y y sssss ttttt //
  6. hhhh t t p p s // // y y s t //
  7. h hh t t ppppp sssss // // yyyyy sssss t //
  8. h h t t p s :: / / y .. s t .. /
  9. h h t t p sssss :: / / yyyyy .. sssss t .. /
  10. <https://y.st./>
  11. Copyright © 2017 Alex Yst <mailto:copyright@y.st>
  12. This program is free software: you can redistribute it and/or modify
  13. it under the terms of the GNU General Public License as published by
  14. the Free Software Foundation, either version 3 of the License, or
  15. (at your option) any later version.
  16. This program is distributed in the hope that it will be useful,
  17. but WITHOUT ANY WARRANTY; without even the implied warranty of
  18. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  19. GNU General Public License for more details.
  20. You should have received a copy of the GNU General Public License
  21. along with this program. If not, see <https://www.gnu.org./licenses/>.
  22. -->
  23. <!DOCTYPE html>
  24. <html xmlns="http://www.w3.org/1999/xhtml">
  25. <head>
  26. <base href="https://y.st./en/weblog/2017/06-June/10.xhtml" />
  27. <title>So many ideas, so little time to implement them &lt;https://y.st./en/weblog/2017/06-June/10.xhtml&gt;</title>
  28. <link rel="icon" type="image/png" href="/link/CC_BY-SA_4.0/y.st./icon.png" />
  29. <link rel="stylesheet" type="text/css" href="/link/basic.css" />
  30. <link rel="stylesheet" type="text/css" href="/link/site-specific.css" />
  31. <script type="text/javascript" src="/script/javascript.js" />
  32. <meta name="viewport" content="width=device-width" />
  33. </head>
  34. <body>
  35. <nav>
  36. <p>
  37. <a href="/en/">Home</a> |
  38. <a href="/en/a/about.xhtml">About</a> |
  39. <a href="/en/a/contact.xhtml">Contact</a> |
  40. <a href="/a/canary.txt">Canary</a> |
  41. <a href="/en/URI_research/"><abbr title="Uniform Resource Identifier">URI</abbr> research</a> |
  42. <a href="/en/opinion/">Opinions</a> |
  43. <a href="/en/coursework/">Coursework</a> |
  44. <a href="/en/law/">Law</a> |
  45. <a href="/en/a/links.xhtml">Links</a> |
  46. <a href="/en/weblog/2017/06-June/10.xhtml.asc">{this page}.asc</a>
  47. </p>
  48. <hr/>
  49. <p>
  50. Weblog index:
  51. <a href="/en/weblog/"><abbr title="American Standard Code for Information Interchange">ASCII</abbr> calendars</a> |
  52. <a href="/en/weblog/index_ol_ascending.xhtml">Ascending list</a> |
  53. <a href="/en/weblog/index_ol_descending.xhtml">Descending list</a>
  54. </p>
  55. <hr/>
  56. <p>
  57. Jump to entry:
  58. <a href="/en/weblog/2015/03-March/07.xhtml">&lt;&lt;First</a>
  59. <a rel="prev" href="/en/weblog/2017/06-June/09.xhtml">&lt;Previous</a>
  60. <a rel="next" href="/en/weblog/2017/06-June/11.xhtml">Next&gt;</a>
  61. <a href="/en/weblog/latest.xhtml">Latest&gt;&gt;</a>
  62. </p>
  63. <hr/>
  64. </nav>
  65. <header>
  66. <h1>So many ideas, so little time to implement them</h1>
  67. <p>Day 00826: Saturday, 2017 June 10</p>
  68. </header>
  69. <section id="general">
  70. <h2>General news</h2>
  71. <p>
  72. My mother and I planned to meet up today and tomorrow, but it looks like they changed their plans on me.
  73. No worries though, I woke up too early and am kind of tired, anyway.
  74. </p>
  75. <p>
  76. I considered adding support in <code>minequest</code> for nodes that drop absolutely nothing.
  77. There are strange chests in <code>glooptest</code> that are spawned during mapgen, but when harvested, drop nothing.
  78. Being able to see how many of these chests you&apos;d found would be nice.
  79. However, when I coded up the beginnings of support for this kind of stat tracking, I saw the only things tracked in Minetest Game were both kinds of fire and all bad crops.
  80. So ... while miners get their success tracked, the main thing tracked for above-ground players would be their farming failures.
  81. As for fire, putting out permanent flames is no accomplishment.
  82. I suppose acting as a firefighter and putting out the other type of fire could be positive, but it&apos;d be better to just not start those kinds of fires.
  83. Anyway, this doesn&apos;t bode well for arbitrary-drop-list-length support.
  84. Now, in addition to having a complete inability to reliably display such drops on the stats page, I need to deal with the fact that zero-item drops are usually not a positive thing to track.
  85. My new, compact design doesn&apos;t fit well with arbitrarily-long lists of items, either.
  86. Worry for space was already a concern before I crunched everything together.
  87. </p>
  88. <p>
  89. While messing around between coding things, I found an item-duplication bug.
  90. If you dig the node under a grass node, two grass items fall instead of one.
  91. I thought it was a bug in Minetest.
  92. The only mods I had running was <code>minestats</code> and a mod I put random debugging code in, neither of which should introduce that sort of thing.
  93. I disabled them both to be sure though.
  94. I was wrong!
  95. <code>minestats</code> was doing it!
  96. Ugh.
  97. It seems that when the node supporting an attached node, such as grass or a torch, is removed, the <code>minetest.get_node_drops()</code> function is called on the attached node.
  98. However, there&apos;s no digger, so <code>minetest.handle_node_drops()</code> is never called.
  99. In <code>minetest.get_node_drops()</code>, I set an extra key containing the dug node&apos;s name to be used by <code>minetest.handle_node_drops()</code>, then <code>minetest.handle_node_drops()</code> removes it.
  100. This allows me to get ahold of the node name, the drops, and the player object all at once, as there&apos;s no callbacks that actually allow me to have all this information at once.
  101. I found a way to pull off what I need though.
  102. I added a space and a zero to the end of the node name when adding it to the drops.
  103. That way, Minetest will interpret it as an empty stack while my code can simply ignore the quantity.
  104. </p>
  105. <p>
  106. I had a flash of inspiration as to how to add some surface elements to <code>minestats</code> in an otherwise vanilla instance of Minetest Game.
  107. What if dropped nodes are irrelevant?
  108. What if a counted mineral can be acquired even if the node drops it along with other nodes?
  109. This has two implications.
  110. First, it would allow farm crops to be countable when they drop their crop as opposed to their seed, even if they drop the seed also.
  111. Second, as the drop counted isn&apos;t the full drop of the node, it begs the question of if the dug node is even relevant.
  112. Should I merge the counts of dropped items dropped by different nodes?
  113. Should I count a drop of three of the same item as the same as three drops of one of that same item?
  114. Logic tells me yes.
  115. My passion tells me no.
  116. I like having the node display by the drop in the menu.
  117. If the node is unknown or if multiple nodes have that same drop, I can&apos;t have that any more.
  118. Even more so, I don&apos;t like the idea that when a node drops a variable number of something, the numbers should simply be added together.
  119. I like knowing not only how many of the item I&apos;ve collected, but also home many of the node I&apos;ve dug and at what frequency I get each number of drops.
  120. But is keeping that separated out inconsistent with counting only part of the drop to begin with?
  121. I&apos;m not sure.
  122. I programmed the beginnings of support for the itemised version of this, and it spammed the stats page with various cotton and wheat plant stages.
  123. Two plants, multiplied by eight stages, multiplied by two drop levels (one or two of the crop).
  124. That&apos;s thirty-two of what is basically only two plants.
  125. It seems quite a bit excessive, and yet, each one of those nodes is important for game play to farmers.
  126. In other words, the problem is in my mod, not <code>farming</code>.
  127. In the case of farming, I don&apos;t mind merging the drops.
  128. Farm plants are renewable, which means what I care about is the total number acquired, not where they came from.
  129. On the other hand, minerals are <strong>*not*</strong> renewable, so I care about drop rates.
  130. If there&apos;s only so much of the material, I want to know exactly how much I&apos;m getting gypped!
  131. Furthermore, if I merge the drops and ignore what node they come from, there are only two farming drops and eight mineral drops in Minetest Game.
  132. Honestly, <code>minestats</code> is still skewed in favour of miners.
  133. </p>
  134. <p>
  135. I ran out of time to program, but I did a lot of thinking about <code>minestats</code> today.
  136. I came to a realisation: it&apos;s no wonder I&apos;ve been failing to find a way to capture surface nodes to log.
  137. There are three main sets of nodes.
  138. There are the nodes underground.
  139. These nodes are often finite in quantity, but with how large the underground is, there&apos;s plenty of them.
  140. Then, there&apos;s the renewable surface nodes.
  141. These nodes can be created in mass, but it takes time.
  142. Rarest of all, we have the finite surface nodes.
  143. Most people think these are the most common nodes, but they&apos;re only on the surface and the surface is so thin.
  144. For the most part, these nodes just get moved around, not used up, though you could waste desert stone to make stone picks or something.
  145. Anyway, this second type of node, the renewable surface nodes, typically take the form of plants.
  146. A key part of their renewability though is the fact that they leave behind something that can be placed in the world, something that will change into several nodes, which will once again leave behind something so the cycle can continue.
  147. I&apos;ve been ruling out nodes that drop more nodes.
  148. Anti-node-dropping is anti-renewal though!
  149. I don&apos;t need to detect against node-dropping or multi-item-dropping, I just need to detect in favour of craft-item-dropping.
  150. It&apos;s worth noting though that while this allows me to log farm plants, it puts the logging of saplings and seeds so far out of reach that it&apos;s not even worth continuing to attempt to log them at all.
  151. Farm plants will have to be enough.
  152. </p>
  153. <p>
  154. I started in my mind reevaluating the way I classified nodes for consideration.
  155. When I use the term &quot;mineral&quot; in Minetest, I&apos;m not referring to metals and stones.
  156. I&apos;m referring to nodes that drop a single craft item instead of themselves.
  157. I just call them minerals because most of them represent things you&apos;d actually call minerals in the real world.
  158. I came up with two new terms to describe the phenomenons I was now trying to measure.
  159. First are the hybrid minerals.
  160. These drop not only the craft item that a true mineral would drop, but also a node.
  161. The craft item should be logged and the node ignored.
  162. Second, we have the compound minerals.
  163. These minerals drop multiple craft items.
  164. Each can be logged separately, though we don&apos;t have a good way to measure them as a single drop just yet.
  165. Later in the day, I realised that compound minerals were just a subclass of hybrid minerals, just mixed with other minerals and not a regular node.
  166. </p>
  167. <p>
  168. I&apos;ve been planning to put plants on a separate page if I could figure out how to log them for as long as I&apos;ve been trying to include plants at all.
  169. Additionally, as I&apos;ll have to leave the node data out for the plants, they won&apos;t fit the format for the minerals page.
  170. The only way to include them is to either leave off the nodes for all logged items or put the plants elsewhere.
  171. It&apos;s far too cool having the mineral nodes display, so I&apos;m not removing that feature.
  172. At this point, my main motivation for continuing to try to log plant-harvesting has been to try to balance the mod and make it less biased against surface-dwellers.
  173. I&apos;m a complete mole, but not everyone is.
  174. Now that I&apos;m so close, I started thinking about what I&apos;m going to do about the separate menu pages.
  175. If I make the starting page, before switching, be the mineral page, it makes the plants seem less important.
  176. I don&apos;t want to make the plants seem like second-class harvestables though.
  177. If I do the reverse, I make the minerals seem less important.
  178. What to I do for fair treatment?
  179. I found a solution though.
  180. When choosing the stats tab, the page automatically chosen to start at will be determined by the player&apos;s elevation.
  181. When underground, the mineral page will be the default.
  182. When near or above the surface, plants will take precedence.
  183. Additionally, I thought about the inclusion of node data for minerals but not plants.
  184. Is that fair?
  185. Game-play-wise, it makes sense.
  186. The default game defines eight different plant nodes for each of the two crops.
  187. Logging all that separately will result in a stats page people won&apos;t enjoy because it looks far too itemised and redundant.
  188. However, can we justify this in a way that isn&apos;t specific to Minetest Game; a way that is subgame-agnostic?
  189. It turns out we can!
  190. The mineral nodes only drop one thing, so we can see a direct conversion from one state to another.
  191. However, with the plants, part of the plant becomes the crop and another becomes the seed.
  192. We can&apos;t see which part becomes which, so we can&apos;t separate it out.
  193. We can&apos;t show a before state, as we don&apos;t know the before state of the pure item, not entangle with the other item.
  194. We don&apos;t have to keep them itemised either, as the pure before state of each is probably the same, but the node is different because the crop is mixed with something else, so it looks different.
  195. In the case of plants, it&apos;s mixed with a different stage of the organism.
  196. I think I&apos;ve found the true purpose of <code>minestats</code>: to log the dropping of non-nodes when digging nodes.
  197. With this more clear goal in mind, I think I&apos;ll end up with better results than I&apos;ve been getting.
  198. </p>
  199. <p>
  200. With the problems of <code>minestats</code> seemingly solved, I turned my attention to <code>minequest</code>.
  201. Now, I had four plants to choose from in addition to the eight minerals.
  202. Do I make <code>minequest</code> default to use plants for some bonus slots?
  203. That seems like a good idea.
  204. But which minerals do I remove from the default line-up?
  205. Or do I have more than eight bonus slots?
  206. Do I have two slots for each plant, as each plant can drop either one or two of its crop, so there are two stats for each?
  207. While it would balance out the bonus slots by having half be for surface nodes and half for subterranean nodes, I decided against this plan. It might&apos;ve worked for the original design of <code>minequest</code>, but in its current, more dynamic state, it would result in two slots with the same available bonuses.
  208. That&apos;s needlessly boring.
  209. Should I randomise the default slots, using all available minerals and mineral hybrids, based on the world seed?
  210. At first, I liked this idea.
  211. It seemed to remove the hard-coded connection between <code>minequest</code> and Minetest Game, but that was only a ruse.
  212. <code>minequest</code> has to add the default bonuses for the items from Minetest Game, so it&apos;s already got to be hard-coded to know about minerals from it.
  213. The default bonus slots should therefore actually be thought out.
  214. I decided the likely minerals to leave out will be flint and gold.
  215. Just like having multiple bonus slots that take the same bonus-giving items would be boring, flint and gold have the least amount of bonus options, so they&apos;re the least fun.
  216. </p>
  217. <p>
  218. I thought about the bonus items wheat and cotton would have at their disposal.
  219. Wheat is kind of limited, but it&apos;s got a few option.
  220. Cotton though, can be crafted into a multitude of coloured wools (as wool comes from cotton in Minetest, not animals).
  221. Each colour would do something different.
  222. After a bit though, I realised that cotton would only have access to the white wool node.
  223. The other colours of wool are crafted using group-based craft recipes.
  224. <code>minequest</code> ignores those.
  225. Originally, this was a bug, but it became a feature later.
  226. I left out group compatibility in the craft-chain-detection because I didn&apos;t like the idea that a bonus item might be crafted without the mineral that powers its bonus.
  227. For example, a vessel shelf is crafted from six wood and three vessels, vessels being items in the <code>vessel</code> group.
  228. Vessels can be made from steel, but they can also be instead made from glass.
  229. If the shelf is made without steel, why should it work with the iron bonus slot?
  230. Since it&apos;s not possible to tell which items were made with or without iron, only those that <strong>*could have been*</strong>, the way to play it safe would be to disable this group-based detection.
  231. But now, giving options for surface-dwellers seemed to depend on adding group support.
  232. I thought about it more, and came to a conclusion I&apos;d missed before.
  233. Group-based recipes are dynamic, but the logic behind ignoring them doesn&apos;t make sense.
  234. Someone could define two recipes for crafting a single item; one that includes a mineral and one that doesn&apos;t.
  235. Unless I&apos;m going to rule out those items too, it makes no sense to ignore group-based crafting.
  236. Like with the <code>lapis</code> mod and gravel treatment, consistency dictates that I must add this feature.
  237. </p>
  238. <p>
  239. I&apos;ll probably have almost no time to code any of this tomorrow, but maybe I&apos;ll get a chunk of it done the next day.
  240. </p>
  241. <p>
  242. The purple-veined dandelions I got at the food giveaway yesterday looked like they wouldn&apos;t keep too long, so I sliced them up to use in soup.
  243. What&apos;s the proper way to prepare dandelion?
  244. I have no idea, and I didn&apos;t look it up; I just boild them with everything else.
  245. I also sliced up the rest of my green onions, as they looked like they would be spoiled beyond th epoint of usability soon.
  246. I&apos;d originally planned to use the kale for the soup instead of dandelions, but the kale looks like it has quite a bit of shelf life.
  247. I have so many carrots right now, so I chopped some up and threw them in too.
  248. Most of them are carrots I bought myself, and after visiting the food place, I kind of with I&apos;d waited for carrots.
  249. I threw in nutritional yeast, bullion, soy milk, water, rice, and fake meat ...
  250. I hoped it&apos;d come out well.
  251. It didn&apos;t.
  252. This soup is outright nasty.
  253. It&apos;s only the dandelions themselves that are so horrid though; the rest of the soup&apos;s perfectly fine.
  254. I&apos;m convinced that either I don&apos;t like dandelions (I can&apos;t remember ever eating them before) or I&apos;ve prepared them completely wrong.
  255. In any case, I don&apos;t plan to get dandelions again any time soon.
  256. After work, I added almost a full bottle of oregano, some fake cheese that I&apos;d planned to use for sandwiches, more nutritional yeast, and some lemon dill seasoning, all in hopes of making this soup more tolerable by drowning out the dandelions.
  257. I refused to just throw the soup away; I&apos;m going to eat it no matter what it takes to get it down.
  258. I&apos;m kind of sad to lose that fake cheese though, I almost never buy that stuff, and can&apos;t really afford to buy more now.
  259. Thankfully, I was able to make the soup decent.
  260. The dandelions are no longer so terrible, so ... bitter, I guess would be the best way I can describe them.
  261. I think the oregano was the most likely to be the key.
  262. I&apos;m not a big user of spices usually though, so if I need to keep a pantry full of oregano to make dandelions edible, I shouldn&apos;t keep dandelions in my refrigerator.
  263. </p>
  264. <p>
  265. I may or may not have mentioned it, but I got ahold of a bed frame a while back.
  266. It&apos;s one of those small, collapsible, metal frames with the wheels.
  267. I think it&apos;s only twin-sized though, and without the bed slats, the thing&apos;s useless for now.
  268. I&apos;ve repeatedly stepped on it over the past month or so, and every time, it hurts.
  269. I try to avoid it, but sometimes I forget.
  270. Today, I managed to gouge my heel pretty good on it though.
  271. Up until today, I hadn&apos;t actually injured myself.
  272. I&apos;ve left the bed frame where it&apos;s been out of lack of another place to put it, but now, I made sure to <strong>*find*</strong> a place to put it.
  273. It&apos;s not the best place, but I&apos;ve stashed it, upright, in the closet with the water heater.
  274. </p>
  275. <p>
  276. My <a href="/a/canary.txt">canary</a> still sings the tune of freedom and transparency.
  277. </p>
  278. </section>
  279. <section id="dreams">
  280. <h2>Dream journal</h2>
  281. <p>
  282. I dreamed I was sitting on my bike, with my bike locked to a bike rack.
  283. I forget what I was doing, but I wasn&apos;t planning on moving any time soon.
  284. A thief ran up with a pair of bolt cutters, asked if I minded if they stole my bike, and cut the lock.
  285. They seemed to think their presence would either scare me away or startle me off my bike so they could take it, and when it didn&apos;t, they ran off without the bike to steal other things.
  286. Instead, I was mostly shocked, so I stayed put for a few moments while I took in the scene.
  287. Looking around, there were several thieves, all part of the same group, taking anything that wasn&apos;t nailed down.
  288. I was afraid, but also defensive of my bike, and glad I didn&apos;t leave it unattended.
  289. With nothing binding the bike to the rack any more, I rode the bike away as quickly as I could, frequently checking behind me to see if I was being pursued.
  290. I wasn&apos;t.
  291. The thieves weren&apos;t interested in me, or so I thought.
  292. </p>
  293. <p>
  294. I ended up with Cyrus somehow, and the bike was no longer with me.
  295. Random people seemed to want to get ahold of us, but were trying to act unsuspicious.
  296. I didn&apos;t buy it though, and we ran.
  297. The thieves nearly caught up with us, but then they made the mistake of talking to the other people that wanted us and asking about us.
  298. The apparent leader of the combined group, one of the non-&quot;thieves&quot;, told them off for their idiocy in blowing the cover of the non-&quot;thieves&quot;, and motioned in our direction.
  299. We&apos;d seen the whole thing.
  300. It appeared they were part of some normally-stealthy government agency that wanted us, but this wan&apos;t explicitly stated.
  301. They managed to back us into a corner, and we had no where to run.
  302. </p>
  303. <p>
  304. At this point, I came to two realisations.
  305. First, this was a dream.
  306. I could do whatever I pleased.
  307. Second, I had to protect Cyrus.
  308. I guess I didn&apos;t fully comprehend the fact that this was a dream after all, as I thought Cyrus and the danger we were in were real.
  309. I let out an energy blast from my hands, burning into disintegration half of our pursuers.
  310. I hit hat many due to their close proximity.
  311. I let out a second blast, nearly frying a small child that had come up on us, but I stopped the energy mid-air and dissipated it.
  312. This was a dream, and I could do whatever I felt like.
  313. I then let out a third energy blast and disintegrated the other half of our pursuers, again, able to hit them all because they were crowded around us.
  314. I felt a little bad about the killing (again, I only seemed to <strong>*partly*</strong> realise this was a dream), but I knew I&apos;d done what I had to.
  315. </p>
  316. </section>
  317. <hr/>
  318. <p>
  319. Copyright © 2017 Alex Yst;
  320. You may modify and/or redistribute this document under the terms of the <a rel="license" href="/license/gpl-3.0-standalone.xhtml"><abbr title="GNU&apos;s Not Unix">GNU</abbr> <abbr title="General Public License version Three or later">GPLv3+</abbr></a>.
  321. If for some reason you would prefer to modify and/or distribute this document under other free copyleft terms, please ask me via email.
  322. My address is in the source comments near the top of this document.
  323. This license also applies to embedded content such as images.
  324. For more information on that, see <a href="/en/a/licensing.xhtml">licensing</a>.
  325. </p>
  326. <p>
  327. <abbr title="World Wide Web Consortium">W3C</abbr> standards are important.
  328. This document conforms to the <a href="https://validator.w3.org./nu/?doc=https%3A%2F%2Fy.st.%2Fen%2Fweblog%2F2017%2F06-June%2F10.xhtml"><abbr title="Extensible Hypertext Markup Language">XHTML</abbr> 5.1</a> specification and uses style sheets that conform to the <a href="http://jigsaw.w3.org./css-validator/validator?uri=https%3A%2F%2Fy.st.%2Fen%2Fweblog%2F2017%2F06-June%2F10.xhtml"><abbr title="Cascading Style Sheets">CSS</abbr>3</a> specification.
  329. </p>
  330. </body>
  331. </html>