1. Archmage Rises
  2. News
  3. Dev Update Feb 7: Making a Map Event

Dev Update Feb 7: Making a Map Event

I recently read an article 42 Essential Game Dev Tips That are Immutably Correct... and the author said:

People want to hear about even the most mundane parts of your dev process


So let’s test that theory, shall we? We got Map Events working this week, so why not show how one is made?

This is a great spot to be in, now that we can make an event, we can turn our attention to making them actually fun. As of this writing, I’ve made a grand total of: 1 event. ːtongueː

For today’s example, I’ve taken what Oonai posted of what they think events should be like. So let’s see if we can do it.

[h2]Step 1: Code it up in JSON[/h2]

We’re both programmers here, so we’re writing the events directly into the text files. Here is what Oonai’s event looks like:



We can have as many branches and details in the event as we like. This is my version of what Oonai wrote.

Save that to a special folder, and it is sucked up into the game.

[h2]Step 2: Shows on Map[/h2]

Start walking around, and the event appears as Tracks because that is the only icon we got right now. And that is what was defined in the JSON `displayAs` field.

I walk into the event.


[h2]Step 3: Run the Event[/h2]

The UI pops up, and the parser runs the event.



(oops, word wrapping isn’t working!)

I pick the evil path because Oonai seems to like evil options. ːlaughing_yetiː



I probably should have written some ‘outcome’ context text—oops! But anyway, it shows an outcome, and the player can continue on their merry way.

We still have to hook up the various values that can be affected (gold, reputation, etc.).

Now that it is (mostly) working, we’ll start making events that are hopefully actually interesting!