stat modifier systems for RPGs

BlitzMax Forums/BlitzMax Beginners Area/stat modifier systems for RPGs

lukehedman(Posted 2006) [#1]
I'm building a space RPG. In the game, there will be many factors that modify the preformance of diffrent items.

For example, a fighter's thrust vale is 10 by default, but this can be changed. If the pilot's flight skill level is high, the pilot turns the thruster preformance, giving it a 50% boost. If if a thrust booster item is added to the ship, the thrusters power is increased by 2. If the thruster get damaged, it's base preformance is reduced by percentage of it's health (so a thruster with only 20% of its health left would work at 20% of the base thruster power). There are even freeform attributes. The thruster be given the "sabatoged" attribute, so when it is used, it has a chance of exploding.

The list goes on and on. My question is, what would be the best way to create a system that allows for many effects and values, while still retaining speed of operation and ease of programming.

Thanks for your time.


Jesse(Posted 2006) [#2]
There is no magical answer to your question, Just jump in and start programming. Use constants for your defaults and maximum values. Use fields in type for all your variables. Use types to declare single or multiple instances of fighters or anything you want to have specific characteristics.
I know this is general but your question is too genereal also. If you have never done a game, star by learning to manipulate fields and objects. Look at code from others. Just about everyone here develope their own technique by looking at code from other programmers.
Personally the best thing I can tell you is to dive in and start programming. If you run in to trouble with your code, just post here and if I can I will help you. I am shure many othere will also.

Luke don't forget the force is with you :)


Paposo(Posted 2006) [#3]
Hi.

One way of control the added gadgets is the making one system of events. This is simple. Look java system of manage events.
The classes that sending events need a list os "listeners" and the classes receiving events must implement a standar method.
The pilot launch event to a listener(fighter), etc
If pilot skill change it launch event to fighter, etc

Bye,
Ramon


lukehedman(Posted 2006) [#4]
Thanks for the help. I like the Java model, and after Jesse's suggestion, I started working on the system more, and I think I can get it to work right.

Anyway, thanks again.

BTW: I know the force is with me, because every single person I've met has told me so. :-)


Matty(Posted 2006) [#5]
Perhaps have a look at some pen and paper RPGs systems and 'borrow' some of their ideas.