StellarForum
May 22, 2012, 02:07:54 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Stellar Frontier has moved to the new forum and site at stellarfrontier.com!
Please make a new account there in preparation for SF 2.0 and to chat on the boards!
 
   Home   Help Search Groups Login Register  
Pages: [1]
  Send this topic  |  Print  
Author Topic: MODULES: The Thread!  (Read 503 times)
AdmiralTigerclaw
Sound Developer
Expert Member
****
Posts: 734


Naval Commander: Forum Sound Admin


« on: December 28, 2008, 04:35:22 AM »

It's time to start thinking about how a ship is set up...  I have a concept.

First off.  Ships contain two values.
VOLUME, and MASS.

Each module, takes up VOLUME, and adds MASS.

VOLUME limits how much you can fit into a ship.  But you no longer have set limits on the number of modules you can stuff into the ship, just a maximum amount of space to fill.  Exceptions will be mentioned later.

Modules are broken into catagories.

CRITICALS
You cannot remove these from the ship.  You may switch which kind of a particular module you have, but you cannot drop these.  At space dock.  It is simply impossible to operate without them.

ESSENTIALS
If you drop one of these, you will lose an important functional aspect of your ship.  But you can still survive.

HARDPOINT MODULES

*BRAINSTORM RIGHT NOW!*

HARDPOINT Modules are mounting points for weapons.  These may be removed or added with a total of up to ten maximum and come in a variety of sizes that take up ship volume.  Weapons can then be installed to these modules.

Equip Modules

Equipment Modules are extra components... usually minor components that give the ship either a special characteristic, or performance boost... they do not come in a default ship, and must be added to a loadout of a ship for a specific effect.

The following is a list of modules by class.

CRITICALS:

Main Reactor - Without this module, the ship has no power.  The main reactor is the only PERMENANT module on the ship, as it was built specificly for this ship class design and output.  It's criticality requires it be monitored at all times.  In the event of a core breach, the X key (formerly self destruct) can be hit to jettison the core before it reaches zero value and explodes.
Reactors have a hitpoint value at 100, and their maximum energy output at 100 percent as well.  At any damage below 100 points, the core produces that percentage of energy until it drops below 30 percent.  Below 30...  and the reactor goes into CRITICAL and an alarm goes off. Below twenty, and the reactor will begin to deteriorate at a rate of one point a second until it hits zero.  When it hits zero, it explodes, destroying the ship unless it's jettisoned.  If jettisoned, the reactor behaves like a small powerful bomb.  If it goes too soon, it'll still kill you.

Life Support - Without this, the crew cannot survive.  When Life Support goes offline, you have one minute to get it back up.  If you don't, your crew will begin to die very quickly.  If you have no crew, your ship becomes derelict and you respawn in a new ship.  (The derelict thus, becomes little more than salvage or target practice)

Engines - Engines allow your ship to move.  They provide turning, strafing, and primary forward thrust.  If the engines are damaged to inoperative levels, your ship is 'dead in space' as the term is called, and you must get a tow home.

Armor - Armor is part of your hull, and you have it whether you like it or not.  The amount of armor you have depends on what ship you have. But you can refit your ship with different types of armor to achieve slightly different defensive effects.

ESSENTIALS

Aux Power - Not critical, but useful if you have to dump your core.  It provides the power needed to run your Criticals which will allow you to limp home.  If you don't have it and you dump your core..., your ship will very quickly end up as a Derelict.

Quantum Tunnel Drive (Q-Drive) - Allows you to enter Q space and travel FTL across systems.  Essential for space travel.

Shield Generator - Regenerating defensive measure that protects the ship from projectiles, both static and dynamic... important for combat as a number of defensive shield types have been created to maximize their effects at certain tasks.

Sensors - Sensor modules are important for space travel.  They allow the ship to project real time positional information on other ships to the pilot on a small strategic monitor.  Removal of the sensor module will leave the player stuck using only the main game window to locate opponents, reducing his strategic map to nothing more than a navigation display.


HARDPOINT MODULES

Point Defense Turrets - The smallest hardpoint, taking up the least volume on a ship.  PDTs can be equipped with small point defense weapons.  They automatically slave to the ~ automatic Point Defense Command and do not take up weapon number slots.

Small Turret
Small turrets are small hardpoints that can rotate and fire in all directions reguardless of the direction of the ship.  These are low volume hardpoints that can hold small weapons.

Medium Turret
Medium Turrets can hold 2 small or 1 medium sized weapons.  All weapons in a turret fire linked to that hardpoint command.

Large Turret
Large turrets can hold 4 small, 2 medium, or one large weapon.  They require the most space, and are thus, more common on larger ships.

Small Spinal Mount
Spinal mounts are hardpoint structures that are built directly to the superstructure of the ship.  These mounts do not move independantly of the ship, and always point forward.  Fighters generally are equipped with Spinal Mount Hardpoints.  Small Spinal mounts can hold one small weapon.

Capital Spinal Mount
A capital class spinal mount is a large structure used to house a gun too large to fit anywhere else on the rest of the ship.  Each of these hardpoints uses less volume than a turret, but can only hold one weapon.

Supercapital Spinal Mount
Used exclusively for bombardment level weapons.  Supercapital Spinal Mounts practically gut medium and large ships in order to house a single massive weapon.



Code:
I've got a logic for this now.
In order to make this system work, weapons have 'slot' values and each hardpoint has 'slots'.

PDs have a value of 1
Point Defense hardpoints do not count towards the ten hardpoint limit.  PDs operate independant of the player via a few settings that are selected VIA the tilde (~) command.


STs = 2

MTs = 4

LTs = 8

 Spinal mounts take up less volume and allow a larger gun, but are locked forward.
SSMs have a value of 2 
CSMs Have a value of 8
SCSMs have a value of 16

Guns are then assigned slot values weapon by weapon. To achieve different combinations.  Most will equip a ship with the biggest guns allowed in each hardpoint.

As an example:

A ship has two large turrets two mediums, and four smalls.

One large turret is equipped with a single large gun.
The other has two or three medium guns equipped to it.

The two mediums are switched out a pair of small guns each.
The smalls are actually equipped with a pair of point defense guns each.  They are actually being used offensively rather than in the point defense mode.

The ship is actually equipped for fighter clearing work, replacing it's small guns with clusters of point defense weapons actually increases the volume of fire it can put out.




Report to moderator   Logged

GCFA Naval Commander
Veteran Player - Supreme Spaceforce Agressor
Owner: Samurai Penguin Studios
Listen on Last.FM
AdmiralTigerclaw
Sound Developer
Expert Member
****
Posts: 734


Naval Commander: Forum Sound Admin


« Reply #1 on: December 29, 2008, 01:14:15 AM »

Picking up on the weapons where I left off, I figured out how to assign hardpoints easily and effectively in a format that will be easy for modders to use.


It goes something like this:

To start, ALL ships must be assigned to a 200 by 200 pixel box.
-ALL- ships.  It doesn't matter what size they are, the master image is 200 by 200 px.

To achieve size for ships, it would recieve a scale factor between 1, and 200.

100 being full scale, while 200 is double size, and 1 being minute.

At 1 percent size, the image is shrunk in game to 2 px by 2 px.  At 50 percent, the image would be 100 by 100.  At 200 percent, it would be 400, by 400.  (Huge).  This keeps ship images uniform, of a decent edit detail level, and easy to map out.

Figure 1



Now comes the entertaining part.

All ships are assigned thirty hardpoint slots.

10 for point defense, 10 for turrets, 10 for spinal mounts.

These ensure, that no matter what configuration the ship has.  The locations for hardpoints won't run out.  Just in case they do, a fallback is that all hardpoint will be at location 100,0

In the ship's control file, after the modules assigned and ship values, the hardpoint slots would be displayed as follows.

Priority,TYPE,X Axis, Y Axis, Orientation in Degrees

Priority defines which slot would be filled first when a player assigns a particular class.
Under value TYPE, you would have either PD, Regular Turret, or Spinal Mount.  Values, 1, 2, and 3 respectively.
X and Y Axis are obvious.  And Orientation is just like SF's mapping system.

So for a point defense turret in the left corner of a ship that would be filled SECOND when a point defense hardpoint is installed, it's value would be

2,1,30,10,0


So a a blank template would probably look like this.

Code:

//Point Defense spots
1,1,0,0,0
2,1,0,0,0
3,1,0,0,0
4,1,0,0,0
5,1,0,0,0
6,1,0,0,0
7,1,0,0,0
8,1,0,0,0
9,1,0,0,0
10,1,0,0,0

//Regular turret Spots
1,2,0,0,0
2,2,0,0,0
3,2,0,0,0
4,2,0,0,0
5,2,0,0,0
6,2,0,0,0
7,2,0,0,0
8,2,0,0,0
9,2,0,0,0
10,2,0,0,0

//Spinal Mount spots
1,3,0,0,0
2,3,0,0,0
3,3,0,0,0
4,3,0,0,0
5,3,0,0,0
6,3,0,0,0
7,3,0,0,0
8,3,0,0,0
9,3,0,0,0
10,3,0,0,0



While only the largest ships will carry the actual full ten primary weapon hardpoint loadout... ensuring that ALL ships have enough hardpoints leftover in layout will make sure that really convoluted loadouts being applied to a vessel can be supported.  This includes mods.


As additional format controlling.  Point Defenses have 220 degrees of firing angle from their orientation.  Regular turrets have 180 degrees, and spinal mounts have zero.

For weapon mapping and control purposes.   The TILDE command (~) controls the firing modes of the point defense rounds, and they do not count towards a ship maximum of ten main weapons. 
The main weapons fall in order of the hardpoint priority with Spinal Mounts coming first.  So spinal mounts 1 and 2 would be assigned to keyboard keys 1 and 2.  While turret mounts 1 and 2 would be assigned keyboard keys 3 and 4.

Asside from mods, ship loadouts for a default setup shouldn't ever actually push the limit of the above system.
Report to moderator   Logged

GCFA Naval Commander
Veteran Player - Supreme Spaceforce Agressor
Owner: Samurai Penguin Studios
Listen on Last.FM
Staker
Moderator
Veteran Member
****
Posts: 352



WWW Email
« Reply #2 on: December 29, 2008, 07:32:17 AM »

You sound like my Calculus III Professor... Boring and interesting at the same time. XD
Report to moderator   Logged

<<GB-C>> King of Death
I am Shiva the King of Death
AdmiralTigerclaw
Sound Developer
Expert Member
****
Posts: 734


Naval Commander: Forum Sound Admin


« Reply #3 on: December 29, 2008, 10:14:58 AM »

It ain't all pretty lights and shiny consoles.  This is what's I call 'working out the program logic'.
It's a twisted kind of method where I understand how it should function from a very core mathematical element, but without the context of actual coding.

I did it before with Milling Hordsman's jump command and carrier command scripts in X2.

In all, while the coder does have to figure things out, he has an idea of what he's looking to do...  This is especially important if you can break the code functionality down to very base behavior principles.

With the hyperbolic jump command software, I determined that if we can't have super speed jumping, we can fake it.  Setting position at super high speed over and over again with a math loop did the job.  After that, it was tweaking it and adding in features like jump interrupt, accelleration and decelleration.... as well as collision avoidance.  It worked wonderfully, even scaled up to thirty fighters using a group management command to all jump and intercept.  It was absolutely stunning to watch when it was combined with carier command programming.

The whole operation of scrambling fighters, grouping them, and sending them on an intercept mission played out like a ballet you never would have thought possible.
An enemy would trip a distance trigger, fighters would be scrambled in pairs.  The jump commands scripting would take over and the fighters would jump to intercept before the opponent became an actual threat to the carrier vehicle.  Once the threat was neutralized, the fighters would RTB.
If the enemy craft wasn't actually attacking, and tripped a second distance trigger that was further out, the fighters would break off and RTB.  (The first distance trigger was closer, it was the launch to defend trigger.  The second trigger, further out, was a break off trigger.  It was further out to allow fighters leeway to engage at range without getting called off.  The idea was to ensure the fighters didn't end up chasing an enemy craft half way across the system when they should be defending the carrier.)

When all the jump command and fighter control scripts were put into upscale play, it was AWESOME.  You could jump an entire fleet into a system in a large coordinated fleet jump and it would IMMEDIATELY engage enemies effectively.  Each enemy counted inside the intercept distance would get two fighters after it.  So you always had just the right force amount going into play.  The default AI of the game just couldn't handle the functional effectiveness of the force management.
Report to moderator   Logged

GCFA Naval Commander
Veteran Player - Supreme Spaceforce Agressor
Owner: Samurai Penguin Studios
Listen on Last.FM
Pages: [1]
  Send this topic  |  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.12 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!