SUBSIM Radio Room Forums



SUBSIM: The Web's #1 resource for all submarine & naval simulations since 1997

Go Back   SUBSIM Radio Room Forums > Silent Hunter 3 - 4 - 5 > SH5 Mods Workshop
Forget password? Reset here

Reply
 
Thread Tools Display Modes
Old 03-04-10, 01:55 AM   #1
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default [Tec] Python Script to renumber items in .ini files

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
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.

Last edited by TheDarkWraith; 03-04-10 at 03:12 AM.
TheDarkWraith is offline   Reply With Quote
Old 03-04-10, 03:05 AM   #2
reaper7
sim2reality
 
Join Date: Jun 2007
Location: AM 82
Posts: 2,280
Downloads: 258
Uploads: 30
Default

Excellent DarkWraith this be of great use, have you had any luck on the interface.
reaper7 is offline   Reply With Quote
Old 03-04-10, 03:09 AM   #3
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by reaper7 View Post
Excellent DarkWraith this be of great use, have you had any luck on the interface.
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.
TheDarkWraith is offline   Reply With Quote
Old 01-23-13, 05:31 PM   #4
Obelix
Seasoned Skipper
 
Join Date: Aug 2010
Location: 49°44´N 129°40´E
Posts: 665
Downloads: 124
Uploads: 7
Default

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?
__________________
Speed squadron is the speed of the slowest ship ... but only so long as on the trail of the squadron did not sit submarines ...
Obelix is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 12:21 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright © 1995- 2025 Subsim®
"Subsim" is a registered trademark, all rights reserved.