Home Crush your enemies... and create an EMPIRE!!! Space Empires V -- BUY NOW!!!

User login

  • Create new account
  • Request new password

Navigation

  • news
    • archive
    • blogs
    • books
    • forums
    • recent posts
    • groups
  • image galleries
  • projects & downloads
  • search
  • create content
  • news aggregator

Search

Who's online

There are currently 0 users and 170 guests online.

Languages

  • English English
  • French French

Browse archives

« May 2008  
Mo Tu We Th Fr Sa Su
      1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31  
Home » news » forums » Space Empires V » Space Empires V General

Ship weapon arcs...

Submitted by Gideon on Sun, 2007-11-11 15:20. Space Empires V General

I know that this has been suggested, in several ways, before. I thought I would throw in my two cents, and make it as complete as possible. If this is inappropriate to have in Space Empires 5, then maybe in SE6? I guy can hope...

Here is a way that Weapon Arcs could be incorporated in to SE5. This is meant to be a holistic suggestion, touching on all aspects of the game which would need to be changed, and going in to specific detail as much as I can. Some of this might have been suggested before (I honestly can't remember) so don't be angry if it looks like I'm copying someone else's idea(s).

Definition:

First, a weapon arc is defined as a 90 degree slice out of a circle. The circle would be centered at the center node on an object, as defined by the Starting Position Offset entries in the _XFileClasses file for a particular race.. Front would be centered at the 0 angle, Back at 180, Left at 270, and Right at 90. The game would only fire a weapon that has one or more of these arcs set for it.

The components:

Each weapon component would have an entry like this:

Size Per Arc Formula                            := formula

This value would result in a float. Its purpose is to increase the size of a weapon as that weapon occupies more than one arc at a time. If it results in 0.10, then the weapon goes up by 10% in size for every arc beyond the first that it can fire in to. Using this as a formula instead of a value allows modders to make changes to incorporate new techs or racial traits which adjust the result.

The calculation is:

weapon_size = weapon_size + (weapon_size * (size_per_arc_result * number_of_arcs – 1))

The nature of this calculation is such that if Size Per Arc Formula is equal to 0.00, then the weapon doesn't get any larger as it is included in more arcs. This is useful for weapons that are always considered to have turrets (like Point Defenses, or whatever).

This formula is applied to the size of the weapon BEFORE weapon mounts. Though, given that its all multiplication, the order of operation really doesn't matter.

The interface:

There are three adjustments to the interface which would be made:

1 – In the Create Design screen, there would be a panel in the upper left corner of the area which shows the ship layout (or whatever other corner makes you happy). This area has four blue buttons on it: Front, Back, Left, Right. The player may select as many of these buttons at once as they like, with a minimum of one button selected at any time. Each button represents the arc(s) that a weapon is set to be able to fire in when it is selected from the components section in the lower left of the screen.

2 – The weapon icons on the Design Details window have a series of letters across the bottom of them (similar to the “O” and “I” that is the top left, or the number that is in the top right). These letters are: F, B, L, R. Each letter present corresponds the arc(s) which that component can fire in.

3 – In the lower left of the Ship Report window, on the damage tab, you have four buttons (Front, Back, Left, Right). Selecting a button causes all the weapons which can fire in to that particular arc to be listed in the left hand size of this window. On the Damage tab, weapon arcs are listed the same as on the Design Details window.

4 – Component damage percent, when shown, is changed to list in the middle of the component. This gets it out of the way of the weapon arc listing, and increases its prominence to the player. Perhaps the visual icon can be “greyed out”, with the damage percent printed over it?

The AI:

To have the AI design ships with discrete weapon arcs, we will first need a few Interface Constants. The changes and additions to the AI script files listed here are meant to be basic, and could be modified and expanded by modders for greater detail. These represent arcs and combinations of arcs:

ARC_FRONT = 1
ARC_BACK = 2
ARC_LEFT = 3
ARC_RIGHT = 4
ARC_FRONT_LEFT_RIGHT = 5
ARC_BACK_LEFT_RIGHT = 6
ARC_LEFT_FRONT_BACK = 7
ARC_RIGHT_FRONT_BACK = 8
ARC_FRONT_LEFT = 9
ARC_FRONT_RIGHT = 10
ARC_BACK_LEFT = 11
ARC_BACK_RIGHT = 12
ARC_FRONT_BACK = 13
ARC_LEFT_RIGHT = 14
ARC_ALL = 15

A value of 0 would indicate a component with no arc, like the bridge, etc.

Sys_Add_Component_To_Vehicle_Design would have to be changed to be like this:

Sys_Add_Component_To_Vehicle_Design: boolean
plr_index: long
design_id: long
comp_id: long
comp_enh_id: long
ship_section_id: long
comp_spread_type: long
comp_spread_id: long
arc_id: long

We would also need a new system function:

Sys_Number_Of_Component_On_Vehicle_Design: long
plr_index: long
design_id: long
comp_id: long
arc_id: long

Returns the number of a particular component on a ship design. Plr_index is the index of the player. Design_id is the id of the design that is being checked. Comp_id is the id of the component that is looked for. Arc_id is the arc that the component is assigned to (0 gets all components of the type we want without regard to arc).

Next, a bunch of global variables would be needed in the GlobalVariables file:

  lst_Weapon_Arc_Percent:                                     longlist

  lng_Weapon_Arc_Front:                                       long      := 100
  lng_Weapon_Arc_Back:                                        long      := 0
  lng_Weapon_Arc_Left:                                        long      := 0
  lng_Weapon_Arc_Right:                                       long      := 0
  lng_Weapon_Arc_Front_Left_Right:                            long      := 0
  lng_Weapon_Arc_Back_Left_Right:                             long      := 0
  lng_Weapon_Arc_Left_Front_Back:                             long      := 0
  lng_Weapon_Arc_Right_Front_Back:                            long      := 0
  lng_Weapon_Arc_Front_Left:                                  long      := 0
  lng_Weapon_Arc_Front_Right:                                 long      := 0
  lng_Weapon_Arc_Back_Left:                                   long      := 0
  lng_Weapon_Arc_Back_Right:                                  long      := 0
  lng_Weapon_Arc_Front_Back:                                  long      := 0
  lng_Weapon_Arc_Left_Right:                                  long      := 0
  lng_Weapon_Arc_All:                                         long      := 0

These are for use by the AI to design ships. Each AI might define this set differently in its _Main file.

The longlist is used in GlobalSettings like this:

//------------------------------------------------------------------------
// AI_Set_Weapon_Arcs
//------------------------------------------------------------------------
function AI_Set_Weapon_Arcs returns boolean
vars
  index:                 long
  weapon_percent:        long

begin
  return TRUE

  for index := 1 to 15 do
    set weapon_percent := 0

    case (index)
      1:
        set weapon_percent := lng_Weapon_Arc_Front
      2:
        set weapon_percent := lng_Weapon_Arc_Back
      3:
        set weapon_percent := lng_Weapon_Arc_Left
      4:
        set weapon_percent := lng_Weapon_Arc_Right
      5:
        set weapon_percent := lng_Weapon_Arc_Front_Left_Right
      6:
        set weapon_percent := lng_Weapon_Arc_Back_Left_Right
      7:
        set weapon_percent := lng_Weapon_Arc_Left_Front_Back
      8:
        set weapon_percent := lng_Weapon_Arc_Right_Front_Back
      9:
        set weapon_percent := lng_Weapon_Arc_Front_Left
      10:
        set weapon_percent := lng_Weapon_Arc_Front_Right
      11:
        set weapon_percent := lng_Weapon_Arc_Back_Left
      12:
        set weapon_percent := lng_Weapon_Arc_Back_Right
      13:
        set weapon_percent := lng_Weapon_Arc_Front_Back
      14:
        set weapon_percent := lng_Weapon_Arc_Left_Right
      15:
        set weapon_percent := lng_Weapon_Arc_All
    endcase 
 
    call lst_Weapon_Arc_Percent.add(weapon_percent)
  endfor
end

When adding non-weapons to a ship, the AI uses the following code INSTEAD of what it uses now:

        call Add_Components_To_Vehicle_Design(design_id, comp_id, comp_enh_id, SHIP_SECTION_OUTER_HULL, num_to_add, FALSE, 0)

When adding primary weapons to a ship, the AI uses the following code INSTEAD of what it uses now:

        set arc_to_add := Get_Weapon_Arc (design_id, comp_id, comp_tonnage,  lng_AI_Design_Tonnage_Ship_Pct_Primary_Weapon)
        call Add_Components_To_Vehicle_Design(design_id, comp_id, comp_enh_id, SHIP_SECTION_OUTER_HULL, num_to_add, FALSE, arc_to_add)

‹ Game freezing on me A Game Idea - PBC Teams vs PBC Teams ›
» login or register to post comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Mod Designer

Re: Ship weapon arcs...

Submitted by Gideon on Sun, 2007-11-11 15:24.
In the DesignCreation file, you would also have the following function:
//------------------------------------------------------------------------
// Get_Weapon_Arc 
//------------------------------------------------------------------------
function Get_Weapon_Arc returns long
params
  design_id:        long
  comp_id:          long
  comp_tonnage:     long
  total_percent:    long
vars
  index:            long
  retval:           long
  vehicle_tonnage:  long
  number_desired:   long
  number_present:   long
  percent_present:  long
  percent_desired:  long

begin
  set retval := 0
  set vehicle_tonnage := Sys_Get_Vehicle_Design_Tonnage_Space(design_id)
  set number_desired := Sys_Trunc((vehicle_tonnage * (total_percent / 100)) / comp_tonnage)
  set index := 0

  loop
    set index := index + 1
    set number_present := Sys_Number_Of_Component_On_Vehicle_Design(sys_long_Player_ID, design_id, comp_id, index)
    set percent_present := Sys_Trunc((number_present / number_desired) * 100)
    set percent_desired := lst_Weapon_Arc_Percent.get(index)

    if (percent_present < percent_desired) then
      set retval := index
    endif

  exitwhen (retval >= 1) or (index >= 15)
  endloop

  if (retval <= 0) then
    set retval := 1
  endif

  return retval
end
» login or register to post comments
Mod Designer

Re: Ship weapon arcs...

Submitted by Gideon on Sun, 2007-11-11 15:24.

The above function gets an arc to put a device in to, based on the percentage of total weapons that are meant to be in that arc. If it can't find an arc to put it in, then it defaults to the Front arc.

Heavy weapons would be set to be added to the front arc, as would all weapons added to Units. Weapon platforms would have their weapons added to the “all” arc. The nature of this system allows this to be heavily modified by modders.

Misc:

The above changes would provide what is required to implement weapon arcs, from a non-code standpoint. After such a thing is implemented, there are several miscellaneous changes that can be made. None of these changes are required, but the could make game play more interesting:

Combat AI could be changed so that vehicles try to keep their arcs with the most weapons towards the enemy, and try to get in to the enemy's arc with the least weapons.

Damage could be applied first to the weapons which can fire out of the arc that has been hit.

Anyways, I've tried for a system that is balanced, and allows for player creativity. Hopefully, I've also presented a system that can be implemented relatively easily (I'm under no illusions that this would be a small or easy thing to do), that is player-friendly, and that the AI can take advantage of.

Let me know what you think.

"Only by being constantly at war with evil in all things, including yourself, can you truely know peace."
Download my mod here: GidMod

» login or register to post comments

Re: Ship weapon arcs...

Submitted by StellarRat on Sun, 2007-11-11 18:47.

Fire arcs make no sense in space combat UNLESS the weapons are in fixed firing positions. Weapons in turret can be made to aim in any direction simply by rolling the ship on it's lengthwise axis. The only spot I would be in favor of being "blind" is the rear due to interfere from the engine exhaust, field, what-have-you. For fixed position weapons I wouldn't have any problem with firing arcs.

» login or register to post comments

Re: Ship weapon arcs...

Submitted by jimbob on Sun, 2007-11-11 19:40.

I think his idea of increasing the mass of the weapon as you increase the number of arcs is simulating the turret mass (actuators, gearing, etc).

I'd suggest that the truly large weapon mounts should not be turret-able, but be restricted to firing within only one arc.

(my 0.02Cdn = 0.0211587USD)

» login or register to post comments
Mod Designer

Re: Ship weapon arcs...

Submitted by Gideon on Sun, 2007-11-11 23:51.

@StellarRat, if you read the first part, you will see that the player can select more than one arc. As for rolling, etc, the space simulator in SE5 is not nearly sophisticated enough to account for such maneuvers. This system is meant to be able to be integrated with SE5, as the game is, not to rewrite the entire tactical combat physics.

@jimbob, that would be up to the player to decide, at creation time. Both the arc selection and the mount size affect the component size simultaniously. The example of a 10% increase was just an exmaple. The actual value could be as high as the person who enters the game values wants. The point is to allow players to make the decision with their ship designs, and if they want to pay the tradeoff in size adjustment for the flexability, then let them.

Its about including more design options for players, while allowing for more tactical options in combat.

"Only by being constantly at war with evil in all things, including yourself, can you truely know peace."
Download my mod here: GidMod

» login or register to post comments

Re: Ship weapon arcs...

Submitted by StellarRat on Mon, 2007-11-12 14:17.

I think you're missing my point. I'm trying to say that we can assume that the ship can bring any turreted weapon to bear in SEV because the ship can roll on their lengthwise axis. Just because you don't see this happen in the tactical simulator doesn't mean that it isn't being done by the ships (it's an abstraction.) So, I don't understand the reason for firing arcs to begin with. To me it isn't logical except for fixed position weapons (i.e. not in turrets.)

» login or register to post comments
Isopsyco's picture
Mod Designer

Re: Ship weapon arcs...

Submitted by Isopsyco on Mon, 2007-11-12 14:55.

I would like delineated firing arcs/positions just for the fact that you could place specific weapons in particular slots. And an added bonus if they could code it in would to have different reload/firing sequences for each arc/position. Sounds like SEV should have gone to hard points, would make the 3d modeler happier - doesn't have to fiddle around with firing arc positions and such.

» login or register to post comments
Mod Designer

Re: Ship weapon arcs...

Submitted by Gideon on Mon, 2007-11-12 16:26.

I made this post as a way to implement firing arcs and turrets in SE5 as the game stands now, but I agree it would have been ideal to have fixed points with angles of fire. Who knows, perhaps in SE6? Fortunatly for the modeler, this suggestion doesn't change how the game models are made at all. The calculation of fire arcs and what arcs a target is in would be all done in the game code, independant of model layout. The origin points that exist would be utilized in the same way. This just constrains what can be used based on relative location and heading of the objects in question.

StellarRat, the tactical game has moved dramaticly from abstract to specific in the move from SE4 to SE5. The inclusion of weapon arcs is a logical extension of the natural evolution of the combat system. I don't think I have well explained how the suggestion works. Multiple arcs can be selected, a weapon could be made to fire in the front/left/right arc, which is a 270 field of fire that excludes the rear section (something you indicated was acceptable). The objective with this idea is to allow players the option to trade off weapon flexability for weapon mass. It adds another facet of gameplay, one which players can spend unending hours tinkering with during their gameplay. Finding the "perfect setup" for use in particular combat situations is already something we spend much time on. This extends the debate (and the joy of experimentation) to a new level. True, a ship could roll to bring weapons to bare, but that conversly rolls arcs which weapons DON'T cover towards other areas (and potentially other enemies). As rolling (much like pitching) doesn't exist in SE5 (except as a representation of turning), I don't think it has a place in the discussion of the tactical combat system. Until such maneuvers exist, it is largly irrelevant, and when they do exist (perhaps SE7 or SE8?), then the advantages and DISADVANTAGES of such tactics can be explored. I think the old saying goes, "I see your point, I just don't agree." Sticking out tongue

"Only by being constantly at war with evil in all things, including yourself, can you truely know peace."
Download my mod here: GidMod

» login or register to post comments
Captain Kwok's picture
Mod Designer

Re: Ship weapon arcs...

Submitted by Captain Kwok on Mon, 2007-11-12 16:44.

There were pages and pages of discussion on this topic during the initial beta. The short of it was that weapon arcs via mounts was probably the best way to go because it wasn't dependent on the ship set being used.


Space Empires Depot | SE:V Balance Mod

» login or register to post comments
Isopsyco's picture
Mod Designer

Re: Ship weapon arcs...

Submitted by Isopsyco on Mon, 2007-11-12 20:17.

Captain Kwok wrote:
There were pages and pages of discussion on this topic during the initial beta. The short of it was that weapon arcs via mounts was probably the best way to go because it wasn't dependent on the ship set being used.


Space Empires Depot | SE:V Balance Mod

Ahh, makes sense for a modable game. I've modded some ships for Freespace and HomeWorld 2 and those are much harder given the hardpoints and all the separate animation required for each. Would definitely limit the number of starting shipsets due to cost of hiring a modeler (and a texture guy, I think they do more work!!)

Still, has to be an easier way to determine firing arcs besides inside a model program or playing with an engine light.

» login or register to post comments
Captain Kwok's picture
Mod Designer

Re: Ship weapon arcs...

Submitted by Captain Kwok on Mon, 2007-11-12 23:22.

Firing arcs are defined on the sets now, but that's strictly to determine which firing point to use when drawing a weapon animation - ie back point for shooting torpedoes behind your ship and so on. If "true" arcs are based on the ship set, then you open up a can of worms with how to balance the default races, let alone stop users from creating uber-custom sets with 360 arcs etc.


Space Empires Depot | SE:V Balance Mod

» login or register to post comments
Mod Designer

Re: Ship weapon arcs...

Submitted by Gideon on Tue, 2007-11-13 11:31.

That was why I suggested the above system. It uses the firing points to define the point of origin of the effect, but uses a more flexible system of arcs to define what an actual device can fire in. The size modifier would supply a point of balance (if correct modifiers are given) and it would allow for players to experiment. I supplied the AI scripting data, to show how the AI could make use of the same game system as the player, and could be set up (particularly by modders) to provide more "personality" for each race's designs.

Anyways, its not really important. I whipped this up while in the shower on the day I posted it, and thought it might be a useful exercise to put the polish on it and post it. Judging by the responces so far (raging from cool to fridgid) I would guess that there were some very heated arguments about this in beta, and everyone involved still has unpleasant feelings about it.

"Only by being constantly at war with evil in all things, including yourself, can you truely know peace."
Download my mod here: GidMod

» login or register to post comments
Cerberus's picture

Re: Ship weapon arcs...

Submitted by Cerberus on Tue, 2007-11-13 11:42.

Firing arcs would be pretty cool to have in the game. But i just don't think its ready to have them implemented yet.
You'd have to teach the computer how to use them, make it so all your weapons fire in all arcs (which they do now Sticking out tongue), or you'd have to be very much involved in battles. telling your ships to turn so they can bring weapons to bare. as it stands i think arcs would make combat way to awkward. and only workable in single play where you can go into tactical and control your ships.
Maybe in SEVI we'll see weapon arcs, combat manoeuvres, and a Z axis... Eye-wink

» login or register to post comments
Isopsyco's picture
Mod Designer

Re: Ship weapon arcs...

Submitted by Isopsyco on Tue, 2007-11-13 15:52.

I think the biggest problem to get this to implement is what Captain Kwok mentioned and what I've experienced: the shipsets have the firing arcs dependent on the size and relative position of the model in the game. You would have to have a method (and I would pay big money if you can find a way to get the firing arcs from a model better than I currently have too!!) to know where the boundary is of the 3d ship model, otherwise you would have to have all ships fit a specific size and dimension so the firing arcs could be placed there.

» login or register to post comments
Mod Designer

Re: Ship weapon arcs...

Submitted by Gideon on Tue, 2007-11-13 16:31.

So you couldn't use the model zero point (which exists, its referenced in the _Ships_XFileClasses.txt file) as the center and the front (angles are reference in the same file, so angle 0 exists) to orient a circle that is cut in to four sections: 315-45 for front, 45-135 for right, 135-225 for rear, and 225-315 for left? Each section corrosponds to a flag, with each device having one or more flags activated depending on the arcs chosen for it. That seems pretty simple to me, and wouldn't violate any balance ethics. Maybe I'm wrong?

"Only by being constantly at war with evil in all things, including yourself, can you truely know peace."
Download my mod here: GidMod

» login or register to post comments
Isopsyco's picture
Mod Designer

Re: Ship weapon arcs...

Submitted by Isopsyco on Tue, 2007-11-13 18:49.

You can get the angle correct but not the radius (or more like x y z) position, its different for every model.

» login or register to post comments
Isopsyco's picture
Mod Designer

Re: Ship weapon arcs...

Submitted by Isopsyco on Tue, 2007-11-13 18:50.

Ahh, wait a minute. I see what your talking about now. You could do that but you would have to sacrifice aesthetics (ship firing from within its own hull and no firing flare effects).

» login or register to post comments
Reiver's picture

Re: Ship weapon arcs...

Submitted by Reiver on Wed, 2007-11-14 00:45.

Really, the biggest benifit to firing arcs would be to allow varying degrees of 'spinal' weaponry - forward firing arcs. You'd fire them from the forward-most point, I suppose.

Other arcs start to, as noted, open large cans of worms, but I'd imagine a 'spinal' mount would be nonetheless handy for many modders, especially if it was mount-based.

How this applies to bases and sattelites, of course, is tricky. Perhaps there's a lot of cans of worms anyway, afterall.

» login or register to post comments

Re: Ship weapon arcs...

Submitted by rahlubenru on Wed, 2007-11-14 10:13.

Would using a formula from the centre to state which of thee existing firing point's it's possible to fire from?
Also if that could be implemented then maybe make arcs either a racial unlock or a technology, maybe with all races being able to fire foreward at the start but only forward.

» login or register to post comments
Cerberus's picture

Re: Ship weapon arcs...

Submitted by Cerberus on Wed, 2007-11-14 11:20.

ok
so i had an idea and i drew some pictures (using - | / \)... but when i post it takes all the spaces out and it looks like a bunch of gibberish.
is there a way to keep my text pictures stay intact??

» login or register to post comments
Captain Kwok's picture
Mod Designer

Re: Ship weapon arcs...

Submitted by Captain Kwok on Wed, 2007-11-14 12:22.

Place your diagram between a [ code ] and [ /code ] without the space between the brackets to preserve spacing etc.


Space Empires Depot | SE:V Balance Mod

» login or register to post comments
Cerberus's picture

Re: Ship weapon arcs...

Submitted by Cerberus on Thu, 2007-11-15 00:29.

well now i can't find my save file and i'm too lazy to write it out again. maybe i'll edit this another day Sticking out tongue

» login or register to post comments
BlueTemplar's picture

Re: Ship weapon arcs...

Submitted by BlueTemplar on Mon, 2007-11-19 22:44.

SEV being a game where you control lots of ships, IMHO the focus should be put first on making better task force and fleet mechanics. Something like a grid where you could manually place your ships when creating a fleet and/or before combat (i.e. custom formations modifiable in-game), assign strategies...


Have a question? Search the wiki first!
» login or register to post comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Now on STEAM

Now on STEAM!Space Empires V via STEAMSpace Empires IV via STEAMSTEAM online by Valve Corporation

Popular content

Today's:

  • Defence vs. Attack and other Combat related questions...
  • Sphärenwelt
  • Why Retrofit is limited to +50% per order?
  • Babylon 5 Wars SEV Mod Update
  • Balance Mod Neutral Races

All time:

  • Space Empires V and VI: Expansions and the Future: Tell the Company What's on Your Wish List
  • Space Empires V
  • Gritty Galaxy Fleet Clash
  • Damn Dirty Bugs/Annoyances
  • Space Empires V: General Thoughts, Observations, and Suggestions

Last viewed:

  • Ally empires blocking warp point
  • Enemy ships passing through warp point blockade...
  • What good are ministers?
  • It's 10/16, now where's the patch?
  • Crystalline Ship Question
(c) Strategy First, Inc. All rights reserved.