• Welcome to SC4 Devotion Forum Archives.

SSPTool

Started by Stefan79, January 19, 2009, 11:23:26 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Stefan79

Hi Fred,

I quote the "Finish" screen of SSPTool-DAMN:

"Congratulations!
You have created the DAMN menu and items.
Now start your SimCity 4 and check out your "Advices" are turned on. You will see a message "Open Additional Submenues" which starts the DAMN menue.
ATTENTION!
The work directory of SimCity shouldn't end with /Apps but with SimCity, else DAMN will not work!
If something is not as you wanted, feel free to start the wizard again.
Have fun with DAMN menu invented by Daeley!"

But it seems most people don't read the ATTENTION, so I will change the text to:

"Congratulations!
You have created the DAMN menu and items.
ATTENTION!
The work directory of SimCity shouldn't end with "...SimCity 4/Apps" but with ".../SimCity 4", else DAMN will not work!
Now start your SimCity 4 and check out your "Advices" are turned on. You will see a message "Open Additional Submenues" which starts the DAMN menue.
If something is not as you wanted, feel free to start the wizard again.
Have fun with DAMN menu invented by Daeley!"


And if I implement the help text in HTML in one of the next version, the ATTENTION will become bold and red  ;)

Stefan
SSP = Stefan's Self-made Productions

Diggis

Unfortunatly Stefan, there is little you'll be able to do to stop that, we'll just have to catch it when people ask.  At least it's a quick easy solution.  :thumbsup:

City Builder

#102
Honestly, I think if it was in red and actually explained about how it's the "shortcut" that you are talking about I would have gotten the idea perhaps something like:

Attention!
If you start SimCity 4 from a shortcut on your desktop (or elsewhere)  instead of your start menu,
please ensure that in the shortcut's property panel it has a working directory listed of /Simcity4 and
NOT of /Simcity 4/Apps  Else the DAMN will not function at all.

To access your shortcuts property panel, right click on the shortcut to SC4 on your desktop, and
choose "Properties" to view the properties of the shortcut.

Something along those lines would have had me go and check my shortcut to see what the working directory is since it was applicable to how I start SimCity4.  With the way it is written above, it did not cross my mind what the heck it was telling me, but telling me it pertains to a shortcut that I use to start SC4 would have grabbed my attention since that's how I start it.

Thanks and sorry again.
When your tired of games of destruction, come to CityBuilderGames.com to discuss games of Construction!
Oh!  Thanks for the negative rep, I love you too!

z

I think that City Builder's warning is the best and clearest so far.  However, the forward slashes ('/') should be changed to backslashes ('\'), at least for Windows users.  Also, the italicized "shortcuts" should have an apostrophe before the final 's'.

Quesh

It's really interesting program  &apls
If you want I can help with French translation ;)

Stefan79

Hi together,

Quesh help me with French translation, so next version will have the option to choose French for the program!
And I will try to implement the option to add language support to DAMN menus as far as it can be.
And the help will be in HTML with Hyperlink support for DAMN and maybe for SSPTool itself.
And maybe I can also finish a version of my new LotModifier plugin for SSPTool (modify recent things of lots)
like ilive's LEProp.
And of course I will do some little things here and there...

I will tell you in this forum, when its done and upload it to LEX then.
Btw, is there anything else, I should implement/integrate?

Stefan
SSP = Stefan's Self-made Productions

andy33b

Hi Stefan,

I have a few problems with DAMN creator:
1. from time to time the program seems to hang up. there is no way to recover the program except with task manager.
2. for quite a few lots the tool seems not able to read the LTEXT-files. In step 3 of Creator (detail view) the linkname has the original "Exemplar Name" (eg. Ut_RT_Street_Bus), the description is blank and the infotext1 is always "Size 0 x 0".
Last lots I found are eg. road-top-mass-transit from Cogeo (sorry have not the link right here). Do you have any clue where the problem might be?
3. Did you implement the feature, so DAMN creator get's back to the last selected folder (in step 1)? If so, then this doesn't work for me; if not, then forget this point.
4. Am I right that it's up to the user to select the right file, when a lot has an override somewhere else in the plugin-folder?

Last but not least, a request:
Could you provide me with some example code on the needed steps (from creating a DBPFfile-instance) to read eg. a property from an exemplar using your dbpf4j. I'd like to try something and it would save me quite some time.
What is the scheme to find the correct language SC4 uses, and then selecting the correct LTEXT file from within a dat-file?


Thanks

Stefan79

#107
Hi andy33b,

to point 1:
Did you start the program with the Start.bat? Then maybe there will be something printed to the console. What have you done before the program hang up? Did the program always hang up at the same point or is it different from time to time or doing to doing?

to point 2:
You choose files you want to DAMN. No the creator scan these files for Lots and try to get the LTEXT and all other information from these files. But sometimes the language files or something else is not in the choosen files, so it will find nothing. The option to scan the whole plugin folder everytime might not be a good idea, because it would take some time. The second option is to choose more files that stores the LTEXT but no lots. This should also work for some times. The third option is for Experts: In tab configuration click on Expert mode. You will get an question to answer (I think you know the answer or try again) and if you are an expert, there will be a subpanel with TGI Key Index. Click on Create file to scan the whole plugin folder for TGI Keys. This may take some time and you should press Save file after done. Now, you either select to load the TGI Key Index at startup or manually to Read the file when needed. Background: The indexFile will store all Exemplar/LTEXT/PNG TGI Keys with there file location. If you move files or folders you have to create a new indexFile or errors will occur when trying to read a non-existing file. (Any changing of Lots with SSPTool will be recognized and the file will automatically be updated, so you don't need to press Save file often when working with SSPTool.)

to point 3:
I have implemented this and test it. But it only works, if you do not go to step 2 and then back, only, if you left in step 1. (That because the local path is stored in the wizard dialog of step 1 and not global.)

to point 4:
thats right, because like point 2, the only way is to scan the whole plugin folder to get all LTEXT/PNG and the latest Exemplars of a lot.

Remark: The scan of the whole plugin folder takes time and the user has to wait. For me, my plugin folder is nearly 3,5 GB and it will take around 2 minutes to do this. But if most users would accept, if SSPTool scan the whole plugin folder while waiting, I could add an option to do this at startup.

Last point:
If you have downloaded the DBPF4J from Sourceforge (I also prefer to download DBPF4J-Ext, too) there will be a subfolder called Examples with Test.java and some test files. Look into the Test.java for a short overview but here I will print some code:


DBPFReader reader = new DBPFReader();
DBPFFile file = reader.read(fileIn);
DBPFConverter converter = new DBPFConverter();
for (DBPFEntry entry : file.getEntryList()) {
   DBPFType type = converter.createType(entry);
   if (type instanceof DBPFExemplar) {
      DBPFExemplar exem = (DBPFExemplar)type;
                // DBPFUtil provides various methods to get a property, read/write values and much more, e.g.
                long val = DBPFUtil.getLongValue(exem, DBPFProperties.PARK_EFFECT, 0);
                long radius = DBPFUtil.getLongValue(exem, DBPFProperties.PARK_EFFECT, 1);
                System.out.println("Park Effect: "+val+", Radius: "+radius);
        }
}


For my knowledge the scheme of SimCity 4 to find the correct language is:
In Registry is the key for the language the user has installed SimCity. Now get the TGI and add to GID the language and search for this. If found this is the right LTEXT, if not get the LTEXT with the original TGI (default language = english).
Because I don't want to use the Registry of Windows, I get the TGI and search for this. I don't check other languages. But within including french language next version I will improve DAMN with the option to save the three supported languages (english, german, french) in DAMN file.

For more detail about programming, you should write me per PM. I think its not for this thread.

[edit]Btw, if your thing is useful, you can program it as a plugin for SSPTool? I would give you help for this and your tool would be distributed with SSPTool.[/edit]

Stefan
SSP = Stefan's Self-made Productions

shanghai kid

I've finally had some time to check newest SSPTool and it works fine, but when i start the game the lots that i've marked with hidden still shows up in the game menu's(i used the multitool button and checked for use hide on all lots)  :'( &cry2.

How can i get them to hide in the game menu's so that they only show up in DAMN, as it's now it's like one of the first editions of SSPTool where the hide lot didn't work :'( ()what().

Ps. I've also tried to remove all the files in DAMN that i had made before using the latest version of SSPTool, and then re-indexing with the indexing .exe in root folder in DAMN, but still the lots shows up in the game menu's.
Shanghai kid from Norway
"The lurking devil"
(Bam Bam Bigelow & Eddie Guerrero R.I.P).

Diggis

Check where they are installing, they need to load after the original lots.

andy33b

Quote from: Stefan79 on September 16, 2009, 01:34:09 AM
to point 1:
Did you start the program with the Start.bat? Then maybe there will be something printed to the console. What have you done before the program hang up? Did the program always hang up at the same point or is it different from time to time or doing to doing?
It happens randomly and when stating from cmd-prompt there is nothing special printed, the log's doesn't show anything special.

Quote from: Stefan79 on September 16, 2009, 01:34:09 AM
to point 2:
You choose files you want to DAMN. No the creator scan these files for Lots and try to get the LTEXT and all other information from these files. But sometimes the language files or something else is not in the choosen files, so it will find nothing. The option to scan the whole plugin folder everytime might not be a good idea, because it would take some time. The second option is to choose more files that stores the LTEXT but no lots. This should also work for some times. The third option is for Experts: In tab configuration click on Expert mode. You will get an question to answer (I think you know the answer or try again) and if you are an expert, there will be a subpanel with TGI Key Index. Click on Create file to scan the whole plugin folder for TGI Keys. This may take some time and you should press Save file after done. Now, you either select to load the TGI Key Index at startup or manually to Read the file when needed. Background: The indexFile will store all Exemplar/LTEXT/PNG TGI Keys with there file location. If you move files or folders you have to create a new indexFile or errors will occur when trying to read a non-existing file. (Any changing of Lots with SSPTool will be recognized and the file will automatically be updated, so you don't need to press Save file often when working with SSPTool.)
I always select the whole folder, so the DAMN creator would have the files with the lots and the ones with LTEXT. I checked the TGI's with iLives Reader and they seem to correspond.
Did you or someone else tried with the lots "road-top-mass-transit" from Cogeo. If it's only me, who doesn't get the text, then also the problem in point 1 could be my installation.

Quote from: Stefan79 on September 16, 2009, 01:34:09 AM
Btw, if your thing is useful, you can program it as a plugin for SSPTool? I would give you help for this and your tool would be distributed with SSPTool.
I'll do it as soon as I'm a bit more comfortable with java (so far I programmed in Delphi).

Andy33b

Stefan79

#111
Quote from: shanghai kid on September 20, 2009, 11:58:21 AM
I've finally had some time to check newest SSPTool and it works fine, but when i start the game the lots that i've marked with hidden still shows up in the game menu's(i used the multitool button and checked for use hide on all lots)  :'( &cry2.

How can i get them to hide in the game menu's so that they only show up in DAMN, as it's now it's like one of the first editions of SSPTool where the hide lot didn't work :'( ()what().

Ps. I've also tried to remove all the files in DAMN that i had made before using the latest version of SSPTool, and then re-indexing with the indexing .exe in root folder in DAMN, but still the lots shows up in the game menu's.

Okay, lets start with SSPTool to search for the problem: When you have used the MultiTool to hide all items, steps through the items and check, if they are all really hidden. After choosing the DAMN folder, there will be an overview of the files/exemplars which are added to the DAMN menu. Are there items or is the DAT file empty? Third, go to Logger tab and set the debuglevel to 3. Press Save and send me the file, so I can see, if the hiding works right.
SSP = Stefan's Self-made Productions

Stefan79

Quote from: andy33b on September 20, 2009, 11:09:48 PM
It happens randomly and when stating from cmd-prompt there is nothing special printed, the log's doesn't show anything special.
I always select the whole folder, so the DAMN creator would have the files with the lots and the ones with LTEXT. I checked the TGI's with iLives Reader and they seem to correspond.
Did you or someone else tried with the lots "road-top-mass-transit" from Cogeo. If it's only me, who doesn't get the text, then also the problem in point 1 could be my installation.
I'll do it as soon as I'm a bit more comfortable with java (so far I programmed in Delphi).

Andy33b

Hmmm, fascinating. Do you have installed the latest JAVA (1.6). Check the PC tasks. Is there space for working or is the CPU/RAM at there maximum?

When you select the folder of RTMT in DAMN Creator, the files listed with there PNG/Exem/LTEXT. Is there a file with LTEXT or are they all zero? Btw. the RTMT is a little bit difficult, because the LotConfig/LotDescriptor/LText doesn't have always the "right" TGI and so DAMN Creator only use the LotDescriptor (Size always 0 x 0). At least have you installed the latest version 3.51?

Stefan
SSP = Stefan's Self-made Productions

z

#113
Quote from: Stefan79 on September 21, 2009, 12:06:43 AM
Btw. the RTMT is a little bit difficult, because the LotConfig/LotDescriptor/LText doesn't have always the "right" TGI and so DAMN Creator only use the LotDescriptor (Size always 0 x 0).

I noticed that the size was sometimes zero, but didn't know why this was happening.  If RTMT has got some wrong TGIs, I should fix them.  Could you please be a little more specific about where this information is?

Also, RTMT will be coming out with a version with fully functional DAMN menus very soon.  (They've already passed their internal beta.)  So andy33b, you might just want to wait for that to come out.

Stefan79

Quote from: z on September 21, 2009, 12:38:10 AM
I noticed that the size was sometimes zero, but didn't know why this was happening.  If RTMT has got some wrong TGIs, I should fix them.  Could you please be a little more specific about where this information is?

Also, RTMT will be coming out with a version with fully functional DAMN menus very soon.  (They've already passed their internal beta.)  So andyb33, you might just want to wait for that to come out.

Hi z,

sorry I don't realize you are the Team Leader of RTMT. Here are the details:
RTMTV3_Lots_NonRoadTop_US_High.dat:
UT_RT_BusStation IID: 0c9db004 has a UserVisibleNameKey = 6a5ea68f and ItemDescriptionKey = 4a5ea68f
UT_RT_SubwayStation IID: 0c9db005 has a UVNK = aa5ea68f and IDK = 8a5ea68f
They both are not in the RTMTV3_Locales.dat and have different IIDs than the other RTMT lots. Where do they come from?
- Oh, are they from original SimCity_Locale? Then I think SSPTool has to scan this file at startup, for better LText. -

The second thing the lots don't have the right size, is because the LotDescription and LotConfig are not in the same file, but I will correct this in the next version, to scan the whole selected filelist...

Stefan
SSP = Stefan's Self-made Productions

z

It sounds like you figured everything out.  I would suggest that SSPTool scan SimCity_Locale only if it can't find a necessary LTEXT in the specified files, which should be rarely.

shanghai kid

#116
Quote from: Diggis on September 20, 2009, 12:06:19 PM
Check where they are installing, they need to load after the original lots.
They install in this folder "zzz_DAMN Remove", that is the only folder in my sc4/plugins folder that has zzz in front of the name.

@Stefan79
I've run SSPTool again with the hole digging lots to test and give a log report.
1. They are all checked/marked with hidden.
2. The .dat file in the DAMN has "PNG, LTEXT file and LUA file"(the files shows up in DAMN in game but also in the main menu - misc).
3. I've sent you a message with a copy of the log file.
Shanghai kid from Norway
"The lurking devil"
(Bam Bam Bigelow & Eddie Guerrero R.I.P).

Diggis

Hmmm, hole diggers are special... it might be because it's them, not sure though.  Try it with a normal park set.  Also, you don't have ~ in front of any folder names do you?

Stefan79

I've checked his log of SSPTool and recognized the folder beginning with numeric letters with the original lots and arabic letter for zzz_Remove.

Does anyone know, in what order SimCity reads the folders and files? Perhaps it reads first the arabic letters (zzz) and then the numeric (9_HoleDigging) and then of course the hiding wouldn't be successfull.

I answered him per PM and try to solve his problem. If I get anything interesting, I will post it here.
SSP = Stefan's Self-made Productions

Diggis

I know that ~ is loaded after ZZZ so it's entierly possible that the numbers are too.  I can't test it today, but will when I get the chance.