[v7] Towns mod manager v1.07

Post your mods and custom content here

[v7] Towns mod manager v1.07

Postby Atoning Unifex » Tue Sep 25, 2012 9:22 pm

I'm stopping further development on this tool and am opening it up for community development.

As I have no source code for the tool I'm happy for people to decompile the exe and use the source generated from that.

I'll also provide high level help on how the tool worked, if people need it.

Please note that the code should be treated as per the GNU GPL in terms of usage, modification and distribution.

Please also see this thread for more details.

Thanks.

*****************************************************************************************


Another quick update to add in a backup and restore feature for game files. You can now make multiple backups for various towns configurations. All files in the 'data' folder and the Graphics & Towns ini files are backed up.

My next planned update is going to attempt to significantly increase control over the XML files, which will require the inclusion of mod manager specific XML attributes. It could take me some time!!! ;)

Any bugs, let me know as always!

Download it here

Fixed in V1.07
* Included the DLL file i forgot to add in V1.06!!

New in V1.06
* Backup feature added. Tabbed window to allow for selection of backups or mods. Multiple backups can be made as the need arises.
* Removed the quit button to fit in better with the tabbed UI setup.

New in V1.05
* Version tag in the modinfo file. Version is optional and doesn't have to be numeric. New column added to display it.
* Description tag in the modinfo file. For now this is just a simple text string that gets displayed in a box below the main mods list. I may expand this later but it's good for a start.
* Ability to store mod manager in a different folder to the towns executable. If the Towns.exe file is not in the same directory then a warning and browse box will open to allow you to locate it. Info is stored in a config file so you only get prompted once. Delete the TownsModManager.ini file if you need to reset this.

Fixed in V1.04
* Stupid mistake in the matching of installed mods to mod files fixed.
* Logic fix in enabling and disabling of install & unistall buttons.

Fixed in V1.03
* Made the UI a bit larger for people who have lots of mods.
* Fixed an issue where commented out lines in graphics/towns.ini were being un-commented by the code.
* Fixed an issue where uninstall folders were not being correctly created (hence file copy actions were not working in some cases)
* Fixed an issue where backup copies of replaced game files were not being correctly copied back on uninstall.

Fixed in V1.02
* Graphics & towns ini files should now correctly recognise unicode characters in the names of the fields.
* New menu items will be placed at the start of the menu to get around the issue of items appearing after the 'back' button.

New in V1.01
* Menu iteration - now the mod manager will iterate to any level of menu/sub menu and update items accordingly. This means you can add items anywhere without disrupting existing menus. Details are shown in the test mod menu files.

New in this version (1.0):
* Uninstall mods - the tool records the changes made during install and reverses them on uninstall. This includes removing files and folders and restoring overwritten files (like graphics files etc)
* Better control over .ini file changes - to help with uninstalling I created a parser that converts the ini files into an intermediate xml format. The upshot of this means that it is now possible to edit or delete existing components of these files, as well as appending to them. There's examples in the graphics.ini file in the test mod.
* Moved the Mods folder location to Towns/Mods rather than Towns/data/Mods (dunno why i put it there to begin with!!!)

Here's an overview of the features:
* Add new components to files (obviously!)
* Edit existing components simply by providing the relevant component in the mod file
* Delete existing components by providing an empty XML element in the mod file
* Basic multi-mod support - mods go in separate folders and the tool allows you to choose which to install.
* A lovely (actually quite ugly ;)) windows GUI.

What is coming:
* Add a 'run towns' button.
* Make the UI a bit nicer
* Allow individual element control - hopefully in the future allow greater control over the xml files so you can add only the parts of elements you need to increase compatibility. Way in the future though!!!

To use it
* Download the package and extract it to your towns folder.
* Download compatible mods and extract them to separate folders in the Mods folder. (The package includes my More random normal mod and a test mod with examples for modders which you should not install!)
* Run the TownsModLoader app. Note that the files column indicates whether install files are found, and installed indicates whether it is already installed.
* Select the name of the mod to install
* Click install! (note installs are pretty instantaneous, if you're unsure whether it's worked then just check the Installed column has changed to True)
* To remove simply repeat the above but click uninstall instead.

For modders:
* I urge you to look at the Test Mod to see examples of things that you can put in the various files.
* Create a separate folder for your mod. Include a ModInfo.xml file (template in test mod)
* In general you just need to provide a file containing the elements you wish to change/add. Matched elements are updated, unmatched are added.
* Deletion is indicated by providing an empty element with just an identifier.
* You have to provide an entire element, such as a barrel or a chopping action, as individual element control is not available (yet?)
* If you wish to include files (graphics, audio, campaigns) place them in sub folders of the relevant name (graphics etc).
* If you delete the modinfo.xml file this effectively resets what the mod manager believes is installed. This is useful if you refresh all your game files from the original.
* Remember menu control isn't great yet so try to use separate menus for your mod until i get the code updated.
* Uninstalls that add in previously removed items (such as menus) will place the additions at the end of the file, possibly causing restored menus to be in unusual places. Hopefully you won't be removing too many menus tho ;)
* Because this is so new i recommend you both install and uninstall your mod via the mod manager and check everything works as expected to identify any issues.


I think that's it. Let me know your thoughts, suggestions, bugs etc.
Last edited by Atoning Unifex on Sat Dec 08, 2012 12:54 pm, edited 15 times in total.
Atoning Unifex
 
Posts: 340
Joined: Wed Sep 05, 2012 11:28 am

Re: A new Mod Manager for Towns

Postby City Builder » Wed Sep 26, 2012 12:13 am

The below error is what I get when I do the following with this:
1. Choose the first mod in the list. (Note I do not try to install it, I simply choose it in the list).
2. Choose another mod in the list (Note again I do not try to install it, I simply choose it in the list).
(this is repeatable and I've done it over and over to test if it was a one time occurrence but it happens every time - It also doesn't matter which two mods that I choose, I could start by choosing the 2ND mod and then choose the 1ST mod afterwards and the below error will happen)
And the following information errors out:

Code: Select all
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.ArgumentOutOfRangeException: InvalidArgument=Value of '0' is not valid for 'index'.
Parameter name: index
   at System.Windows.Forms.ListView.SelectedIndexCollection.get_Item(Int32 index)
   at TownsLoader.MainMenu.modsList_SelectedIndexChanged(Object sender, EventArgs e)
   at System.Windows.Forms.ListView.OnSelectedIndexChanged(EventArgs e)
   at System.Windows.Forms.ListView.WmReflectNotify(Message& m)
   at System.Windows.Forms.ListView.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.269 (RTMGDR.030319-2600)
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll
----------------------------------------
TownsLoader
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/GAMES/!%20Towns/0.50bM/Towns/TownsModManager.exe
----------------------------------------
System.Windows.Forms
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.278 built by: RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System.Drawing
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.282 built by: RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.269 built by: RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Xml.Linq
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.1 built by: RTMRel
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml.Linq/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.Linq.dll
----------------------------------------
System.Core
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.233 built by: RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
----------------------------------------
System.Xml
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.233 built by: RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
    <system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.
User avatar
City Builder
 
Posts: 1950
Joined: Fri Mar 02, 2012 5:32 am
Location: Check your Mom's basement.

Re: A new Mod Manager for Towns

Postby Atoning Unifex » Wed Sep 26, 2012 12:30 am

Wow, not a great start then!! I've tested my version and I'm getting this as well, missed it in testing. Oddly it works perfectly in visual studio so I'm at a bit of a loss as to what's going wrong. I'll need to investigate!
Atoning Unifex
 
Posts: 340
Joined: Wed Sep 05, 2012 11:28 am

Re: A new Mod Manager for Towns

Postby Atoning Unifex » Wed Sep 26, 2012 12:39 am

Ok i found the cause. Should be fixed now. Re-download and have another go!
Atoning Unifex
 
Posts: 340
Joined: Wed Sep 05, 2012 11:28 am

Re: A new Mod Manager for Towns

Postby Jontis_00 » Wed Sep 26, 2012 9:31 am

Sounds great!

Will test it as soon as I get home. :)
My Mods: 13 000+ downloads!

Check out and help test the new Creative Mod Reloaded.
User avatar
Jontis_00
 
Posts: 750
Joined: Sun Feb 12, 2012 4:49 pm

Re: A new Mod Manager for Towns

Postby tom k. » Wed Sep 26, 2012 10:27 am

What language is it written in? :)
Tom K.
Former Community Moderator


Please read the FAQs before posting.
Image
Towns' Official Modding Partner Site - Townsmods.net
tom k.
 
Posts: 1605
Joined: Wed Mar 28, 2012 7:22 pm
Location: Lincoln, UK

Re: A new Mod Manager for Towns

Postby Atoning Unifex » Wed Sep 26, 2012 10:34 am

tom k. wrote:What language is it written in? :)

C#. I'm quite new to it so this is a learning experience, as well as, hopefully, helping the community out!
Atoning Unifex
 
Posts: 340
Joined: Wed Sep 05, 2012 11:28 am

Re: A new Mod Manager for Towns

Postby tom k. » Wed Sep 26, 2012 11:49 am

Atoning Unifex wrote:
tom k. wrote:What language is it written in? :)

C#. I'm quite new to it so this is a learning experience, as well as, hopefully, helping the community out!


Cool, I know a lot of vb.NET, and some C#, so if you need any help with the coding aspect, don't hesitate to ask :D
Tom K.
Former Community Moderator


Please read the FAQs before posting.
Image
Towns' Official Modding Partner Site - Townsmods.net
tom k.
 
Posts: 1605
Joined: Wed Mar 28, 2012 7:22 pm
Location: Lincoln, UK

Re: A new Mod Manager for Towns

Postby Atoning Unifex » Wed Sep 26, 2012 12:00 pm

tom k. wrote:
Atoning Unifex wrote:
tom k. wrote:What language is it written in? :)

C#. I'm quite new to it so this is a learning experience, as well as, hopefully, helping the community out!


Cool, I know a lot of vb.NET, and some C#, so if you need any help with the coding aspect, don't hesitate to ask :D


Good stuff, thanks. I'll let you know if i need help!
Atoning Unifex
 
Posts: 340
Joined: Wed Sep 05, 2012 11:28 am

Re: A new Mod Manager for Towns

Postby Effix » Wed Sep 26, 2012 4:55 pm

Sweet, good luck with it!
User avatar
Effix
 
Posts: 178
Joined: Mon Jun 18, 2012 11:18 am
Location: The Netherlands

Next

Return to Modding

Who is online

Users browsing this forum: No registered users and 3 guests

cron