Litcube's Excel TShip Editor 0.64b

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
Litcube
Posts: 4245
Joined: Fri, 20. Oct 06, 19:02
xr

Litcube's Excel TShip Editor 0.64b

Post by Litcube » Thu, 3. Mar 11, 23:01

Litcube's Excel TShip Editor 0.64b (LETE)
Beta Version

Screen shot 1

Screen shot 2

Screen shot 3

Image


Installation & Tech Details


Dump into a folder.
May not be compatible with Excel versions less than 2010. Test it. Don't ask me. Enable macros. If you don't know how to do this, use X Editor 2.


What Is It?


Mass editing ships, or creating multiple changes like 'hull packs' is a pain in the ass using X Editor 2 (which we all love anyway). This allows you to see all ships and their stats in one list, and make changes as you would expect in an excel spreadsheet. Most importantly, importing and exporting happens with one button click, as opposed to copying pasting, fiddling with ";"s, cvs, yadda yadda.

TShip items not yet implemented:

- Turret offsets, dummies, scenes. There's no reasonable way to lay this out in Excel on a single row. Besides, most of this depends on the model, and mass editing usually isn't important for this. Use X Editor 2 for these things. Note that this does not include TCockpit IDs for turrets (meaning, you *can* change the TCockpit IDs for the turrets using LETE).

The files referenced are within the directory, which includes vanilla T files. You can replace them with your own from your favourite mod.

When you open the file, goto the "Control Panel" page. Hit "Import". Edit away. When you're ready, hit "Export".

Things:

- To use the Delete and Copy buttons on the Edit sheet, double click them.

- See screen shot 3. Using these swaps formulas in case you'd like to edit certain things from a different angle. For example, instead of always editing minimum speed, and adding engine tunings until you get your desired max speed, now you can just hit "edit" above the max speed column, set a max speed, and the minimum speed will be calculated off of the engine tunings, and vice versa. Speed, weapon recharge, and variant ID, are all supported in this manner.

- For your own safety and functionality, leave the sheets protected.

- Price Column: If you enable the edit button here, you'll be able to enter a price (in game price), and the RelVal will be automatically calculated off of that. This formula is accurate to within ~7 credits. A few things need to happen before you can use this properly. Price Mod 1 & 2 all need to be set to 1, and RelVal NPC Link enabled. Vanilla uses 25, which causes an error near the 107 million mark caused by wrapping errors. You'll have to re-calculate your prices if you decide to use this. Note price does not take into account the built-in wares. Those will be added to the cost of the ship in game.

Have fun.



Versions

0.64b:
- Filters are now cleared when hitting the edit buttons before the edit changes take place. The filters were causing only some of the cells to be updated. I'll remedy this in the future with a solution that applies to all appropriate cells without undoing your filters. For now, just take note, and reapply your filters after changing the edit toggles.
- Cockpit weapon usage pips weren't updating when changing the cockpit weapon on ships. This has now been fixed/implemented.
- Minor bug fixes

0.62b:
- Added version info to the exported header.
- Fixed a small bug in name writes that caused multiple variant entries in the XML file to not write properly. An example of the bug is two Super Freighter variants, and the Super Freighter XL not showing up. This has been fixed.

0.60b:
- Acceleration column was accidentally named Column 1. Woops.
- Added "link" checkbox for RelVal NPC. All values for RelVal NPC and Player are the same, so I just put a checkbox in there that enable the sheet to auto-update all these values to match the Player RelVal values.
- Added Price column. If you enable the edit button here, you'll be able to enter a price (in game price), and the RelVal will be automatically calculated off of that. This formula is accurate to within ~7 credits. A few things need to happen before you can use this properly. Price Mod 1 & 2 all need to be set to 1, and RelVal NPC Link enabled. Vanilla uses 25, which causes an error near the 107 million mark caused by wrapping errors. You'll have to re-calculate your prices if you decide to use this. Note price does not take into account the built-in wares. Those will be added to the cost of the ship in game.

0.59b:
- Fixed regional settings incompatibility for backward regions (decimal, comma thing).
- Added WareLists ID view function. Again, double click it. It'll popup the ware lists.
- Due to the above, all ware files have now been included.

0.58b:
- "Procedure too large" error has been fixed. This was a bug only found in 32-bit versions of Excel 2010. It'll work now in both versions.
- Added "Edit" buttons. See screen shot 3. Using these, swaps formulas in case you'd like to edit certain things from a different angle. For example, instead of always editing minimum speed, and adding engine tunings until you get your desired max speed, now you can just hit "edit" above the max speed column, set a max speed, and the minimum speed will be calculated off of the engine tunings, and vice versa. Speed, weapon recharge, and variant ID, are all supported in this manner.
- Added the ability to resize columns, if you add your own
- Removed cell locks, as it was preventing you from sorting or filtering using the table functions, and I know you were probably unprotecting the sheet to do so. Now you don't have to. As a result, locks are now hard coded. Filter and sort to your heart's content. The export function *can* handle your sorts, filters, etc. It just removes them before exporting.
- Fixed a few nameless bugs.

0.56b:
- Some exports were putting out decimal values when they weren't supposed to. All values that are supposed to be whole numbers should now be exported only as whole numbers. (Thanks for spotting it, TrixX!)
- Added Copy and Delete Buttons. DOUBLE-CLICKING these will perform the said function. Copy copies the ship to the end of the table, and delete deletes the whole row
- Added everything from TShips to the Edit page, which includes useless stuff like Video ID, Reaction Delay
- Added the ability to add columns. Users can now add columns to the edit sheet without breaking anything. Don't try this with rows.
- Added more robust formatting routines
- Included a Wipe routine on the control panel. Advisable to do this before importing, if your Edit sheet has data on it.
- Included TShips from Vanilla 3.1

0.54b:
- First release
Last edited by Litcube on Fri, 18. Mar 11, 07:53, edited 13 times in total.

fallenwizard
Posts: 608
Joined: Tue, 13. Apr 10, 20:03
x4

Post by fallenwizard » Thu, 3. Mar 11, 23:26

I don't know what to say. How about a big THANK YOU?

I was using h2o.Ava's version before and I always had problems with it. I will try your version and I hope it will work better.

Thanks :)

By the way: Is it also possible to create a version for OpenOffice/LibreOffice?

User avatar
X2-Illuminatus
Moderator (Deutsch)
Moderator (Deutsch)
Posts: 21451
Joined: Sun, 2. Apr 06, 16:38
x4

Post by X2-Illuminatus » Thu, 3. Mar 11, 23:49

This is really awesome. :o Many thanks for this, Litcube. :) I just had a short test with Excel 07 and it works perfectly, if you enable macros.

Your work is much appreciated. :thumb_up: :thumb_up:
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 and Nopileos as Kindle e-books! (NOW also available: X3: Yoshiko!)

User avatar
Litcube
Posts: 4245
Joined: Fri, 20. Oct 06, 19:02
xr

Post by Litcube » Thu, 3. Mar 11, 23:50

You're welcome, guys.

User avatar
Litcube
Posts: 4245
Joined: Fri, 20. Oct 06, 19:02
xr

Post by Litcube » Fri, 4. Mar 11, 01:47

The ability to add a ship is an obvious omission, something I'll rectify soon.

fallenwizard
Posts: 608
Joined: Tue, 13. Apr 10, 20:03
x4

Post by fallenwizard » Fri, 4. Mar 11, 02:08

I have a suggestion: Please add the ability to import a second TShips file to make it easier to copy&paste entries.

User avatar
TrixX
Posts: 2022
Joined: Wed, 18. Aug 10, 14:28
x3tc

Post by TrixX » Fri, 4. Mar 11, 10:58

Or you could just open it twice...
"If you’re not prepared to be wrong, you’ll never come up with anything original."
Sir Ken Robinson

fallenwizard
Posts: 608
Joined: Tue, 13. Apr 10, 20:03
x4

Post by fallenwizard » Fri, 4. Mar 11, 15:16

Yes but it is a little bit annoying (and confusing) to open 2 excel instances.

User avatar
TrixX
Posts: 2022
Joined: Wed, 18. Aug 10, 14:28
x3tc

Post by TrixX » Fri, 4. Mar 11, 17:09

:o

Personally I'd find it more annoying having them in the same instance as copy/pasta works so much faster when you can alt-tab between documents than when you have to select sheets in Excel...
"If you’re not prepared to be wrong, you’ll never come up with anything original."
Sir Ken Robinson

User avatar
imperium3
Posts: 1253
Joined: Fri, 5. Jun 09, 18:55
x3tc

Post by imperium3 » Fri, 4. Mar 11, 18:48

This is an excellent idea! Thanks very much, Litcube. In my brief experience I see it being especially useful sorting out weapon/missile compatibilities across whole classes. In particular missiles, which are a right PIA normally because you have to add/remove each individual missile for each individual ship, making a large-scale rearrangement infeasible. It's the main reason, besides compatibility with shipmods, that my MRM never touched that are which sorely needs some fiddling.

So thanks :D I'll see what I can achieve with it.
ImageImage

User avatar
LV
Sith Lord
Posts: 6362
Joined: Wed, 6. Nov 02, 21:31
x3tc

Post by LV » Fri, 4. Mar 11, 20:17

I made a slight variation to your first post ;)
LV's TC Scripts
Readme's For All My Scripts


I felt a great disturbance in the forum, Like millions of voices cried out in terror, then were silenced

si tacuisses, philosophus mansisses

User avatar
Litcube
Posts: 4245
Joined: Fri, 20. Oct 06, 19:02
xr

Post by Litcube » Fri, 4. Mar 11, 20:55

Oh! I've been force gripped!



Folks, this package has 3.0 TShips, and not the 3.1 TShips. TrixX told me there's only one small value change to the Angel in 3.1, but still, use 3.1 TShips for this.

I'll pack it in the next version, which might come out today.

User avatar
Litcube
Posts: 4245
Joined: Fri, 20. Oct 06, 19:02
xr

Post by Litcube » Sat, 5. Mar 11, 07:43

Update


Added to original post: "For your own safety and functionality, leave the sheets protected."

0.56b:
- Some exports were putting out decimal values when they weren't supposed to. All values that are supposed to be whole numbers should now be exported only as whole numbers. (Thanks for spotting it, TrixX!)
- Added Copy and Delete Buttons. DOUBLE-CLICKING these will perform the said function. Copy copies the ship to the end of the table, and delete deletes the whole row
- Added everything from TShips to the Edit page, which includes useless stuff like Video ID, Reaction Delay
- Added the ability to add columns. Users can now add columns to the edit sheet without breaking anything. Don't try this with rows.
- Added more robust formatting routines
- Included a Wipe routine on the control panel. Advisable to do this before importing, if your Edit sheet has data on it.
- Included TShips from Vanilla 3.1

qwizzie
Posts: 560
Joined: Thu, 1. Jun 06, 12:17
x4

Post by qwizzie » Sat, 5. Mar 11, 16:32

exactly what many of us were waiting for .. thnks

Osiris454
Posts: 741
Joined: Tue, 4. Jan 11, 23:03
x3tc

Post by Osiris454 » Sun, 6. Mar 11, 00:17

Lit, when I try to import a Tships file, I get a "Compile Error: Procedure Too Large".

Post Reply

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