[Script][V1.3|2.5|1.0] X2-X3//X3-X3-Converter//Copy Ships and Stations

The place to discuss scripting and game modifications for X³: Reunion.

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

jsloan31
Posts: 5
Joined: Wed, 15. Dec 04, 07:12
x3tc

Post by jsloan31 »

Excellent script, used it to transfer from a Vanilla X3 (well, with some scripts, but mostly Vanilla) to a XTM 0.7 installation without much issue. Only things I had to deal with were some stations in my complex being shifted up and down, but I rearranged them pretty easily with the Factory Complex Constructor.

Just wanted to add, under Vista, the text log file doesn't get put in the X3 Directory, you have to navigate to the X3 Directory and click on a "Compatibility Files" button which comes up (next to the View, Options, etc. buttons.) This threw me off for a long time, since I was wondering where the file was.
spoidz
Posts: 607
Joined: Sat, 6. Mar 04, 20:43
x3tc

Post by spoidz »

I went through the readme and this thread and I just want to be sure on the sequence before I take the plunge to XTM.

I currently have a fairly modified X3/2.0.02/Balagi/BonusPack06. I haven't completed the vanilla plot yet.

Am I correct in the following sequence?

1. Run converter against my current X3 save in order to establish the logs and the import commands, stop
2. Install XTM and establish a new start/save as required by XTM
3. Run converter from inside the new XTM save to import my previous universe

Thanks
jumbled
Posts: 320
Joined: Mon, 28. Jun 04, 08:22
x4

Post by jumbled »

The angles were pretty straightforward. I needed only a 3-digit string for each angle (using your base-50 system), so it came out as 9 extra characters in the output per station. In these days of outrageously humongous hard drives packed into our computers (mine came with a dual 75GB RAID config. - I don't think I could use that much in a lifetime!), I really don't think an extra few dozen bytes of data is going to break anyone. ;)

As for the mines, it's a simple solution if you're willing to go through a bit of extra effort. just use the Station Relocator script (found in here) to pack up the mine onto a TL, then place it again on the same asteroid you had before (new game, so it should be back in it's old place). Problem solved.
User avatar
SymTec ltd.
Posts: 5285
Joined: Mon, 11. Apr 05, 21:11
x3tc

Post by SymTec ltd. »

spoidz wrote:I went through the readme and this thread and I just want to be sure on the sequence before I take the plunge to XTM.

I currently have a fairly modified X3/2.0.02/Balagi/BonusPack06. I haven't completed the vanilla plot yet.

Am I correct in the following sequence?

1. Run converter against my current X3 save in order to establish the logs and the import commands, stop
2. Install XTM and establish a new start/save as required by XTM
3. Run converter from inside the new XTM save to import my previous universe

Thanks
That's exactly how it works. ;)
jumbled wrote:The angles were pretty straightforward. I needed only a 3-digit string for each angle (using your base-50 system), so it came out as 9 extra characters in the output per station. In these days of outrageously humongous hard drives packed into our computers (mine came with a dual 75GB RAID config. - I don't think I could use that much in a lifetime!), I really don't think an extra few dozen bytes of data is going to break anyone. ;)
Well, I am proud owner of 250GB mostly free data-storing space. :D Could you send me the two files you modified? ;) :roll: :P
spoidz
Posts: 607
Joined: Sat, 6. Mar 04, 20:43
x3tc

Post by spoidz »

Well I thought I'd try it out with my mod vanilla before I overwrote my entire game with XTM to see if there were any quirks.

I seem to have a glitch somewhere.

I received all my ships and stations/HQ/facts using an Extreme restart. My race stats are good and my trade/fight are reset per Extreme restart as expected. My UTs are all good restart ranks.

But I lost the following:

1,462,499,550cr - The game convert gave me only 311,587,267 cr. I had no credits in any station/HQ/factory, all in the bank before the convert. I cannot find the remaining credits in any of my ships or stations/facts.

-- I know that the script gives you some credits to buy back the hub, and the stations are filled up. I was at 1,774,086,817cr at the write save. Is there any chance the amount given by the script busted the 2B limit and only kept some overage?

51 salvage insurance - I had 65 and the convert only gave me back 14.

--No idea what could have taken this away

One other quirk also. The write save had entire vanilla universe explored to include gates. The convert put back all known sectors but when I tried to get back to the Unk sector by Pats Retreat (where I parked all my ships and the Hq was) there was no gate available. I used Cycrow reveal all to get it back. I didn't check any other unk sector.

I re-ran the read against a another extreme restart and same result. This time though I used reveal all before I started the read and didn't have the gate problem (it didn't remove the revealed gate at least). but I still have all the credit/salvage losses.

EDIT: Just to check I re-ran with an custom X-universe start. Same previous losses plus a few more additions:

The missing gates were numerous after looking around, not just limited to my HQ unk sector. Also I lost all my HQ blueprints (hyperion**), they weren't in the HQ after re-drop. ( I know you asked if people wanted to do w/o the HQ mammoths, was that actually a possible option we can turn on? I may have to to save my blueprints as the re-drop obviously resets it all. And I don't have an old enough save to restore them fresh).

END EDIT:


Is there somewhere I should find the missing credits/salvage or do I need to move credits from the bank to stations/fact before hand as some have suggested for complexes/HQ.

Other than the glitch above it works fine, thank you.

Once I can sort this out I'll be ready to move fully to XTM.

Again, thankyou for this lifesaver script.
jumbled
Posts: 320
Joined: Mon, 28. Jun 04, 08:22
x4

Post by jumbled »

SymTec ltd. wrote:Well, I am proud owner of 250GB mostly free data-storing space. :D Could you send me the two files you modified? ;) :roll: :P
Far be it for me to fill up what precious little space you have left... :roll:

Send me your email address and I'll get a copy of my changes out to you.

Something I should mention, in the course of my "edit", I had to alter a few other things.

1) You were taking the x/y/z coords and dividing by 100 when encoding, then multiplying back when restoring. First, this gives you less than the 3 digits of base-50 precision than you need for encoding (for most numbers), and you lose 2 digits of decimal precision on restore. I place my complexes in a compact format (as close as I can so they connect the way I want them, and no accidental 'bridges'), and sometimes I'm splitting hairs by 100 meters or so. This line didn't make sense to have in there, for both reasons, so I commented yours out and put a new one in there to convert the exact number, which is still well within the range of the base-50 numbers you're using.

2) The collision detection was causing probems for me, in a similar manner as above, moving things out of place and making me move them back. I know where my stations should be and that "it worked before, why not now"? So I commented it out, as well, leaving things where they should be.

Other than that, the extraction came out just fine. (Had to try it a couple of times to work out these bugs, but....).
spoidz wrote:1,462,499,550cr - The game convert gave me only 311,587,267 cr. I had no credits in any station/HQ/factory, all in the bank before the convert. I cannot find the remaining credits in any of my ships or stations/facts.

51 salvage insurance - I had 65 and the convert only gave me back 14.
Sounds like a precision error... Could be he's not counting enough digits for BIG numbers like that. I might suggest loading it, in smaller numbers, into stations. As for the insurance, without actually looking at the code, I might say it's counting one base-50 digit, assuming 50 or less, and taking a MOD function from it (65 MOD 50 = 15). You may have used one somewhere along the way, or there may be another math operation being performed on it.

The gate issue may very well be due to not having "been there" to explore it yourself. He puts a NavSat in a high location in a sector to put it on your map, but you need to actually put one near a gate, or visit it yourself to reveal the stuff inside the sector. Personally, I didn't have this problem because some time ago I tweaked a file to give my AdvSats a HUGE range (100km radius), so the maps are instantly revealed for me as soon as those are restored. Now, if only I can keep the pirates/Kha'ak/Xenon from killing them all the time! :evil:

As for the HQ, the blueprint stuff (my guess) is probably contained in some sort of local variable within the STATION. I say this because I have two HQ's of my own (the original plus one I scripted in). Each maintains a separate blueprint catalog. If you pack it into a TL (did that once), all "information" that was once in the station is reset back to default on placing it again. Meaning, you gotta re-reverse engineer things again. I just finished with my Hyperions a short while ago. :)
spoidz
Posts: 607
Joined: Sat, 6. Mar 04, 20:43
x3tc

Post by spoidz »

Jumbled,

Yes the math is what I think is the issue. I have no real coding knowledge but I tried adding the next higher sequence of his math to the values in the x2.inttostl.xml file but no luck. It looks like the limit it will leave in a station is 310,042,318. I kept getting the same result no matter the start amount. I'm about to put blocks of 300M even into each station and leave none in the player account.

For the PHQ I was really hoping I could somehow modify the packup, as he mentioned a few posts back and have it replace it without packing, just like other stations. Any chance from what you've edited/seen its as simple as deleting the x3.station.phq.xml ?? Or is that written because the PHQ isnt treated as a regular station?

Anyway, thanks for the help, hopefully Symtech will also have a chance to take a look at it.

I'm going to try one more shot before I just hold off until some more tweaks can be made or I learn more scripting language.
jumbled
Posts: 320
Joined: Mon, 28. Jun 04, 08:22
x4

Post by jumbled »

I don't think the PHQ is treated as a regular station. From what I've seen and heard, others have tried scripting it into a sector, but it doesn't behave like a PHQ afterwards. You need to "place" it manually from a TL for it to get set up properly by X3 to do the RE and ship building stuff. Otherwise, it's just another EQ style dock.

You could do as I did and...ahem...cheat. Hey, I HAD these in there once...can I help it if I want to try out a new mod? I'm still playing the same game...so I scripted myself copies of each ship I had RE'd (and couldn't otherwise get new copies of "legally"), then docked and re-RE'd them. I consider it just part of restoring my "copied" game. 8)

As for the numbers, it looks like he allows for as much as 5 digits for player money (pocket money or station money). 50^5 = 312,500,000, so yeah, you're better off to put it into stations at <300 mil each.
spoidz
Posts: 607
Joined: Sat, 6. Mar 04, 20:43
x3tc

Post by spoidz »

Yes, the 300M worked fine.

As for PHQ, if there is a chance the game will replay Balagi with a new game start, I'm willing to go through it again with XTM loaded.

Else I'm afraid the hyperion is going to have to be resurrected by that "replicator" I "found in some flotsam"...yeah that's the story! :roll:

Thanks for your help
User avatar
Algoran
Posts: 584
Joined: Wed, 5. Apr 06, 08:12
x3tc

Post by Algoran »

I have the same problem a couple other people have posted about: my universe map and credits have transferred, but ships (only about 10) and trade/combat rankings have not! Also im not sure about race rep - now only teladi, boron and argon reps are shown. I dont know if those reps are right, cant remember what they should be. But a couple police licenses and salvage insurances are shown.

Also, gates and stations ect i had scouted in all the known sectors are not shown, is this normal? All the sectors are displayed unlinked on the universe map because of it :p

I do love the idea of this mod, makes the decision to transfer to XTM an easier one :p If only i could get it to work properly :(
User avatar
SymTec ltd.
Posts: 5285
Joined: Mon, 11. Apr 05, 21:11
x3tc

Post by SymTec ltd. »

Algoran wrote:I have the same problem a couple other people have posted about: my universe map and credits have transferred, but ships (only about 10) and trade/combat rankings have not! Also im not sure about race rep - now only teladi, boron and argon reps are shown. I dont know if those reps are right, cant remember what they should be. But a couple police licenses and salvage insurances are shown.
This means there has been some error reading in the ships. Either there is an incompatibility with another script editor version (Version 32 is the one used in my script), or another bug regarding the execution of the script files. Is there something common about the ones who had the problems?
- do you use Vista?
- in which order did you update your game?
- do all have ~10 Ships, no stations?
- do all use vanilla/modded/script games?
Algoran wrote:Also, gates and stations ect i had scouted in all the known sectors are not shown, is this normal? All the sectors are displayed unlinked on the universe map because of it :p
This is normal. Remember, you started a new game, so the stations seem to be the same, but really are new ones.
spoidz
Posts: 607
Joined: Sat, 6. Mar 04, 20:43
x3tc

Post by spoidz »

SymTech,

I'm on WinXP Sp2. I originally used the 1.86 Script installer to start against a completely vanilla/updated install. Archive is 2.0.00/balagi DVD folllowed by 2.0-2.02 patch, followed by Bonus 3.1.06.

I've run it several times with same results. Are the trade/fight ranks "supposed" to transfer? I have never recieved any but Race ranks on restart.

I've always received all ships and stations, approx 20 ships and 20-25 facts from a single complex (detached ahead of time) and the PHQ. As you've read had to use the >300M trick in order to get all my bank back.

Since then I have been beta-testing Cycrow's new PluginMgr 2.0. Using that I can still get the program to run against that same fresh vanilla start but I now have a new problem.

I had the Apricotslice custom M6 etc in my old save and with the old installer I had no problems importing my old save after an XTM install.

But now after import my empire, XTM overwrites them with XTM fighters of some type. XTM/import however does not overwrite them in the shipyards, they are still fine to start new with, but of course I lose all my previous and all the wares in them etc. Don't know if this is Pluginmgr or Converter issue yet but will follow up.

Also with the gates/station etc not showing up, I used his range edit trick and as soon as the convert placed them, their increased range allowed me to see the gates at restart. Agree that for anyone that didn't have enough Sats before, when the verse is restarted, the view is limited to existing Sat range. Unless you wanted to add a "reveal-all" switch for any previous known sector.

Only last item that I might ask a tweak for as well, is when the factories are replaced, they are reset to trade with races. I don't know if this can be changed to "no" by your script or if it is a hardcode of the drop process. It just would be nice to have them turned off so I don't lose stock/cr before I have time to run through them all to reset them. Especially for ones that are going back into a complex. Not too much hassle for me but others with many more might appreciate. I noticed a switch in the script for fact process on or off and wondered if that might be a key?

If you saw my previous, I was wondering if you actually had an offer of being able to leave the PHQ unpacked, but only if that does allow retaining blueprints, if it is hardcoded loss then no prob, just have to start over.
User avatar
Algoran
Posts: 584
Joined: Wed, 5. Apr 06, 08:12
x3tc

Post by Algoran »

Symtech,

Im using winXP, and yea i have about 10 ships, no stations.
In that game i have the bonus pack and i think one or two other scripts, also the cockpit and minimal hud mod. Its version 2.02.

This is what ive done for the switch-to-XTM process:
-use converter to make compressed file
-fresh install
-upgrade straight to 2.02
-install XTM
-install bonus pack, cockpit/hud mods
-start new game, uncompress file.

Oh and im not sure what you mean about script editor version... thats something to do with the game itself isnt it?
jumbled
Posts: 320
Joined: Mon, 28. Jun 04, 08:22
x4

Post by jumbled »

spoidz wrote:Yes, the 300M worked fine.

As for PHQ, if there is a chance the game will replay Balagi with a new game start, I'm willing to go through it again with XTM loaded.
I'm half-way through mine already. Just keep working and you'll get the mission soon enough.


@Algoran
Race reps worked for me, but I didn't "see" them until I met my first examples of the aliens to register the rep in my personal status page. Once you see one of their ships, or visit one of their sectors, you get the line in the stats.
undercover_agent
Posts: 51
Joined: Sun, 26. Feb 06, 08:13
x4

Problem...

Post by undercover_agent »

When i try to convert my old savegame to a new XTM 0.7 version, it comes up with these errors:

2 - There was a problem in line ReadText8758-2 - string null could not be read. Started with next line.

null - header could not be read correctly
String: ReadText8758-1

These two messages occur simultaniously, and after which, nothing happens. Here's what i did:
1. Installed the X3->X3 Converter on the V1.86 script installer (i have V2.0.02 of X3 installed)
2. Went into my savegame and went to a quiet sector, and started tranfer
3. Transfer completed with no difficulties
4. Copied and pasted the log08758.txt into the t folder, and renamed it 448758.xml
5. Installed XTM 0.7
6. Started new savegame and saved
7. Started the X3->X3 converter
8. Error messages occured, along with an annoying beeping noise (for about 4 seconds)
*I also moved the files in the folder marked 't' from the extracted X3->X3 converter to the t folder in my X3 directory, and moved the files in the 'scripts' folder of the extracted X3->X3 converter to the script files in my X3 directory

Well, that was it, it took me until yesterday to get the XTM0.7 mod, after i cant download it on dial-up, and then when my friend downloaded it, it failed, and we had to re-download it! I think i may not be destined to get this mod and play it with my old savegame!!
User avatar
SymTec ltd.
Posts: 5285
Joined: Mon, 11. Apr 05, 21:11
x3tc

Post by SymTec ltd. »

undercover_agent: This is a pretty typical error. Could you send me the file via Email so I can have a look?
undercover_agent
Posts: 51
Joined: Sun, 26. Feb 06, 08:13
x4

Post by undercover_agent »

@SymTec Ummm... yeah, i sent the code to via a mrivate message, i dont know ur email address!!
User avatar
SymTec ltd.
Posts: 5285
Joined: Mon, 11. Apr 05, 21:11
x3tc

Post by SymTec ltd. »

If you had read the readme, you would.


The code is fine. However, you might have saved the logfile under the wrong encoding or made other mistakes renaming it. That's why I need the file itself here, not its content. You do play an English X3-version, do you?
undercover_agent
Posts: 51
Joined: Sun, 26. Feb 06, 08:13
x4

Post by undercover_agent »

Yes, i do play the english version, i'm about to send you the file now.
hadsak
Posts: 32
Joined: Fri, 2. Jan 04, 08:53
x4

Post by hadsak »

I got the same error, If you find a solution, can you send me a pm

Return to “X³: Reunion - Scripts and Modding”