Character Needs (Like the Sims)

Character Needs (Like the Sims)
Version: 1.0
By: MephistoX

Introduction

Well, like a complement to my House Deco System, I created this system, very very similar to the Sims, so I want to share with you, includes all the features that are in the Sims, or many of them. for example if the need reaches 0, a state is added to the actor, all can be customizable. believe me :)

Ease to understand, if 1 second has passed, substract all needs (depend of the Rate that you assign)


Features
  • Many Needs as you wish
  • Very Customizable
  • You can create conditions to NO Substract need values (For example, if switch is on, don't substract need, or if the map, the terrain, the actor id, the class.
  • Includes Event Environment, this events, if the player is in x range (customizable) affect a need, add or substract value.

Demo

http://www.4shared.com/file/123009856/5 ... Needs.html <= Basic, see the gold window in menu :)


Instructions

Well, install the script, like every script, refer to the header to see how customize or how create events and all that, to create new needs, you should modify the script itself:

Search for Character_Needs and customize the Instance Variables, like the example, remember to add these new needs to the module constants.


  1. class Character_Needs::Actor_Needs
  2.   #--------------------------------------------------------------------------
  3.   # * Public Instance Variables
  4.   #--------------------------------------------------------------------------
  5.   attr_accessor :energy                                       # Energy Need
  6.   attr_accessor :yourneed
  7.   #--------------------------------------------------------------------------
  8.   # * Object Initialization
  9.   #     actor_id : actor id
  10.   #--------------------------------------------------------------------------
  11.   def initialize(actor_id)
  12.     @actor_id = actor_id
  13.     @energy = Character_Needs::Configuration['energy']['Values'][1]
  14.     @youenewneed = initial value
  15.   end
Expand to see the code.



FAQ

None yet.

Compatibility

I don't tested it withouth SDK, maybe can be compatible only, I didn't use any class from it... but, I made on a SDK base, and MACL, any problem, please tell me. (try to use in a non-SDK removing the SDK.LOG, and final end)

Credits and Thanks

Credits to MephistoX, and also Thanks to the HispanoCoders Group, yes I'm a Latin Guy living in SouthAmerica :), always thanks to the MACL TEAM, and SDK developers.

Author's Notes

This Script doesn't include a Window with all the Needs... and that, you need to create that, depending of your game gui or graphical part.

Terms and Conditions

This script is for Free Proyects only, please contact me, if you want to use this in a Commercial Proyect.

That's All, any Question or Bug report, here.
Cool, this is perfect for some Sim games..

Edit 1: Can you make a script that can display the need status of the person?
Mmm... Give me a few days to add that.
Wow! If this + House system... you have a Sims copy!

Kewl mate!
Keep up the good work!

I might try making a game like Survival kids using this and the house system :D

Original thread: https://www.hbgames.org/forums/viewtopic.php?t=66634