Modding HQ time queues

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

User avatar
ezra-r
Posts: 3423
Joined: Fri, 14. Oct 05, 21:04
x4

Modding HQ time queues

Post by ezra-r »

Is it possible to modify HQ time queues easily?

I certainly dont want the HQ to spend almost two hours to manufacture 5 M4 ships.
User avatar
jack775544
Posts: 1277
Joined: Tue, 13. Dec 11, 08:27
x4

Post by jack775544 »

For AP in 03.cat\addon\types or in TC 11.cat\types there is a file called hq.pck. Extract it using the X3 editor. Extract it to your desktop and open it (it should be an XML, notepad is fine) there should be some code at the top like this

Code: Select all

<?xml version="1.0" encoding="iso-8859-1" ?>
<headquarters>
  <upgrades>
    <upgrade index="0" typename="SS_DOCK_P_HQ" storage="500000">
      <blueprints>
        <blueprint typename="SS_SH_A_M4" />
      </blueprints>
      <production time="100" money="100" resources="100">
        <factor class="ship" value="1" />
      </production>
      <repair time="100" money="100" resources="100">
        <factor class="ship" value="2" />
        <factor class="hq" value="2" />
      </repair>
      <reverse time="100" money="0" resources="0">
        <factor class="ship" value="1" />
      </reverse>
      <recycle time="5" money="0" resources="80">
        <factor class="ship" value="1" />
      </recycle>
    </upgrade>
  </upgrades>
  <resources>
    <!-- Time (uses the SETA upgrade as the typename!) -->
    <resource typename="SS_WARE_TECH231">
      <factor class="m5" value="10000" primary="1" />
      <factor class="m4" value="12500" primary="1" />
      <factor class="m3" value="16666" primary="1" />
      <factor class="gonership" value="16666" primary="1" />
      <factor class="freighter" value="5000" primary="1" />
      <factor class="bigship" value="25000" primary="1" />
      <factor class="hq" value="25000" primary="1" />
    </resource>
Change the code production section were it says

Code: Select all

<production time="100" money="100" resources="100">
        <factor class="ship" value="1" />
by deleting a zero from the time element.
Continue this for the repair, reverse and recycle sections if you want.

Then add a zero to the value element of this section

Code: Select all

    <!-- Time (uses the SETA upgrade as the typename!) -->
    <resource typename="SS_WARE_TECH231">
      <factor class="m5" value="10000" primary="1" />
      <factor class="m4" value="12500" primary="1" />
      <factor class="m3" value="16666" primary="1" />
      <factor class="gonership" value="16666" primary="1" />
      <factor class="freighter" value="5000" primary="1" />
      <factor class="bigship" value="25000" primary="1" />
      <factor class="hq" value="25000" primary="1" />
    </resource>
This will drastically lower times for everthing that the HQ does. If you even have the slightest knowledge of coding and an example of anthor HQ file, you should be able to change the resouce costs as well.

When you are done simply save the file as hq.xml in the 'types' file of the directory.

If you want me to I can post a copy of my modded HQ file.

PS. If you are using XRM, it drastically changes the hq.xml file and I wouldn't have the slightest clue on where to start. Well I do but it is alot more complicated :wink: .
Last edited by jack775544 on Fri, 22. Aug 14, 07:24, edited 2 times in total.
1940s - Various "computers" are "programmed" using direct wiring and switches. Engineers do this in order to avoid the tabs vs spaces debate.
User avatar
cattafett
Posts: 884
Joined: Thu, 30. Aug 07, 00:40
x3tc

Post by cattafett »

below is the top of the types\hq.pck found in no.11 Cad/Dat

Code: Select all

<?xml version="1.0" encoding="iso-8859-1" ?>
<headquarters>
  <upgrades>
    <upgrade index="0" typename="SS_DOCK_P_HQ" storage="500000">
      <blueprints>
        <blueprint typename="SS_SH_A_M4" />
      </blueprints>
      <production time="100" money="100" resources="100">
        <factor class="ship" value="1" />
      </production>
      <repair time="100" money="100" resources="100">
        <factor class="ship" value="2" />
        <factor class="hq" value="2" />
      </repair>
      <reverse time="100" money="0" resources="0">
        <factor class="ship" value="1" />
      </reverse>
      <recycle time="5" money="0" resources="80">
        <factor class="ship" value="1" />
      </recycle>
    </upgrade>
  </upgrades>
theres more but you don't need it at the moment

Code: Select all

  <upgrade index="0" typename="SS_DOCK_P_HQ" storage="500000">
as i understand it this says a)what model to use and b)the size of the storage

Code: Select all

<production time="100" money="100" resources="100">
this line deals with production
time is how long it will take, money is how much it will cost and resources is how much stuff/wares it will take to make
setting the no. to 50 will half the time and setting the no. to 200 should make it take twice as long or cost twice as much or use twice as much wares
you get the idea
the same for repair and recycle
this needs to be changed before you place your HQ as changes only work on new HQs
and lastly if you use a mod that added HQ type stations like Enhanced Equipment Docks (and you should) that edit the same file you need to edit that one
those UFOs you hear about are just what you tried to explaine to me going over my head
Advanced Complex-Hub you know you need it Catta Fett's D.O.G.S Vanilla safe mod collectionyou don't need them but you want them
Friendship is like peeing on yourself: everyone can see it, but only you get the warm feeling that it brings
User avatar
ezra-r
Posts: 3423
Joined: Fri, 14. Oct 05, 21:04
x4

Post by ezra-r »

Wow, thanks a lot for the tips. I don't want to reduce it too much to the point of cheating but I feel more confortable If I can build ships in a "playable time".

The info you have provided me is perfect, I do apreciate!
Noimageavaiable
Posts: 322
Joined: Wed, 14. Apr 10, 20:35
x3ap

Post by Noimageavaiable »

Just some additional info

Code: Select all

<production time="100" money="100" resources="100">
        <factor class="ship" value="1" /> 
This is the production time as a percentage, so if there is a HQ with production time="10" production will take 10% of the normal time. If you have a mod that adds new HQs they will all have seperate lines for this so you could make one type of HQ produce at 10%, the other at 50% or so.

Code: Select all

    <!-- Time (uses the SETA upgrade as the typename!) -->
    <resource typename="SS_WARE_TECH231">
      <factor class="m5" value="10000" primary="1" />
      <factor class="m4" value="12500" primary="1" />
      <factor class="m3" value="16666" primary="1" />
      <factor class="gonership" value="16666" primary="1" />
      <factor class="freighter" value="5000" primary="1" />
      <factor class="bigship" value="25000" primary="1" />
      <factor class="hq" value="25000" primary="1" />
    </resource> 
This is the actual time it takes for a ship to be build. The game takes the ships value and then somehow divides it by this value, so larger numbers will speed up production times. This affects all HQs.
User avatar
ezra-r
Posts: 3423
Joined: Fri, 14. Oct 05, 21:04
x4

Post by ezra-r »

Thank you so much,

I decided to touch them all to last pretty much half of what vanilla does into everything except reverse engineering, since for my role-play reverse engineering is the most difficult taslk, but recycling, manufacturing... well, adapted to playstyle.

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