0 reviews
  • Add Review
  • Subscribe
  • Nominate
  • Submit Media
  • RSS

Working On Guest Spawn System

  • Corentin
  • 11/25/2012 09:49 PM
  • 651 views
The main work I've been working on recently here is a guest spawn system. In the game, there will be two types of guests: guests brought to the inn by special cases (called Storylines), and guests created by a random spawner.

The spawner will decide when to create guests based on time of year, the reputation and quality of the inn, and special cases (i.e, they won't come if you are full). Then it will construct guests out of the various pieces which define a guest, which at this point include:
-Name
-Length of Stay
-Type of Stay
-Introverted or Extroverted
-Probability that they'll make trouble.
-Occupation
-Destination
-Gender
And such. It has to construct the guests, then store that information so that I can access it later to do things with it. The hope is to end up with a semi-random guest spawner which works moderately well.

The issue I've been working on is the method of data storage. My first thought was to assign a numeric code to every permutation of guest, then fill a single variable with that code. Then I realized that would cause me to have to code somewhere around 10,000 permutations. Not an option.

At this point, my approach is to take these pieces of guest, combine as many I can into variables and switches, give each codes (For instances, extroverted and likely to cause trouble can be the number 1.) Then, I'll take those various variables and switches which make up a guest. I'll make as many as the inn can hold guests, and then whenever a new guest enters the inn, we can fill those variables and switches with the correct codes and positions.

So, yeah...that's what I've been working on. If you think you know how to fulfill the requirements of the spawner better(in RM2k3), leave a comment below.

The work continues.

Posts

Pages: 1
I dont no about helping on the spawner, but this sounds pretty darn cool. :)
Pages: 1