• 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

Quote from: JoeST on March 18, 2009, 06:16:00 AM
hey Stefan, thanks for the update :)

what do the DBPF4J extensions do? is the source (the .java) going to be avaiable?

also, would you like a website making? it would be a good thing to have the javadoc avaliable on the web.

Joe

Hi Joe,

the extensions need more dependant libs and provide renderer, image tools, DBPFElement, which partly came from SSPTool-Plugin-Support.
I made this so I havn't to update the DBPF4J and Plugin-Support every time when I add a new renderer or something else and to keep a
minimum dependency of DBPF4J and Plugin-Support.
I havn't updated the CVS yet because I programmed "offline", but you can download the source-code from Sourceforge - SSPTool-dev - dbpf4j.
Maybe when I have time, I place the javadoc on the website but for now you can download it as same as source-code.

Stefan
SSP = Stefan's Self-made Productions

JoeST

#41
thankyou very much for the Source code :) it helped me understand the way of doing it much better :D

have you thought of making ssp.dbpf4j.entries.DBPFEntries into an Enum "class"? I "coded it up" to test my theory:
public enum DBPFEntry{

DIRECTORY (Long.decode("0xE86B1EEF"), Long.decode("0xE86B1EEF"), -1 ),

LD (Long.decode("0x6BE74C60"), Long.decode("0x6BE74C60"), -1);



private final long tid, gid, iid;

private String type;

DBPFEntry(long t, long g, long i){

this.tid = t; this.gid = g; this.iid = i;

}

public String getType(){

return name()+" file";

}

public long getID(char s){

long ret;

switch(s){

case 't':

ret = tid;

break;

case 'g':

ret = gid;

break;

case 'i':

ret = iid;

break;

default:

ret = -1;

}

return ret;

}

public String toString(){

long t = getID('t');

long g = getID('g');

long i = getID('i');

return getType()+" has a TGI of "+(t==-1?"X":t)+", "+(g==-1?"X":g)+", "+(i==-1?"X":i);

}

public static void main(String[] args){

for(DBPFEntry i : DBPFEntry.values())

System.out.println(i);

}

}

the main class just displays what the thing does :) I dont know if that will be more usefull to you

I dont know, are they even to be used? another one that could be Enumerated is DBPFTypes, but thats "not used" either, as far as I can see. and DBPFProperties?

Joe
Copperminds and Cuddleswarms

Stefan79

Quote from: JoeST on March 18, 2009, 11:36:40 AM
thankyou very much for the Source code :) it helped me understand the way of doing it much better :D

have you thought of making ssp.dbpf4j.entries.DBPFEntries into an Enum "class"? I "coded it up" to test my theory:
...

the main class just displays what the thing does :) I dont know if that will be more usefull to you

I dont know, are they even to be used? another one that could be Enumerated is DBPFTypes, but thats "not used" either, as far as I can see. and DBPFProperties?

Joe

I thought about making the DBPFEntries into a Enum class - thats why this is a class but not an interface - but I have more overview,
when only have static final constants. And for getting the TGI or a string I have the getTGI and toString methods in DBPFEntry. I used
them often with DBPFUtil.isTGI to check, if an entry is a specific type.

DBPFType is an interface (as described the reason above) and I use this internal in DBPFConverter.createData for determine the right type.

DBPFProperties is - not an interface and - a mix: It has final constants for getting properties from exemplar (this was necessary at beginning) but now has a hashtable which is set from SSPTool with all available properties in a exemplar. When searching a specific property its easier for the programmer to search
for DBPFProperties.ITEM_ORDER instead of 0x8a2602b9 but I have only listed the most interesting and maybe in further version the constants will be gone...

Look at DBPFUtil as it provides some interesting functions.

Stefan
SSP = Stefan's Self-made Productions

JoeST

ok, your DBPFEntry  equals()  method doesnt take into account -1's. and I was just trying to get the "gui" name for an entry, as they are named in DBPFEntries, like if the item is a DIRECTORY file, I wanted to get the string "directory" etc. and I would guess similar things might be usefull in DBPFType and DBPFProperties?

Joe
Copperminds and Cuddleswarms

Stefan79

Quote from: JoeST on March 20, 2009, 03:41:48 AM
ok, your DBPFEntry  equals()  method doesnt take into account -1's. and I was just trying to get the "gui" name for an entry, as they are named in DBPFEntries, like if the item is a DIRECTORY file, I wanted to get the string "directory" etc. and I would guess similar things might be usefull in DBPFType and DBPFProperties?

Joe

Let me see, what I can do for you. Maybe the enum isn't wrong as I first thought of.
But this menas also the next version wouldn't be compatible with the old one, so this need a complete redesign, I haven't the time at the moment.
After next week there would be time, so please wait.

Stefan
SSP = Stefan's Self-made Productions

JoeST

hey, I can wait, I was just suggesting :)

Joe
Copperminds and Cuddleswarms

andy33b

hi Stefan,

I checked your new version this weekend. First of all,  :thumbsup: that your damn-creator tool now selects just the potential lots. This is a good help.
I have following issues/suggestions:

  • in the file-exporer of the damn-creator the "open" button is short-cut with the <enter>-key. In the other places it is not. please remove it, so one can navigate down a subfolder by pressing <enter> instead of having to <ctrl>-<enter>.
  • expand the function that reminds the last selected file-path to the whole program. So when someone has created a damn-menu item and likes to make a new one he gets to the last place he was.
  • set the text color to eg. white on selected items in the lists. Black text on dark blue background is hard to read (or is it just my configuration?).
  • link a short-cut with the "De-/Select" button. It is preferable not to use <space>, since this is already used to highlight the lines of the list-box. Do same with the "move up"/"move down"/"first"/"last" buttons (eg. short cut with <+>,<->,<home>,<end> - with or without <ctrl>/<shift>... ->that's up to you).
  • set the description-box to be the last selected item when tabbing.
  • move the tabs "configuration" & "logger" to be last. You won't use it quite often on normal work.
  • In general I would suggest to remove the description-box and make a help file, and then with a more detailed description of the functions and buttons. It uses quite some valuable space

andy

Stefan79

Hi andy,

thanks for your feedback. Some of your ideas will be easy to realize, some of them a little difficult.
The idea to remove the description and make a button with help text seems to be very important,
because on the one side it provide more space in the dialogs and on the other side the help could
be more detailed.
I will see what I can do and will implement it in my next release.

Stefan
SSP = Stefan's Self-made Productions

Stefan79

A little question to everyone who use my SSPTool:


Should the size of the dialogs be larger than 600 x 500 pixel, e.g. 800 x 600?

(By the way you can resize a dialog when moving the mouse to the border.)

Any other ideas for next version of SSPTool should be post this week. Next week I will begin to implement it!

Stefan
SSP = Stefan's Self-made Productions

andy33b

Hi Stefan,

I would appreciate it. with a larger dialog you gain valuable space to arrange the different buttons or make the list-boxes larger (having more lines visible, arrange the informations in several columns, that might also be sortable or not,...).
Most (almost all) computers should have now-a-days screens that are larger than 800x600, except maybe subnotebooks and similar. but I doubt that on such a device SC4 runs smoothly.

Diggis

#50
Stefan, I have an issue with the tool.  It won't accept my installation directory.  If keeps defaulting back to yours and says mine isn't valid.

Edit:  Meant to say, we have found an effective way of removing the lots from the menu.  You need to copy the building exemplar into a new dat file that needs to load after the original lots.  Then remove the lot resource key from the exemplar and this will remove the lot from the menu.

As this needs to load after the original lots this must be installed into the SC4Plugins directory.  If you are able to add to the tool it would be excellent.

Stefan79

Hi Diggis,

when choosing the directory, be sure to take the path without the subfolder Apps, e.g. c:\Games\SimCity 4 Deluxe\. Also the MyDocs/Plugin folder has to be right or the program will not accept any of the paths.

The second thing to remove items from menu sounds fantastic and I will integrate this in my program.

But at the moment I have to do so much in RL, I can't develop my program but I hope this will be better in 2-3 weeks.

And sorry for this late answer.

Stefan
SSP = Stefan's Self-made Productions

Diggis

What file is it looking for with the config?  My path is:

C:\programme files\maxis\simcity 4\

I have the original plus rush hour, not delux, but every time I add that folder is says it's not valid.

Stefan79

It only tests, if the path exists, nothing more. But the application path AND the plugin path have to be exist.
If any of the both doesn't exist, it will not accept one of them (I will change this in further version). So be sure
to choose an existing application and plugin path.
SSP = Stefan's Self-made Productions

Diggis

Hmmm, I'll take another look, might be the My Docs with the problem then

Need4Camaro

I'm having problems with the DAMN-Menu. I have exported a Menu for a dat file of mine containing several lots and I also made those lots hidden. However when I load up the game, the lots are completely visable in my Menu, and also my Menu is not appearing in the News Ticker. I also checked all the advisors. The .dat file for the menu IS inside the plugins folder. What is wrong?

Stefan79

This could be two possible things:

1. Advices must be turned on, to activate the DAMN menu.
2. The work directory of SimCity shouldn't end with /Apps but with SimCity, else DAMN will not work!

(These thing will be displayed in Finished Step of the DAMN Creator.)

Last the dat file of the DAMN menu has to be in the .../Apps/SimCity 4/Plugins folder not in
the .../My Docs/SimCity 4/Plugins, but this should be, when you use the DAMN Creator.
SSP = Stefan's Self-made Productions

Diggis

#57
Stefan, I've manged to get this to work, although maybe not quite as intended  :D

It still ignores my attempts to put the correct paths in so I just ignore it and move stuff when done. ;D  It's brilliant!  One small thing to consider, would you be able to get the lot image (not the icon the larger one) into the DAMN file?  I have found DAT packer will delete these so if they aren't included in the file and someone is playing with packed plugins they will lose them.

Edit:  I have an error with the DAMN editor part.  When I open a file to edit it uses the Icon image as the main image and cuts the description down to 1 line.

koki373737

#58
Quote from: Diggis on October 06, 2008, 02:53:28 AM
Quote
OK, I think we have a way of removing the files from the menu.  However I need some testers to verify that it doesn't break the files.  I need people who are using the DAMN to test this for me, before I start releasing how we did it.  All going well I will let you all in on the secret.  Wink

Volunteers please PM me an email address to send the files to.  I will try sort it out and email them tonight.
Just wondering, sorry if I missed, but has this feature been added do SSPTool? I downloaded SSPTool and browsed the rest of the thread, but couldnt find out. Is it that "hidden" option from DAMN Creator/Configure Menuitem?

Also, which would be the best use when using DAMN Creator and datpacker? Should I select the uncompressed .dat to DAMNify and the run dat packer after or can I Use DAMN Creator directly with the packed dat?

Thanks, and congratulation for this great tool

Marcelo

Stefan79

Hi folks,

soon (2 weeks) I will return to SSPTool and try to include all the ideas, remove the bugs and give help,
but at the moment I have to do so much in RL, SSPTool has to wait.
By the way, I will include the new feature to remove icons from the menu and will test how to use
DAMN Creator together with DATPacker.

So, please wait a little,

Stefan
SSP = Stefan's Self-made Productions