Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Fable Alignment System

Torai

Member

INTRO

I am going to show you how to make a Fable Alignment System. This is a system which makes a character become good or evil depending on how they act. If you are good, you start to look like more of a hero and people like you more. If you are bad, you start to look like a villain and people start hating you.




THE COMMON EVENT

This common event will make it so that being good, evil, or neutral will change your look and turn on a switch that will change how people will approach you.


This common event is a parallel one, so it needs an event to trigger it.

http://i304.photobucket.com/albums/nn17 ... ntcode.jpg[/img]

Notice I've split this image into 3 parts. This is so the code will be easier to understand.


Part 1

Part 1 tells the game to change what your character looks like and turns on a switch if the character has done enough good or evil. If the variable has reached 2000 or higher, then you become good. If it reaches -2000 or lower, you become evil.

Part 2

Part 2 tells the game if you have become evil or good and reform to neutral or the opposing side, to change how people approach you. If the variable becomes higher than -2000 or lower than 2000, you lose the evil or good switch and change your look.

Part 3

This is optional, but it is recommended. This just gives a limit to how good or evil you can be. If the variable reaches -5000, you can't get any more evil points, and if it reaches +5000, you can't get any more good points.


ALIGNMENT DECIDING EVENTS

These events are like actions in Fable. They help you decide which road to take, good or evil. And ultimately, how you look and how people approach you.


http://i304.photobucket.com/albums/nn172/Torai428/goodaction.jpg[/img]


http://i304.photobucket.com/albums/nn17 ... action.jpg[/img]


These events change the good and evil variable in the common event. They add to it whenever you do good things and subtract from it when you do evil things.


EVENTS THAT USE THE GOOD AND EVIL SWITCHES

These events tell how certain people approach you if you are good or evil.

http://i304.photobucket.com/albums/nn172/Torai428/goodevent.jpg[/img]


http://i304.photobucket.com/albums/nn17 ... levent.jpg[/img]


http://i304.photobucket.com/albums/nn17 ... levent.jpg[/img]


The Good event uses the Good switch, the Evil event uses the evil switch, and the Neutral one uses neither.




So, how was this tutorial? Please tell me if it helped any, because it's my second tutorial.



The original alignment system was made by Lionhead Studios and I am not in any way affiliated with them.
 
Thats far two simple. Try using variables. Positive numbers are good, negative is evil. It alows you to have certain degrees of alignment rather than being Good...or Evil.
 

Torai

Member

First of all, I am using variables in this, didn't you read the code in the common event? The simple good or evil was just an example. I didn't want to make it too complicated by making so many switches to so many degrees of good or evil.

You can be just a rebel or an evil mastermind or just a nice person or a superhero. You just have to make more switches. Instead of just good or evil, you could have like 4 or 6 stages. You can even add renown to this. There is a simple way if you know how to do it.

You just need to make conditional branches on each page for levels of renown.

http://i304.photobucket.com/albums/nn172/Torai428/evilplusrenown.jpg[/img]

Each conditional branch is a stage of renown. Let's make renown a variable that turns on switches.

Variable = Switch

0             Townsfolk
400          Known pretty well
1000        Known well
5000        Famous
10000      Legendary

You don't need a limit since renown doesn't go down in Fable.
 
I understand you are USING variables. It's my fault for not really explaining what I meant. I meant variables for conditions. E.g. You need 2000 points to reach a certain quest, 1999 won't cut it.
 

Torai

Member

Oh, that's understandable. Like you need to be a certain amount of good points to start a certain quest, get an expression, or a spell. That's easy, you just need to start a conditional branch with variables instead of switches.

But, overall, how was this tutorial?
 
It was good. If I haven't already figured it out before hand (for an old game on XP) it would have helped a whole lot. Kudos on it. You should compile it with some other open-end tutorials for people who are interested in the genre.
 
Dude this Tutorial ROCKS LIKE HELL !! I definetly gonna use this tut in my RPG.....
Congrats I hope you gonna make it on this forum !




Srry for my bad english xD I'm Dutch
 
I created something simmaler in my game but the max good or evil you could get is 100 as that is a nice well rounded smallish number and so its easier to work with but essently the one you made and the one I made are the same except I have text telling you that your evil is a certain level.
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top