DISCLAIMER

This software is currently under development. It is not done. While it will not be done quickly, contributions can help make things go faster. Please contribute if you can.

NAME

Games::Framework::RCP::Battle - Details of the Battle Tables and Views

VERSION

Version 0.04

DEPENDENCIES

As this is a documentation module, there are no dependencies.

SYNOPSIS

Games::Framework::RCP::Battle - Module that describes the SQL tables and views used by this part of the database. In PostGresQL, this would be the schema.

DESCRIPTION

The Games::Framework::RCP::Battle module is a documentation module that describes what uses the battle based database tables and views. Following PostGresQL schema organization, this module effectively represents the battle schema.

CONFIGURATION AND ENVIRONMENT

As this is a documentation module, no configuring is required.

TABLES

The two tables are listed below in alphabetical order:

combatants

The lineup of fighters.
Column Type Null? Default Constraints Comment
join_time datetime NOT NULL now() What time did the fighter join?
fkey_character bigint NOT NULL [fk][uniq] The character that is fighting.
fkey_job integer NOT NULL [fk] The job the character is fighting with.
secondary varchar(32) NULL secondary skillset
aux varchar(32) NULL auxillary skill
ct numeric(12,4) NOT NULL int rand 500 CT. randomized at the start.
id_fighter integer NOT NULL 1 [pk] ID of the fighter.
hp numeric(12,4) NOT NULL 50 HP of the fighter.
mp numeric(12,4) NOT NULL 50 MP of the fighter.
pp numeric(12,4) NOT NULL 50 PP of the fighter.
spd numeric(12,4) NOT NULL 50 Speed of the fighter.
patk numeric(12,4) NOT NULL 50 Physical Attack
matk numeric(12,4) NOT NULL 50 Magical Attack
pdef numeric(12,4) NOT NULL 50 Physical Defense
mdef numeric(12,4) NOT NULL 50 Magical Defense
pacc numeric(12,4) NOT NULL 50 Physical Accuracy
macc numeric(12,4) NOT NULL 50 Magical Accuracy
pevd numeric(12,4) NOT NULL 50 Physical Evade
mevd numeric(12,4) NOT NULL 50 Magical Evade
max_hp numeric(12,4) NOT NULL 50 Max HP
max_mp numeric(12,4) NOT NULL 50 Max MP
max_pp numeric(12,4) NOT NULL 50 Max PP
fkey_job integer NOT NULL 1 [fk] The job the fighter starts with. Used for rewards and such.

The combatants table shows who is fighting as what jobs, along with their various stats. When fighters join, their CT is randomized to a number between 0 and 499. The job fighters start as is stored for ease of rewarding purposes.

For those looking for a fighter's collection of status effects or inventory, check the tables below.

A note on id_fighter: it is NOT using a sequence number. This is by design: after battles end, fighters are to be wiped out of the battle data. Instead, make the next fighter MAX(id_fighter) + 1, or 1 if no one is in the battle data yet.

fighter_status

What status effects do the fighters have?
Column Type Null? Default Constraints Comment
fkey_combatant integer NOT NULL [fk][pk] The fighter.
fkey_status integer NOT NULL [fk][pk] The status effect.
length numeric(12,4) NOT NULL 21 The length. If -10K or less: indefinite. If 10K or more: permament.

The fighter_status table contains all of the status effects that have inflicted the fighters, whether for good or ill.

As battles should not last more than 10000 ticks (and those that do are probably not being run properly), a convention is in use with this table. If a status effect's length is considered less than 10000, then the status effect is to last indefinitely until an unknown time, maybe forever. If a status effect's length is considered more than 10000, then the status effect is a permament part of the fighter and should not be removed for most reasons. Needless to say, a Game Master can choose to overrule this at any time.

A note on fkey_combatant: its a foreign key to the combatants table above.

VIEWS

Information on the views is coming soon.

SUBROUTINES/METHODS

There are no subroutines in this module.

INCOMPATIBILITIES

There are no known incompatibilities in this module.

DIAGNOSTICS

There are no known problems, and therefore no need to provide solutions.

AUTHOR

Jason Felds, <wolfman.ncsu2000 at gmail.com>

BUGS AND LIMITATIONS

Please report any bugs or feature requests to bug-Games-Framework-RCP at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Games-Framework-RCP-Battle. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT

You can find documentation for this module with the perldoc command.

perldoc Games::Framework::RCP::Battle

You can also look for information at:

ACKNOWLEDGEMENTS

See Games::Framework::RCP for all acknowledgements.

LICENSE AND COPYRIGHT

Copyright 2008 Jason Felds, all rights reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.