In this post:
- Pasted code showing off my attempt to design the Codex library by using it before it exists.
- Notes on stuff I introduced just for this.
- Getting philosophical about having written this stuff in a frantic haze.
I didn't have a lot of lead time for this post. Starting a few hours before I published it, I took an empty file and started typing plausible-looking code into it.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
--- -- Setting codex for Linked Seas 'Verse. -- @module linked_seas local cc = require 'conworld_codex' local codex = cc:new() local salt_mill_critiqued = codex:event( "The Yeffle Salon-Gazette criticizes the Aternabel salt mill design") local bilusic_population_boom = codex:event( "New farming and sanitation techniques lead to a massive population increase in Bilus") local bilusic_expansion = codex:event( "Bilus expands agressively, but ultimately is defeated") local gaewon_empire = codex:event( "Gaewon controls an expansive empire, briefly") local aternabel_at_spansen = codex:event( "Admiral Aternabel petitions for a commission against Afepes") local plague_of_gaewon = codex:event( "A plague along the southern coast of Gaewon fractures the empire") -- This next one is of course a complete fantasy idea. Governments NEVER pursue -- exclusively short-term solutions and put off responsibility onto the future. codex:contributed_to( bilusic_population_boom, bilusic_expansion, "The reigning belief in Bilus's government was that war would address " .. "the crowding, either through colonization or attrition") codex:contributed_to( salt_mill_critiqued, aternabel_at_spansen, "Admiral Aternabel wishes to realize the designs of his grandfather(?)") codex:contributed_to( bilusic_expansion, gaewon_empire, "The defeat of the Bilusic navy gives Gaewon the confidence to expand, " .. "itself") codex:part_of( aternabel_at_spansen, gaewon_empire, "Admiral Aternabel's speech was part of a general sentiment that " .. "Gaewon had 'proven itself' by defeating Bilus") codex:part_of( plague_of_gaewon, gaewon_empire "The Plague threw the island of Gaewon into chaos, severing " .. "administrative ties with the colonies")
The basic idea right now is that a given setting has its own "codex", which is basically a database. The codex contains events, with a short description, and relates them in various ways, with a further description of the relationship.
I've held off on actually implementing any of this until I'm sure this is how I want to do it. This is approximately the second revision already, and the first revision had some very different ideas that didn't fit in this context.
Expanding on this is going to be kind of a delicate thing. I kind of assume that I'm going to want to tag stuff, like, Bilus, Gaewon, Kuirkentord, Aternabel, Masilomaru yan Grevitch, salt, but I don't know what I want that tagging to look like. Wait, actually...
local salt = codex:tag 'salt' local deoshen_aternabel = codex:tag 'Deoshen Aternabel' local atsimats_aternabel = codex:tag 'Atsimats Aternabel' --... codex:relates_to( salt, salt_mill_critiqued, "Deoshen Aternabel's salt mill design was intended to use sun, wind, " .. "etc, to extract salt from the ocean.") codex:relates_to( deoshen_aternabel, salt_mill_critiqued, "Deoshen Aternabel designed a 'salt mill'. Despite the care he put " .. "into its architecture, he never addressed the fact that his design " .. "was impractical in the cool, moist climate of Gaewon.") codex:relates_to( atsimats_aternabel, aternabel_at_spansen, "Admiral Atsimats Aternabel saw Gaewon's victory over Bilus as a " .. "chance to bring glory to his family by realizing Deoshen's design. He " .. "framed it in terms of the glory of Gaewon.")
I'll need to think about this more, but this looks sort of reasonable. Also, I came up with Deoshen and Atsimats as names just for this, because it was really obnoxious calling them "Aternabel" and "Admiral Aternabel". I want to get into the linguistics of all this at some point, have naming languages, make sure that Deoshen and Atsimats (Дэошэн and Ацимац?) are legit Gaewon names.
The big thing I wonder right now is if I want to remove the "codex" references, and just relate tags and events to each other directly. That would more closely resemble English grammar, which is potentially useful for function names made of English words.
Regardless, I didn't have a design when I started, and now I do, so that's cool.
Next week, I'll have tried out some minor syntax changes, and hopefully have gotten LDoc integrated into the publishing toolchain.