Player HQ modding-Help/advice needed XTC AP

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
zdan30
Posts: 262
Joined: Mon, 29. Jan 07, 14:20
x4

Player HQ modding-Help/advice needed XTC AP

Post by zdan30 » Sun, 1. Jan 17, 14:11

Im having trouble getting my PHQ to produce anything.
Im looking to test things out so i can change it about how i would like it for different game styles.


This is my HQ.XML and maybe someone could take a look at tell me if anything obvious would stop it from working.
Ideally what i want is to be able to build any blueprints i add for nothing and then change the resources to values that suit my game play and changing the production speeds considerably.

Code: Select all

<?xml version="1.0" encoding="iso-8859-1" ?>
<headquarters>
  <upgrades>
    <upgrade index="0" typename="SS_DOCK_P_HQ" storage="500000000">
      <blueprints>
        <blueprint typename="SS_LASER_TUG" />
        <blueprint typename="SS_WARE_SATELLITE2" />
        <blueprint typename="SS_WARE_A_MK2DRONE" />
        <blueprint typename="SS_FAC_B_POWER_2" />
      </blueprints>
      <production time="1" money="0" resources="0">
        <factor class="ship" value="2" />
        <factor class="station" value="2" />
        <factor class="laser" value="1" />
        <factor class="missiles" value="2" />
        <factor class="ware" value="1" />
      </production>
      <repair time="10" money="0" resources="100">
        <factor class="ship" value="2" />
        <factor class="hq" value="2" />
      </repair>
      <reverse time="10" money="0" resources="0">
        <factor class="ship" value="1" />
      </reverse>
      <recycle time="2" money="0" resources="100">
        <factor class="ship" value="1" /> 
      </recycle>
    </upgrade>
	<upgrade index="1" typename="SS_DOCK_TR_HQ" storage="700000000">
			<blueprints>
				<blueprint typename="SS_SH_USC_M4" />
			</blueprints>
			<production time="10" money="0" resources="100">
				<factor class="ship" value="1" />
			</production>
			<repair time="10" money="0" resources="100">
				<factor class="ship" value="2" />
				<factor class="hq" value="2" />
			</repair>
			<reverse time="10" money="0" resources="0">
				<factor class="ship" value="1" />
			</reverse>
			<recycle time="2" money="0" resources="100">
				<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="1000000" primary="1" />
      <factor class="m4" value="1250000" primary="1" />
      <factor class="m3" value="1666600" primary="1" />
      <factor class="gonership" value="1666600" primary="1" />
      <factor class="freighter" value="500000" primary="1" />
      <factor class="bigship" value="2500000" primary="1" />
      <factor class="hq" value="2500000" primary="1" />
    </resource>
    <!-- Money -->
    <resource typename="SS_WARE_CREDITS">
      <factor value="-1" />
    </resource>
    <!-- Energy Cells -->
    <resource typename="SS_WARE_ENERGY">
      <factor value="-1" />
    </resource>
    <!-- Ore -->
    <resource typename="SS_WARE_ORE">
      <factor value="-1" />
    </resource>
    <!-- Silicon -->
    <resource typename="SS_WARE_SILICON">
      <factor value="-1" />
    </resource>
    <!-- Nividium -->
    <resource typename="SS_WARE_NIVIDIUM2">
      <factor racemask="khaak" value="-1"  />
    </resource>
    <!-- Cloth Rimes -->
    <resource typename="SS_WARE_F217">
      <factor value="-1" />
    </resource>
    <!-- Rastar Oil -->
    <resource typename="SS_WARE_F238" >
      <factor value="-1" />
    </resource>
    <!-- Teladianium -->
    <resource typename="SS_WARE_R255">
      <factor value="-1"  />
    </resource>
    <!-- Crystals -->
    <resource typename="SS_WARE_TECH205">
      <factor value="-1"  />
    </resource>
    <!-- Quantum Tubes -->
    <resource typename="SS_WARE_TECH206">
      <factor value="-1" />
    </resource>
    <!-- Microchips -->
    <resource typename="SS_WARE_TECH207">
      <factor value="-1" />
    </resource>
    <!-- Computer Components -->
    <resource typename="SS_WARE_TECH208">
      <factor value="-1" />
    </resource>
  </resources>
</headquarters>

Thanks for any help


Edit: Added code-tags so that formatting remains, and the file can be read better. X2-Illuminatus

User avatar
zdan30
Posts: 262
Joined: Mon, 29. Jan 07, 14:20
x4

Post by zdan30 » Sun, 1. Jan 17, 15:43

Not sure if this is helpful but as you can see ive added products to the list but i cant seem to get it to start to tell me im missing resources and if i am how many i need or how long the cycle will take.
Happy to post any other info you might need to help answer my question

https://i.imgur.com/6zwlbAT.png


{Images posted directly to the forums should not be greater than 640x480 or 100kb, oversize image now linked - Terre}

User avatar
RoverTX
Posts: 1436
Joined: Wed, 16. Nov 11, 18:37
x4

Post by RoverTX » Sun, 1. Jan 17, 19:06

You set the value for all resources to -1. Normally they are given a positive value.

User avatar
zdan30
Posts: 262
Joined: Mon, 29. Jan 07, 14:20
x4

Post by zdan30 » Sun, 1. Jan 17, 19:37

Was an attempt to get it to work with zero resources,i have tried using 0 and even with 1 but i just cant get a production cycle to start or for it to tell me what resources if any are required like it used to on the reunion PHQ.
My PHQ gets stuck in limbo with items in the production queue but nothing else happening

User avatar
RoverTX
Posts: 1436
Joined: Wed, 16. Nov 11, 18:37
x4

Post by RoverTX » Sun, 1. Jan 17, 20:19

You can just remove every resource but SETA(time) and credits.

User avatar
RoverTX
Posts: 1436
Joined: Wed, 16. Nov 11, 18:37
x4

Post by RoverTX » Sun, 1. Jan 17, 20:20

Try this

Code: Select all

<?xml version="1.0" encoding="iso-8859-1" ?> 
<headquarters> 
  <upgrades> 
    <upgrade index="0" typename="SS_DOCK_P_HQ" storage="500000000"> 
      <blueprints> 
        <blueprint typename="SS_LASER_TUG" /> 
        <blueprint typename="SS_WARE_SATELLITE2" /> 
        <blueprint typename="SS_WARE_A_MK2DRONE" /> 
        <blueprint typename="SS_FAC_B_POWER_2" /> 
      </blueprints> 
      <production time="1" money="0" resources="0"> 
        <factor class="ship" value="2" /> 
        <factor class="station" value="2" /> 
        <factor class="laser" value="1" /> 
        <factor class="missiles" value="2" /> 
        <factor class="ware" value="1" /> 
      </production> 
      <repair time="10" money="0" resources="100"> 
        <factor class="ship" value="2" /> 
        <factor class="hq" value="2" /> 
      </repair> 
      <reverse time="10" money="0" resources="0"> 
        <factor class="ship" value="1" /> 
      </reverse> 
      <recycle time="2" money="0" resources="100"> 
        <factor class="ship" value="1" /> 
      </recycle> 
    </upgrade> 
   <upgrade index="1" typename="SS_DOCK_TR_HQ" storage="700000000"> 
         <blueprints> 
            <blueprint typename="SS_SH_USC_M4" /> 
         </blueprints> 
         <production time="10" money="0" resources="100"> 
            <factor class="ship" value="1" /> 
         </production> 
         <repair time="10" money="0" resources="100"> 
            <factor class="ship" value="2" /> 
            <factor class="hq" value="2" /> 
         </repair> 
         <reverse time="10" money="0" resources="0"> 
            <factor class="ship" value="1" /> 
         </reverse> 
         <recycle time="2" money="0" resources="100"> 
            <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="1000000" primary="1" /> 
      <factor class="m4" value="1250000" primary="1" /> 
      <factor class="m3" value="1666600" primary="1" /> 
      <factor class="gonership" value="1666600" primary="1" /> 
      <factor class="freighter" value="500000" primary="1" /> 
      <factor class="bigship" value="2500000" primary="1" /> 
      <factor class="hq" value="2500000" primary="1" /> 
    </resource> 
    <!-- Money --> 
    <resource typename="SS_WARE_CREDITS"> 
      <factor value="-1" /> 
    </resource> 
  </resources> 
</headquarters>

User avatar
zdan30
Posts: 262
Joined: Mon, 29. Jan 07, 14:20
x4

Post by zdan30 » Sun, 1. Jan 17, 22:33

Great thanks i`ll try it!

EDIT: Sadly it didnt work and its the same as before.

Im editing the file in F:\x3 terran conflict\addon\types hq.xml
Is there somewhere else i need to change anything,like in a cat file?
Ive downloaded the X3 editor but i cant seem to find anything

User avatar
zdan30
Posts: 262
Joined: Mon, 29. Jan 07, 14:20
x4

Post by zdan30 » Mon, 2. Jan 17, 01:17

Tried using the x3 editor,managed to find the mod hq.xml and changed that too but i think the game is using the one i edited in addon/types

Im still in the same situation of can add to production queue but it wont actually start the cycle or give me any hint why.
I read that maybe i need to get the latest version of this Cycrow-Blueprints-Cheat but that maybe a red herring.
Im pretty much at a dead end now and not sure what else to try

https://i.imgur.com/lHsCjs4.png


{Images posted directly to the forums should not be greater than 640x480 or 100kb, oversize image now linked - Terre}

User avatar
apricotslice
Posts: 14129
Joined: Sun, 16. May 04, 13:01
x4

Post by apricotslice » Mon, 2. Jan 17, 01:48

RoverTX wrote:You set the value for all resources to -1. Normally they are given a positive value.
This is definitely a problem.

First thing, put them back the way they were, and see if it works again.

Those values are something I never changed in any mod.

User avatar
zdan30
Posts: 262
Joined: Mon, 29. Jan 07, 14:20
x4

Post by zdan30 » Mon, 2. Jan 17, 02:58

I just added this text back in which is the original file before i started editing,and i get no resources from recycling and when i add something to the production queue it doesnt ask for any resources same as in the pictures i posed.
Is there any other file that could effect the HQ production?



<?xml version="1.0" encoding="iso-8859-1" ?>
<headquarters>
<upgrades>
<upgrade index="0" typename="SS_DOCK_P_HQ" storage="500000000">
<blueprints>
<blueprint typename="SS_LASER_TUG" />
<blueprint typename="SS_WARE_SATELLITE2" />
<blueprint typename="SS_WARE_A_MK2DRONE" />
</blueprints>
<production time="10" money="0" resources="100">
<factor class="ship" value="2" />
<factor class="station" value="2" />
<factor class="laser" value="1" />
<factor class="missiles" value="2" />
<factor class="ware" value="1" />
</production>
<repair time="10" money="0" resources="100">
<factor class="ship" value="2" />
<factor class="hq" value="2" />
</repair>
<reverse time="10" money="0" resources="0">
<factor class="ship" value="1" />
</reverse>
<recycle time="2" money="0" resources="100">
<factor class="ship" value="1" />
</recycle>
</upgrade>
<upgrade index="1" typename="SS_DOCK_TR_HQ" storage="700000000">
<blueprints>
<blueprint typename="SS_SH_USC_M4" />
</blueprints>
<production time="10" money="0" resources="100">
<factor class="ship" value="1" />
</production>
<repair time="10" money="0" resources="100">
<factor class="ship" value="2" />
<factor class="hq" value="2" />
</repair>
<reverse time="10" money="0" resources="0">
<factor class="ship" value="1" />
</reverse>
<recycle time="2" money="0" resources="100">
<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="1000000" primary="1" />
<factor class="m4" value="1250000" primary="1" />
<factor class="m3" value="1666600" primary="1" />
<factor class="gonership" value="1666600" primary="1" />
<factor class="freighter" value="500000" primary="1" />
<factor class="bigship" value="2500000" primary="1" />
<factor class="hq" value="2500000" primary="1" />
</resource>
<!-- Money -->
<resource typename="SS_WARE_CREDITS">
<factor value="3" />
</resource>
<!-- Energy Cells -->
<resource typename="SS_WARE_ENERGY">
<factor value="885" />
</resource>
<!-- Ore -->
<resource typename="SS_WARE_ORE">
<factor value="21250" />
</resource>
<!-- Silicon -->
<resource typename="SS_WARE_SILICON">
<factor value="28333" />
</resource>
<!-- Nividium -->
<resource typename="SS_WARE_NIVIDIUM2">
<factor racemask="khaak" value="170000" />
</resource>
<!-- Cloth Rimes -->
<resource typename="SS_WARE_F217">
<factor value="85000" />
</resource>
<!-- Rastar Oil -->
<resource typename="SS_WARE_F238" >
<factor value="42500" />
</resource>
<!-- Teladianium -->
<resource typename="SS_WARE_R255">
<factor value="28333" />
</resource>
<!-- Crystals -->
<resource typename="SS_WARE_TECH205">
<factor value="85000" />
</resource>
<!-- Quantum Tubes -->
<resource typename="SS_WARE_TECH206">
<factor value="85000" />
</resource>
<!-- Microchips -->
<resource typename="SS_WARE_TECH207">
<factor value="42500" />
</resource>
<!-- Computer Components -->
<resource typename="SS_WARE_TECH208">
<factor value="85000" />
</resource>
</resources>
</headquarters>

User avatar
apricotslice
Posts: 14129
Joined: Sun, 16. May 04, 13:01
x4

Post by apricotslice » Mon, 2. Jan 17, 04:07

I know what the problem is.

This spec only gets used when the the PHQ is created. It doesn't change dynamically.

So after you change the file, any PHQ you have has to be removed from the game, and then re-dropped from a TL normally, at which time the new spec will be used.

So, move all resources to ships, undock everything, use the cheat menu to remove the PHQ, use cheat menu to add a PHQ to a TL, drop it normally, and redock the ships.

It should then work, assuming the new phq file works. If it doesn't, you need to go through the whole process again, after you modify the file again.

The PHQ isn't a normal station. The code for it is connected to it at drop time. So you cant just create a new station and have it work. Nor can you change the phq file and have it work.

Sorry, taken a while for the old memory to kick in.

User avatar
zdan30
Posts: 262
Joined: Mon, 29. Jan 07, 14:20
x4

Post by zdan30 » Mon, 2. Jan 17, 10:09

I have been trying to get round that by having a save with a TL docked at kingdom end and enough credits to buy one and jump the TL to the sector i want to build the PHQ,i was thinking that would meet those requirements.

Do you think Dockware manager would affect the PHQ and why when i recycle a ship i get no resources back?

Trying to think if anything else im using would affect the PHQ adversely or if theres another file thats stopping it working normally,can you remember what else if anything you changed that could effect it?
Im thinking maybe i can take it back to its vanilla state and then once its working i can try add the stations back and play with the resources needed until its how i want to be.

User avatar
apricotslice
Posts: 14129
Joined: Sun, 16. May 04, 13:01
x4

Post by apricotslice » Mon, 2. Jan 17, 10:15

Yes, go back to the original vanilla file, and see if it works as it should after. If not, we know something else is conflicting.

But for the time it takes, what mods are you using, and how are they installed?

User avatar
zdan30
Posts: 262
Joined: Mon, 29. Jan 07, 14:20
x4

Post by zdan30 » Mon, 2. Jan 17, 10:56

So ive just taken the vanilla HQ.XML and changed the cat1 cat3 Apricot AMS and the one in addon/types and it worked,it shows resources needed,build time and its how it was in reunion so i have a base to work from.

Thanks for your support and suggestions.

Do you know or can anyone help with what i would need to change in the hq.xml to reduce build time,remove certain resources and lower resource costs without breaking the PHQ again?

Im going to have a play about and see what i can do myself but all input helps.

<?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="freighter" value="5000" primary="1" />
<factor class="bigship" value="25000" primary="1" />
<factor class="hq" value="25000" primary="1" />
</resource>
<!-- Money -->
<resource typename="SS_WARE_CREDITS">
<factor value="3" primary="1"/>
</resource>
<!-- Energy Cells -->
<resource typename="SS_WARE_ENERGY">
<factor value="885" primary="1" />
</resource>
<!-- Ore -->
<resource typename="SS_WARE_ORE">
<factor value="21250" primary="1" />
</resource>
<!-- Silicon -->
<resource typename="SS_WARE_SILICON">
<factor value="28333" primary="1" />
</resource>
<!-- Nividium -->
<resource typename="SS_WARE_NIVIDIUM2">
<factor racemask="khaak" value="170000" primary="1" />
</resource>
<!-- Cloth Rimes -->
<resource typename="SS_WARE_F217">
<factor value="85000" />
</resource>
<!-- Rastar Oil -->
<resource typename="SS_WARE_F238" >
<factor value="42500" />
</resource>
<!-- Teladianium -->
<resource typename="SS_WARE_R255">
<factor value="28333" primary="1" />
</resource>
<!-- Crystals -->
<resource typename="SS_WARE_TECH205">
<factor value="85000" primary="1" />
</resource>
<!-- Quantum Tubes -->
<resource typename="SS_WARE_TECH206">
<factor value="85000" />
</resource>
<!-- Microchips -->
<resource typename="SS_WARE_TECH207">
<factor value="42500" />
</resource>
<!-- Computer Components -->
<resource typename="SS_WARE_TECH208">
<factor value="85000" />
</resource>
</resources>
</headquarters>

User avatar
apricotslice
Posts: 14129
Joined: Sun, 16. May 04, 13:01
x4

Post by apricotslice » Mon, 2. Jan 17, 11:16

zdan30 wrote:So ive just taken the vanilla HQ.XML and changed the cat1 cat3 Apricot AMS and the one in addon/types and it worked,it shows resources needed,build time and its how it was in reunion so i have a base to work from.
Umm? What did you do?

All you needed to do was delete the one you had in types. The mod version should have worked.

If I read that correctly, the one thing you never ever do, is change anything inside the game cats. Extract it yes, change anything inside no.

Do you know or can anyone help with what i would need to change in the hq.xml to reduce build time,remove certain resources and lower resource costs without breaking the PHQ again?
I dont think you can remove a resource. The problem with a lot of things Egosoft do, is they only make them partly modable. So you can change the specs a bit, but the way it works is hardcoded. One of the things hardcoded is the resources. You can change how much you need, but not remove one.

In theory, set time to zero to make it happen immediately, money to zero to cost nothing, and production to zero to not use any resources.

I know money 0 works. But I tend to use time 10, and leave resources alone. (Except in a salvage game, where I've set recycle resources to 200, and received twice the resources back as normal.)

User avatar
zdan30
Posts: 262
Joined: Mon, 29. Jan 07, 14:20
x4

Post by zdan30 » Mon, 2. Jan 17, 11:26

I used x3 editor 2,i opened the cat file used the text viewer and copy pasted in what i wanted and it seems to have worked ok,i am literally walking around in the dark doing this and trying to find what i can on google and taking those ideas with help i get on here,if i break it i can always start again.

So far ive removed all resources except money and lowered the cost of the buster blueprint i got with the vanilla hq to about 10k.
I cant seem to add stations or wares though,im trying to cross reference what i had in the xml to what ive got now to work out why stations wont appear as blueprints

<?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" />
<blueprint typename="SS_LASER_TUG" />
<blueprint typename="SS_WARE_SATELLITE2" />
<blueprint typename="SS_WARE_A_MK2DRONE" />
<blueprint typename="SS_FAC_A_SHIELD_D" />
<blueprint typename="SS_FAC_S_ORE_3" />
<blueprint typename="SS_FAC_S_SIL_1" />
<blueprint typename="SS_FAC_B_POWER_2" />
<blueprint typename="SS_FAC_F258_1" />
<blueprint typename="SS_FAC_A_SHIELD_F" />
<blueprint typename="SS_FAC_R214_1" />
<blueprint typename="SS_FAC_F219_1" />
<blueprint typename="SS_FAC_R256_1" />
<blueprint typename="SS_FAC_F218_1" />
<blueprint typename="SS_FAC_A_TECH207" />
<blueprint typename="SS_FAC_A_TECH208" />
<blueprint typename="SS_FAC_F247_1" />
<blueprint typename="SS_FAC_R245_1" />
<blueprint typename="SS_FAC_A_SAT2" />
<blueprint typename="SS_LASER_APRICOT1" />
<blueprint typename="SS_LASER_APRICOT2" />
</blueprints>
<production time="100" money="1" 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="freighter" value="5000" primary="1" />
<factor class="bigship" value="25000" primary="1" />
<factor class="hq" value="25000" primary="1" />
</resource>
<!-- Money -->
<resource typename="SS_WARE_CREDITS">
<factor value="3" primary="1"/>
</resource>
</resources>
</headquarters>

User avatar
apricotslice
Posts: 14129
Joined: Sun, 16. May 04, 13:01
x4

Post by apricotslice » Mon, 2. Jan 17, 11:39

You added blueprints, but not the ability to make them.

Code: Select all

<production time="10" money="0" resources="100">
        <factor class="ship" value="2" />
        <factor class="station" value="2" />
        <factor class="laser" value="1" />
        <factor class="missiles" value="2" />
        <factor class="ware" value="1" />
      </production>

User avatar
zdan30
Posts: 262
Joined: Mon, 29. Jan 07, 14:20
x4

Post by zdan30 » Mon, 2. Jan 17, 11:50

Just tested and all working as i wanted which is great!
The only part i havent added is the Terran HQ which at this point im happy to live without.
Going to have a play with the resources and tweak it some more.

User avatar
apricotslice
Posts: 14129
Joined: Sun, 16. May 04, 13:01
x4

Post by apricotslice » Mon, 2. Jan 17, 12:04


Post Reply

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