Ships that should be build-able are not, need help

The place to discuss scripting and game modifications for X Rebirth.

Moderators: Scripting / Modding Moderators, Moderators for English X Forum

spartanheyho
Posts: 162
Joined: Sun, 24. Nov 13, 16:06

Ships that should be build-able are not, need help

Post by spartanheyho »

If I extract the wares.xml file and the buildmodule_ships_devries_l (and xl)_macro.xml files to see if the Succellus destroyer can be built, this is what I find:

Wares.xml entry:

Code: Select all

  <ware id="shp_xl_red_destroyer" name="shp_xl_red_destroyer" transport="container" size="ship" volume="1" tags="shippart">
    <price min="1" average="1" max="1" />
    <production time="440" amount="1" method="default" name="{20206,501}">
      <primary>
        <ware ware="bioelectricneurongel" amount="0" />
        <ware ware="bioopticwiring" amount="254" />
        <ware ware="bofu" amount="0" />
        <ware ware="emspectrometer" amount="0" />
        <ware ware="energycells" amount="1320" />
        <ware ware="foodrations" amount="640" />
        <ware ware="fusionreactor" amount="46" />
        <ware ware="holtzmanfieldgenerator" amount="114" />
        <ware ware="microchips" amount="238" />
        <ware ware="plasmaflowregulator" amount="62" />
        <ware ware="plasmapumps" amount="0" />
        <ware ware="reinforcedmetalplating" amount="186" />
        <ware ware="scanningarray" amount="148" />
      </primary>
    </production>
    <component ref="units_size_xl_red_destroyer_macro" amount="1" />
  </ware>

The "ship_xl_red_destroyer" macro is the Succellus destroyer according to roguey's x rebirth website. Here is the buildmodule entry:

buildmodule_ships_devries_xl_macro.xml entry:

Code: Select all

<macros>
  <macro name="buildmodule_ships_devries_xl_macro" class="buildmodule">
    <component ref="props_surf_ar_buildmodule_xl" />
    <properties>
      <identification unique="0" />
      <builder>
        <macro ref="units_size_xl_red_destroyer_macro" />
      </builder>
    </properties>
  </macro>
</macros>

In FACT!!, the file pertaining to the Albion XL ship buildmodule in the Shady Vault Shipyard shows this!!:

Code: Select all

<macros>
  <macro name="buildmodule_ships_albion_xl_macro" class="buildmodule">
    <component ref="props_surf_ar_buildmodule_xl" />
    <properties>
      <builder>
        <macro ref="units_size_xl_capital_destroyer_2_macro" />
        <macro ref="units_size_xl_cargo_hauler_3_macro" />
        <macro ref="units_size_xl_red_destroyer_macro" />
        <macro ref="units_size_xl_capital_destroyer_1_macro" />
        <macro ref="units_size_xl_builder_ship_macro" />
      </builder>
    </properties>
  </macro>
</macros>

See the "units_size_xl_red_destroyer" macro in the middle of the group? This means that the Succellus destroyer should be build-able there as well ... but its not. In fact, that ship along with other canteran ships referenced within other buildmodule files cannot be built anywhere! ... so wth? Why? Looking for help to figure this out.

UniTrader managed to implement both hybrid Rahans into a mod and add them to the build lists in Albion and Omnicron Lyrae here --> Hybrid Rahanas. My question is ... why are these other ships clearly listed in the build lists within the vanilla game files not showing up on the lists in-game?
UniTrader
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 14571
Joined: Sun, 20. Nov 05, 22:45
x4

Post by UniTrader »

because the DV Shipyard refers to the buildmodules of Albion.. you will have to dig through multiple files to understand, but it some point (i think it was the common Macro struct_econ_prod_shipl_macro but not really sure) it refers to the Alb Yard instead of DV - probably because the DV yard has almost nothing to offer..
if not stated otherwise everything i post is licensed under WTFPL

Ich mache keine S&M-Auftragsarbeiten, aber wenn es fragen gibt wie man etwas umsetzen kann helfe ich gerne weiter ;)

I wont do Script&Mod Request work, but if there are questions how to do something i will GLaDly help ;)
spartanheyho
Posts: 162
Joined: Sun, 24. Nov 13, 16:06

Post by spartanheyho »

The albion shipyard build list also contains the terran destroyer ... yet its nowhere to be seen in the options. Any insight on that? Here is the list I am talking about:

Code: Select all

<macros>
  <macro name="buildmodule_ships_albion_xl_macro" class="buildmodule">
    <component ref="props_surf_ar_buildmodule_xl" />
    <properties>
      <builder>
        <macro ref="units_size_xl_capital_destroyer_2_macro" />
        <macro ref="units_size_xl_cargo_hauler_3_macro" />
        <macro ref="units_size_xl_red_destroyer_macro" />
        <macro ref="units_size_xl_capital_destroyer_1_macro" />
        <macro ref="units_size_xl_builder_ship_macro" />
      </builder>
    </properties>
  </macro>
</macros>

The "units_size_xl_red_destroyer_macro" is the terran destroyer yet its not even on the options list.
UniTrader
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 14571
Joined: Sun, 20. Nov 05, 22:45
x4

Post by UniTrader »

please dont answer while i move stuff around :D :P moved these two answers here because they have nothing to do with the initial topic and you created a new one ^^
if not stated otherwise everything i post is licensed under WTFPL

Ich mache keine S&M-Auftragsarbeiten, aber wenn es fragen gibt wie man etwas umsetzen kann helfe ich gerne weiter ;)

I wont do Script&Mod Request work, but if there are questions how to do something i will GLaDly help ;)
spartanheyho
Posts: 162
Joined: Sun, 24. Nov 13, 16:06

Post by spartanheyho »

I didn't know you were moving stuff around. I could have assumed but when you assume, I make an a** out of u and me. Anyway, whats your thoughts on my latest post?
Cactus_Punch
Posts: 31
Joined: Sat, 7. Dec 13, 10:16

Post by Cactus_Punch »

I also would love this, being able to make terran ships, possibly split ships too would make the universe look alot better
spartanheyho
Posts: 162
Joined: Sun, 24. Nov 13, 16:06

Post by spartanheyho »

Yeah I am going to do some digging. This is bugging me and hopefully I can find something.
spartanheyho
Posts: 162
Joined: Sun, 24. Nov 13, 16:06

Post by spartanheyho »

I found this in the NPC_Shiptrader.xml file but I am not sure what to make of it:

Code: Select all

                <add_player_choice_sub text="{1002,8001}" position="top_left" section="cArch_buildermacros" choiceparam="[0, 0, $actor, $BuildModule, 1, $WareList]" comment="Select ship for building"/>

as part of this:

Code: Select all

              <do_if value="not $ship? and $BuildModule.freedockslot">
                <add_player_choice_sub text="{1002,8001}" position="top_left" section="cArch_buildermacros" choiceparam="[0, 0, $actor, $BuildModule, 1, $WareList]" comment="Select ship for building"/>
                <add_player_choice_sub text="{1002,8005}" position="left" section="cArch_modifyship" comment="Modify a ship"/>
                <add_player_choice_sub text="{1002,8006}" position="bottom_left" section="cArch_sellship" choiceparam="[0, 0, 'player', 'sellship', [$BuildModule]]" comment="Sell a ship"/>
              </do_if>

It is one of the dialogue options upon communicating with a shiptrader. It makes reference to section="cArch_buildermacros". It seems like this might have something to do with it but I am not sure what that reference is to or what it means.
UniTrader
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 14571
Joined: Sun, 20. Nov 05, 22:45
x4

Post by UniTrader »

id does not, it refers to this section in the same file:

Code: Select all

            <do_elseif value="event.param == 'cArch_buildermacros'">
              <!-- Show info about available macros / select macro for building (depends on choiceparam) -->
              <do_if value="not $showed_cArch_buildermacros?">
                <!-- Say this only the first time in the conversation -->
                <set_value name="$showed_cArch_buildermacros" />
                <add_npc_line line="1118" comment="Here is a list of ships we can build." view="facedetailmonitor" />
              </do_if>
              <do_else>
                <add_conversation_view view="facedetailmonitor" />
              </do_else>
              <open_conversation_menu menu="BuilderMacrosMenu" param="event.param2" param2="event.param3" />
            </do_elseif>
if not stated otherwise everything i post is licensed under WTFPL

Ich mache keine S&M-Auftragsarbeiten, aber wenn es fragen gibt wie man etwas umsetzen kann helfe ich gerne weiter ;)

I wont do Script&Mod Request work, but if there are questions how to do something i will GLaDly help ;)
spartanheyho
Posts: 162
Joined: Sun, 24. Nov 13, 16:06

Post by spartanheyho »

The last part is interesting:

Code: Select all


<open_conversation_menu menu="BuilderMacrosMenu" param="event.param2" param2="event.param3" /> 
            </do_elseif>

Perhaps its possible that the simple reason why we don't see the additional ships is because we can't see the options even though they are "there"?
spartanheyho
Posts: 162
Joined: Sun, 24. Nov 13, 16:06

Post by spartanheyho »

I managed to add terran large ships to large shipyards. It was simply just a matter of adding them to the build list even though they are technically already on it. On that note, I want to point out that there are TWO versions of each of the buildmodule_ships_...xml files. There is always one in the 01.dat files and another in the 02.dat files. Here is an example:

01.dat - buildmodule_ships_albion_l_macro.xml :

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<!--Exported by: Benedikt (192.168.3.113) at 08.04.2013_17-21-23-->
<macros>
  <macro name="buildmodule_ships_albion_l_macro" class="buildmodule">
    <component ref="props_surf_ar_buildmodule_l" />
    <properties>
      <builder>
        <macro ref="units_size_l_liquid_freighter_macro" />
        <macro ref="units_size_l_single_attack_ship_macro" />
        <macro ref="units_size_l_ice_collector_macro" />
        <macro ref="units_size_l_ions_collector_macro" />
        <macro ref="units_size_l_hydrogen_collector_macro" />
        <macro ref="units_size_l_ore_collector_macro" />
        <macro ref="units_size_l_kit_liquid_01_macro" />
        <macro ref="units_size_l_kit_container_01_macro" />
        <macro ref="units_size_l_kit_carrier_02_macro" />
        <macro ref="units_size_l_kit_carrier_01_macro" />
        <macro ref="units_size_l_kit_energy_01_macro" />
        <macro ref="units_size_l_kit_bulk_01_macro" />
        <macro ref="units_size_l_canteran_transporter_macro" />
      </builder>
    </properties>
  </macro>
</macros>

02.dat - buildmodule_ships_albion_l_macro.xml :

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<!--Exported by: Benedikt (192.168.3.146) at 05.11.2013_10-12-37-->
<macros>
  <macro name="buildmodule_ships_albion_l_macro" class="buildmodule">
    <component ref="props_surf_ar_buildmodule_l" />
    <properties>
      <identification name="{20107,3801}" description="{20107,3802}" />
      <explosiondamage value="100000" />
      <hull max="6200000" />
      <effects>
        <explosion ref="explosion_station_01" />
        <sefx_hack_disabled ref="hack_deactivated_m" />
      </effects>
      <secrecy level="4" />
      <builder>
        <macro ref="units_size_l_single_attack_ship_macro" />
        <macro ref="units_size_l_ice_collector_macro" />
        <macro ref="units_size_l_ions_collector_macro" />
        <macro ref="units_size_l_hydrogen_collector_macro" />
        <macro ref="units_size_l_ore_collector_macro" />
        <macro ref="units_size_l_kit_liquid_01_macro" />
        <macro ref="units_size_l_kit_container_01_macro" />
        <macro ref="units_size_l_kit_carrier_02_macro" />
        <macro ref="units_size_l_kit_carrier_01_macro" />
        <macro ref="units_size_l_kit_energy_01_macro" />
        <macro ref="units_size_l_kit_bulk_01_macro" />
      </builder>
    </properties>
    <connections>
      <connection ref="connection_dockingbay01">
        <macro ref="props_surf_ar_docks_size_l_inv_macro" connection="connection_component01" />
      </connection>
    </connections>
  </macro>
</macros>

If you notice, the first list has terran ships on it while the second does not. I have no idea why two of the same file exists in two different places or how they are compiled when loaded. What I do know is that, by using diff / replace method, I was able to add the terran ships cleanly to the list. I tried using the add method but this exhibited odd behavior (duplicate ships showing up) so I assume that perhaps it was being added to both versions of the file and loaded? Not sure.

Here is what I did to add the terran large ships to the large ship list in Albion shipyard:

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<!--Exported by: Benedikt (192.168.3.146) at 02.11.2013_15-57-14-->
<diff>
	<replace sel="/macros/macro[@name='buildmodule_ships_albion_l_macro']/properties/builder">
		<builder>
			<macro ref="units_size_l_liquid_freighter_macro" />
			<macro ref="units_size_l_single_attack_ship_macro" />
			<macro ref="units_size_l_ice_collector_macro" />
			<macro ref="units_size_l_ions_collector_macro" />
			<macro ref="units_size_l_hydrogen_collector_macro" />
			<macro ref="units_size_l_ore_collector_macro" />
			<macro ref="units_size_l_kit_liquid_01_macro" />
			<macro ref="units_size_l_kit_container_01_macro" />
			<macro ref="units_size_l_kit_carrier_02_macro" />
			<macro ref="units_size_l_kit_carrier_01_macro" />
			<macro ref="units_size_l_kit_energy_01_macro" />
			<macro ref="units_size_l_kit_bulk_01_macro" />
			<macro ref="units_size_l_kit_hybrid_01_macro" />
			<macro ref="units_size_l_kit_hybrid_02_macro" />
			<macro ref="units_size_l_canteran_transporter_macro" />
		</builder>
	</replace>
</diff>

PS. The files dictating XL ship lists are managed in the same way. I used the same method to add the terran destroyer to the list but oddly ... it doesn't work. I tried add, I tried replace and nothing. I even created a completely new file and placed it in the main X Rebirth file structure with the -prefersinglefiles launch command for the game so it gives files in the main structure priority, replacing vanilla ones and nothing. The following post will show what I am talking about.
Last edited by spartanheyho on Mon, 9. Dec 13, 15:02, edited 1 time in total.
spartanheyho
Posts: 162
Joined: Sun, 24. Nov 13, 16:06

Post by spartanheyho »

*Read my previous post first for context*

Here is what the XL ship Albion shipyard files look like, again two versions: 1 in the 01.dat file and another in the 02.dat file that I extracted and found:

01.dat - buildmodule_ships_albion_xl_macro.xml

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<!--Exported by: Benedikt (192.168.3.113) at 08.04.2013_17-22-09-->
<macros>
  <macro name="buildmodule_ships_albion_xl_macro" class="buildmodule">
    <component ref="props_surf_ar_buildmodule_xl" />
    <properties>
      <builder>
        <macro ref="units_size_xl_capital_destroyer_2_macro" />
        <macro ref="units_size_xl_cargo_hauler_3_macro" />
        <macro ref="units_size_xl_red_destroyer_macro" />
        <macro ref="units_size_xl_capital_destroyer_1_macro" />
        <macro ref="units_size_xl_builder_ship_macro" />
      </builder>
    </properties>
  </macro>
</macros>

02.dat - buildmodule_ships_albion_xl_macro.xml

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<!--Exported by: Benedikt (192.168.3.146) at 02.11.2013_15-57-14-->
<macros>
  <macro name="buildmodule_ships_albion_xl_macro" class="buildmodule">
    <component ref="props_surf_ar_buildmodule_xl" />
    <properties>
      <identification name="{20107,4001}" description="{20107,4002}" />
      <explosiondamage value="100000" />
      <hull max="12800000" />
      <effects>
        <explosion ref="explosion_station_01" />
        <sefx_hack_disabled ref="hack_deactivated_l" />
      </effects>
      <secrecy level="4" />
      <builder>
        <macro ref="units_size_xl_capital_destroyer_2_macro" />
        <macro ref="units_size_xl_cargo_hauler_3_macro" />
        <macro ref="units_size_xl_capital_destroyer_1_macro" />
        <macro ref="units_size_xl_builder_ship_macro" />
      </builder>
    </properties>
    <connections>
      <connection ref="connection_dockingbay01">
        <macro ref="props_surf_ar_docks_size_xl_inv_macro" connection="connection_component01" />
      </connection>
    </connections>
  </macro>
</macros>

Notice that, again, the first version of the file - the 01.dat file - had the terran destroyer on the list (...xl_red_destroyer_macro...) but the second one does not just as was the case with the terran ships in the albion large shipyard files as I explained in my previous post.

Here is what I did to add the terran destroyer to the group:

Code: Select all


<?xml version="1.0" encoding="utf-8"?>
<!--Exported by: Benedikt (192.168.3.146) at 02.11.2013_15-57-14-->
<diff>
	<replace sel="/macros/macro[@name='buildmodule_ships_albion_xl_macro']/properties/builder">
		<builder>
			<macro ref="units_size_xl_capital_destroyer_2_macro" />
			<macro ref="units_size_xl_cargo_hauler_3_macro" />
			<macro ref="units_size_xl_red_destroyer_macro" />
			<macro ref="units_size_xl_capital_destroyer_1_macro" />
			<macro ref="units_size_xl_builder_ship_macro" />
		</builder>
	</replace>
</diff>

I created a proper extension and it loads just fine as the Large ships list is modified with added terran ships. The XL ship list does not want to change at all. Anyone have any thoughs?
csaba
Posts: 1256
Joined: Fri, 26. Aug 05, 22:39
x4

Post by csaba »

Here is my conspiracy theory :lol: regarding the Lepton and the Sucellus:

Not like it's hard to add those build order lines. I'm pretty sure they were left out on purpose.

I think the reason why 2 of the 3 Terran ships were not implemented is in their inherent bug closely connected to their models.

Both the Lepton and the Sucellus have wings that get hit by their own weapons and the Sucellus suffers from the poor combat AI as well. (Can't really use it's main gun effectively).

So these defective ships were made rare. They probably reduced the original cargo hold of the Lepton cause that 40000 is laughable and reduced the weaponry on the Sucellus just so they are less appealing for boarding with already a little chance to even see them in the game.

Also the Lepton looks like as if it was originally designed to be a frigate and not a freighter probably a counterpart to the Balor. However this is high conspiracy now. :shock:

So you end up with 1 ship the Hermoid being the only Terran model that is working properly. What do you do? Have the L shipyard build only the Hermoind while the XL the construction ship? Naaaaaa give them the Argon ships ... :shock:
spartanheyho
Posts: 162
Joined: Sun, 24. Nov 13, 16:06

Post by spartanheyho »

Makes sense and you are right: the Succellus destroyer is terrible as it does hit itself with its own weapons. But I guess its not so much about why they weren't added but why I CAN'T add the Succellus to the XL shipyard using the same method I used to add the Lepton and Hermond to the L shipyard (which worked) and I even tested it and they were both built correctly.

I have cross referenced game files and differences between various ships and the Succellus files are fine. It just won't show up on the construction list which is annoying.

EDIT: Its as if something else is managing/loading the ship list used at XL ship buildmodules. I even modified the albion XL shipyard to NOT have any ships at all, replacing the whole document and removing all ships and it STILL loaded with the four usual ships it has with its selection.
UniTrader
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 14571
Joined: Sun, 20. Nov 05, 22:45
x4

Post by UniTrader »

i think you forget that extension files are diff files instead of file replacements.. if you try it that way it probably wont work - look in my non-plus rahanas hybrid adding-mod how to add ships to a shipyard ;)
if not stated otherwise everything i post is licensed under WTFPL

Ich mache keine S&M-Auftragsarbeiten, aber wenn es fragen gibt wie man etwas umsetzen kann helfe ich gerne weiter ;)

I wont do Script&Mod Request work, but if there are questions how to do something i will GLaDly help ;)
csaba
Posts: 1256
Joined: Fri, 26. Aug 05, 22:39
x4

Post by csaba »

spartanheyho wrote:
EDIT: Its as if something else is managing/loading the ship list used at XL ship buildmodules. I even modified the albion XL shipyard to NOT have any ships at all, replacing the whole document and removing all ships and it STILL loaded with the four usual ships it has with its selection.
That is probably the case.


Someone asked me to try to add npc build nodes to the game. As they were invisible in game I could only have a general idea where they were so I thought I'll give them an icon. Found the build icon in the libraries but they were connected to "build_inact" "build_act" (or something like that) while in the zones.xml they are named "buildcon" and I was not able find the link between them so far.
spartanheyho
Posts: 162
Joined: Sun, 24. Nov 13, 16:06

Post by spartanheyho »

I tried this for both L and XL shipyards:

L shipyards - modified diff/replace file within extension:

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<!--Exported by: Benedikt (192.168.3.146) at 02.11.2013_15-57-14-->
<diff>
	<replace sel="/macros/macro[@name='buildmodule_ships_albion_l_macro']/properties/builder">
		<builder>
		</builder>
	</replace>
</diff>

This worked really well. No ships were on the list. I tested this on a new free-play game with no mods. I even got debug errors from the trade.shipyard.xml file as it was attempting to build ships randomly but could not because none could be found.

Here is the XL shipyard file I modified:

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<!--Exported by: Benedikt (192.168.3.146) at 02.11.2013_15-57-14-->
<diff>
	<replace sel="/macros/macro[@name='buildmodule_ships_albion_xl_macro']/properties/builder">
		<builder>
		</builder>
	</replace>
</diff>

This did not work at all. All 4 ships (Arawn, Scaldis, Construction ship, Taranis) were still on the list and build-able when I talked to the ship trader.

Conclusion: something else is modifying/loading the XL shipyard files that prevents it from being changed by simply modifying the list. There is another file somewhere loading up this info.
csaba
Posts: 1256
Joined: Fri, 26. Aug 05, 22:39
x4

Post by csaba »

If you have extracted all the cat files you can use Notepad++ to search for the same line in a whole directory(so it checks all file's content in the whole directory for [@name='buildmodule_ships_albion_l_macro'] for example). It will take a while it's on par when you run a full virus scan but will give you the locations in time.
spartanheyho
Posts: 162
Joined: Sun, 24. Nov 13, 16:06

Post by spartanheyho »

I didn't know that. Thanks for the tip. I appreciate it. Trying it now.

EDIT: Won't have to. I am an idiot.

Here is why it wasn't working:

buildmodule_ships_albion_xl_macro.xml -----> this is what the file should have looked like.

buildmodule_ships_albion_xl_macro .xml ------> this is what it looked like............... 1 f*INg space!!!

JC ... anyway I was able to wipe the shiptrader list. Time to add the ships back and see if this works.
flatbush71

Post by flatbush71 »

I'm really glad to see you guys working on this.
You are giving hope to a lot of people.

Return to “X Rebirth - Scripts and Modding”