123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253 |
- <?xml version="1.0" encoding="utf-8"?>
- <!--
-
- h t t :: / / t /
- h t t :: // // t //
- h ttttt ttttt ppppp sssss // // y y sssss ttttt //
- hhhh t t p p s // // y y s t //
- h hh t t ppppp sssss // // yyyyy sssss t //
- h h t t p s :: / / y .. s t .. /
- h h t t p sssss :: / / yyyyy .. sssss t .. /
-
- <https://y.st./>
- Copyright © 2017 Alex Yst <mailto:copyright@y.st>
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <https://www.gnu.org./licenses/>.
- -->
- <!DOCTYPE html>
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <base href="https://y.st./en/weblog/2017/06-June/08.xhtml" />
- <title>lapis and gems <https://y.st./en/weblog/2017/06-June/08.xhtml></title>
- <link rel="icon" type="image/png" href="/link/CC_BY-SA_4.0/y.st./icon.png" />
- <link rel="stylesheet" type="text/css" href="/link/basic.css" />
- <link rel="stylesheet" type="text/css" href="/link/site-specific.css" />
- <script type="text/javascript" src="/script/javascript.js" />
- <meta name="viewport" content="width=device-width" />
- </head>
- <body>
- <nav>
- <p>
- <a href="/en/">Home</a> |
- <a href="/en/a/about.xhtml">About</a> |
- <a href="/en/a/contact.xhtml">Contact</a> |
- <a href="/a/canary.txt">Canary</a> |
- <a href="/en/URI_research/"><abbr title="Uniform Resource Identifier">URI</abbr> research</a> |
- <a href="/en/opinion/">Opinions</a> |
- <a href="/en/coursework/">Coursework</a> |
- <a href="/en/law/">Law</a> |
- <a href="/en/a/links.xhtml">Links</a> |
- <a href="/en/weblog/2017/06-June/08.xhtml.asc">{this page}.asc</a>
- </p>
- <hr/>
- <p>
- Weblog index:
- <a href="/en/weblog/"><abbr title="American Standard Code for Information Interchange">ASCII</abbr> calendars</a> |
- <a href="/en/weblog/index_ol_ascending.xhtml">Ascending list</a> |
- <a href="/en/weblog/index_ol_descending.xhtml">Descending list</a>
- </p>
- <hr/>
- <p>
- Jump to entry:
- <a href="/en/weblog/2015/03-March/07.xhtml"><<First</a>
- <a rel="prev" href="/en/weblog/2017/06-June/07.xhtml"><Previous</a>
- <a rel="next" href="/en/weblog/2017/06-June/09.xhtml">Next></a>
- <a href="/en/weblog/latest.xhtml">Latest>></a>
- </p>
- <hr/>
- </nav>
- <header>
- <h1><code>lapis</code> and <code>gems</code></h1>
- <p>Day 00824: Thursday, 2017 June 08</p>
- </header>
- <section id="general">
- <h2>General news</h2>
- <p>
- I copied my documents, then mailed them to Discover.
- Now I just need to wait and see if they'll keep their word and honour the copies.
- </p>
- <p>
- Yesterday, when I was trying out mineral-defining mods, I ran into two cases of mod name collision.
- Two mods of the same name cannot be installed simultaneously for a few reasons, the main one probably being that each mod gets its own name space to define in-game objects with, and that name space is based on the mod's name.
- The first collision was with the name <code>gems</code>.
- With such an unoriginal name, how could there <strong>*not*</strong> be a collision?
- One adds gems to make tools from.
- The other adds gems to encrust existing tools with, changing their properties.
- The second collision was with a pair of mods called <code>lapis</code>.
- This collision should have never happened.
- The author of the second mod knew about the first mod, even reusing code from the original.
- You'd think that they share some node/item names because the second is basically a continuation of the first, but you'd be wrong.
- They both define lapis lazuli minerals, but they don't share an internal identifier and they behave completely differently.
- The second mod also adds pyrite alongside lapis lazuli.
- Nothing about the two mods is the same, so they should use different names so they can be installed together if desired.
- Yesterday, I hatched a plan to merge both pairs to form new mods that take the place of their components, filling both roles, eliminating conflict, and still covering the needs of any mod that depends on either of the component parts.
- </p>
- <p>
- Merging the <code>gems</code> mods might be tricky to pull off in a clean way.
- I'll need to extend the functionality to include more, potentially allowing all gems defined by the mod to fill either role and defining a bunch of new tools to pull it off.
- I thought the <code>lapis</code> mods would be easier though.
- <code>minestats</code> wasn't detecting the lapis lazuli ores from the second mod, so I looked into the code.
- It turns out the "mineral" node is craftable.
- It sometimes drops its gem, but usually drops a cobble version of itself, which can be smelted back into its original form.
- However, I thought I read that it could also be crafted into and from nine of its gems.
- In other words, the gem drop is "bad", as you get less of the material!
- That was an ugly mess and I didn't like it.
- I figured when I merged the mods, I'd alias the new drop to the old drop, remove the spawning of the new mineral nodes, make the new mineral nodes stop dropping the gems (so they always drop the cobble version of themselves), and make the new nodes craftable from the old gems.
- Nine of the old gem in a square would make the old block.
- Four would make the new block/mineral hybrid.
- This would also help deal with the new-found rarity on the new mod's end, as it was supposed to spawn full nodes instead of just minerals, so it shouldn't take a full nine gems to craft them.
- </p>
- <p>
- As I was merging the code today though, I found I'd misread yesterday.
- The new mineral node isn't craftable from gems, it's only craftable by smelting its cobble form.
- No material is lost.
- So should I get <code>minestats</code> to count the times it drops the gem instead of the cobble?
- As I debated back and forth, I came up with a way to provide support for this mineral.
- I could check to see if any of the recipes used to craft the node require the exact drop of the node.
- Additionally though, I wondered if I even needed to check to see if the node is craftable at all.
- If I remove that check, the problem is that clay will be counted as a mineral.
- The same clay can be dug and placed repeatedly, boosting your clay count.
- This could be done intentionally, but it could also be done unintentionally when you change your mind about where you wanted the clay placed.
- I was torn, unsure whether this strangely-defined lapis lazuli node was deserving of inclusion as a mineral.
- One of my main thoughts was that with minerals, you can't choose where they are.
- You can't have them in your inventory, so you can't place them to dig them.
- That firmly rules this newer lapis lazuli out as a mineral, right?
- However, after a bit, I realised the inconsistency in that thought.
- I've been treating flint as a mineral when it falls from gravel, but gravel usually drops itself.
- That means the mineral node <strong>*can*</strong> exist in-inventory and the player <strong>*can*</strong> chose where to place it.
- This new lapis lazuli is as much a mineral as flint, so because I adamantly hold to the claim that flint counts as a mineral, I <strong>*must*</strong> provide support for this lapis lazuli if feasible, and it's plenty feasible.
- </p>
- <p>
- After writing code to weed out empty stacks in drop sets, I realised that empty stacks were already weeded out in a better way elsewhere in my code.
- I'd already accounted for them.
- After writing up code to sort drop sets so they could be more-easily compared to craft recipes (I'd use that same function to normalise the recipes), I realised I didn't need to do that either, and undid all my code work for the day up to that point.
- I don't need the drops sorted.
- If the node drops multiple item stacks, it's already eliminated as not a mineral.
- If we know it only drops one item stack, what's to sort?
- </p>
- <p>
- Having fixed the bug in <code>minestats</code> and having failed to make any progress whatsoever on the mod merge I thought I knew how to complete, I biked around town for a while, exercising, getting some sun, and thinking about both mod mergers.
- On the <code>lapis</code> mod, I came to a new conclusion as to how to complete it.
- For the most part, the mods will remain unchanged, aside from the fact that the two will now be one.
- However, the new <code>lapis</code> mod adds a couple elements.
- First, it adds pyrite.
- Second, it replaces lapis lazuli ore with blocks of lapis lazuli that are filled with calcite.
- At first, I tried to figure out how to change the names of these new lapis lazuli nodes to include the fact that they've got calcite, aside from the main ore node, which already has that information.
- However, I settled on a better plan.
- Instead, I'll label the old lapis lazuli minerals as <strong>*pure*</strong>.
- It'll get the same point across, and will allow the two to be separated.
- When I have time, it shouldn't take to long to get it right this time.
- As for the <code>gems</code> mod merger, I'm still lost.
- One one just defines minerals to be made into tools.
- It's pretty straightforward.
- The other encrusts three sets of tools.
- One set is the steel tools from <code>default</code>.
- The other two are the gold and mithral tools from <code>moreores</code>.
- Mese tools are mentioned as being unencrustable, but no other tools are mentioned.
- I imagine at the point this mod was abandoned, Minetest Game still only had wooden, stone, steel, and mese tools.
- It might not have even had the full mese set yet.
- At this point though, Minetest Game's <code>default</code> has bled <code>moreores</code> all but dry.
- Only two minerals are left in <code>moreores</code>: silver and mithral.
- Golden tools no longer exist.
- I think the obvious thing to do is extend support to all <code>default</code> and <code>moreores</code> tools, including mese, and just forget about golden tools.
- I can then bump up the bonuses for the encrusting gems, and make the tool gems have lower-level encrusting bonuses.
- I can add low-level tools that can be made from the encrusting gems as well.
- That way, the gems can be used for either purpose, but they work best for their respective, original purposes.
- I'll need to create textures for the blocks crafted from the encrusting gems, as the tools gems allow themselves to be crafted into nodes and the encrusting gems don't yet, and I'll need to do something with the fact that the tools gems define a way to make tool handles out of stone, but all that will be mostly reasonable to accomplish.
- The problem though, will be the diamonds in the encrusting <code>gems</code> mod.
- This mod's old and, as I said before, seems to predate the most recent tool sets.
- It defines diamonds because diamonds didn't yet exist.
- Defining diamonds in the new version of this mod could be a mess if I don't do it right, but removing them would in part defeat the purpose of this merger.
- I <strong>*must*</strong> include them.
- </p>
- <p>
- One possibility I'm thinking about is to define them as low-grade diamonds or something.
- Perhaps they're not fit for their original purpose, and the diamonds in <code>default</code> will fill that role.
- Or perhaps, they make tools that are half the strength of regular diamond tools and have half the encrusting bonus of the regular diamonds.
- Or maybe, you craft together several low-grade diamonds to get a usable diamond.
- </p>
- <p>
- My new Oregon Community Credit Union credit card arrived today.
- I stopped using my old one when I found I could choose a name on my Discover card, but Discover revoked that feature and I now have the legal name I want anyway.
- I might actually use this new card.
- The utility bill also arrived, but by the time I checked the mail, the utility company's office was closed.
- Maybe I'll pay the bill tomorrow when I get home from this food-getting thing.
- </p>
- <p>
- My <a href="/a/canary.txt">canary</a> still sings the tune of freedom and transparency.
- </p>
- </section>
- <section id="dreams">
- <h2>Dream journal</h2>
- <p>
- I don't remember most of this dream, but the last part is still vivid in my mind.
- Vanessa, our mother, and I were in my mother's car, off in the wilderness, on a thin, dirt road on a slope by the waster.
- I had a newspaper that I was using to keep track of the events of the day with.
- Somehow, what I was going to write in my journal related to the content of the newspaper.
- However, Vanessa wanted to take my newspaper for something; I don't recall what.
- I scoured the newspaper to find the parts I needed, and took notes on my laptop so I wouldn't need the paper any more before giving it up.
- I found an article about Trump; I don't recall the specifics of what it said, but the article included a life-size balloon of Trump, uninflated and folded into the newspaper.
- I jokingly asked our mother if they wanted the balloon.
- I didn't mean any harm by it, but ...
- </p>
- <p>
- My mother asked how it was in my apartment, no longer having to share a kitchen with someone of such drastically-different political views, referring to themself.
- I said I didn't mind sharing a kitchen, it didn't affect the quality of the food.
- That's when my mother got mean.
- They said it did, that when someone with a warm heart makes the food, you can taste the care they put into it.
- In other words, they were saying that I must have a cold heart, as I voted against Trump.
- At that point, I retaliated.
- Somehow, my mother appeared outside the vehicle though, so they didn't hear me.
- At that point, the road had a large dip in it, and without a driver, it nearly fell off the road.
- Once the car had come to a stop, I got out and repeated myself: "If you had a warm heart, you'd have voted for anyone but the republican.", adding onto the end, "If you didn't like the democrat, you could've even written in a candidate.".
- </p>
- <p>
- Somehow, the story of the dream got rewritten at that point.
- My mother was holding their cat, and had been frustrated for a while, not sure how to handle moving the cat in their upcoming move.
- In exasperation from my words, they simply gave up, and released the cat by the road.
- They made sudden, startling motions to scare the already-nervous cat (the cat fears unknown environments) down the slope and to the lake, where two black cats already were.
- The cat would never survive there though.
- It doesn't know how to hunt or avoid predators.
- In releasing the cat, my mother sort of proved my point.
- I cried a bit, knowing I'd unintentionally played a hand in the cat's soon-to-be, untimely demise.
- I briefly considered the fact that I might, myself, be stranded too; that my mother wouldn't bring me back home from our outing.
- That was about when I woke up.
- </p>
- <p>
- The ironic thing about the kitchen remark from my mother, and something I didn't even consider until I was awake, is that my mother doesn't pour love and care into meals.
- Additionally, when I was living there, I couldn't keep edible food around, or my mother would complain.
- I practically lived off of whatever I could buy and eat quickly.
- No large bags of potatoes, no vegetables that had to be stored in the refrigerator ... even canned goods were too much, as they were a pain to eat while out and I felt like I couldn't bring food home.
- I was eating mostly junk food such as potato chips.
- In the dream, I didn't mind sharing a kitchen with my mother.
- In the real world, I do.
- </p>
- </section>
- <hr/>
- <p>
- Copyright © 2017 Alex Yst;
- 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's Not Unix">GNU</abbr> <abbr title="General Public License version Three or later">GPLv3+</abbr></a>.
- If for some reason you would prefer to modify and/or distribute this document under other free copyleft terms, please ask me via email.
- My address is in the source comments near the top of this document.
- This license also applies to embedded content such as images.
- For more information on that, see <a href="/en/a/licensing.xhtml">licensing</a>.
- </p>
- <p>
- <abbr title="World Wide Web Consortium">W3C</abbr> standards are important.
- This document conforms to the <a href="https://validator.w3.org./nu/?doc=https%3A%2F%2Fy.st.%2Fen%2Fweblog%2F2017%2F06-June%2F08.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%2F08.xhtml"><abbr title="Cascading Style Sheets">CSS</abbr>3</a> specification.
- </p>
- </body>
- </html>
|