DEFAULT.UNIT file Editor/Browser

What is the world like in 2020? What are the different ways to play? How can I create my own futuristic scenario and country groupings?

Moderators: Balthagor, Legend

Post Reply
catatonic
General
Posts: 1113
Joined: Jun 03 2009
Human: Yes

DEFAULT.UNIT file Editor/Browser

Post by catatonic »

Edit: THIS "Browser" SOFTWARE IS NOW OBSOLETE. See page two of this thread for info on the new "SR2020 Utility" program.

Here is a browser that I have been working on. A link to the .ZIP file is at the end of the post.

Here is the content of the README.TXT file:

10/15/2009

Author:catatonic
Contents of 2020 Browser.zip:

Setup.exe
SR2020 Browser.msi
readme.txt


Description:

This Windows .NET application is designed to allow the user to browse the Supreme Ruler 2020 DEFAULT.UNIT file.
Since this .CSV data file is quite large and is awkward to view with a plain text editor, or even with a spreadsheet program,
this application was designed to allow the user to view each SR2020 unit in the same format as is in the game - the Technical Readout
window.

Technical Readouts are available for ALL units in the DEFAULT.UNIT file, including Facilities, Towns, Spys, Missiles, etc.
All units display unit icons. Unit IDs are displayed at the bottom of the screen.

The program is designed for use with SR2020-GC only. Other installations might work - no guarantees.
The program reads the installed DEFAULT.UNIT, DEFAULT.TTRX, Local_text.TTR, variabes.ini, UGBITS1.png and UGBITS2.png files.
The program reads the "Language Files" entry from your SR2020 registry.
The program writes no files.
The program will not change any of your SR2020 files.

This application requires the light-weight ".NET Framework 3.5 Client Profile" package, which will be automatically
downloaded to your computer via the Web. This only takes a few seconds.

FUTURE PLANS:

1. Add a custom TR window for Missiles, just like the in the game.
2. Modify to allow for Unit editing and creation.
3. Modify for database queries i.e. "Show me all of the missiles in order of their Ground Attack strengths".
4. Allow side-by-side compairsons of units.
5. Allow selection of DEFAULT.UNIT file.

INSTALLATION:

You MUST install the browser into your "Supreme Ruler 2020" program folder.
You must have an active Internet connection.

1. Download "SR2020 Browser.zip".

2. Un-zip the three installation files into any folder.

3. Run "setup.exe" with Administrator's Privledges.

4. Setup will ask for permission to download the ".NET Framework 3.5 Client Profile".

5. Allow the download. This will happen very quickly.

6. Acknowledge the successful Framework installation. This screen may be obscured by the next one.

7. The SR2020 Browser installation process will begin immediately.

8. Follow the prompts and allow it to install into the "C:\Program Files\Supreme Ruler 2020".
If you have SR2020 installed on another drive then you will get a chance to change the drive letter.

A shortcut icon will be placed onto your desktop. Use it to start the browser.

If the installation refuses to install the files into "c:\Program File\Supreme Ruler 2020" then you can :

A. Login as Administrator and change the file permissions for the folder.

or

B. Re-install into another folder that you have permission to write to and then move the "SR2020 Browser.exe" and "Readme.txt" files
manually to "c:\Program File\Supreme Ruler 2020".

I need feedback from Vista and XP users. I used the .NET 3.5 Framework so that the app would be compatable with XP, but I have
no way of testing this. If 3.5 in not compatable with XP then let me know.

Release Notes
version 1.0.0.0 10/12/2009

1. Tool-tips are not localized - they are all in English. Unit and tech names are translated into your installed language.
2. Tool-tips are keyed to the text data, not to the icons.
3. Compiled to use .NET Framework version 3.5 SP1 Client Profile.
4. Only tested under Windows 7 without extra .NET Frameworks installed.
5. Missiles use the standard TR large window, not the smaller missile one.

version 1.0.0.1 10/15/2009
1. Fixed problem where un-expected numeric format in .CSV file caused program exception.
2. Cleaned up graphics.
3. Added title to technical readout.
4. Replaced file-handling so that the entire .CSV file is no longer resident in memory.
5. Added accessors to class objects.
6. Strengthened error checking.
7. Modified to accept eccentricly formated DEFAULT.UNIT files.
8. Modified file opening to share mode.

DISCLAIMER:

Install and run this program at your own risk.

This program is provided as is without any guarantees or warranty.
Although the author has attempted to find and correct any bugs in the free software programs, the author is not responsible for any damage or losses of any kind caused by the use or misuse of the programs.
The author is under no obligation to provide support, service, corrections, or upgrades to the free software programs.

Download link to latest version of new SR2020 Utility (browser included):

http://www.mediafire.com/?zg0ilmwjmhf

Mirror sites;

http://home.cogeco.ca/~chrisahl/SR2020_ ... sion_9.zip
http://www.battlegoat.com/downloads/SR2 ... sion_9.zip
Last edited by catatonic on Jun 29 2010, edited 13 times in total.
"War is merely the continuation of politics [diplomacy] by other means"
General Carl von Clausewitz - 1832

"Defense: De ting dat keeps de cows off de road."
Catatonic - 2012
Hullu Hevonen
General
Posts: 3604
Joined: Dec 11 2008
Location: Turunmaa/Turunseutu, Suomi
Contact:

Re: DEFAULT.UNIT unit file Browser

Post by Hullu Hevonen »

Hi, this sounds great, but I can't get it to work, using Vista, it says it stopped working and does not even launch :-)
Happy Linux user!
Links: List of Mods
Draken
General
Posts: 1168
Joined: Jul 14 2004
Human: Yes
Location: Space Coast, FL

Re: DEFAULT.UNIT unit file Browser

Post by Draken »

Same issue on Xp SP3
Violence is the last refuge of the incompetent.
Isaac Asimov, Salvor Hardin in "Foundation"
-
Si vis pacem, para bellum
-
It is hard to free fools from the chains they revere.
Voltaire
catatonic
General
Posts: 1113
Joined: Jun 03 2009
Human: Yes

Re: DEFAULT.UNIT unit file Browser

Post by catatonic »

Hullu Hevonen wrote:Hi, this sounds great, but I can't get it to work, using Vista, it says it stopped working and does not even launch :-)
Thanks guys. I am working on a proper Setup.exe MSI package right now.

Edit:

This "Browser" is now obsolete. See page two of this thread for the replacement "SR2020 Utility" program.
Last edited by catatonic on Nov 21 2009, edited 2 times in total.
"War is merely the continuation of politics [diplomacy] by other means"
General Carl von Clausewitz - 1832

"Defense: De ting dat keeps de cows off de road."
Catatonic - 2012
Draken
General
Posts: 1168
Joined: Jul 14 2004
Human: Yes
Location: Space Coast, FL

Re: DEFAULT.UNIT unit file Browser

Post by Draken »

Event Type: Error
Event Source: .NET Runtime 2.0 Error Reporting
Event Category: None
Event ID: 5000
Date: 11/13/2009
Time: 7:23:10 AM
User: N/A
Computer:
Description:
EventType clr20r3, P1 sr2020 browser.exe, P2 1.0.0.0, P3 4afce91f, P4 mscorlib, P5 2.0.0.0, P6 4a7cd8f7, P7 c42, P8 59, P9 system.formatexception, P10 NIL.

For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
Data:
0000: 63 00 6c 00 72 00 32 00 c.l.r.2.
0008: 30 00 72 00 33 00 2c 00 0.r.3.,.
0010: 20 00 73 00 72 00 32 00 .s.r.2.
0018: 30 00 32 00 30 00 20 00 0.2.0. .
0020: 62 00 72 00 6f 00 77 00 b.r.o.w.
0028: 73 00 65 00 72 00 2e 00 s.e.r...
0030: 65 00 78 00 65 00 2c 00 e.x.e.,.
0038: 20 00 31 00 2e 00 30 00 .1...0.
0040: 2e 00 30 00 2e 00 30 00 ..0...0.
0048: 2c 00 20 00 34 00 61 00 ,. .4.a.
0050: 66 00 63 00 65 00 39 00 f.c.e.9.
0058: 31 00 66 00 2c 00 20 00 1.f.,. .
0060: 6d 00 73 00 63 00 6f 00 m.s.c.o.
0068: 72 00 6c 00 69 00 62 00 r.l.i.b.
0070: 2c 00 20 00 32 00 2e 00 ,. .2...
0078: 30 00 2e 00 30 00 2e 00 0...0...
0080: 30 00 2c 00 20 00 34 00 0.,. .4.
0088: 61 00 37 00 63 00 64 00 a.7.c.d.
0090: 38 00 66 00 37 00 2c 00 8.f.7.,.
0098: 20 00 63 00 34 00 32 00 .c.4.2.
00a0: 2c 00 20 00 35 00 39 00 ,. .5.9.
00a8: 2c 00 20 00 73 00 79 00 ,. .s.y.
00b0: 73 00 74 00 65 00 6d 00 s.t.e.m.
00b8: 2e 00 66 00 6f 00 72 00 ..f.o.r.
00c0: 6d 00 61 00 74 00 65 00 m.a.t.e.
00c8: 78 00 63 00 65 00 70 00 x.c.e.p.
00d0: 74 00 69 00 6f 00 6e 00 t.i.o.n.
00d8: 20 00 4e 00 49 00 4c 00 .N.I.L.
00e0: 0d 00 0a 00 ....
Violence is the last refuge of the incompetent.
Isaac Asimov, Salvor Hardin in "Foundation"
-
Si vis pacem, para bellum
-
It is hard to free fools from the chains they revere.
Voltaire
catatonic
General
Posts: 1113
Joined: Jun 03 2009
Human: Yes

Re: DEFAULT.UNIT unit file Browser

Post by catatonic »

Here is a screen-shot of the browser.

Edit: This "Browser" screen is now available in a new program "SR2020 Utility". See page tow of this thread for details on this and a cool new screen called the "List Viewer".

Image
Last edited by catatonic on Nov 21 2009, edited 1 time in total.
"War is merely the continuation of politics [diplomacy] by other means"
General Carl von Clausewitz - 1832

"Defense: De ting dat keeps de cows off de road."
Catatonic - 2012
User avatar
Genessis
Sergeant
Posts: 22
Joined: Nov 13 2009
Human: Yes
Location: Wolverhampton

Re: DEFAULT.UNIT unit file Browser

Post by Genessis »

I mess around with Units so much that this would be a major help to me Im downloading and installing now, will comment on how it works.
User avatar
Genessis
Sergeant
Posts: 22
Joined: Nov 13 2009
Human: Yes
Location: Wolverhampton

Re: DEFAULT.UNIT unit file Browser

Post by Genessis »

Sorry mate but mine did not work, I hope you get it working still as its a great idea.

hope this helps:
My OS: Windows 7 Ult 64bit

Discription:
Stopped working

Problem signature:
Problem Event Name: CLR20r3
Problem Signature 01: sr2020 browser.exe
Problem Signature 02: 1.0.0.0
Problem Signature 03: 4afce91f
Problem Signature 04: mscorlib
Problem Signature 05: 2.0.0.0
Problem Signature 06: 4a275af7
Problem Signature 07: c43
Problem Signature 08: 59
Problem Signature 09: System.FormatException
OS Version: 6.1.7600.2.0.0.256.1
Locale ID: 2057
catatonic
General
Posts: 1113
Joined: Jun 03 2009
Human: Yes

Re: DEFAULT.UNIT unit file Browser

Post by catatonic »

Darken:

I have not received a reply to my PM regarding your installation experience on XP SP3.

To All:

The two crashes reported seem to have the same thing in common - the program throwing an exception when attempting to reformat a string to an integer.

This code was developed using the "vanilla", version 6.6.5 of DEFAULT.UNIT, dated 7/26/09 (1,641 kb).

I have been able to reproduce the error by changing the line:

349,Spy,0,264,0,...

to

349,Spy,0.0,264,0,...

The program crashes when it expects "0" (integer type) but finds "0.0" (floating point type) instead and attempts to format it into an integer. This would never happen with C++, but C# seems very picky about it.

Since my user community consists of modders, it would not surprise me if your DEFAULT.UNIT file does not match the "vanilla" version. If this is not the case then please let me know.

Please send me a copy of your DEFAULT.UNIT file and perhaps some of your other SR2020 data files listed in the Original post and in the readme.txt file.

I will modify the code to handle this situation and beef it up with some additional error-trapping as well.

Meanwhile if you want to demo the browser I suggest that if you are not using the version 6.6.5 "vanilla" DEFAULT.UNIT file then you restore it for testing purposes.

I will add a new post with a new download link when it is ready.

Thank you very much for your patience and assistance.
"War is merely the continuation of politics [diplomacy] by other means"
General Carl von Clausewitz - 1832

"Defense: De ting dat keeps de cows off de road."
Catatonic - 2012
Draken
General
Posts: 1168
Joined: Jul 14 2004
Human: Yes
Location: Space Coast, FL

Re: DEFAULT.UNIT unit file Browser

Post by Draken »

That's because I haven't had the time to respond until now.... Patient is a virtue :) ;)

Indeed, I'm not using a vanilla DEFAULT.UNIT... PM me your email address and I'll sent it to you.

The screen shot looks very good... Hope you have plans to allow to compare units... I guess, right now you will have to open 2 browsers
Violence is the last refuge of the incompetent.
Isaac Asimov, Salvor Hardin in "Foundation"
-
Si vis pacem, para bellum
-
It is hard to free fools from the chains they revere.
Voltaire
vortex79
Colonel
Posts: 284
Joined: Jul 21 2008

Re: DEFAULT.UNIT unit file Browser

Post by vortex79 »

Wanted to report browser works fine for 5.6.2 in its current state if installed into the proper root directory of the game. This would be the latest update for SR2020 Original.
User avatar
BigWolf
Brigadier Gen.
Posts: 523
Joined: Jun 24 2008
Location: Empire of the Wolf

Re: DEFAULT.UNIT unit file Browser

Post by BigWolf »

To be honest, if you're able to format the data into a browser, it shouldnt be too much of a step to turn this into an editor (since the formatting is usually the bitch with file editors/readers lol)

Pull that off and I think you'd be hailed a god lol, especially if you're able to throw it to other files as well
catatonic
General
Posts: 1113
Joined: Jun 03 2009
Human: Yes

Re: DEFAULT.UNIT unit file Browser

Post by catatonic »

Edit: SR2020 Browser version 1.0.0.1 is complete but is now obsolete. See page two if this thread
for the replacement "SR2020 Utiility" program.

SR2020 Browser version 1.0.0.1 download:

[link removed]

Please read the OP for the current Readme.txt.
Last edited by catatonic on Nov 21 2009, edited 1 time in total.
"War is merely the continuation of politics [diplomacy] by other means"
General Carl von Clausewitz - 1832

"Defense: De ting dat keeps de cows off de road."
Catatonic - 2012
Hullu Hevonen
General
Posts: 3604
Joined: Dec 11 2008
Location: Turunmaa/Turunseutu, Suomi
Contact:

Re: DEFAULT.UNIT unit file Browser

Post by Hullu Hevonen »

catatonic wrote:SR2020 Browser version 1.0.0.1 download:

http://www.mediafire.com/?n3t5tjw2zn3.

Please read the OP for the current Readme.txt.
Also Could you make it so in the future that you can choose the .UNIT file you wan't to use. I would not wish to rename my yksikko.unit file to default every time I wan't to edit it. :-)
Happy Linux user!
Links: List of Mods
Draken
General
Posts: 1168
Joined: Jul 14 2004
Human: Yes
Location: Space Coast, FL

Re: DEFAULT.UNIT unit file Browser

Post by Draken »

It works now!

Good job so far but I would suggest using a tree view in the unit list to group the units by class and have the list sorted alphabetically ...

THANKS!
Violence is the last refuge of the incompetent.
Isaac Asimov, Salvor Hardin in "Foundation"
-
Si vis pacem, para bellum
-
It is hard to free fools from the chains they revere.
Voltaire
Post Reply

Return to “Scenarios, Mods and More - 2020”