[Scripts] Apricot Mapping Service Scripts, MD and mini-mods [APv2.5.1/TCv3]

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

Kontaro
Posts: 90
Joined: Wed, 5. Sep 12, 17:31
x3tc

Post by Kontaro »

apricotslice wrote:
Kontaro wrote:Tried out 5.2 and while it didn't break the HQ i already had down, when i built a new HQ from a TL, THAT was broken with 0/0 and no blueprints. Not even the Sabre Blueprint that's supposed to be included.
The existing one wont be affected by a file change.

Can you be explicit about the steps you take to get a new station in, and are you 100% sure your using the correct station ?

Again, I'd really like to have your save and tships so I can see whats going on myself.
Ok, what I did is destroy my current HQ with the cheat script, then I cheat in an MMBS, and cheat the 30000 unit headquarters into it's cargo bay, then I deploy it normally. Before 5.2, the current HQ would stop working(have the 0/0 and no production) on the xml, but this time it didn't.(it still worked fine far as i can tell)

As for the save and such, I guess I could send it to you, altho you would need Asteroid Fusion, Marine Repairs, NPC bailing, and Salvage Claim Software, as that is what mods i'm using atm. Also I'm using the AP Bonus pack(all of it) and the non-steam exe. Also I don't know where to upload my save and tships file.
User avatar
apricotslice
Posts: 14163
Joined: Sun, 16. May 04, 13:01
x4

Post by apricotslice »

Kontaro wrote:Ok, what I did is destroy my current HQ with the cheat script, then I cheat in an MMBS, and cheat the 30000 unit headquarters into it's cargo bay, then I deploy it normally. Before 5.2, the current HQ would stop working(have the 0/0 and no production) on the xml, but this time it didn't.(it still worked fine far as i can tell)

As for the save and such, I guess I could send it to you, altho you would need Asteroid Fusion, Marine Repairs, NPC bailing, and Salvage Claim Software, as that is what mods i'm using atm. Also I'm using the AP Bonus pack(all of it) and the non-steam exe. Also I don't know where to upload my save and tships file.
If its working fine after dropping, then 5.2 should have fixed it. Try dropping a TPHQ as well and see if that works as well.

If you zip up the save and tships and its less than 10mb, you should be able to email it to me.

None of those script packs are important to testing the PHQ. Only tships.
Kontaro
Posts: 90
Joined: Wed, 5. Sep 12, 17:31
x3tc

Post by Kontaro »

apricotslice wrote:If its working fine after dropping, then 5.2 should have fixed it. Try dropping a TPHQ as well and see if that works as well.

If you zip up the save and tships and its less than 10mb, you should be able to email it to me.

None of those script packs are important to testing the PHQ. Only tships.
No, the one that's already DEPLOYed keeps working, in the versions before, THAT one would stop working. The newly dropped ones NEVER worked.

Also, I've ONLY been dropping the Terran PHQs, haven't deployed the commonwealth one.
User avatar
apricotslice
Posts: 14163
Joined: Sun, 16. May 04, 13:01
x4

Post by apricotslice »

Kontaro wrote:No, the one that's already DEPLOYed keeps working, in the versions before, THAT one would stop working. The newly dropped ones NEVER worked.

Also, I've ONLY been dropping the Terran PHQs, haven't deployed the commonwealth one.
Any old hq will continue to work using the hq file it was created with - that gets stored in the save file. Thats why we have to delete them and redrop to get them to work for the new file.

I need to see a save, its working fine for me, so I need to see what your game is doing.
Kontaro
Posts: 90
Joined: Wed, 5. Sep 12, 17:31
x3tc

Post by Kontaro »

apricotslice wrote:Any old hq will continue to work using the hq file it was created with - that gets stored in the save file. Thats why we have to delete them and redrop to get them to work for the new file.

I need to see a save, its working fine for me, so I need to see what your game is doing.
Which is odd, as the first couple times, before 5.2, my already built HQ would stop working, this is the first where it kept working as intended...but alas, as I stated, a newly built-from-TL wasn't...next time I load the save I'll drop BOTH PHQs and see if either work.

It's odd because I'm not running any mods, only scripts, yet it still doesn't work right... Anyway, I recently rebuilt my MMBS, maybe deploying from one that wasn't cheated in will make a difference


Edit - Nope, neither HQ works, 0/0 in dockware, no blueprints either.
Kontaro
Posts: 90
Joined: Wed, 5. Sep 12, 17:31
x3tc

Post by Kontaro »

Opened up the xml, and got something that looked funny...

Edit - Nevermind, made the change that I thought would work, and all it changed was breaking the currently placed HQ, newly deployed HQ unchanged.
User avatar
apricotslice
Posts: 14163
Joined: Sun, 16. May 04, 13:01
x4

Post by apricotslice »

*sigh*

Relooked and there was a line left in that shouldnt have been there.

Try 5.3.
Kontaro
Posts: 90
Joined: Wed, 5. Sep 12, 17:31
x3tc

Post by Kontaro »

That fixed it! My CURRENT Terran PHQ now has the 7mil/700 mil storage, and has the creditless stuff, heck, repairing my J happened in 10 seconds from 7 percent health to full! So I'd say it worked like a charm!

Thanks for sticking with us and helpin on fixin our problems! It's just funny that I went to see if my current HQ still worked, and saw it had all the stuff from yer patch without me having to rebuild it. :D
User avatar
apricotslice
Posts: 14163
Joined: Sun, 16. May 04, 13:01
x4

Post by apricotslice »

Thats interesting. They must have changed the way the phq works in one of the patches. Good to know for the future.
Kontaro
Posts: 90
Joined: Wed, 5. Sep 12, 17:31
x3tc

Post by Kontaro »

yeah, now the only sad part is that i gotta wait for it to finish REing my Tokyo at the old speed before it can start REing the other stuff at the new speed, since it did that when i saved
User avatar
apricotslice
Posts: 14163
Joined: Sun, 16. May 04, 13:01
x4

Post by apricotslice »

:lol:
David Trest
Posts: 3
Joined: Mon, 8. Oct 12, 02:08

Post by David Trest »

Well, I'm having a different problem.

I created (via cheat menu) and then deleted and then built via ST another PHQ. Some functions work, some do not.

What WORKS:
Extended cargo hold (confirmed 500m)
Reverse engineering
Recycling (sort of -- ships are recycled but I don't see any wares collected)

What does NOT WORK:
Construction of ships

I add ships to the construction queue and there are no markers on the current resource list for materials required (in the vanilla PHQ it would list the amount currently in storage followed by the amount consumed for the current production cycle in parenthesis). The % of materials required does not change either.
User avatar
apricotslice
Posts: 14163
Joined: Sun, 16. May 04, 13:01
x4

Post by apricotslice »

Which version of the PHQ mod are you using ? Have you tried the v5.3 that I uploaded the other day.

No wares showing after recycling tends to suggest there is no storage space for them.

Can you do some screen prints so I can see what is showing ?
David Trest
Posts: 3
Joined: Mon, 8. Oct 12, 02:08

Post by David Trest »

I used the one from the downloads page on your website, filename is:
X3TC-Apricot-PHQ-Fix.zip

Downloaded it today, so if that's the right location & link, that's the latest.
User avatar
apricotslice
Posts: 14163
Joined: Sun, 16. May 04, 13:01
x4

Post by apricotslice »

Thats only for use with the AMS mod.

Use the other one, v5.3.

Edit : Which game are you playing ?

Edit 2 : v5.3 for AP. v4 for TC.

I've removed that fix file. The mods have their own fix files.

The hq file is different for vanilla or Apricot mods. If you put a mod file in for a game without the mods, the PHQ's wont work.
David Trest
Posts: 3
Joined: Mon, 8. Oct 12, 02:08

Post by David Trest »

A-ha. That did it. Now I see all expected behavior. Much appreciated!

You might want to rethink a better organizational and naming schema dude. ;)
User avatar
Brinnie
Posts: 908
Joined: Mon, 5. Jun 06, 08:26
x3tc

Post by Brinnie »

@ Apricotslice:

I have taken some files from an old package of yours mixed them up with some from one of your newer ones and by shear luck and coincidence I seem not to have broken anything.

Reason why I did the above is because at this time I only wanted CBeam and Beamdock (you might remember me from a few pages back).

Although both scripts work fine I would like to make a small modification, if it is not too much trouble.
I'd like to change both scripts so that they only work within a 5km radius.

Is that complicated to achieve? I was hoping it only involved changing a number or something like that.

Otherwise I better leave things as they are.

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

Post by apricotslice »

In apricot.cbeam.xml there is this line :

Code: Select all

$box =  find flying ware: sector=$sec maintype=$anull subtype=$anull flags=[Find.Nearest] refobj=$ship maxdist=500000 maxnum=$anull, refpos=$anull
Change the maxdist value down to 5000 and it should be range restricted to that.

With Beamdock, the relevant code has been starred out.

Code: Select all

 *if $dist > 6000
173   *$x = $tl -> get x position
174   *$y = $tl -> get y position
175   *$z = $tl -> get z position
176   *$ts -> set command: BEAMDOCK
177   *= $ts -> call script !move.movetoposition :  sector=$tssec  position x=$x  position y=$y  position z=$z  precision=2500
178   *end
Remove the stars and change 6000 to 5000 and it should be restricted to that distance. $dist is already setup, so unstarring that code should work.
User avatar
Brinnie
Posts: 908
Joined: Mon, 5. Jun 06, 08:26
x3tc

Post by Brinnie »

Thanks for your quick reply.

I have edited the following lines, I couldn't do it exactly as you advised as the code in my files seems different.
It has not made any changes to the distance ingame.



Beamdock:

Code: Select all

<line linenr="196" indent=""></line>
<line linenr="197" indent=""><comment>*$dist = <text>get distance between </text>$tl<text> and </text>$ts</comment></line>
<line linenr="198" indent=""></line>
<line linenr="199" indent=""><comment>if $dist > 5000</comment></line>
<line linenr="200" indent=""><comment>$x = $tl -><text> get x position</text></comment></line>
<line linenr="201" indent=""><comment>$y = $tl -><text> get y position</text></comment></line>
<line linenr="202" indent=""><comment>$z = $tl -><text> get z position</text></comment></line>
<line linenr="203" indent=""><comment>$ts -><text> set command: </text>BEAMDOCK</comment></line>
<line linenr="204" indent=""><comment>= $ts -><text> call script </text>!move.movetoposition<text> : </text><text> sector=</text>$tssec <text> position x=</text>$x <text> position y=</text>$y <text> position z=</text>$z <text> precision=</text>2500</comment></line>
<line linenr="205" indent=""><comment><text>end</text></comment></line>



CBeam:

Code: Select all


<line linenr="024" indent=""><var>$box = </var><text> find flying ware: sector=</text><var>$sec</var><text> maintype=</text><var>$anull</var><text> subtype=</text><var>$anull</var><text> flags=</text><var>[Find.Nearest]</var><text> refobj=</text><var>$ship</var><text> maxdist=</text><var>5000</var><text> maxnum=</text><var>$anull</var><text>, refpos=</text><var>$anull</var></line>

and

<line linenr="040" indent=" "><var>$box = </var><text> find flying ware: sector=</text><var>$sec</var><text> maintype=</text><var>$anull</var><text> subtype=</text><var>$anull</var><text> flags=</text><var>[Find.Nearest]</var><text> refobj=</text><var>$ship</var><text> maxdist=</text><var>5000</var><text> maxnum=</text><var>$anull</var><text>, refpos=</text><var>$anull</var></line>

I have first uninstalled the other version, loaded the game, saved and installed the modified version.
User avatar
DrBullwinkle
Posts: 5715
Joined: Sat, 17. Dec 11, 01:44
x3tc

Post by DrBullwinkle »

Use the in-game Script Editor to edit scripts.

A text editor (or normal xml editor) will not work.

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