[MOD] Enhanced Equipment Docks (eEQ) [discontinued, forks available]

The place to discuss scripting and game modifications for X³: Terran Conflict and X³: Albion Prelude.

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

Post Reply
User avatar
Saetan
Posts: 3223
Joined: Wed, 1. Feb 06, 19:26
x4

Post by Saetan » Wed, 28. Oct 09, 00:27

Important Note: This manual is quite old, the procedere is still the same but the files may differ in details. So don't copy the code inside the quotes anymore, as it's mentioned as possibility. Always copy the codes out of the original files.
Also in newer versions of the eEQ there got to be placeholders inserted into the TDocks, these placeholders can be overwritten by entries of other mods without causing problems for my mod.


I know, I said it gets easier in that version. But it's still quite a lot of work, especially if you are not used to do such things. Try not to be shocked ^^

Step 1:
You have to extract the types/TDocks and the types/hq.xml of both Mods out of the .cat/.dat. For that purpose I'm using the "X3 Editor 2".

Step 2:
Open the TDocks with a editor like notepad.
In the last ten lines of my TDocks you'll find the following:
1;0;0;0;0;SG_DOCK_HQ;9404;108;-1;-3;200;stations\trading_stations\argon_trading_station_scene;0;1;37;38;3500;ICON_TRG_ST_TRADING;15000;769231;25;1;5;769231;3333;0;0;SS_DOCK_A_eEQ2;
1;0;0;0;0;SG_DOCK_HQ;9408;108;-1;-3;200;stations\others\military_outpost_scene;42;1;201;38;7500;ICON_TRG_ST_TRADING;24000;2769231;25;1;5;2769231;33333;0;0;SS_DOCK_A_eEQ3;
1;0;0;0;0;SG_DOCK_HQ;9412;108;0.100000;3;200;stations\sadiablo\supply_base_scene;18;1;37;38;7500;ICON_TRG_ST_EQUIPDOCK;19500;3730769;25;1;5;3730769;100000;0;0;SS_DOCK_A_eEQ4;
1;0;0;0;0;SG_DOCK_HQ;9400;108;-1;-3;200;stations\station_scenes\others\argon_equipmentdock_scene;42;1;201;38;4000;ICON_TRG_ST_EQUIPDOCK;10500;961538;25;1;5;961538;10000;0;0;SS_DOCK_A_eEQ1;
1;0;0;0;0;SG_DOCK_HQ;9416;108;-1;-3;200;stations\sadiablo\freighter_base_scene;0;1;37;38;3500;ICON_TRG_ST_TRADING;15000;1000000;25;1;5;1000000;3333;0;0;SS_DOCK_A_eEQ5;
1;0;0;0;0;SG_DOCK_EQUIP;9402;108;-1;-3;200;stations\station_scenes\others\argon_equipmentdock_scene;42;1;201;38;4000;ICON_TRG_ST_EQUIPDOCK;10500;961538;25;1;5;961538;10000;0;0;SS_DOCK_A_eEQ1_DUMMY;
1;0;0;0;0;SG_DOCK_TRADE;9406;108;-1;-3;200;stations\trading_stations\argon_trading_station_scene;0;1;37;38;3500;ICON_TRG_ST_TRADING;15000;769231;25;1;5;769231;3333;0;0;SS_DOCK_A_eEQ2_DUMMY;
1;0;0;0;0;SG_DOCK_TRADE;9410;108;-1;-3;200;stations\others\military_outpost_scene;42;1;201;38;7500;ICON_TRG_ST_TRADING;24000;2769231;25;1;5;2769231;33333;0;0;SS_DOCK_A_eEQ3_DUMMY;
1;0;0;0;0;SG_DOCK_EQUIP;9414;108;0.100000;3;200;stations\sadiablo\supply_base_scene;18;1;37;38;7500;ICON_TRG_ST_EQUIPDOCK;19500;3730769;25;1;5;3730769;100000;0;0;SS_DOCK_A_eEQ4_DUMMY;
1;0;0;0;0;SG_DOCK_TRADE;9418;108;-1;-3;200;stations\sadiablo\freighter_base_scene;0;1;37;38;3500;ICON_TRG_ST_TRADING;15000;1000000;25;1;5;1000000;3333;0;0;SS_DOCK_A_eEQ5_DUMMY;
Copy & paste them to the end of the TDocks from the FDN (or any other mod using the TDocks too) and save it.

edit:
Also, in the first lines of the TDocks you'll find something similar to:
// Created with X3 Editor TC 0.0.24
47;58;
1;0;0;0;0;SG_DOCK_TRADE;3181;108;-1;-3;200;stations\trading_stations\argon_trading_station_scene;0;1;37;38;3500;ICON_TRG_ST_TRADING;15000;461000;25;1;5;461000;3333;0;0;SS_DOCK_A_TRADE;
1;0;0;0;0;SG_DOCK_TRADE;3381;108;-0.050000;-3;200;stations\trading_stations\split_trading_station_scene;0;3;37;38;3500;ICON_TRG_ST_TRADING;10000;450000;25;1;5;450000;3333;0;0;SS_DOCK_S_TRADE;
1;0;0;0;0;SG_DOCK_TRADE;3481;108;0.200000;3;200;stations\trading_stations\paranid_trading_station_scene;0;4;37;38;3500;ICON_TRG_ST_TRADING;12000;459000;25;1;5;459000;3333;0;0;SS_DOCK_P_TRADE;
[...]
The colored number depends on which mod the TDocks is from. It displays the number of entries in the TDocks. If you copied my entries into the TDocks of the other mod, you'll have to increase that number by ten. (5 for the eEQs, 5 for the eEQ-Dummies)
/edit

Step 3:
After that, you have to do the similar for the hq.xml. Just copy & paste the following lines out of my hq.xml into the other mods hq.xml between the section "<upgrades> ... </upgrades>". You must not post it into a section "<upgrade ...>...</upgrade>" which is inside the other section. Maybe you have to increase the indexes too.
<upgrade index="1" typename="SS_DOCK_A_eEQ1" storage="30000">
<!-- OTAS Equipment Dock: storage only -->
</upgrade>
<upgrade index="2" typename="SS_DOCK_A_eEQ2" storage="60000">
<!-- OTAS Trading Station: storage only -->
</upgrade>
<upgrade index="3" typename="SS_DOCK_A_eEQ3" storage="240000">
<!-- OTAS Commercial Port: storage only -->
</upgrade>
<upgrade index="4" typename="SS_DOCK_A_eEQ4" storage="120000">
<!-- OTAS Battleship Supply Base: storage & battleship repair only -->
<repair time="100" money="100" resources="100">
<factor class="hugeship" value="2" />
</repair>
</upgrade>
<upgrade index="5" typename="SS_DOCK_A_eEQ5" storage="90000">
<!-- OTAS Freigther Base: storage only -->
</upgrade>
After that, save it again.

Step 4:
Now you have to edit my language file (9400-L044.pck) with a editor like notepad too. The .pck must first be extracted with a programm like WinZip, WinRar or 7-zip.
<!-- Index of the eEQ-SubTypes: DON'T change them, except you know what you are doing !! -->
<t id="20000">51</t> <!-- OTAS Equipment Dock (SS_DOCK_A_eEQ1) -->
<t id="20001">48</t> <!-- OTAS Trading Station (SS_DOCK_A_eEQ2) -->
<t id="20002">49</t> <!-- OTAS Commercial Port (SS_DOCK_A_eEQ3) -->
<t id="20003">50</t> <!-- OTAS Capital Ship Supply Base (SS_DOCK_A_eEQ4) -->
<t id="20004">52</t> <!-- OTAS Freight Base (SS_DOCK_A_eEQ5) -->

<t id="20050">53</t> <!-- Dummy for OTAS Equipment Dock (SS_DOCK_A_eEQ1_DUMMY) -->
<t id="20051">54</t> <!-- Dummy for OTAS Trading Station (SS_DOCK_A_eEQ2_DUMMY) -->
<t id="20052">55</t> <!-- Dummy for OTAS Commercial Port (SS_DOCK_A_eEQ3_DUMMY) -->
<t id="20053">56</t> <!-- Dummy for OTAS Capital Ship Supply Base (SS_DOCK_A_eEQ4_DUMMY) -->
<t id="20054">57</t> <!-- Dummy for OTAS Freight Base (SS_DOCK_A_eEQ5_DUMMY) -->
Here you have to adapt the SubTypes (the numbers between the <t ...> and </t>, marked in color again). They have to fit the line in the TDocks. You can start to count them by hand (start counting with 0) or you can see the number of the line also if you open the TDocks with the "X3 Editor 2", but then you have to decrease it by one, as the X3 Editor 2 starts to count with 1 and not with 0.

edit:
PS: The highest subtype is the same as the number of entries in the TDocks (see Step 2), decreased by one.
/edit

Step 5:
Last, you have to repack your modified types/TDocks and types/hq.xml into a .cat/.dat. The TDocksWrecks is not needed there. You would have to modify it the same way as the TDocks, but if you "delete" it (out of my .cat/.dat via X3 Editor 2), there should just the debris be missing, if one of these stations gets destroyed.

Pack my language file again (gz-compression, file-extension pck) or simply copy it, saved as a .xml into your t-directory. But then you must delete the .pck-Version in there.

Then simply install the .cat/.dat's of the other mod, eEQ and your own modified ones as fake patches. But make sure, that your own cat/dat has a higher number than the ones of the other mod or the eEQ.

After that, you should be able to use both mods. No changes in my scripts are needed.
Last edited by Saetan on Sat, 16. Jul 11, 06:36, edited 11 times in total.

Mad_CatMk2
Posts: 518
Joined: Sun, 22. Feb 09, 20:13
x4

Post by Mad_CatMk2 » Wed, 28. Oct 09, 01:14

Whoa, quite a lot of editing, I'll have to look into that later (college is fun eh)

Thanks for the readme :D
I fly an OWP. What about you?

User avatar
Saetan
Posts: 3223
Joined: Wed, 1. Feb 06, 19:26
x4

Post by Saetan » Wed, 28. Oct 09, 07:33

Good Luck ;-)

Neaera
Posts: 33
Joined: Fri, 17. Oct 08, 15:57
x3tc

Post by Neaera » Sun, 1. Nov 09, 20:17

I've tried to do that, but I think I've failed.

Where do we find these new Equipement Docks?

I've found the FDN ones, but not yours.

User avatar
Saetan
Posts: 3223
Joined: Wed, 1. Feb 06, 19:26
x4

Post by Saetan » Sun, 1. Nov 09, 22:29

The eEQ's get sold at the OTAS Shipyard in Legend's Home.

User avatar
Saetan
Posts: 3223
Joined: Wed, 1. Feb 06, 19:26
x4

Post by Saetan » Wed, 4. Nov 09, 07:58

Mad_CatMk2 wrote:Whoa, quite a lot of editing, I'll have to look into that later (college is fun eh)
Neaera wrote:I've tried to do that, but I think I've failed.
Any response if it did work at last?

Neaera
Posts: 33
Joined: Fri, 17. Oct 08, 15:57
x3tc

Post by Neaera » Wed, 4. Nov 09, 08:41

My problem was the first line of the merged TDocks "47;57;" read by X3 Editor 2 like "Version 47, Count 57".
I've added 10 lines (5 eeQ, 5 Dummy) so, I've thought the "count" part was no longer valid, so I put 67 and, it worked, I've got them in the Shipyard OTAS.

And I will test tonight by buying them to see if they are "fonctionnal" or if I've screwed something else.


(Excuse my poor english)

User avatar
Saetan
Posts: 3223
Joined: Wed, 1. Feb 06, 19:26
x4

Post by Saetan » Wed, 4. Nov 09, 10:30

Neaera wrote:My problem was the first line of the merged TDocks "47;57;" read by X3 Editor 2 like "Version 47, Count 57".
I've added 10 lines (5 eeQ, 5 Dummy) so, I've thought the "count" part was no longer valid, so I put 67 and, it worked, I've got them in the Shipyard OTAS.
Sorry, forgot to say it in the description. Thanks! I'll add it.

Mad_CatMk2
Posts: 518
Joined: Sun, 22. Feb 09, 20:13
x4

Post by Mad_CatMk2 » Wed, 4. Nov 09, 19:33

Yeah, I haven't had much time to test this out...maybe later this week or next week hopefully.
I fly an OWP. What about you?

Neaera
Posts: 33
Joined: Fri, 17. Oct 08, 15:57
x3tc

Post by Neaera » Wed, 4. Nov 09, 22:52

A quick test, and it seems like the merging is a succes (And your equipement dock seems to work with Cycrow R&D).

By the way, great mod and the capital base is awesome.

*leaving for trying to get one without cheat*

jernau11
Posts: 18
Joined: Sat, 10. Jun 06, 07:30
x3tc

Post by jernau11 » Sun, 6. Dec 09, 03:07

Hi Saetan,

I picked up an eEQ Capital Ship dock in my game and it seems to have some very odd limits on its capacity, i.e. 2500 Energy Cells etc. I also can't seem to set different limits on it with Dockware manager. Theres an option in the command menu to replace dummy docks but it didn't do anything when I activated it. I've been looking though this thread and the forum in general but I can't seem to find any info on it. Can you point me in the right direction?

User avatar
Saetan
Posts: 3223
Joined: Wed, 1. Feb 06, 19:26
x4

Post by Saetan » Sun, 6. Dec 09, 08:24

Hi jernau11

It seems, as your dummy didn't automatically got replaced by the scripts, thats weired enough but for that cases there is the possibility to replace it by hand via command menu ... why that isn't working for you is weired some more.

Did you do a "regular" installation of the mod, or are you using other mods which modify the TDocks as well too?

You could try to reinstall the mod, maybe the scripts didn't got installed properly? Or you could send me (via mail or filehoster) your savegame incl. scripts-, mods- and t-directories so I could look into it.

Best regards
Saetan

jernau11
Posts: 18
Joined: Sat, 10. Jun 06, 07:30
x3tc

Post by jernau11 » Sun, 6. Dec 09, 09:09

Hi again Saetan,

Thanks for the quick reply. It was a regular mod install but I created the station using FCC, probably while OOS. Think that's the cause of the problem. I un-docked my ship from the station and then ran your cleanup script and it worked fine. My big mistake was that the dummy removal script will not work if ships are docked there. Its now a regular old eEQ. If you'd still like the save I can send it too you but I think I've worked things out.

User avatar
Saetan
Posts: 3223
Joined: Wed, 1. Feb 06, 19:26
x4

Post by Saetan » Sun, 6. Dec 09, 09:39

It should normaly work with FCC, even with OoS building, too. Also docked ships shouldn't be a problem, as they'll get the order to undock. Maybe it was because it's been the players ship?

I'll have to do some more tests some time. I think, that I can rebuild that situation by myself with your information, no need for your savegame I think.
I'm glad to see it's working for you now.

Thanks for your replies.

Best regards,
Saetan

Azalyn
Posts: 80
Joined: Sun, 7. Jun 09, 15:07
x3tc

Post by Azalyn » Fri, 1. Jan 10, 01:12

Hi Saetan,

I used this mod in my last gave and loved it. When it got corrupted between computers I re-started from a much older save game. I've got the pHQ via LD Deathmatch Arena, before actually building the station I modified the types\hq.pck file. While I could get more pHQ from the arena, its annoying how the new blueprints get put into the newest station; otherwise I'd have several pHQ's.

Long story short, I need multiple docks to store all my M2' and M7's. Reluctantly I cheated and put shipards above my HQ to corrale them. After the next bacth of ships rolls of the production line the 3rd shipyard'll be full.

Now that I understand more of the modding basics wanted to get this mod working again. I don't see there being any problems since anything I build/purchase from here on would be the only items affected right? I'd just need to add the changes either to your file or mine before re-packaging the .pck file and then using the new mod?

BUGS:
Previous game the equipment research scipt didn't work with the new stations. If I purchased a Teladi EQ and one yourr EQ's the Teladi one would still allow the modifications, but nothing on the new onnes.

Also think I may have figured out partially why people have problems with collisions. Anythine I tried to move 2 ships from the dock one would inevitiably crash into the dock. If I watied for the 1st to get several Km away everything was fine.
The surest way to make something easy to use, with few errors, is to make it impossible to do otherwise
- Donald Norman

User avatar
Saetan
Posts: 3223
Joined: Wed, 1. Feb 06, 19:26
x4

Post by Saetan » Fri, 1. Jan 10, 12:03

Hi Azalyn
Azalyn wrote:I'd just need to add the changes either to your file or mine before re-packaging the .pck file and then using the new mod?
Did I understand right? You just want to modify your hq.xml like you did the old one? You only want one PHQ, but you already have built it?

When you already built it, you shouldn't be in need to modify your PHQ, as it's only relevant if building new ones.
But there is no problem in modifing it of course, you can do the changes for your PHQ in "my" hq.xml too.
Azalyn wrote:Previous game the equipment research scipt didn't work with the new stations.
The eEQ's are of HQ-class of course, but no equipment dock-class. That may be the reason for that problem? I don't use such scripts, so I can't say if its a technical limitation or a scripting limitation.
But I remember someone telling me that one of these equipment-Scripts is working even on eEQs. I'm not sure, I think it was the R&D or POED script. I'm not sure and I don't find it on a first sight.
Azalyn wrote:Also think I may have figured out partially why people have problems with collisions.
Your talking about the capital ship supply base? I just deleted unneeded parts of the PHQ stationmodel, moved the docks for TS and saved it again. So the docking positions of capital ships are unchanged.

An other crashing problem is caused because of the long arms for the capital docks and the "reduced" size of the stationmodel. I think, because of that the flight-routine for collision preventation acts to late for capital ships.


Best regards
Saetan

User avatar
Litcube
Posts: 4254
Joined: Fri, 20. Oct 06, 19:02
xr

Post by Litcube » Sat, 3. Apr 10, 03:56

What are the dummy entries in the TDOCKS.TXT used for?

User avatar
Saetan
Posts: 3223
Joined: Wed, 1. Feb 06, 19:26
x4

Post by Saetan » Sat, 3. Apr 10, 20:01

Litcube wrote:What are the dummy entries in the TDOCKS.TXT used for?
When you buy an eEQ, you buy the dummy of it. After you have built the dummy, the dummy gets replaced with the true eEQ by script, but its owned by neutral race. After building it, the ownership gets moved to the player by the same script.

That's for preventing a bug ... an eEQ isn't able to save bought (or added by script) blueprints. These always get added "to the last as playerowned built station of PHQ-class". Building an eEQ that way, it doesn't get recognized as last built PHQ-class station and therefor blueprints are still saved on the true PHQ.

Best regards,
Saetan

User avatar
Litcube
Posts: 4254
Joined: Fri, 20. Oct 06, 19:02
xr

Post by Litcube » Sat, 3. Apr 10, 20:32

Very interesting! Whoever found out the trick to that deserves a prize.

User avatar
Saetan
Posts: 3223
Joined: Wed, 1. Feb 06, 19:26
x4

Post by Saetan » Sat, 3. Apr 10, 20:36

Litcube wrote:Very interesting! Whoever found out the trick to that deserves a prize.
It was brilliant, great and almighty Lucike. :-)

Post Reply

Return to “X³: Terran Conflict / Albion Prelude - Scripts and Modding”