[REQUEST] No Travel - ToA

The place to discuss scripting and game modifications for X4: Foundations.

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

cypsake
Posts: 1
Joined: Fri, 26. Dec 14, 04:12
x3ap

[REQUEST] No Travel - ToA

Post by cypsake »

Hello. There was a mod named No Travel by Althir that I enjoy. To my understanding there Isn't a ToA version yet and was wondering if anyone can teach me how to remove the travel mode on all ships, or how to update the mod to work with ToA. Thanks to everyone who reads this. :D
sprIder
Posts: 135
Joined: Sat, 3. Jul 10, 23:23
x4

Re: [REQUEST] No Travel - ToA

Post by sprIder »

Hi cypsake,

In the following I will show you how to remove the travel mode of the drives from the ToA / Pirates DlC. But next time please be so kind and link directly to the mod or mods to which you refer.

First you should read through the Getting Started tutorial and XML patch guide to get into modding X4 a bit. And unpack your X4 game, as described in the first tutorial.
I won't go into too much detail here, but the following should be said.
In the folder where you unpacked the game (e.g. X4unpacked) you will find many other folders. All extensions, like the DlCs from Egosoft or mods from the community are in or belong in the "extensions" folder. Here you can also find the ToA DlC as "ego_dlc_pirate".
In the respective assets folder are from the base game or the extensions the files of the ships, shields, stations, weapons, other and also the drives.

And now reverse engineering helped me to get into modding X4.

To do that, you download of the No Travel mods for one of the DlCs from Nexus, let's say the Split DlC, and unzip it.
This will help you understand how to proceed with DlCs if you want to mod them. You can also see directly from this that a separate mod has been created for each additional DlC. This helps those who do not own all DlCs.

You can now go, for example, copy the entire NoTravelSplit mod and name it as NoTravelPirate or NoTravelToA.

Now you will see in the folder first a content.xml file and another folder. The content.xml describes your mod and its content. The "id" should be unique and not the same as another mod. In your case it could be NOTP for example. For No Travel Pirate. You can then set the written out as the parameter "name". The rest should be self-explanatory.

Now to the folder. If you compare the NoTravel mod and the NoTravelSplit mod, you will see that the folder paths and the folder structure within the mods differ. If you keep opening the folders, you will eventually get to the following paths:
\NoTravel\assets\props\engines\macros
and
\NoTravelSplit\extensions\ego_dlc_split\assets\props\Engines\macros

So the NoTravel mod refers to the data from the base game, the NoTravelSplit mod refers to the data from the Split DlC.

For your ToA/Pirate mod this means that you also have to refer to the Pirate DlC data. So your folder structure is (e.g.)
NoTravelPirate\extensions\ego_dlc_pirate\assets\props\engines\macros

In this macros folder are the macros of the drives from the DlC. The macros describe the function of the drives, including their properties regarding travel and boost. If you have copied the NoTravelSplit mod before, please delete the content of the macros folder.
Exactly the same folder you will find in your unpacked games folder (let's say X4unpacked).
X4unpacked\extensions\ego_dlc_pirate\assets\props\engines\macros

In this you will find three files. Of these, we only need two files, the ones that don't have the word "video" in their name.
Copy these two files into the macros folder of your new mod and open them, e.g. with Notepad++.
Here is to be said: To change an existing file of the game you always need a file with the same name in the same folder path of your mod.

And what should be in the two files that you want to edit? To do this, simply look at such a file from the NoTravel mods.

There is then approximately the following in it:

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<diff>
	<replace sel="//macros/macro/properties/travel/@charge">1</replace>
	<replace sel="//macros/macro/properties/travel/@thrust">1</replace>
	<replace sel="//macros/macro/properties/travel/@attack">1</replace>
	<replace sel="//macros/macro/properties/travel/@release">1</replace>
</diff>
With "diff "it is initialized that the file processes the original from the (base) game. The operator "replace" needs a path to its target, a target and a target value/replacement value for its operation. "1" replaces the existing values in the game.
You take this over for your copied files. In these you can either delete the rest or comment it out with a beginning "<!--" and a "-->" as the end, so it won't be read by the game.

So your engine_gen_m_yacht_01_mk1_macro.xml in NoTravelPirate\extensions\ego_dlc_pirate\assets\props\engines\macros of your NoTravelPirate mod looks like this:

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<diff>
	<replace sel="//macros/macro/properties/travel/@charge">1</replace>
	<replace sel="//macros/macro/properties/travel/@thrust">1</replace>
	<replace sel="//macros/macro/properties/travel/@attack">1</replace>
	<replace sel="//macros/macro/properties/travel/@release">1</replace>
</diff>
<!-- <macros>
  <macro name="engine_gen_m_yacht_01_mk1_macro" class="engine">
    <component ref="engine_gen_m_yacht_01_mk1" />
    <properties>
      <identification name="{20107,9004}" basename="{20107,9001}" shortname="{20107,9005}" makerrace="argon" description="{20107,9002}" mk="1" />
      <boost duration="10" thrust="8" attack="0.25" release="1" />
      <travel charge="0" thrust="12" attack="10" release="15" />
      <thrust forward="2415" reverse="3139" />
      <angular />
      <hull integrated="1" />
      <sounds>
        <enginedetail ref="enginedetail_ship_m_01" />
      </sounds>
    </properties>
  </macro>
</macros> -->
Now save the file and do the same with the second file. At the end you should get something like this.
This mod belongs into your extensions folder of the game.

In conclusion, this is a simple mod. It gets more complicated if you want to add new files, ships, drives, etc. to the game. But that for another time. Or look at this tutorial.

I hope this helps.

sprIder
Cypsake21
Posts: 1
Joined: Wed, 15. May 19, 20:50
x4

Re: [REQUEST] No Travel - ToA

Post by Cypsake21 »

This is helped a lot thank you. I was also curious about modding the game and this was a great start. :D

Return to “X4: Foundations - Scripts and Modding”