Ship weapon arcs... |
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)
Re: Ship weapon arcs...
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.
Re: Ship weapon arcs...
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)
Re: Ship weapon arcs...
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.)

Re: Ship weapon arcs...
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.

Re: Ship weapon arcs...
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.

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

Re: Ship weapon arcs...
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.

Re: Ship weapon arcs...
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
), 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... 

Re: Ship weapon arcs...
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.

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

Re: Ship weapon arcs...
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).

Re: Ship weapon arcs...
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.
Re: Ship weapon arcs...
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.

Re: Ship weapon arcs...
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??

Re: Ship weapon arcs...
Place your diagram between a [ code ] and [ /code ] without the space between the brackets to preserve spacing etc.

Re: Ship weapon arcs...
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 

Re: Ship weapon arcs...
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!




Re: Ship weapon arcs...
//------------------------------------------------------------------------ // 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