Novels2Search

Hello world

As Alex sat on the bench outside the West Inn, he was excited to start on his first spell.

My biggest struggle with magic right now is just that it’s too dangerous to play around. I need some way to mitigate the errors I’ll make. Programming on Earth was frustrating enough with syntax errors simply throwing tons of errors and quitting. Having spells explode is a whole different level of punishment!

I really want to make my debuffs so that I can maximize my base stat gain, but I’m not willing to die to speed up my improvement. This spell should allow me to shove the danger of errors off onto a spell, itself. It’s not quite going to be an emulator, but it should allow me to at least move the danger away from myself. I will get an emulator set up eventually, but I’ve got some more important priorities right now.

I’ll update my to-do list quickly before writing my first spell.

* save 37 small copper (a single day’s room, board, and sponge bath)

* pay Erin back for Inn costs

* pay back Mother Edith for clothes

* buy clothes

* make debuff spells

Well, at least my goals are becoming far more specific. As I get to know more about the world and what I can do in it, I’m able to describe what I want more precisely. Also, these goals are far less open-ended than what I had previously. Tomorrow, I need to quickly get a second pair of clothes, then spend all day making potions to see if I can get ahead of the money situation.

But for now – spell programming!

Alex opened his interface, created two new tabs, and split the screen to fit both tabs on it at once. He made the left tab take up most of the space as it was where he planned to write his spell. The right tab was going to be used for planning the spell and tracking his progress.

Alright, all I want is a very simple spell. It will take mana from an input source, a text stream from a second input source, a sound output for the spell incantation, a visual output for the glyphs, and a mana output to feed into the central glyph while the spell forms. I’ll call this spell “Parrot” for now.

It’s not an emulator at all. Emulators pretend that they are some other system and try to mimic its actions. It’s not an interpreter either. Those are like emulators specifically built to treat a programming language as their system. I guess technically it could be called a compiler since it will be translating between the textual input into a pictorial and auditory output, but it’s going to be the stupidest compiler ever. Compilers generally translate between different languages, but the translation is frequently very complex. Because it’s so stupid I’ll give it the new name. It’s just a parrot which will take the spell text I feed it and create that spell in the world.

So, I’ll need the following:

* dictionary between spell text and glyphs

* dictionary between glyph lines and phonemes

* function to output glyphs to the spell form

* function to output phonemes as sound

* function to map spell text through the dictionaries to their output functions

I’m going to keep my parrot as stupid as possible, so it’ll pull a single glyph from the input spell text at a time, then convert that to the spell form and incantation before proceeding to the next single glyph. This means that my spell text will have to be essentially an assembler – Damn it, that’s what the parrot spell is, just a simple assembler. Those were created back in the really fucking old days when people were just starting to program stuff. The first assemblers just used a dictionary to translate between words which humans could read and the actual numbers that the computer used to represent different instructions.

I guess since I never really used an assembler I just don’t think about them that often. This is the simplest possible version. Each symbol in my spell text will represent exactly one value in the underlying spell language, so the spell will simply directly map between the spell text to the spell language.

I’m still calling it Parrot. All I’m doing is throwing phrases at it and having it spit them out in a different language. “Polly wants a cracker” becomes “Polly veut un biscuit.” Onward!

Though Xigun doesn’t provide dictionaries by default, I can use the basic arrays they include to form a slow dictionary. Alex thought. An array is like a set of packing boxes or mailboxes. You can line them all up and stuff things in them. The nice thing about arrays is that you can access anything from any part of the array immediately. If you want to empty the 17th box, you don’t have to look at boxes 1-16. Instead, you just walk up to the 17th box and take out whatever is inside.

The problem with arrays in programming languages and Xigun is that they’re very simple. You have to use the number of the box to put things into or take things out of the box. What I really want to do is look up a symbol in my spell text, then find the Xigun glyph that it corresponds to. I can’t do that, unfortunately, because the boxes must use integers as their addresses.

So, instead, I’ll use the indexes naturally to correspond to the Xigun glyphs and I’ll just store the programming symbols in the array’s boxes. Then to map between the two, I’ll search the array until I find the right symbol. When I get the right symbol, I’ll have the index which represents the Xigun glyph.

Since I want this to be extremely simple, I’m not going to worry about performance. I’ll just use a linear search to find the symbol that I need. In the long run, I’ll have to fix that but it’ll do for a first attempt. And hopefully I won’t make any mistakes. Those headaches suck.

So, Alex created an array of 4096 boxes. The first box represented the space glyph – the one with no lines active. The second one represented the glyph with only the top line active. The third box represented the glyph with only the top-left line active. The fourth represented the glyph with both the top and the top-left lines active. Alex was using binary to correspond the boxes with glyphs. He let the top line represent the ones place, the top-left line represented the twos place, the bottom left line the fours place, and so on around the hexagon. Then he started with the line from the center to the corner between the top and top-left lines and went around counter-clockwise again.

This mapping represented the order that the symbols seemed to naturally take. Several classes of glyphs confirmed his thoughts here including the 64 number glyphs.

He allocated simple symbols to each of the boxes. He was lucky that the interface could represent Xigun directly because he didn’t actually have a need for all of the symbols yet. Instead, he translated only the ones he thought of as most critical. That amounted to only about 500 symbols.

For the rest of the symbols, he let them represent themselves. He would make sure that he never used Xigun in his spell texts and that would keep them from being accidentally output before he could figure out how he should use them and, thus, how he should represent them in his new spell text.

Speaking of which I need a name for my spell text too. I’m calling it “Pigeon”. It’s a stupid language that will perform some necessary tasks but be generally odious to accept. It matches those birds exactly.

This process took him about two hours. He ended up with a single array which held the symbols he could use in Pigeon to create new spells using a subset of Xigun. It was most of the grunt work that he needed to get done, though. He crossed that item off the list and started with the next one.

He created a simple array that had only 13 boxes. Xigun had a way to pronounce each glyph.

When you cast a spell, you not only had to channel mana into the spell and create the spell form in the air with all the glyphs but you also had to read the damned thing out loud. If you wrote an incredibly complex spell to do awesome things you’d have to read the entire text of the spell each time you wanted to cast it.

Well, if you couldn’t define spell fragments, that is. With those, you could package the entire spell behind a single name. Then when you wanted to cast the spell, you just had to say the name of the spell and all the values you wanted to pass to the spell. For spells you didn’t need to configure, you could omit the values altogether and get super-fast casting times.

Anyway, the point is that Xigun is extremely simple with respect to its pronunciation. You literally just say a special sound for each of the lines that are active in a glyph. The lines are pronounced, in order: “Ha”, “Hu”, “Ho”, “Ba”, “Bu”, “Bo”, “Ma”, “Mu”, “Mo”, “Ka”, “Ku”, “Ko”.

So the word glyph – the one with all lines active – would be pronounced HaHuHoBaBuBoMaMuMoKaKuKo. This is a little ridiculous. There are ways to shorten this pronunciation. If all three of a given set of lines with the same starting letter are present you can simply replace the three syllables with a single syllable with an ‘e’. So the above could be shortened to HeBeMeKe.

While the shortened versions would be easy enough to add, I want the absolutely simplest spell I can come up with in case I make a mistake. If I screw this up, I’ll get a massive headache and I’m not willing to increase that pain just to make the Parrot a little less dumb.

The thirteenth box simply represents the space glyph. When there’s nothing to say, the Parrot shouldn’t break but simply make no sound.

So, the first box of this array contained the Xigun glyph with only the Ha line present. The second contained the Xigun glyph with only the Hu line present and so on. It took Alex about two minutes to make this array.

The next two items on the list could have taken an inordinate amount of time if Alex hadn’t cheated. He’d grilled Victoria after she’d taught him the first half of the single glyphs until he got her to reveal spells which already did what he needed.

The spell form writing function he stole from a simple spell some lazy student of the Magic Study had constructed. It simply copied a spell from from a piece of paper and created the spell form in the air. Apparently the student in question was ridiculed for a long time because she still had to provide the mana for the spell and pronounce the glyphs as they were being constructed. While she’d eased her load a little – she still had to work to cast each spell. Everyone thought it was useless.

Luckily for Alex, that student was at the Study when Victoria studied there and so she’d seen and memorized a copy of it. Why’d she memorize a copy? Well, because she loved magic and this was novel even if it was useless.

Enjoying this book? Seek out the original to ensure the author gets credit.

It wasn’t useless to Alex. He didn’t have to worry about figuring out how to get the spiral correct or the hexagons drawn into the air. He didn’t have to be concerned with how to feed the mana into the spell form. It was all taken care of by the spell that student had created.

The sound output spell he was able to copy directly from one of the linkage spells Victoria mentioned. The final linkage spell accepted an input stream of Xigun and then pronounced them directly. He simply rewired the input.

So, he finished the spell by writing the container to pull all the bits together:

*Parrot ( *pigeonInput, *manaInput ) { *pigeonToXigun[4096] = ( ‘ ‘, ‘(‘, ‘)’, ‘{‘, ‘}’, … ); *xigunPhonemes[13] = ( … ); while ( *pigeonInput ) { *pigeonSymbol = *pigeonInput; *xigunSymbol = ~*mapFrom ( *pigeonToXigun, *pigeonSymbol ); *phonemes = ~*getPhonemeSequence ( *xigunSymbol ); ~*addToSpellForm ( *xigunSymbol ); ~*pronounce ( *phonemes ); }; };

As for the names of the functions Alex had created, he simply assigned each letter of the English alphabet to a different Xigun symbol in order starting with A-Z then finishing with a-z. He had gotten the spell to check for unique spell names from Victoria and none of the ones he wanted had been taken.

The mapFrom spell is poorly named. I’ll get back to that later. Right now it just returns one Xigun symbol determined by which index the second input maps to in the array passed as the first input. It’s a simple loop.

If it fails to find a match, it returns the special glyph sequence “space word space” which I know will break the syntax of the spell. Instead of an exploding parrot, we’ll have a bird with a killer headache.

Alex was exuberant. Theoretically he’d just created the first tool Marin had ever seen to make spell-creation pain free. Well, as long as the ASPCA didn’t get upset about his mistreatment of Parrots.

His Parrot was special anyway. It read Pigeon and created magic spells in Xigun. All it needed was someone to feed it the correct words and a bunch of power in the form of mana. Though it was dumb as a brick, it could make magic accessible instead of violently explosive.

He sat there for a bit as he waited on Erin to return. He’d read over all the different portions of the spells that he’d stolen from and he was confident he understood them. Unfortunately, there had been a lot of new information presented to him today so he was beginning to feel a bit worn. In just a few minutes, he fell asleep slumped upon the bench.

At 11pm, there was a hubbub at the west gate into the city. Since West Inn was just inside the walls, it woke Alex from his fatigue-induced slumber. He looked over to the gate and saw Erin, the two ladies who’d been on guard earlier, and four other women. Erin and her party were absolutely covered in slime that continued to drip off of their armor, clothes, arms, legs, and even their hair.

Since he couldn’t hear what was being said, Alex stood up and made his way to the gate.

“The first level had over a hundred slimes” one of Erin’s party said. “I lost count at one-twenty-two” another replied. “Definitely an attack coming within the next two weeks” said the lady standing at the front. She looked like a fighter with chain mail armor, a sword strapped to her hip, and a shield on her left arm. “Everyone go home and get some rest. I’ll expect you no earlier than noon at the Wardens’ to report in. We’ll likely head back for another scouting mission in six days so keep leveling and make sure you’re well rested the day before we leave again.”

All the Wardens nodded and they each headed their own way. Alex gave Erin a huge hug which caused her to giggle. He’d just gotten his only set of clothes very dirty. He walked her to the back entrance to the inn and they turned the corner inside to the washroom. He peeled her out of her armor and got out of his own clothes, then he washed her.

After he got done washing her, he sent her over to his room to sleep. He rinsed her clothes and armor and even the daggers she’d taken with her. He dried the armor and daggers using the cloths in the washroom and snuck across the hall to deposit them on the small table in his room. He went back to the washroom and rinsed his own clothes and then washed himself.

Finally, he went to his room with all the clothes, which he hung out to dry across the single chair, the foot and head of the bed, and the bits of the table not covered in armor or weapons.

I meant to talk to Erin about the change in the dungeons’ behavior as well as all that I’ve accomplished today. I also wanted to hear about her excursion. I guess I’ll have to wait until tomorrow. She’s exhausted.

So am I. Goodnight, world.

Alex woke the next morning after the sun was up. He and Erin took care of the Goddesses’ spell rather enthusiastically and then headed out for a late breakfast. They started to eat at 8:30 am and Alex got to relate all that he’d accomplished previous morning. Erin was ecstatic that he’d gotten to level 2 and promised that they’d celebrate with a special meal on Saturday.

While Alex did mention that he was going to be working with Victoria on making some new spells, he didn’t mention the revolutionary nature of his work. He trusted that Erin would know to keep this information quiet, but some things are simply too dangerous for anyone to know about. In turn, Erin related her news about the dungeon.

“It was far further along than anyone expected. It’s been years since the dungeon accelerated the production of its forces.”

“What’s that mean?”

“Well, it means that the slimes will start attacking Scottstown with shorter intervals of rest in between each attack. Also, it means that we’ll start having to post patrols far more often through that portion of the forest. Though the overall time between attacks will shorten, each attack will vary in exactly how long it takes the dungeon to prepare. Since we can’t afford to catch the attack on the walls with no preparation of our own, we’ll have to be checking up on the dungeon’s forces more frequently.”

“We had a hard time on our mission because we weren’t prepared for the numbers of red slimes that were present. We should have taken another Warden and had larger numbers of potions ready to heal us. A ward stone would have been great as well. It’s hard to rest when you’re getting attacked every few minutes and the stone would have allowed us to become undetectable to the dungeon monsters until we’d had a chance to catch our breaths. None of it would have been an issue without the massive number of higher-level red slimes, though.”

“At least dungeons have become predictable. Many years ago, before the spell the Goddesses cast, the dungeons used to be relatively tame. Only one or two a year would start sending forces against settlements and those dungeons would be eliminated to keep people safe. Sometime shortly after the spell was cast, a lot more dungeons started to send invasion forces. Back in those days the time between attacks was impossible to predict.”

“It became too hard for adventures and the Queens’ forces to keep up with the invasions so each village or town near a dungeon was fortified. Small groups of guard forces were established to keep the people safe. Wardens, they were called.”

“Now, people are essentially safe if they don’t travel too much. Since the time between dungeon attacks is variable the roads are harder to travel without a significant guard force. Most of the people who would serve as guards are either already Wardens or have chosen to become adventures. Both have other duties that keep them from escorting caravans.”

“Here in Scottstown, we’ll have to prepare for an attack by the slimes. It’s important that you get to level ten before they get here. People get hurt every time, but with the extra health from hitting the tenth level we haven’t had anyone die in two generations. Please promise me that you’ll work on potions exclusively until you get it to level ten!”

Alex saw her fear for him in her face and so he promised “I’ll only work on potions during the day from now on after I first go to get fitted for a second set of clothes this morning.”

“Great!” Erin replied. A little of the fear lifted from her features and she managed a small grin before she continued, “You should also know that having the time on our interface helped out the Wardens a great deal. I shared it with the whole party before we set out this morning and it allowed us to do things much more precisely.”

“Sarah, the party leader, could call out instructions for specific spells or abilities as soon as they became available. We also got to split up into two different teams and make our way through the first section of the level very easily. We knew exactly when we should appear at different sections of the level and could coordinate our actions against the largest groups of slimes so that we both attacked with the highest level of surprise and biggest burst of damage each time.”

“While we all had ideas for how to use it better, what we did use saved us a lot of trouble. We wouldn’t have been able to get to the final rooms without it.” She smiled at him, leaned over and gave him a quick kiss, and whispered “Thanks so much!”

“You’ll probably be getting some requests from the Wardens to make some more gadgets we can put on our interfaces to help us out. We didn’t even know that you could change things on the interface! Now, off to work with you!”

They parted ways with Alex going to a clothier and Erin headed back to her house to get some more rest before her meeting after noon. Alex was fitted quickly and headed over to Mother Edith’s shop. He quickly went through the ingredients he’d purchased from yesterdays’ potions sales and created a grand total of 50 potions in the three and a half hours before 1 pm. He was moving faster and faster and his potions were higher quality than they’d ever been before.

Mother Edith told him to come back that evening and she’d furnish more herbs. She was keeping a balance sheet and she thought he could make 75 potions in five hours tonight. That would allow him to make enough money tomorrow, if he did potions all day, that he should be able to gain his first spare pay the next day.

Looking at his changelog, Alex was pleased to see that he’d pushed his potions skill up to level seven. He’d gained 800 experience from producing a few exceptionally high quality potions throughout the morning. He’d also gained an ability for potions!

Healthy ingredients (toggle)

A passive spell which highlights the unhealthy portions of herbs so that potions may contain only the highest-quality ingredients.

He immediately toggled that on and looked around. Herbs which were in perfect health glowed a bit green whereas any infected or damaged portions of a plant were highlighted from yellow to red. He couldn’t see highlights on most of the herbs in the store, but the ones he’d used for his three potion recipes were brightly highlighted.

He toggled the spell off, then ran to the West Inn to get a packed lunch. He could eat with Victoria and try to activate his new spell. He just couldn’t wait till this evening, but he had to eat lunch so he wouldn’t be breaking his promise to Erin if he multi-tasked.

When he got to the Wardens’ building he went straight down to the basement, but found it empty. As he turned to go up the stairs, Victoria came down them with a packed lunch of her own.

“Oh, Alex, did you need something?” She asked.

“I thought that we might eat lunch together while I showed you the spell I put together. I want to define it today and cast it before lunch is over, if there aren’t any problems!” Alex gushed.

Victoria smiled and hurried into the Sapphire Room saying “What are you waiting on?” Alex immediately shared his pigeon text for Parrot and Victoria examined it as well as all the connected functions. She looked them over with a fine toothed comb, going along the spell forwards, then backwards, then pulling each part out and looking at it for any obvious errors.

Just as they got close to finishing their meals, she pronounced it safe to cast. She had especially liked that Alex purposely returned poor grammar when something that should be impossible happened. Having a spell with a headache seemed infinitely preferable to having an explosion.

Alex cast each of the spells to define the function spells in order. It took most of his mana at a total of 150 mana. He defined the Parrot spell which cost him another 50 mana. Victoria gave him a mana potion to drink so that he could cast the Parrot spell to try it out.

He quickly checked the Pigeon he had for Blade and waited on his mana to regenerate to 100 before he started casting the spell. He fed 10 mana to cast the Pigeon spell. A puff of white smoke appeared in front of Alex on Victoria’s desk and billowed about for a few seconds.

Alex and Victoria both waved the smoke away while Alex continued to feed the spell mana so that it could eventually cast the Blade spell, but when the smoke cleared Alex blinked. Victoria gasped and asked “What is that???”

Collapsed on the desk was a three inch long parrot. It had a red breast, green sides and wings, a blue throat, a yellow face and a red crown. Its eye rolled to look at Alex accusingly as he continued to feed power to the spell. He stopped the power when he’d reached 6 mana for the Blade spell and the parrot limply began to recite the spell.

After about thirty seconds, the parrot finished the spell and a Blade wafted over some papers before another plume of smoke erupted and the parrot disappeared.

Alex and Victoria stared at the desk where the parrot had laid, dumbfounded. Alex turned to Victoria and asked “Why did a bird from Earth appear when I cast a spell I named after it?”

Victoria blinked a few times then started laughing which started Alex laughing as well. “You named the spell after a bird from your home? No wonder it appeared there. Magic is a bit of a tricky thing on Marin. It’s got a sense of humor. When you cast a spell which includes a certain level of knowledge within the spell, the spell can be manifested by the system as a physical thing.”

“Since you gave that spell a name, it will always manifest as that bird from now on. Hopefully you’ll be willing to give it a bit more power so that the poor thing can at least stand up instead of falling over the instant it appears!”

Alex started laughing at the absurdity of it all and Victoria joined after a few seconds. Laughter is the best kind of contagious.

Beware evildoers, Alex comes with his army of tiny, collapsed parrots! Hello world!