[Looking for] Kha'ak Weaponsmith Factory Mod

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

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

Übersoldier
Posts: 33
Joined: Tue, 11. Nov 08, 15:16

[Looking for] Kha'ak Weaponsmith Factory Mod

Post by Übersoldier »

Hey guys,

I've searched through the Scripts and Mods section, but I havent been able to find a simple addition to X3TC:

Similarly to the Marauder Shipyard, I would like to have a factory that produces all 3 types of Kyon Emitters, as I plan to reproduce Kha'ak ships with my Headquarter.

If you know something like that, I would highly appreciate your info.

Kind regards,

Übersoldier
Wenn ich heute kämpfen muss, mit aller Kraft und allen Tricks die ich kenne und wenn das bedeutet, dass ich morgen noch kämpfen kann, dann hat es sich gelohnt.
User avatar
JSDD
Posts: 1379
Joined: Fri, 21. Mar 14, 20:51
x3tc

Post by JSDD »

... servus >soldier,

you can modify your HQ so that it can itself produce weapons & other wares, what you have to do is to edit your types/HQ.xml file as described here (in german)
& if you append the red-marked lines also in the <reverse> section, your HQ will b e able to reverse engineer lasers ;)
// you just need to know how to use the X3Editor2, extract types/HQ.xml, make those changes, save & paste the file back into that .cat-file where you've extracted it

as an altenatve you could script such a station yourself, just a few lines of code are needed:

Code: Select all

$Sector = [PLAYERSHIP] -> get sector
$Station = create station: type=Argon Lasertower Factory addto: $Sector ... coords etc ...
$Station-> add primary resource: E-zells
$Station-> add primary resource: nividium
$Station-> add primary resource: cahoona
$Station-> add product to factory/dock: Alpha Kyon Emitter
$Station-> add product to factory/dock: Beta Kyon Emitter
$Station-> add product to factory/dock: Gamma Kyon Emitter
= $Station -> install 10 units of 2GJ Shield
$Station-> factory: production task: [TRUE]
To err is human. To really foul things up you need a computer.
Irren ist menschlich. Aber wenn man richtig Fehler machen will, braucht man einen Computer.


Mission Director Beispiele
caishow2
Posts: 79
Joined: Wed, 3. Jun 15, 14:21
x3ap

Post by caishow2 »

How to add a new raw material for NPC factory?
Übersoldier
Posts: 33
Joined: Tue, 11. Nov 08, 15:16

Post by Übersoldier »

JSDD thanks alot!

I will try the first method, because I got exactly 0 experience with coding, but at least some in modifying other games.

Hm. I got a few questions:

1. Do I have to take these steps http://www.moddb.com/games/x3-terran-co ... ery-basics before being able to find the hq.xml and edit it?
2. If not, where can I find it in the X3 Editor 2?
3. Is your suggested modification possible with X3TC (NOT Albion Prelude)?

Sorry if I basically ask for a plan from scrap on.
Wenn ich heute kämpfen muss, mit aller Kraft und allen Tricks die ich kenne und wenn das bedeutet, dass ich morgen noch kämpfen kann, dann hat es sich gelohnt.
User avatar
JSDD
Posts: 1379
Joined: Fri, 21. Mar 14, 20:51
x3tc

Post by JSDD »

Übersoldier wrote:1. Do I have to take these steps http://www.moddb.com/games/x3-terran-co ... ery-basics before being able to find the hq.xml and edit it?
for short: its in 11.cat

Übersoldier wrote:3. Is your suggested modification possible with X3TC (NOT Albion Prelude)?
yes, here is how you do it:

1. Extract hq.xml:
1.1 open x3editor2 (run as admin)
1.2 Plugin -> catManager
1.3 New.. (popdown menu, click on the arrow downwards) -> open --> select 11.cat in your install directory
1.4 types\hq.pck ... click on it once, click then on extract files, check the box "decompress compressed files" & select your desktop as target location
=> now you have a "hq.xml" on your desktop

2. Edit hq.xml
2.1 open the hq.xml with any text editor (notepad++ for example)
2.2 copy the red-marked lines into your file at the correct position/ section
2.3 save & quit

3. create your own mod (to prevent overwriting original egosoft files just in case ..)
3.1 New.. (popdown menu, click on the arrow downwards) -> New --> select "14" as filename => now there should be 2 new files in your install directory: 14.cat & 14.dat
3.2 command -> create directory -> "types" => navigate into the new types folder in your 14.cat
3.3 drag & drop hq.xml from your desktop into the types folder in 14.cat
=> ready !! ;)

... to make your own mods, you have to name your cat-files in a ascending order (its called "fakepatch")
... if you havent got any mods installed currently and want to install new ones, rename them (cat & dat !!) into 15, 16, etc. ...

... if you want to edit some other files (e.g. TShips/TLasers to change ship/laser stats) you have to take it from the most recent cat file (with the highest number as filename)

regarding scripting: it isnt that complicated, there are many good tutorials out there ;) and its very useful to make your game more interesting (if you dont use it for "cheating")
To err is human. To really foul things up you need a computer.
Irren ist menschlich. Aber wenn man richtig Fehler machen will, braucht man einen Computer.


Mission Director Beispiele
Übersoldier
Posts: 33
Joined: Tue, 11. Nov 08, 15:16

Post by Übersoldier »

:o

Thanks alot for this precise description! Didnt expect so much detailed help.

I had only one issue: Drag & Drop didnt work so I "Add"ed it via the Editor. Now I got the 14.cat and .dat, got the types directory and the new hq file.

When I finished the HUB Plot (doing it without any scripts since a few years...) gonna see if it worked out!

At least, I now have a pretty good idea how to fix certain things myself.

Again, thanks alot :)
Wenn ich heute kämpfen muss, mit aller Kraft und allen Tricks die ich kenne und wenn das bedeutet, dass ich morgen noch kämpfen kann, dann hat es sich gelohnt.
Übersoldier
Posts: 33
Joined: Tue, 11. Nov 08, 15:16

Didnt work

Post by Übersoldier »

So, I managed to get the HQ a few days ago (after all the ressources, capturing that Orca was a chose too), and I modified the hq.xml as you instructed, and got a 14.cat + .dat with the hq.pck in the "types" directory with the additional lines.

But in the Station Settings of my HQ, only the vanilla options appear.

Would you mind to help me find the mistake?
Wenn ich heute kämpfen muss, mit aller Kraft und allen Tricks die ich kenne und wenn das bedeutet, dass ich morgen noch kämpfen kann, dann hat es sich gelohnt.
User avatar
X2-Illuminatus
Moderator (Deutsch)
Moderator (Deutsch)
Posts: 25130
Joined: Sun, 2. Apr 06, 16:38
x4

Post by X2-Illuminatus »

The changes to the HQ.xml mentioned by JSDD above won't change the interface of the PHQ. It will just allow you to add also blueprints for other wares and stations to the PHQ. To do so, there's a script command called "add blueprints to player HQ: type=<Var/Ship/Station>" in the General Object Commands of the Script Editor. The blueprint will then be added to the list of other blueprints in the PHQ, from where you can start the build process just as you would do with ships.
Nun verfügbar! X3: Farnham's Legacy - Ein neues Kapitel für einen alten Favoriten

Die komplette X-Roman-Reihe jetzt als Kindle E-Books! (Farnhams Legende, Nopileos, X3: Yoshiko, X3: Hüter der Tore, X3: Wächter der Erde)

Neuauflage der fünf X-Romane als Taschenbuch

The official X-novels Farnham's Legend, Nopileos, X3: Yoshiko as Kindle e-books!

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