Project Update – September 19th, 2019

Here’s some boring words about what’s been going on with Shining Online since the last worklog entry (April 2018). I’m going to stick in a bunch of screenshots today to try and make it less wordy.

But don’t worry, there’s plenty of technical words (and screens) right at the end!

Roaming NPC’s

This is something the original Shining Online never had, but I really wanted them in the game.

The first attempt was not a total success.

Very fast NPC
Click to watch a very fast grandma

After adding some pauses and timing tweaks, the finished result looks like this:

Reasonable grandma
Click to watch a much more reasonable grandma

I’m pretty happy with how it turned out.

Custom text boxes

Text boxes can have custom frames, backgrounds and fonts. They can also be positioned anywhere on the screen.

Not very exciting, but at least we know what’s in the tent.

Battle ranges

Towns aren’t the only thing that have had some attention.

Battle ranges are present and take land types into effect

Battle ranges are a key part of Shining-style battles, and now they’re in Shining Online. They take land types and movement types into account, so flying entities will ignore trees, whereas centaurs will be slowed down by them.

Finding items and gold

What kind of RPG would this be if you can’t raid people’s homes for their hard-earned cash?

Click to watch Cody raid someone’s barrels

Items work in a similar way, and are automatically passed to the next free character. If there’s no space, it will be left in the container until some room is available.

There’s a fair amount of behind-the-scenes work going on in that screenshot, most of it handled via script:

  1. The text for “Cody looking in the barrel” looks like this in the configuration file “%CHARACTER% looked in the %CONTAINER%”. The tokens are replaced by fetching data from the team (the team leader’s name) and the entity being searched (the barrel).
  2. Gold is added to the player’s gold reserves
  3. Flags are set in the session to make sure searching the same place doesn’t give rewards twice.
  4. There’s some other bits going on, like pausing player input, displaying a text box and playing a jingle (which you can’t hear in the gif, but it’s there).

Items are slightly more complicated; the game has to check there is at least one character with an open inventory slot, and then has to either pass it to them or display a “There is no room” message.

Here’s how the barrel in the screenshot is configured:

All entities in Shining Online are made up of components. Entities are created using a simple template system, which sets out which components are required and what their field values are. The base_money_container template looks like this:

It listens for an inspectevent, and then disables input, runs the gold:findscript using properties from the entity and then re-enables the entity when done.

The %self% variable is always set to the entity’s identifier. So for the money container in the example, it will be the string “vagabond_gold_container_1”. Flag names can be overridden by setting a flag_name property on the entity, but that’s optional.

And finally, here’s what the gold:find function looks like:

For comparison, this is what the item:find function looks like:

It’s a little more complicated, but it’s all built and configured in a similar way to the gold container.

That’s all (for now)

I’d like to get item management finished in the next few months so I can move on to the battle system. Pathfinding and movement ranges are all working, so with some AI and proper turn management there will be an actual game soon!

Leave a Comment