SC4 Devotion Forum Archives

Sim City 4 Devotion Tools => Tools - General Discussion => Topic started by: fafalone on May 10, 2014, 01:39:11 AM

Title: New tool: SC4 Icon Wizard
Post by: fafalone on May 10, 2014, 01:39:11 AM
I'm putting the finishing touches on a tool to automatically make a SC4 icon from an image. I don't mind releasing the code if no one makes fun of me for using VB6 :)  It's still a powerful language fully compatible with Win7 and 8.

Right now I can just export the PNG; I don't know how to insert it into a DAT or SC4lot. Maybe for version 2?

Any suggestions before I pull the trigger?

(https://www.sc4devotion.com/forums/proxy.php?request=http%3A%2F%2Fi.imgur.com%2FlufTBL0.jpg&hash=2664cdfd6dd14b5d1f2cbc13cb23ccd1cde0183f)

(https://www.sc4devotion.com/forums/proxy.php?request=http%3A%2F%2Fi.imgur.com%2FkwtQbZH.png&hash=679058793ef8431a0470507d36061fec7f3541ac)
(https://www.sc4devotion.com/forums/proxy.php?request=http%3A%2F%2Fi.imgur.com%2F7VAN73I.png&hash=3dff6731de36fd6908a57bf54f07dc34039697d7)

(https://www.sc4devotion.com/forums/proxy.php?request=http%3A%2F%2Fi.imgur.com%2F0XTU0wA.jpg&hash=7549c4d48bc007c1a44f6c0a9da400b5b044dd17)
(https://www.sc4devotion.com/forums/proxy.php?request=http%3A%2F%2Fi.imgur.com%2F2Jyzipr.png&hash=73b28f0abe91b0d68c9d231e2de6df7018d9e4b2)

Supported Input Formats: PNG, BMP, JPG/JPEG, GIF, ICO, CUR. Other image types may be supported depending on your system- this program uses GDI Plus.
Requirements: This program runs on XP, but some visual effects will not show up (this does not effect the output). gdiplus must be installed. It comes preinstalled with XP or higher, and any version is ok. An image editor is not included; your picture must be created with another program.


-------------------------------------
Beta Release 5/11/2014

Assuming anyone besides me actually wants to use it, I'm posting a beta version now. It's feature-complete for Version 1.0 (will add new items... but some of you know how long it can me to release sequels). It works fine on my machine, Win7 x64, and Microsoft et al. say all of the dependencies don't need to be redistributed by me (msvbvm60.dll, gdiplus.dll, comdlg.dll), but I don't have the time or resources to test it on a bunch of different systems.
So please let me know if there's any problems!

SC4 Icon Wizard Version 0.1 Beta Release (https://www.dropbox.com/s/at3u80ewy3oppst/sc4icowiz.zip)
Title: Re: New tool: SC4 Icon Wizard
Post by: FrankU on May 10, 2014, 06:19:38 AM
This looks like a useful tool, but I must confess that I can use SC4-Pim for making icons. So maybe there is some advantage to your program, otherwise I think I will not need it?
Title: Re: New tool: SC4 Icon Wizard
Post by: fafalone on May 10, 2014, 11:43:39 AM
Batch processing mainly. I make a lot of icons. Also if you want to keep the icon around. Plus SC4PIM is unstable and I try to avoid using it, would rather do everything in the regular lot editor, leprop, and reader. (leprops import icon only works with existing icons). Besides this is an early version, I plan to add quite a few more features. Mainly for batch processing to save me time. I made it because it saves me time given the programs I use (not SC4PIM) and the way I do things (have to edit things in reader even if i DID use sc4pim, so it's less extra grief to add it there), and thought I'd release it in case anyone else does things that way too. If not, don't download it.
Title: Re: New tool: SC4 Icon Wizard
Post by: catty on May 10, 2014, 02:44:40 PM

Well whether people use it or not, its still a great effort and a karma point heading your way

&apls
Title: Re: New tool: SC4 Icon Wizard
Post by: mrbisonm on May 10, 2014, 03:35:18 PM
If it is easier to work with than the freaking PIM,(I try to avoid it as much as possible) then I will use it, or at least try it. ;)

Fred
Title: Re: New tool: SC4 Icon Wizard
Post by: vester on May 10, 2014, 03:56:42 PM
Looks like it could be a useful tool.

I use Photoshop for icons myself. Have a template, which I think got for the Andreas, which I modified.
Lately I created an action, so now I just need to paste, play the action and save the file as a PNG.
Starting to use action took months of nothing. Creating the action took 20 seconds, running it now takes 2 seconds.

Works like a charm :)
Title: Re: New tool: SC4 Icon Wizard
Post by: fafalone on May 11, 2014, 12:44:07 AM
Looks like I'm not alone in my SC4PIM avoidance!


Beta version released, see first post.
Title: Re: New tool: SC4 Icon Wizard
Post by: fafalone on May 11, 2014, 01:19:40 AM
Quote from: vester on May 10, 2014, 03:56:42 PM
Looks like it could be a useful tool.

I use Photoshop for icons myself. Have a template, which I think got for the Andreas, which I modified.
Lately I created an action, so now I just need to paste, play the action and save the file as a PNG.
Starting to use action took months of nothing. Creating the action took 20 seconds, running it now takes 2 seconds.

Works like a charm :)

So you have to paste it into the template and run the action, for each icon?

I take it you don't make projects with 100-200 separate lots. That's why I really made this program, to automatically perform that action on dozens or hundreds of files. And this is just the beginning.
Version 2 is already in the works, here's a short list of planned features:
-automatically overlay text
-inset smaller images on a background (a la RMIP)
-actually inserting it into a dat isn't really do-able, since there's no VB-compatible libraries and I have no intention of trying to re-learn the java i forgot after college and port that to vb, and other languages are beyond me... that said, I should be able to make a script for the new reader to set the tgi once it's imported, since reader has to be used anyway. i already have several scripts that help set properties on bulk files.

On a related note, if any developers know of a DLL/type library for DBPF files that makes them workable... point me in that direction. There's one C++ "library" but it looks like a console application and I can't even get it to compile.
Title: Re: New tool: SC4 Icon Wizard
Post by: Tropod on May 11, 2014, 03:23:24 AM
Quote from: fafalone on May 10, 2014, 01:39:11 AM
Right now I can just export the PNG; I don't know how to insert it into a DAT or SC4lot. Maybe for version 2?

Any suggestions before I pull the trigger?

Looks nice :thumbsup:. The more tools the merrier I say ..... as for inserting into a *dat; you could use ilives Reader or my SC4Reader tool to do this if you don't care to write your own ;).

EDIT: to clarify; I meant to insert using these tools after generating ico/png/etc file(s).
Title: Re: New tool: SC4 Icon Wizard
Post by: memo on May 11, 2014, 03:25:41 AM
Nice progress, so far! I've never been able to figure out how to create an icon with SC4PIMX, so I ended up using Andreas' templates... for the maybe dozen icons I have ever created.

Quote from: fafalone on May 11, 2014, 01:19:40 AM
-actually inserting it into a dat isn't really do-able, since there's no VB-compatible libraries and I have no intention of trying to re-learn the java i forgot after college and port that to vb, and other languages are beyond me... that said, I should be able to make a script for the new reader to set the tgi once it's imported, since reader has to be used anyway. i already have several scripts that help set properties on bulk files.

On a related note, if any developers know of a DLL/type library for DBPF files that makes them workable... point me in that direction. There's one C++ "library" but it looks like a console application and I can't even get it to compile.

There are two C++ libraries I know of (one (http://www.moreawesomethanyou.com/smf/index.php/topic,8279.0.html), two (http://modthesims.info/journal.php?do=showentry&e=4853)), but I have not used or compiled either of them. You may also be able to extract what you need from the source code of other programs, e.g. TheSimsEdit originally written in VB (https://github.com/ZackCDLVI/TS1Edit2k) and rewritten in C++ (https://github.com/ZackCDLVI/TS1EditX) (which also appears to be actively developed), or even the Reader, written in C++. You may also contact cogeo as he mentioned that he has his own set of routines for writing DBPF files in C++, I think.

That said, if it is merely intended for importing files into dats, a batch import script for the Reader is an elegant solution, if you ask me, as it is what the Reader already solves satisfactory.
Title: Re: New tool: SC4 Icon Wizard
Post by: art128 on May 11, 2014, 04:58:18 AM
Quote from: fafalone on May 11, 2014, 01:19:40 AM
I take it you don't make projects with 100-200 separate lots.

He does icons for 20-30 maybe more train skins at once... Sure that's not hundreds of lots but it's still a big number... :)
Title: Re: New tool: SC4 Icon Wizard
Post by: vester on May 11, 2014, 09:11:56 AM
Have just done 65 icons (http://sc4devotion.com/forums/index.php?topic=14278.msg480538#msg480538).

So how do you control what you want the picture to be and what part of it?
I have full control over what it is going to be.

You take about adding text. Tell a little more about that part.