Firing Arc Data and Questions

Please post here for questions and discussion about data, event, art and sound modding and the game editor for Distant Worlds.

Moderator: MOD_DW2

Post Reply
User avatar
SamuraiProgrmmr
Posts: 416
Joined: Sun Oct 17, 2004 3:15 am
Location: NW Tennessee

Firing Arc Data and Questions

Post by SamuraiProgrmmr »

I have been working on extracting weapon component bay information (including allowable size and firing arc) from the XML data as part of my wish to build a series of charts that show the differences (some subtle) in the different ship hulls.

All of this information is based on v1.0.2.8.

In my quest, I have discovered that the documentation in ShipHullList.xsd does not match the XML in ShipHulls.xml.

Specifically, the tag supplied for WeaponBayFiringArc never appears in ShipHulls.xml. (See the first line in the first code block below and the next to last line in the second code block below.)

Code: Select all

  <xs:complexType name="WeaponBayFiringArc">
    <xs:sequence>
      <xs:element minOccurs="1" maxOccurs="1" name="Forward" type="Vector3" />
      <xs:element minOccurs="1" maxOccurs="1" name="Up" type="Vector3" />
      <xs:element minOccurs="1" maxOccurs="1" name="Right" type="Vector3" />
      <xs:element minOccurs="1" maxOccurs="1" name="RotationHalfArcRange" type="xs:float" />
      <xs:element minOccurs="1" maxOccurs="1" name="RotationHalfArcRangeCosine" type="xs:float" />
      <xs:element minOccurs="1" maxOccurs="1" name="HeadingUnitSize" type="xs:float" />
      <xs:element minOccurs="1" maxOccurs="1" name="ElevationUnitSize" type="xs:float" />
      <xs:element minOccurs="0" maxOccurs="1" name="HeadingElevations" type="xs:base64Binary" />
      <xs:element minOccurs="1" maxOccurs="1" name="HeadingCount" type="xs:unsignedByte" />
      <xs:element minOccurs="1" maxOccurs="1" name="ElevationCount" type="xs:unsignedByte" />
    </xs:sequence>

Code: Select all

  <xs:complexType name="ComponentBay">
    <xs:sequence>
      <xs:element minOccurs="1" maxOccurs="1" name="ComponentBayId" type="xs:unsignedByte" />
      <xs:element minOccurs="1" maxOccurs="1" name="Type" type="ComponentBayType" />
      <xs:element minOccurs="1" maxOccurs="1" name="MaximumComponentSize" type="xs:int" />
      <xs:element minOccurs="0" maxOccurs="1" name="MeshName" type="xs:string" />
      <xs:element minOccurs="1" maxOccurs="1" name="RotationHalfArcRange" type="xs:float" />
      <xs:element minOccurs="1" maxOccurs="1" name="DisplayEffectRescaleFactor" type="Vector3" />
      <xs:element minOccurs="1" maxOccurs="1" name="DisplayEffectOffset" type="Vector3" />
      <xs:element minOccurs="0" maxOccurs="1" name="Meshes" type="ArrayOfMeshInfo" />
      <xs:element minOccurs="0" maxOccurs="1" name="WeaponBayFiringArc" type="WeaponBayFiringArc" />
    </xs:sequence>
Clearly the data exists somewhere as the ships have individual and persistent firing arcs for their weapon component bays. But I can't find it.

To state what may be obvious to anyone interested in this post, here is what I have determined.

1). The RotationalHalfArcRange element in ComponentBay is one half of the firing arc in radians (rather than degrees). It does not say anything about the direction of the centerline of the firing arc.

2). Weapon component bays have their centerline pointed in one of eight directions. (0, 45, 90, 135, 180, 225, 270, 315).

3). So far in my data gathering (by hand), it appears that the definitions for each hardpoint designation (i.e. #weapon0, #weapon1, etc.) are consistent within each role with the exception of Troop Transports (which are having some changes made that may confirm this). As an example, The Heavy Battleship has 17 hardpoints. The Battleship has only 15, but the ones it has are configured exactly like the corresponding ones on the Heavy Battleship.

I have gathered the information about the centerline by hand so far (details below). I would really appreciate any input as to where this data might exist and how to extract it gracefully. The truth is once the 'balance' updates happen, it will remove any confidence in the hand gathered data and it will all have to be checked (again by hand.)

So here are my questions:

Question #1 : Has the WeaponBayFiringArc xml tag been deprecated or is this advance warning of a better way of doing things?

Question #2 : Does anyone know where I can find extractible firing arc information at this time?

As mentioned above, I have gathered some data on the centerline of the firing arcs of the weapon component bays. This is clearly a work in process but I am happy to share it at this time to demonstrate I have actually been working on this .

I gathered this information by:
1) Starting new game with my race set to the highest tech level
2) Going into ship design and 'creating' a new version of each ship hull.
3) visually observing the facing of each weapon hardpoint
4) logging that information in a spreadsheet.

I have designated the different directions as:
b - bow
p - port
s - starboard
a - aft
bp - bow port (45 degrees counterclockwise from the bow)
bs - bow starboard (45 degrees clockwise from the bow)
ap - aft port (45 degrees clockwise from the aft)
as - aft starboard (45 degrees counterclockwise from the aft)

In situations where the weapon was a 360 degree weapon, I have categorized the hardpoint according to what other ship hulls have that hardpoint categorized as. I did this because the 360 degree classification is, in fact, noted in the Ship Hull xml.

Not all ship hulls have data as I did not play further to unlock any ship hulls that were not available upon start at the highest tech level.

In this data, the Size is only listed when it was needed for me to go back and grab the correct ship hull id. This happened in the case of ship hulls with the exact same Role and Name. (Ex. there are three Small Space Ports.)
The numbers in the first (heading) row equate to the #weapon number. (Ex. 0 represents the #weapon0 hardpoint)

I have only gathered data on Human ships thus far. (I'm really hoping there is a better way to do this.)

While I have tried to be diligent, I must admit that there might be some mistakes. I would love to hear back on any issues - especially if there is not a graceful way to dig this information out of the game files.

I hope this is useful to someone.

Code: Select all

  Race          Role                 Ship Hull                Ship Hull ID         Size    0     1     2     3     4     5     6     7     8     9     10    11    12    13    14    15    16    17     18      19      20      21
  Human     CapitalShip            Battlecruiser                   317                     b     bp    bs                p     s     p     s     p     s                 ap    as    b     b     a
  Human     CapitalShip             Battleship                     324                     b     bp    bs    p     s     p     s     p     s     p     s                 ap    as    b     b     a
  Human     CapitalShip             Dreadnaught                    337
  Human     CapitalShip          Heavy Battleship                  333                     b     bp    bs    p     s     p     s     p     s     p     s     p     s     ap    as    b     b     a
  Human       Carrier                 Carrier                      325                     b     bp    bs    p     s     b     b     a
  Human       Carrier              Fleet Carrier                   338
  Human       Carrier              Heavy Carrier                   334                     b     bp    bs    p     s     b     b     a
  Human       Carrier              Light Carrier                   318                     b                 p     s     b           a
  Human     Colony Ship          Large Colony Ship                 160                     b     a
  Human     Colony Ship         Massive Colony Ship                332                     b     a
  Human     Colony Ship         Medium Colony Ship                 150                     b     a
  Human     Colony Ship          Small Colony Ship                 128                     b
  Human     Colony Ship             World Ship                     336                     b     a
  Human  Construction Ship    Large Construction Ship              158                     b     a
  Human  Construction Ship   Medium Construction Ship              140                     b     a
  Human  Construction Ship    Small Construction Ship              117                     b     a
  Human       Cruiser             Command Cruiser                  321                     b     bp    bs    p     s     p     s     a     b     b
  Human       Cruiser                 Cruiser                      322                     b     bp    bs    p     s     p     s     a     b     b
  Human       Cruiser           Exploration Cruiser                326                     b     bp    bs    p     s     p     s     a     b
  Human       Cruiser              Fast Cruiser                    319                     b     bp    bs    p     s     p     s     a     b     b
  Human       Cruiser          Fleet Command Cruiser               328                     b     bp    bs    p     s     p     s     a     b     b
  Human       Cruiser              Heavy Cruiser                   329                     b     bp    bs    p     s     p     s     a     b     b
  Human       Cruiser              Light Cruiser                   154                     b     bp    bs    p     s     p     s     a     b     b
  Human       Cruiser           Long Range Cruiser                 320                     b     bp    bs    p     s     p     s     a     b
  Human       Cruiser             Patrol Cruiser                   327                     b     bp    bs    p     s     p     s     a     b     b
  Human    Defensive Base          Space Bastion                   157             550     bp    bs    as    ap    p     s     bs    as    b     a     ap    bp
  Human    Defensive Base          Space Bastion                   149             450     bp    bs    as    ap                bs    as    b     a     ap    bp
  Human      Destroyer               Destroyer                     137                     bp    bs    b     b     a
  Human      Destroyer            Fast Destroyer                   146                                 b     b     a
  Human      Destroyer            Fleet Destroyer                  147                     bp    bs    b     b     a
  Human      Destroyer            Heavy Destroyer                  145                     bp    bs    b     b     a
  Human        Escort                 Escort                       114                     b     b
  Human        Escort              Heavy Escort                    123                     b     b
  Human        Escort              Patrol Escort                   124                     b     b
  Human   Exploration Ship    Large Exploration Ship               159                     b     a
  Human   Exploration Ship    Medium Exploration Ship              141                     b     a
  Human   Exploration Ship    Small Exploration Ship               118                     b     a
  Human    FighterBomber           Basic Bomber                    162                     b     b
  Human    FighterBomber           Heavy Bomber                    393                           b     b
  Human    FighterBomber           Light Bomber                    164                     b     b
  Human    FighterBomber           Medium Bomber                   167                     b     b
  Human    FighterBomber           Strike Bomber                   392                           b     b
  Human  FighterInterceptor    Advanced Interceptor                386                     b     b
  Human  FighterInterceptor       Attack Fighter                   168                     b     b
  Human  FighterInterceptor        Basic Fighter                   161                     b
  Human  FighterInterceptor    Gyrfalcon Interceptor               388              20     b     b
  Human  FighterInterceptor    Gyrfalcon Interceptor               389              22     b     b
  Human  FighterInterceptor    Gyrfalcon Interceptor               111              19     b     b
  Human  FighterInterceptor    Light Attack Fighter                165                     b     b
  Human  FighterInterceptor      Light Interceptor                 163                     b     b
  Human  FighterInterceptor       Strike Fighter                   387                     b     b
  Human  FighterInterceptor     Superiority Fighter                390                     b     b
  Human  FighterInterceptor     Superiority Fighter                391
  Human  FighterInterceptor    Tactical Interceptor                166                     b     b
  Human       Frigate              Fast Frigate                    135                     b     bp    bs
  Human       Frigate              Fleet Frigate                   136                     b     bp    bs          a
  Human       Frigate                 Frigate                      125                     b     bp    bs          a
  Human       Frigate              Heavy Frigate                   134                     b     bp    bs    b     a
  Human     Fuel Tanker          Large Fuel Tanker                 151                     b     p     s
  Human     Fuel Tanker         Medium Fuel Tanker                 761                     b                 a
  Human     Fuel Tanker          Small Fuel Tanker                 131                     b                 a
  Human   Large Freighter         Large Freighter                  152                     a
  Human   Large Spaceport        Large Space Port                  331                     a     s     s     b     b     p     p     a           as    bs                bp    ap          a     b      a       s       b       p
  Human   Medium Freighter       Medium Freighter                  143                     a
  Human   Medium Spaceport       Medium Space Port                 156             750     bp    ap    as    bs    bs    bp    as    ap    p     s     p     a     s     b     a     b
  Human   Medium Spaceport       Medium Space Port                 148             600     bp    ap    as    bs    bs    bp    as    ap    p     s     p     a     s     b
  Human     Mining Ship          Large Mining Ship                 142                     b     a
  Human     Mining Ship         Medium Mining Ship                 129                     b     a
  Human     Mining Ship          Small Mining Ship                 119                     b
  Human    Mining Station      Large Mining Station                132                     a     p     b     s     b
  Human    Mining Station      Small Mining Station                121                     a     p     b     s     b
  Human  Monitoring Station     Monitoring Station                 115                     b     a     p     s
  Human    Passenger Ship      Large Passenger Ship                153                     a
  Human    Passenger Ship      Medium Passenger Ship               144                     a
  Human    Passenger Ship      Small Passenger Ship                130                     a
  Human   Research Station       Research Station                  122                     b     a     p     s
  Human     Resort Base           Resort Station                   133                     b     a     p     s
  Human   Small Freighter         Small Freighter                  120                     a
  Human   Small Spaceport        Small Space Port                  139             450     bp    bs    as    ap    p     s     bs    as    b     a     ap    bp
  Human   Small Spaceport        Small Space Port                  127             375     bp    bs    as    ap    p     s     bs    as    b     a
  Human   Small Spaceport        Small Space Port                  116             250     bp    bs    as    ap    p     s     bs    as    b     a
  Human   Troop Transport         Army Transport                   335                     b     b     a     p     s
  Human   Troop Transport      Expedition Transport                330                     b     b     a     p     s
  Human   Troop Transport      Large Troop Transport               155                           p
  Human   Troop Transport     Massive Troop Transport              323                           b     a     p     s
  Human   Troop Transport     Medium Troop Transport               138                           p
  Human   Troop Transport      Small Troop Transport               126                           p     s
Bridge is the best wargame going .. Where else can you find a tournament every weekend?
User avatar
frankycl
Posts: 402
Joined: Mon Mar 01, 2021 5:16 pm

Re: Firing Arc Data and Questions

Post by frankycl »

As far as I know, the official XSDs are only a list of entries that COULD be placed in the XMLs (as an example, to get the syntax right that the game would understand), but often they aren't used at all, so far. - So, I guess you could just add the missing entries. - Have you already tried this ? ;)

... and yes, your listing to the ship hulls is very interesting (at least for me) - especially since you sorted it according to the ship roles (that's very helpful if you're looking for the right ShipHulls-ID for the specific ship-types. :)). But I would suggest that you put this in an Excel- or Open-Office-spreadsheet, so that anybody can sort it according to the other things, too. ;)

- But I'd need this also for the other races (!) - do you want to mak a spreadsheet for them too ? (would be very much appreciated ;-))
User avatar
SamuraiProgrmmr
Posts: 416
Joined: Sun Oct 17, 2004 3:15 am
Location: NW Tennessee

Re: Firing Arc Data and Questions

Post by SamuraiProgrmmr »

frankycl wrote: Mon Apr 04, 2022 4:28 pm As far as I know, the official XSDs are only a list of entries that COULD be placed in the XMLs (as an example, to get the syntax right that the game would understand), but often they aren't used at all, so far. - So, I guess you could just add the missing entries. - Have you already tried this ? ;)
No, I haven't made any changes to the xml files. I am not so keen on modding as much as having the data to make good decisions. As I play more, I wonder how important the firing arcs really are. On the other hand, putting a big expensive weapon where it can see the most targets seems useful.
frankycl wrote: Mon Apr 04, 2022 4:28 pm ... and yes, your listing to the ship hulls is very interesting (at least for me) - especially since you sorted it according to the ship roles (that's very helpful if you're looking for the right ShipHulls-ID for the specific ship-types. :)). But I would suggest that you put this in an Excel- or Open-Office-spreadsheet, so that anybody can sort it according to the other things, too. ;)
Well, it is in an excel spreadsheet. The data I posted is an export (text, space delimited) from that sheet. Eventually, I would be happy to make it available but I am at the very beginning of this. Right now, it is a rough work in progress. I know there are problems (that may have been addressed in a beta patch) so I will wait a bit before posting it.

My ultimate goal is to combine this data with the component bay size and firing arc range to provide that information in a consolidated form. However, I don't know about committing to that project until I can be in a position where I don't have to spend several hours manually checking and correcting every time a patch comes out. This is why I am looking for a programmatic way of extracting the data. The combination of data and the production of useful reports would be automated as well (I am a programmer after all :) ).
frankycl wrote: Mon Apr 04, 2022 4:28 pm - But I'd need this also for the other races (!)
As would I.
frankycl wrote: Mon Apr 04, 2022 4:28 pm do you want to mak a spreadsheet for them too ? (would be very much appreciated ;-))
I'm working toward that. I want to see what is coming as far as extractability first. This is a tedious process and for my old eyes, it is tiring to be sure that you have the right row and column as you put down the information for each hardpoint. I probably won't do another race for a few days just to see what

If you would like to participate, let me know what race you are working on so we don't duplicate our effort.
Bridge is the best wargame going .. Where else can you find a tournament every weekend?
User avatar
frankycl
Posts: 402
Joined: Mon Mar 01, 2021 5:16 pm

Re: Firing Arc Data and Questions

Post by frankycl »

SamuraiProgrmmr wrote: Mon Apr 04, 2022 4:57 pm (...) I wonder how important the firing arcs really are. (...)
I think they are at least important for ships that have a slow turn-rate. ;)
SamuraiProgrmmr wrote: Mon Apr 04, 2022 4:57 pm Well, it is in an excel spreadsheet.
Good to hear - I think I realy could need this. :mrgreen:
SamuraiProgrmmr wrote: Mon Apr 04, 2022 4:57 pm (...) This is why I am looking for a programmatic way of extracting the data. The combination of data and the production of useful reports would be automated as well (I am a programmer after all :) ).
Wow - this would be very interesting, too, I think (although there are not many things that where changed in the patches (with one exception - 1.0.2.1 :? ) - How do you do this ? (and could you offer me the code/formula for this, too ?)

SamuraiProgrmmr wrote: Mon Apr 04, 2022 4:57 pm (...) This is a tedious process and for my old eyes, it is tiring to be sure that you have the right row and column as you put down the information for each hardpoint. (...)
Then you maybe could need f.lux (https://justgetflux.com/) - it's free, easy to use and helped me a lot with this (and maybe it would be good to use the high-contrast mode (with self-chosen colors :D ) from WIN, too). ;)
SamuraiProgrmmr wrote: Mon Apr 04, 2022 4:57 pm If you would like to participate, let me know what race you are working on so we don't duplicate our effort.
No, thanks - I'm only interested in modding (and using such tools) - and my coding skills are also very limited, I'm affraid. :roll: (but my son is also a professional programmer, and he helps me often. :D )
User avatar
SamuraiProgrmmr
Posts: 416
Joined: Sun Oct 17, 2004 3:15 am
Location: NW Tennessee

Re: Firing Arc Data and Questions

Post by SamuraiProgrmmr »

frankycl wrote: Mon Apr 04, 2022 5:36 pm I think they are at least important for ships that have a slow turn-rate. ;)
I mean in the context of building a large, robust economy so you can build more ships may be much, much more important than worrying about balancing speed vs maneuverability. I'm just not sure yet.
frankycl wrote: Mon Apr 04, 2022 5:36 pm Wow - this would be very interesting, too, I think (although there are not many things that where changed in the patches (with one exception - 1.0.2.1 :? ) - How do you do this ? (and could you offer me the code/formula for this, too ?)
You asked how, so here goes. Understand that I have only started this project and may not finish it.

I use Delphi (the language I used professionally - too old to bother learning a new language). I have written a program that opens the XML files and extracts the data (element by element) into objects I have designed that mirror the structure of the data.

After all of the objects (from the different XML files) are imported (not done yet), I will make a pass through the data and link the objects together. An example would be linking the resource id from the resources needed for a ship hull to an object that represents the resource. After that is done, I can look at the resource and easily get a list of all of the things (ship hulls, components, research items, etc.) that use this resource.

As I am doing this, I will produce output for the things I am interested in. The first being consolidated firing arc information. I have a reporting suite that I can use, but it will not be useful to anyone else to build on. I.e. it will only be something you can read, not easily manipulated.

Typically, until I have things working as I want them, I will simply export information to a CSV file (see the ones at the end of this post) which can be imported into a spreadsheet and looked or manipulated.

The real problem with dumping output into a spreadsheet is that the data is arranged in a hierarchical format so it doesn't relate so well to that format. For example, a ship hull has many components and has many required resources, etc.

tldr; - well, you asked.
frankycl wrote: Mon Apr 04, 2022 5:36 pm Then you maybe could need f.lux (https://justgetflux.com/) - it's free, easy to use and helped me a lot with this (and maybe it would be good to use the high-contrast mode (with self-chosen colors :D ) from WIN, too). ;)
Thanks for the suggestion but color and contrast is not the problem. The problem is looking at the game on one screen and the spreadsheet on the other and being sure I am on the right line and the right column. It is repetive, boring, and tiring. I find myself losing focus and have to take a break or risk making errors (not like it's perfect).
frankycl wrote: Mon Apr 04, 2022 5:36 pm No, thanks - I'm only interested in modding (and using such tools) - and my coding skills are also very limited, I'm affraid. :roll: (but my son is also a professional programmer, and he helps me often. :D )
OK

Here is some data I have extracted in CSV format for an example...these are just segments of the files, not the whole thing. These files are looong.

These are it for now.

Ship Hulls

Code: Select all

Ship Hull ID,Race ID,Name,Role,Level,Design Template ID,Size,Maximum Size,Model Name,Base Cost,Armor Reactive Rating,Ion Defense,Engine Limit,Countermeasures Bonus,Targeting Bonus,Turn Roll Rate,Maximum Turn Roll Angle,Build Speed Factor,Image Filename,Model Size X,Model Size Y,Model Size Z,,Description
0,3,Escort,Escort,0,-1,125,375,Ships/Haakonish/escort,1400,3,1,3,0.1,0,0.25,0.35,0,Ships/Haakonish/Images/escort,0,0,0,,
1,3,Monitoring Station,MonitoringStation,0,-1,225,650,Ships/Haakonish/researchStation,6000,3,1,-1,-0.05,0,0,0,0,Ships/Haakonish/Images/researchStation,0,0,0,,
2,3,Small Construction Ship,ConstructionShip,0,-1,150,475,Ships/Haakonish/construction,1500,2,0,2,0,0,0.25,0.25,0.67,Ships/Haakonish/Images/construction,0,0,0,,
3,3,Small Exploration Ship,ExplorationShip,0,-1,125,400,Ships/Haakonish/exploration,1500,2,0,3,0.1,0,0.25,0.25,0.67,Ships/Haakonish/Images/exploration,0,0,0,,
4,3,Small Mining Ship,MiningShip,0,-1,125,400,Ships/Haakonish/mining,1000,2,0,2,0,0,0.25,0.25,0,Ships/Haakonish/Images/mining,0,0,0,,
5,3,Small Freighter,FreighterSmall,0,-1,125,400,Ships/Haakonish/cargo,1000,2,0,2,0,0,0.25,0.25,0,Ships/Haakonish/Images/cargo,0,0,0,,
6,3,Small Mining Station,MiningStation,0,-1,225,700,Ships/Haakonish/mining_station,4000,2,0,-1,-0.1,0,0,0,0,Ships/Haakonish/Images/mining_station,0,0,0,,
Ship Hulls with Bonuses

Code: Select all

Ship Hull ID,Name,Bonus Type,Amount,Applies To,Filter ID,Discovery Level,end
0,Escort,ShipSpeed,0.25,Item,0,0,
0,Escort,ShipManeuvering,0.25,Item,0,0,
1,Monitoring Station,WeaponsRange,0.5,Item,0,0,
6,Small Mining Station,WeaponsRange,0.5,Item,0,0,
7,Research Station,WeaponsRange,0.5,Item,0,0,
7,Research Station,ShieldRechargeRate,0.5,Item,0,0,
Ship Hulls With Component Bays

Code: Select all

Ship Hull ID,Name,Component Bay ID,Component Bay Type,Maximum Component Size,Mesh Name,Rotation Half Arc Range,Display Effect Rescale Factor X,Display Effect Rescale Factor Y,Display Effect Rescale Factor Z,Display Effect Offset X,Display Effect Offset Y,Display Effect Offset Z,,Description
0,Escort,0,Weapon,120,#weapon0,2.356,0,0,0,0,0,0,
0,Escort,1,Engine,50,#engine0,0,1,0,0,0,0,0,
0,Escort,2,Engine,50,#engine1,0,1,0,0,0,0,0,
0,Escort,3,Engine,50,#engine2,0,1,0,0,0,0,0,
0,Escort,4,Sensor,19,#sensor0,0,0,0,0,0,0,0,
0,Escort,5,Sensor,19,#sensor1,0,0,0,0,0,0,0,
0,Escort,6,Defense,50,#defense0,0,0,0,0,0,0,0,
0,Escort,7,Defense,50,,0,0,0,0,0,0,0,
0,Escort,8,General,50,,0,0,0,0,0,0,0,
0,Escort,9,General,50,,0,0,0,0,0,0,0,
0,Escort,10,General,50,,0,0,0,0,0,0,0,
0,Escort,11,General,50,,0,0,0,0,0,0,0,
0,Escort,12,General,50,,0,0,0,0,0,0,0,
0,Escort,13,General,50,,0,0,0,0,0,0,0,
0,Escort,14,General,50,,0,0,0,0,0,0,0,
0,Escort,15,General,50,,0,0,0,0,0,0,0,
0,Escort,16,General,50,,0,0,0,0,0,0,0,
0,Escort,17,General,50,,0,0,0,0,0,0,0,
1,Monitoring Station,0,Weapon,120,#weapon0,1.963,0,0,0,0,0,0,
1,Monitoring Station,1,Weapon,120,#weapon1,1.963,0,0,0,0,0,0,
1,Monitoring Station,2,Weapon,39,#weapon2,1.963,0,0,0,0,0,0,
1,Monitoring Station,3,Weapon,39,#weapon3,1.963,0,0,0,0,0,0,
1,Monitoring Station,4,Hangar,50,#hangar0,0,0,0,0,0,0,0,
1,Monitoring Station,5,Hangar,50,#hangar1,0,0,0,0,0,0,0,
1,Monitoring Station,6,Sensor,120,#sensor0,0,0,0,0,0,0,0,
1,Monitoring Station,7,Sensor,19,#sensor1,0,0,0,0,0,0,0,
1,Monitoring Station,8,Sensor,19,#sensor2,0,0,0,0,0,0,0,
1,Monitoring Station,9,Defense,50,#defense0,0,0,0,0,0,0,0,
1,Monitoring Station,10,Defense,50,#defense1,0,0,0,0,0,0,0,
1,Monitoring Station,11,Defense,50,,0,0,0,0,0,0,0,
1,Monitoring Station,12,Defense,50,,0,0,0,0,0,0,0,
1,Monitoring Station,13,General,50,,0,0,0,0,0,0,0,
1,Monitoring Station,14,General,50,,0,0,0,0,0,0,0,
1,Monitoring Station,15,General,50,,0,0,0,0,0,0,0,
1,Monitoring Station,16,General,50,,0,0,0,0,0,0,0,
1,Monitoring Station,17,General,50,,0,0,0,0,0,0,0,
1,Monitoring Station,18,General,50,,0,0,0,0,0,0,0,
1,Monitoring Station,19,General,50,,0,0,0,0,0,0,0,
1,Monitoring Station,20,General,50,,0,0,0,0,0,0,0,
1,Monitoring Station,21,General,50,,0,0,0,0,0,0,0,
1,Monitoring Station,22,General,50,,0,0,0,0,0,0,0,
1,Monitoring Station,23,General,50,,0,0,0,0,0,0,0,
1,Monitoring Station,24,General,50,,0,0,0,0,0,0,0,
Note to those who understand : No, this data is not normalized. It is for human consumption. :)
Bridge is the best wargame going .. Where else can you find a tournament every weekend?
User avatar
frankycl
Posts: 402
Joined: Mon Mar 01, 2021 5:16 pm

Re: Firing Arc Data and Questions

Post by frankycl »

SamuraiProgrmmr wrote: Mon Apr 04, 2022 6:35 pm
You asked how, so here goes. (...)

Typically, until I have things working as I want them, I will simply export information to a CSV file (...)
Yes, that sounds very interesting, but also very complicated and like a lot of work (if I only think of the 482824 lines/entries in the ShipHulls.xml :?) - so, I guess I could't use it myself, huh ?
... but I also know CSV-files and how to make a proper spreadsheet of them. :)

SamuraiProgrmmr wrote: Mon Apr 04, 2022 6:35 pm
frankycl wrote: Mon Apr 04, 2022 5:36 pm Then you maybe could need f.lux (...)
(...) It is repetive, boring, and tiring. I find myself losing focus and have to take a break or risk making errors (...).
Well, if you're eys don't get tired so quickly, you won't lose focus so soon, too. (at least that's my experience with it - among other benefits) ;)
User avatar
iancmtaylor
Posts: 181
Joined: Wed May 09, 2012 6:38 pm

Re: Firing Arc Data and Questions

Post by iancmtaylor »

Component Bay Mesh info is somewhere in the actual 3d model file. To see the data just load up the ship model in game, unless you want to figure out how to use Blender.

https://dw2.fandom.com/wiki/Boskaran_Ship_Models

Most of the things you're looking for have already been taken care of. All you need are directionals and arcs for weapons.
I am /u/SharkMolester, moderator of /r/DistantWorlds and BFHKitteh, admin of https://dw2.fandom.com/wiki/Distant_Worlds_2_Wiki.
User avatar
SamuraiProgrmmr
Posts: 416
Joined: Sun Oct 17, 2004 3:15 am
Location: NW Tennessee

Re: Firing Arc Data and Questions

Post by SamuraiProgrmmr »

iancmtaylor wrote: Mon Apr 04, 2022 10:44 pm Most of the things you're looking for have already been taken care of. All you need are directionals and arcs for weapons.
iancmtaylor, thanks for the effort.

I can already extract everything I need except the direction the weapon bay component points. Are you suggesting that the combat mechanics in the program relies upon directional data embedded in the mesh?
Bridge is the best wargame going .. Where else can you find a tournament every weekend?
KeCzajkowski
Posts: 51
Joined: Fri Sep 18, 2020 2:08 pm

Re: Firing Arc Data and Questions

Post by KeCzajkowski »

I can confirm that the firing arc direction is determined by the rotation of the mesh, mostly on the Z axis. This also goes for just about every component. The 'entrance' of docking bays for ships/fighters, the direction of engine trails etc.

I'm not sure how exactly you'd extract it but the data will be in .xkskel files (ie human_battleship Skeleton.xkskel)
User avatar
SamuraiProgrmmr
Posts: 416
Joined: Sun Oct 17, 2004 3:15 am
Location: NW Tennessee

Re: Firing Arc Data and Questions

Post by SamuraiProgrmmr »

Thank you. I will look into it. 8-)
Bridge is the best wargame going .. Where else can you find a tournament every weekend?
User avatar
frankycl
Posts: 402
Joined: Mon Mar 01, 2021 5:16 pm

Re: Firing Arc Data and Questions

Post by frankycl »

iancmtaylor wrote: Mon Apr 04, 2022 10:44 pm (...) unless you want to figure out how to use Blender.
What do you mean by "Blender" ? - I thought that they used >Stride 3D< / Xenko for modeling - and that this would be needed for modding, too. - Or is there another, more easy to use editor (= Blender) for the model- (/bundle-) files ? :?:
KeCzajkowski
Posts: 51
Joined: Fri Sep 18, 2020 2:08 pm

Re: Firing Arc Data and Questions

Post by KeCzajkowski »

So any 3D package that supports FBX files can be used to edit or make new models. The Stride/Xenko side of things is for materials and for asset management. So you edit the mesh in your package of choice, import it into Stride, set up and assign materials, and then build a bundle.

SamuraiProgrmmr sent me a PM with some questions and I figured I'd answer it in here in case it's useful for anyone else.

as far as I know the shmd files don't contain mesh info in them. I'm pretty sure all they have is stuff generated from shiphull.xml. Their file sizes are too small for mesh data, textures or anything like that. What would be in there (and in shiphulls) related to what you're looking for is the total firing area. It's in radians and the value is for the radius of the total area as you guess. Here's a little cheat sheet I made myself that might helpful in some way for finding data as these are the only values I ever used for this.

90 degrees - 0.79
135 degrees - 1.18
180 degrees - 1.57
225 degrees - 1.96
270 degrees - 2.36
360 degrees - 3.14

This is what a typical weapon mount looks like in Maya (again any 3D package that supports FBX should work)

Image

This is a small mount but could have the large weapons in there as well. They wont show up unless the component slot in shiphulls.xml is large enough. It's go a rotation of 90 in there meaning it's firing cone points directly left from the ship's point of view.

I have a series of some 'unoffical' videos that goes over the 3D workflow of the game. Later on some more professionally made ones should be showing up but for now it's a good primer on how things work.

https://www.youtube.com/watch?v=iwfBDE_ ... u4YkYxm52V

Now the actual firing direction is different and determines where the firing cone is facing. The degrees you mentioned are correct (they are also be negative. 0 degrees is forward, negative degrees are to the right of forward and positive to the left from the ship's perspective.) but there are only gathered from the skeleton data attached to the mesh. Looking through my files the skeleton files I mentioned aren't exposed right now so the only place to get these facings would be in the bundle files themselves which are located in

Distant Worlds 2\data\db\bundles

During beta we actually handed out the entire Mortalen project for people to play around with so something like that might happen down the road which would come with the meshes themselves and the skeleton files I mentioned before. I'm not sure if the bundle files are encrypted or not but that'd be the place to look for this data if it isn't.

Please let me know if you have any further questions.
User avatar
SamuraiProgrmmr
Posts: 416
Joined: Sun Oct 17, 2004 3:15 am
Location: NW Tennessee

Re: Firing Arc Data and Questions

Post by SamuraiProgrmmr »

Thank you so much for the detailed reply.
Bridge is the best wargame going .. Where else can you find a tournament every weekend?
Reznor111
Posts: 3
Joined: Tue Jan 26, 2021 6:55 pm

Re: Firing Arc Data and Questions

Post by Reznor111 »

in regards of firing arcs, i've noticed that modify the value of rotational arc in ShipHulls.xml does noting in game, the rotational arcs stay the same that they were
User avatar
frankycl
Posts: 402
Joined: Mon Mar 01, 2021 5:16 pm

Re: Firing Arc Data and Questions

Post by frankycl »

Reznor111 wrote: Tue Apr 19, 2022 10:50 am in regards of firing arcs, i've noticed that modify the value of rotational arc in ShipHulls.xml does noting in game, the rotational arcs stay the same that they were
What do you mean ? - If you look in the ship-designer you'll notice that they DO change when you "modify the value of rotational arc" (i.e. if you mean "<RotationHalfArcRange>" in the section of the weapon-component: 0.001 - 3.6 (in degree) are facing forward and above 3.6 backward). ;)

However, this will only be loaded/applied when you start a completely new game (like everything else that's connected with the XMLs) - So, I guess you had possibly tried this with a savegame, yes ? - Well, in that case it's no wonder you won't notice anything you edited in any of the XMLs - it's just not possible, yet. :|
Reznor111
Posts: 3
Joined: Tue Jan 26, 2021 6:55 pm

Re: Firing Arc Data and Questions

Post by Reznor111 »

[/quote]

What do you mean ? - If you look in the ship-designer you'll notice that they DO change when you "modify the value of rotational arc" (i.e. if you mean "<RotationHalfArcRange>" in the section of the weapon-component: 0.001 - 3.6 (in degree) are facing forward and above 3.6 backward). ;)

However, this will only be loaded/applied when you start a completely new game (like everything else that's connected with the XMLs) - So, I guess you had possibly tried this with a savegame, yes ? - Well, in that case it's no wonder you won't notice anything you edited in any of the XMLs - it's just not possible, yet. :|
[/quote]
thanks for the reply, i know, i start a new game everytime i mod something, the shiphull modification just don't work.
ioulaum
Posts: 23
Joined: Tue Mar 15, 2022 12:05 pm

Re: Firing Arc Data and Questions

Post by ioulaum »

In order to make firing arc changes to take effects.

You need to delete \data\ShipHullModelData folder and start a new game to let game regenerate it to include the changes you made in ShipHulls.xml
Reznor111
Posts: 3
Joined: Tue Jan 26, 2021 6:55 pm

Re: Firing Arc Data and Questions

Post by Reznor111 »

ioulaum wrote: Sat Apr 23, 2022 12:38 pm In order to make firing arc changes to take effects.

You need to delete \data\ShipHullModelData folder and start a new game to let game regenerate it to include the changes you made in ShipHulls.xml
it worked. thanks !!!
arvcran2
Posts: 2904
Joined: Fri Dec 11, 2020 3:17 pm

Re: Firing Arc Data and Questions

Post by arvcran2 »

ioulaum wrote: Sat Apr 23, 2022 12:38 pm In order to make firing arc changes to take effects.

You need to delete \data\ShipHullModelData folder and start a new game to let game regenerate it to include the changes you made in ShipHulls.xml
Would it not make sense for DW2, when initiating a 'new game', to verify new meta-data compared to existing derived from meta-data data?
Post Reply

Return to “Design and Modding”