PDA

View Full Version : [Tec] Python Script to renumber items in .ini files


TheDarkWraith
03-04-10, 01:55 AM
Here's a little jewel of a script I wrote to renumber the items in the .ini files. It will renumber them starting with 1 and incrementing the count for each item. This is handy when you insert or delete items from the .ini file so you don't have to manually correct the 'holes' or additions or even worry if you duplicated a number or not.
Take the Page layout.ini file for example. Let's say you add 35 entries to it dealing with adding dials or something. Let's say you added it somewhere in the middle of the file. That file has 442 entries in it stock. Do you really want to manually fix 200+ entries? Hell no!! This is where this little gem shines.
You also have the ability to rename the items in the .ini file. Say the same file above we wanted to use D3D instead of G3F...again this little jewel comes to your rescue!
I'm writing more scripts to help figure out this mess of a so called sim game we have been handed by Ubi :nope:
You have to have python installed on your computer for these to work. Python is a free download. Google it. I'm using version 2.6

http://www.filefront.com/15736129/Page-Renumberer.py/

TheDarkWraith

Edit:

It does NO error checking to ensure you enter the correct values (user input errors). If you're using it you should know what you're doing and thus shouldn't need the error checking. Plus it's a python script, not an application and thus I didn't bother taking the time to code in user input error checking. It will 'bark' if you do something wrong.

reaper7
03-04-10, 03:05 AM
Excellent DarkWraith this be of great use, have you had any luck on the interface. :up:

TheDarkWraith
03-04-10, 03:09 AM
Excellent DarkWraith this be of great use, have you had any luck on the interface. :up:

got an SH3 style compass added to it so far. Working on more. I posted a JSGME version of it here for everyone to use.

Yes, the script is a wonderful little addition to a modder's toolbox. It is very handy.

Obelix
01-23-13, 05:31 PM
I missed this before!:/\\!! I terribly missed this tool! Of course, I can use the menu editor, but it is not always convenient for me. And now, when I found this gem, it was unavailable for download. It's been two years, but I hope to still be able to get this script, TheDarkWraith?:06: