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

Diggis

Koki,

No, that feature to remove the DAMN from the menus is different to the hidden, which causes the user to have to reslect the lot every plop.

As for using the DAMN with DAT Packed files, it should be possible, but not always the best way.  I tend to use the unpacked files as I have more control over what loads.

JoeST

Good to here from you Stefan :) Cant wait for you to get back :)

Joe
Copperminds and Cuddleswarms

Stefan79

Hi folks,

good and bad news.
:thumbsup:
The good news: I've implemented the new way of hiding the icons from the menu (LotResourceKey), and to prevent the option to show them again in the menu, I add a LTEXT entry to the lot with the Value of the LotResourceKey. Although I manipulate the original lot, I think its the best way to implement this feature. Else I have to create a new file for each lot and this would reduce the performance. Second I implement a KeyIndexList which collect all necessary entries fom the Plugin folder to speed up the DAMN menu, when searching for LTEXT, PNG and more. Third I have implement a convert option to remove the ConditionalBuilding Property from File (if not a Reward of course) and do the new way of hiding, so anyone can convert to the new way without doing the whole DAMN menu once more.
:thumbsdown:
The bad news: The hiding works fine, but I will test it a little bit more before I publish it. Second the KeyIndexList has to be updated each time, the program start, I think about doing this only when necessary. Third I have not take care of DAT Packer yet, and this I will also test.
"$Deal"$
Finally, although I have made some great steps, it will take some more time to "eliminate" the bad news. But I think next week it will be ready to publish a BETA at least or perhaps a final version.

I know, you can't wait for this to publish...

Stefan
SSP = Stefan's Self-made Productions

Diggis

Stefan,  If I have read this correctly, you are saying that what your new version does is edit the original files to remove the lot resource Key property?  This poses a problem in that we would need to redistribute any files that have been DAMNed.  What I have been doing is copying the building exemplars into a new file and removing the LotResourceKey and saving it to a Z folder as an override.  That way the user just has to remove that folder and they come back.  If possibly, I would recommend this way as it has no impact on original files and allows someone to retroactivly DAMN old works.

Stefan79

@Diggis,
Let me explain what I have found when implementing the new way of menu hiding: When I take the original exemplar entry, remove the Lot Resource Key and save the file to a new file loaded after the original file, it won't work! Why? Because the directory file is not the same as in original file. When I change the IID to the one in the original file, it works!
So I decided to remove the LotResourceKey in the original file, but I recognize that the value wouldn't be always the exemplar ID and so I add a LTEXT entry, where the value of the LotResourceKey can be readed. With this it is possible to undone the hiding operation, either by opening SC4Reader, add the LotResourceProperty to the exemplar and give them the value that can be read in the LTEXT entry or by using the SSPTool (I will add this option this week). The LTEXT entry can then be removed from the file, if wished.
This have the advantage to hide and unhide the menu icon without getting the lot once more, when it was damned. On the other side, there will be no more files in a new z folder which would expand the Plugin folder. Second if you want to change a property value of the lot, this have to be done in the new z folder, but when you delete it to unhide the icon, the change will be lost, too. So I think manipulating the original file would be the best way...

But to satisfy everyones wishes, I can make both things: Either manipulate the original lot or create a new lot in the z folder.
Would this be okay for everyone or might there be any other things, I forgot?

Stefan
SSP = Stefan's Self-made Productions

Diggis

I'm not sure of the problem with the DIR IID.  I've done (manually with the reader) 4 or 5 sets of DAMN files without any problem.  As long as the IID of the building Exemplar is the same it will overwrite the original if it loads last. 

The only reason I'm asking for this is it makes it easier for the end user.  We can't upload the original lot files, because it's against the community spirit, meaning the end user has to open the SSPTool and change the settings themselves.  This way it's all included in one upload.

Having both ways is a fine solution for me, as it allows those with the knowledge to edit the originals easily on their own machine and allows them to create a file that will do it on others.

shanghai kid

My first reply on this topic.

@Stefan79 i like the idea of both version because then i can manipulate the original lot's that i want & with the create a new lot in the z folder option i can test some lots and go back easy if i rather just have the icon in the game menu + it's easier for many who ain't that experienced(i'm one of them, though i try to understand the more complexed things...  :) :thumbsup:)

Ps: thank you for this great program as i've moved more lots from the menu to DAMN for easier access, and with this new update i can hide the icons in the menues so there will be less cluther there to  &apls
Shanghai kid from Norway
"The lurking devil"
(Bam Bam Bigelow & Eddie Guerrero R.I.P).

freedo50

#67
Stefan, I've been using your wonderful SSPTool to make DAMN sets, and Shaun taught me his method of hiding the lots. IMHO, that method of adding new "override" exemplars is the best solution, and (as Shaun was kind enough to explain to me) doesn't increase the size of your plugins folder by more than about 20Kb even for big sets.

It works fine for me every time - if you'd like an example DAMN mod to look at I have a few in the scrutineering stages right now that you could take a look at, or I'm sure Shaun will have some too. The only way I can see this not working would be if you don't have the new exemplar file loading last...

Fred

z

#68
First of all, I would like to congratulate you on the wonderful tool you have made.  It has allowed me to make a basic set of DAMN menus, multiple levels deep, for over 50 RTMT stations, and the whole thing took only about 15 minutes to do.

I have one request.  I notice that you go into the LTEXT files that are available to get all the information you can.  For those people who have implemented multiple language support in their LTEXT files, could you carry that over into DAMN?  I know that that this would not provide a full multiple language solution, but it would certainly help a lot.

Also, is there some way that the "Add Files" command could open the same folder used last time, even if it can remember only from the same session?  That would be very helpful as well.

Stefan79

Thank you freedo50, z and all others,

but notice that the new version is still under process and not publish, yet. Think, next week it will be finished.

@z:
To your requests:
Remembering the last path for the Add files command should be no problem and I will implement this in the new version.
The second thing to support the multiple languages is a good idea and I will try to implement this in the new version.

Stefan
SSP = Stefan's Self-made Productions

sithlrd98

So, I have kinda been following this...from a distance $%#Ninj2 and had not seen the newest additions...very cool!   Now here is the question: I need to find the latest version , mainly for checking freedo50's stuff for scruiteenering ,and also because my curiosity has been peaked! Since there have been a few revisions I'm not sure which is "the Latest and Greatest!".

Jayson

Diggis

Oh, something I forgot to mention, when you edit an existing DAMN it cuts the end off the LTEXT information when you reload it.

Stefan79

To all users,

there are some bugs (or should I call features) in the latest public version (SSPTool_Complete112.zip from Sourceforge).
So, if you can wait this week, you will get a newer and better version next week. I'll try to implement your wishes and
ideas, remove bugs and add features to make the creation of DAMN menues easy as it can be. And for expert users
is the LotEditor which can edit/change some things of the lot.

@sithlrd98:
The latest public version is 1.1.2 (SSPTool_Complete112.zip) from Sourceforge.

Stefan
SSP = Stefan's Self-made Productions

shanghai kid

I'm looking forward to the new version.

1 question though(i just remembered this): is the "path to simcity game" bug one of the fixed bugs in the new version, as i have the game under E:\Maxis\SimCity 4 Deluxe and in current version(1.1.2) it doesn't find the path so every time i restart SSPTool i have to put in the path to make new DAMN's.
Shanghai kid from Norway
"The lurking devil"
(Bam Bam Bigelow & Eddie Guerrero R.I.P).

Diggis

Ahh, That wasn't a bug, it was user error.  Check that both paths are correct as it turned out that my problem was that the My Docs path was wrong.

z

Quote from: Stefan79 on August 25, 2009, 04:24:49 AM
The second thing to support the multiple languages is a good idea and I will try to implement this in the new version.

I would imagine that integrating strings into the LTEXT subfiles shouldn't be too bad - you just need to add more LTEXT subfiles.  But some LTEXT strings end up in the LUA script.  Is it possible for their translations can get in there as well?

Stefan79

As I know SimCity takes the TGI from the LTEXT and search for different GroupID to choose the local language. The offsets are:
00 Default
01 US English
02 UK English
03 French
04 German
...
So, I can take the TGI from LTEXT, add the local language (choosed in SSPTool) and try to search for this TGI.
When SSPTool doesn't find any LTEXT, it will take the default.

Quote from: z on August 26, 2009, 09:47:32 PM
I would imagine that integrating strings into the LTEXT subfiles shouldn't be too bad - you just need to add more LTEXT subfiles.  But some LTEXT strings end up in the LUA script.  Is it possible for their translations can get in there as well?
I don't understand what you mean with "end up in the LUA script". Can you give me an example or maybe send me a file and explain what SSPTool should taken from LUA file? Or do you concrete mean to edit the LUA script of DAMN to localize it? Then, I have to ask Daeley because he does this LUA DAMN script.
SSP = Stefan's Self-made Productions

z

Quote from: Stefan79 on August 26, 2009, 10:55:03 PM
As I know SimCity takes the TGI from the LTEXT and search for different GroupID to choose the local language. The offsets are:
00 Default
01 US English
02 UK English
03 French
04 German
...

Yes, that part's correct.

QuoteSo, I can take the TGI from LTEXT, add the local language (choosed in SSPTool) and try to search for this TGI.
When SSPTool doesn't find any LTEXT, it will take the default.

No, this wouldn't work.  The result would be that whenever the menu was used, it would display in the language of the menu's creator, when you actually want it to display in the language of the menu's user.  So instead of adding the local language, you have to add all available languages.  At run time, the system will pick the right one for the user.

QuoteI don't understand what you mean with "end up in the LUA script". Can you give me an example or maybe send me a file and explain what SSPTool should taken from LUA file? Or do you concrete mean to edit the LUA script of DAMN to localize it? Then, I have to ask Daeley because he does this LUA DAMN script.

In the building exemplar, there are two properties that contain text that ends up in the DAMN menus.  The Item Description Key points to an LTEXT subfile that currently ends up as part of an LTEXT subfile in menu data file.  This is handled by the procedure described above.  But the property User Visible Name Key, which is the name of the building, points to an LTEXT subfile whose contents end up in the LUA script.  Here's an example:

local item1 = DAMenu.newItem()
item1.linkname = "Bus Stop (Road)"
item1.description = [[text@145ab450]]
item1.iid = "0c9db024"
item1.info[1] = "Size: 0 x 0"
item1.info[2] = ""
item1.icon = "sc4://HTML/1d424f4e/145ab450"
item1.hidden = false
item1.network = false
DAMenu.addItem(menu,item1)


This is the entire code for a single menu item.  The string "Bus Stop (Road)", which resides in item1.linkname, originally came from an LTEXT subfile, and there are translations of this string into many other languages using the structure you outlined.  I'm sure it's possible to get the other languages in here, as LUA is a reasonably powerful scripting language, but it may take a bit of work.  Yet if DAMN menus are to provide the full functionality of regular menus, I think this is important work to do.  As you mention, though, you may have to talk to Daeley about it.

Diggis

Yeah, I would imagine adding the additional languages to the LUA might be something Daeley will need to look into.  If you are super keen to get it in then you should post it in his thread.

z

OK.  In the mean time, I've found what appears to be a bug, and I have a couple of requests.

The bug is that while SSPTool can be used to specify a custom large icon by clicking in the space on the menu items configuration page, this doesn't work for the small icon.  PNG is not one of the allowed file types (although it is for the large icon).  If I select "All types" so that I can see PNG files, I can select one, but then an empty item selection box comes up, and there's nothing to select.

My requests are as follows:  1) In the bottom text box, could you please put a simoleon sign ('ยง') right before the cost number?  This seems to be standard practice in the game.  2) In the same text box, could you please change the three occurrences of "costs" to "cost"?  Grammatically, this is better English, and it also reflects how the properties are named in the exemplar.

Thanks again for all the wonderful work you're doing here.  :thumbsup: