I thought all guns fire independently? E.g. when I tell my mothership to fire at an asteroid on it's left, the left gun swings around to fire at it, but the right gun won't because it's out of the firing arc. Do the weapon definitions have this firing arc parameter?
Edit:
What I mean to say is, the guns seem to fire if target enters range, and doesn't seem to care if other guns can fire at the target or not. This is most noticeable on the slow, large mothership but I imagine it applies to fighters as well.
Okay, I tried combining mothership radar and mothership engine (mainly because the results should be easily seen in max speed + radar range increases).
1. Created definition in
AllModules.xsd:
Code:
<xs:complexType name="ComboBSOne">
<xs:complexContent>
<xs:extension base="SystemModule">
<xs:sequence>
<xs:element name="moving_force_ratio" type="TFloat"/>
<xs:element name="resolution" type="TFloat"/>
<xs:element name="max_distance" type="TFloat"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
I merely compared the separate definitions for RadarModule and MovingForceModule. Both start with the same extension to SystemModule, so I just added all three elements.
2. Added it to
Modules.xsd:
Code:
<xs:element name="ComboBSOne" type="ComboBSOne" minOccurs="0"/>
This file contains the elements list, so I added my new one in.
3. Finally, edited an entry in
Modules.xml so that it would point to the new item.
Code:
<ComboBSOne name="BS_EngAmp1">
<short_name>#M_Name_BS_EngAmp1</short_name>
<hint>#M_Hint_BS_EngAmp1</hint>
<short_desc>#M_SDesc_BS_EngAmp1</short_desc>
<long_desc>#M_LDesc_BS_EngAmp1</long_desc>
<mesh_name>systembox</mesh_name>
<flat_image>Mothership Engines 02</flat_image>
<hit_points>10000</hit_points>
<mass>10</mass>
<disable_trade>false</disable_trade>
<cost>140000</cost>
<technology/>
<attach_type>ONLY_BIGSHIP</attach_type>
<moving_force_ratio>1.2</moving_force_ratio>!!
<resolution>0.2</resolution>
<max_distance>400</max_distance>
</ComboBSOne>
I chose to edit BS_EngAmp1, the "Buffalo", which was originally a MovingForceModule entry. As you can see, I followed the definition and you can see the three element entries at the bottom: moving_force_ratio, resolution, and max_distance.
Game started fine, loaded an early save at Elio. Docked at a trade station... CTD. Here's what LOGfile.txt had to say at the end:
Code:
(22:12:26) (ERROR) ModuleManager::CreateGameObject('bs_engamp1') - element with specified name is not Is_A(CLSID_GameObject): className = 'ComboBSOne'
(22:12:26) (ERROR) ModuleManager::CreateObject('bs_engamp1') - game object not created!
(22:12:26) (ERROR) ModuleManager::CreateModule('bs_engamp1') - module not created
It's complaining about CLSID_GameObject... which I'm guessing is referring to a hardcoded parameter (?). So it looks like we can't make combination items.
Update:
This time I tried merely editing an existing definition. ImproveManeuverabilityModule looks like a good candidate, there are only 3 items associated with it. I opened
AllModules.xsd and added a new element, "moving_force_ratio". Again, I chose this because if it works then the results should be visible on the trade screen.
Had to edit the three entries in
Modules.xml to add the new moving_force_ratio value. These were ManAmp1, ManAmp2, and BS_ManAmp respectively. Started game, loaded Elio, docked at the trade station... and nothing happened. When I bought one of the modified items (BS_ManAmp, the "Buffalo Mk 2" 50% maneuverability boost) and installed it on the ship, the maneuverability increased, but not the top speed... even though I already added a moving_force_ratio element. The game didn't crash or complain, the modification was simply ignored.
So if the definitions are hardcoded, then why bother with the entire XMLSchema folder? Hmm, come to think of it, I've yet to see any mod actually change anything in here.