March 19, 2024, 05:23:23

Author Topic: [Tool] Tacticstypes.ini spreadsheet for OpenOffice  (Read 29298 times)

Offline Arparso

  • Administrator
  • Lieutenant
  • *****
  • Posts: 558
  • Karma: 14
  • I can see you...
    • View Profile
    • http://arparso.de/nexus
[Tool] Tacticstypes.ini spreadsheet for OpenOffice
« on: February 22, 2010, 08:30:46 »
Editing the tacticstypes.ini to insert new or modify existing ships and devices can get quite cumbersome, if you're creating a whole mod from scratch. The mod tools actually include an Excel spreadsheet, which is supposed to automate tacticstypes.ini-creation using a macro, but if you're using OpenOffice, that won't work at all.

So I wrote my own version of this script and spreadsheet being compatible to OpenOffice.org Calc. That enables me to have a much better overview over all my shipclasses and devicetypes, making changes to all of them much easier while not having to manually code my own tacticstypes.ini. Maybe it'll prove useful to other modders as well, so I'm sharing it here with you.

Usage instructions:
  • extract the tacticstypes.ods file to your mod directory into the _work\tables-subfolder and make a backup of your original tacticstypes.ini (!)
  • make your changes to the spreadsheet inserting your own shipclasses, devicetypes, shiptypes, etc.
  • save it
  • run the "Main" macro in tacticstypes.ods->Standard->ExportToIni
  • repeat steps 2 - 4 until you're happy with your tacticstypes.ini
Important! The included macro script WILL override your original tacticstypes.ini, so don't forget to make a backup in case things don't work out! Don't blame me, if you lose your stuff, I've warned you!

I've also included a spreadsheet for Nexus' singleplayer tacticstypes.ini as an example. It's more or less a direct copy of Nexus' Excel spreadsheet with my modified macro script attached.

I'd suggesst adding the macro to your toolbar or assigning it a hotkey to avoid having to go through the macro submenu each time.
« Last Edit: December 03, 2010, 01:19:46 by Arparso »

Offline nasharas

  • Recruit
  • *
  • Posts: 15
  • Karma: 0
    • View Profile
    • http://
-
« Reply #1 on: February 23, 2010, 17:05:38 »
a little mistake in here, the location of tacticstypes.ods file should be _work\params
« Last Edit: May 29, 2011, 11:54:40 by Arparso »

Offline Arparso

  • Administrator
  • Lieutenant
  • *****
  • Posts: 558
  • Karma: 14
  • I can see you...
    • View Profile
    • http://arparso.de/nexus
(No subject)
« Reply #2 on: February 23, 2010, 18:44:21 »
Doesn't really matter, though - the script works nonetheless ;)

Offline nasharas

  • Recruit
  • *
  • Posts: 15
  • Karma: 0
    • View Profile
    • http://
(No subject)
« Reply #3 on: February 23, 2010, 19:11:20 »
well it didn't worked for me, until I changed name of folder :)
Btw, it would be nice if someone would create such a file to efx.ini ;) I'm too lazy to do it myself :D

Offline Arparso

  • Administrator
  • Lieutenant
  • *****
  • Posts: 558
  • Karma: 14
  • I can see you...
    • View Profile
    • http://arparso.de/nexus
(no subject)
« Reply #4 on: February 23, 2010, 20:43:47 »
I'm already working on it. See the attachment for the version I currently use. I didn't have time to test it thoroughly, but it appears to be working just fine right now. It doesn't have a fancy progress bar like the tacticstypes macro, though. ;)

Don't forget to backup your existing efx.ini!

Quote
well it didn't worked for me, until I changed name of folder :)
That's odd, cause mine works perfectly fine in _work\tables ... the name of the folder should be irrellevant - you'll just need to put it two subfolders "deep" into the mod's folder or it won't save the .ini at the correct location.

/edit:
Uploaded newer version of the efx.ods including a progress bar.
« Last Edit: December 03, 2010, 01:20:30 by Arparso »

Offline jstubbles

  • Petty Officer
  • **
  • Posts: 169
  • Karma: 2
    • View Profile
    • http://www.ivassago.com
(No subject)
« Reply #5 on: April 18, 2010, 21:16:30 »
<3  You're awesome, Arparso. Thanks!
Was just looking for a solution to the OpenOffice issue :)


I DID notice something quite annoying though. For some reason, when inputting quotation marks, it always shows up as some other kind of symbol, instead of the "quote marks". :(
I find that I have to input a letter, then put the quotation mark, then erase the letter in front of it.

Offline Arparso

  • Administrator
  • Lieutenant
  • *****
  • Posts: 558
  • Karma: 14
  • I can see you...
    • View Profile
    • http://arparso.de/nexus
(No subject)
« Reply #6 on: April 19, 2010, 02:40:34 »
Hmm, that's odd. Do you have typographical quotation marks enabled? If so, try disabling it under Tools->Autocorrect->Typographical quotes (or whatever its called in your OpenOffice-version) and uncheck "Replace".

Offline jstubbles

  • Petty Officer
  • **
  • Posts: 169
  • Karma: 2
    • View Profile
    • http://www.ivassago.com
(No subject)
« Reply #7 on: April 19, 2010, 04:34:13 »
Sweet, that was it man, thanks :)

Offline jstubbles

  • Petty Officer
  • **
  • Posts: 169
  • Karma: 2
    • View Profile
    • http://www.ivassago.com
(No subject)
« Reply #8 on: April 23, 2010, 04:54:31 »
Hey Arparso, the EFX document doesn't seem to work via macro export :(

Offline Arparso

  • Administrator
  • Lieutenant
  • *****
  • Posts: 558
  • Karma: 14
  • I can see you...
    • View Profile
    • http://arparso.de/nexus
(No subject)
« Reply #9 on: April 23, 2010, 11:54:35 »
Really? Worked fine for me. Make sure you're using the right macro (from efx.ods->Module1->Main). It doesn't have a progress bar, so you don't actually see it working, but it creates the efx.ini just fine.

Actually I just uploaded an updated version in the post above, which I'm currently using for the FreeSpace mod. It also includes a progress bar, just like the tacticstypes macro.

Also keep in mind, that it creates the efx.ini, not the mod_efx.ini. It basically overwrites ALL of Nexus' effects, so you can't rely on any of them anymore. ;)

Offline jstubbles

  • Petty Officer
  • **
  • Posts: 169
  • Karma: 2
    • View Profile
    • http://www.ivassago.com
(No subject)
« Reply #10 on: April 23, 2010, 20:42:00 »
Quote
it creates the efx.ini, not the mod_efx.ini

Ahhh ha!
That's where it was coming from, haha. I was wondering what was going on there. I was crashing from EFX errors after I exported an I was like "where the hell did that EFX.INI come from???" since I was using the mod_efx.ini. thanks for the heads up :)  I'll be sure to rename it once I'm done, hah.

Offline Arparso

  • Administrator
  • Lieutenant
  • *****
  • Posts: 558
  • Karma: 14
  • I can see you...
    • View Profile
    • http://arparso.de/nexus
(No subject)
« Reply #11 on: April 23, 2010, 22:29:52 »
Quote
I'll be sure to rename it once I'm done, hah.
I suppose you could also rename Nexus' default efx.ini to mod_efx.ini and have your mod's custom effects in efx.ini loaded first.

Offline jstubbles

  • Petty Officer
  • **
  • Posts: 169
  • Karma: 2
    • View Profile
    • http://www.ivassago.com
(No subject)
« Reply #12 on: April 24, 2010, 01:50:29 »
True, yeah. Either way is fine by me :D
I just wish I could get rid of that frakkin' "combustion" particle! Garrrrr :)

Offline Lord_Valarian

  • Specialist
  • *
  • Posts: 64
  • Karma: 0
    • View Profile
[Tool] Tacticstypes.ini spreadsheet for OpenOffice
« Reply #13 on: June 18, 2011, 08:25:34 »
The sp version's macro doesn't work. I can't find tachics type file.

Also, how do you change the color of row?


Offline Arparso

  • Administrator
  • Lieutenant
  • *****
  • Posts: 558
  • Karma: 14
  • I can see you...
    • View Profile
    • http://arparso.de/nexus
Re: [Tool] Tacticstypes.ini spreadsheet for OpenOffice
« Reply #14 on: June 27, 2011, 16:54:05 »
The macro creates a tacticstypes.ini at:

..\..\universe\tactics\tacticstypes.ini

This path is relative to where your "tacticstypes_vanillaSP.ods" file is saved. So if you were to save the .ods in a "_work\tables" subfolder of your mod (or vanilla nexus installation), the tacticstypes.ini gets saved to the correct location automatically... of course while overwriting the one that's already there, so remember to make a backup before that!

Changing the color of a row? Select the row(s) and change the background color using the paint bucket button in your toolbar.

Offline Lord_Valarian

  • Specialist
  • *
  • Posts: 64
  • Karma: 0
    • View Profile
[Tool] Tacticstypes.ini spreadsheet for OpenOffice
« Reply #15 on: June 27, 2011, 21:10:44 »
You said it shows a progress bar. I can't see anything happening. Also, the original is missing other common terms used in nexus.

I"m using open office  3.3.0


Offline Arparso

  • Administrator
  • Lieutenant
  • *****
  • Posts: 558
  • Karma: 14
  • I can see you...
    • View Profile
    • http://arparso.de/nexus
Re: [Tool] Tacticstypes.ini spreadsheet for OpenOffice
« Reply #16 on: June 27, 2011, 23:53:22 »
How do you run the macro? I've tested and worked with it both in 3.2.0 and 3.3.0 versions of OpenOffice and never had issues with the progress bar or the .ini creation itself.

As for missing items: my spreadsheet is a direct copy of the original Excel spreadsheet included in the game's modding tools - I only ported the original macro, because that wouldn't work in OpenOffice. Everything that's missing in my spreadsheet would also be missing in the original Excel file, so blame the original developers for that one ;)

Offline Lord_Valarian

  • Specialist
  • *
  • Posts: 64
  • Karma: 0
    • View Profile
Re: [Tool] Tacticstypes.ini spreadsheet for OpenOffice
« Reply #17 on: June 28, 2011, 23:26:02 »
How do you run the macro? I've tested and worked with it both in 3.2.0 and 3.3.0 versions of OpenOffice and never had issues with the progress bar or the .ini creation itself.

tools>macros>run macro>
Library:
tachictypes_vanillasp>standard>ExportToIni>
Macro name:
main

Nothing happens on any of the macro names. I'm using a test directory. mods/phasermod/_work/parms/tachictypes_vanillasp
This would remove all the other additions i'v made to tachictypes.

>As for missing items: my spreadsheet is a direct copy of the original Excel spreadsheet included in the game's modding tools - I only ported the original macro, because that wouldn't work in OpenOffice. Everything that's missing in my spreadsheet would also be missing in the original Excel file, so blame the original developers for that one ;)

Yea, that's what I meant. We need to expand on it. As it now, it's no good for my mod and likely others.


Offline Arparso

  • Administrator
  • Lieutenant
  • *****
  • Posts: 558
  • Karma: 14
  • I can see you...
    • View Profile
    • http://arparso.de/nexus
Re: [Tool] Tacticstypes.ini spreadsheet for OpenOffice
« Reply #18 on: June 29, 2011, 11:13:16 »
Are you running OpenOffice in Windows or Linux?

Or maybe your macro security settings prevent the macro from running? You can change them under:
Tools->Options->OpenOffice.org->Security->Macro Security
(I've set mine to medium, so I'm asked to enable/disable macros when opening a file with macros in it)

Apart from that, I've got no idea why it's not working for you. :(

Offline Lord_Valarian

  • Specialist
  • *
  • Posts: 64
  • Karma: 0
    • View Profile
Re: [Tool] Tacticstypes.ini spreadsheet for OpenOffice
« Reply #19 on: July 01, 2011, 08:17:40 »
Are you running OpenOffice in Windows or Linux?

Openoffice in windows.

Quote
Or maybe your macro security settings prevent the macro from running? You can change them under:
Tools->Options->OpenOffice.org->Security->Macro Security
(I've set mine to medium, so I'm asked to enable/disable macros when opening a file with macros in it)

I set it to medium. Nothing happens. :p

Can you make a video and show it to me?    How you do it?