• Welcome to SC4 Devotion Forum Archives.

Editing LOTs and Custom Icons

Started by FrankU, March 31, 2008, 07:14:49 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

FrankU

When I edit someone else's Lots I cannot use the Custom Icon that goes with the lot anymore. I get the ugly Lot Editor icon in my menu.

Is it possible to extract the Custom Icon that went with the Lot, edit this and put it into my own edited Lot?

Well, I am sure there is a way, but how is it done? Last night I tried (with the Reader) to extract the PNG file from Soulstealer's Container dock as to edit it in Photoshop and put it back into the edited lot I made. But I couldn't find out how.
Is there even a tutorial?

RippleJet

With iLive's LEProp you can both export a custom icon to an external PNG file, and import an external PNG into a custom icon. :)

FrankU


dedgren

#3
This is the method I use- it sticks with the Reader.  I don't go into icon editing, and assume basic familiarity with the Reader's screen and functions.

1.  EXTRACTING AND OPENING A MENU ICON FILE FOR EDITING

To extract the menu icons from an existing LOT file to edit them, open the lot you want to work with and (1) find the .PNG file that contains them.  You can easily tell because (2) the pic that appears in the edit pane will be the four small icon squares.  Highlight the .PNG file and right-mouse click on it, then navigate down the drop-down menu that appears to the "Save selected file(s)" menu choice and (3) left-click on it.



If you now (1) open your "My Documents" SimCity 4 "Plugins" subfolder, you will see (2) a new file named "file00000000.png".  This is your newly created icon file, which can be opened and edited in your graphics program.



* * *

2.  INSERTING A CUSTOM MENU ICON FILE

I'll presume you've edited a really nice custom menu icon file and are ready to replace the generic one in the LOT file with it.  So, here goes.

Returning to the Reader, find (1) the .PNG file you want to replace- the (2) menu squares are a dead-giveaway.  Highlight the file, then right-click on it and select (3) "Insert File" from the drop-down menu.



This will bring up (1) an input window titled "Open."  Navigate to your "Plugins" folder, or wherever you have saved the edited menu icon file, and (2) select the file, then left-click (3) the "Open" button.



A (1) "File Type" input window will now appear.  Highlight (2) "PNG file" from the choices, then left-click (3) "OK".



Notice (1) that you now have three .PNG files.  If you highlight the newly-appeared one, you'll see (2) your newly-created custom menu icons in the edit pane.  You'll also notice (3) that the "Group" and "Instance" attributes of your new file are set to "00000000".



A discussion of "TGI" ("Type-Group-Instance") attributes is beyond the scope of this tutorial.  Suffice it to say that the TGI attributes are collectively like GPS coordinates or a street address- they tell the game engine where to look for a particular file among the hundreds of thousands that are in use during an SC4 session.

Making sure (1) the new .PNG file continues to be highlighted, left-click (2) on the "File Info" selection from the menubar at the top of the Reader window.  This opens (3) a "File Info" input window, and you'll select (4) "Edit" by left-clicking on the button when it appears.



A (1) "Header - Edit" input window replaces the "File Info" window.  Note (2) that the "Group" and "Instance" entry fields each contain "00000000".



Edit (1) the "Group" attribute first by typing the characters "6a386d26" into the entry field.  This number, when you are dealing with custom menu icons, will always be the same.  Next, check (2) the "Instance" of the first "Exemplar" file that appears- you'll see this same number repeated as the instance for several other files.  Copy it exactly by typing (3) it into the "Instance" entry field in the "Header - Edit" window.  When you have done this, left-click (4) "OK" to save your changes.



When you refer back (1) to your new .PNG file, you'll see (2) the changed "Group" and "Instance" attributes reflected.



Next, highlight once again (1) the .PNG file containing the old menu icons, confirming (2) you have the right one by looking at the edit pane.  Right-click on the selected file and, from the drop-down menu that appears, (3) select "Remove File" by left-clicking on that menu choice.



You're almost done.  The following steps, though, are very important, as failing to do them can lead to a scrambled LOT file, and the possibility it will lock-up your game when you try to use it.

Note (1) that you now have two .PNG files.  When you look (2) at the "Num" category, though, you'll see that the list goes "1-2-3-5-6", skipping the number: 4, assigned to the .PNG file you removed.



This is corrected by right-clicking (1) anywhere in the Reader's file list window white space just below the file names.  A drop-down menu will appear; from it, choose (2) "ReIndex" by left-clicking on that menu choice.



Now, right-click (1) in the same place on the screen again.  The same drop-down menu reappears.  This time, choose (2) "Rebuild Directory File" by left clicking on that choice.



Confirm (1) after pressing the [F5] key that the "Num" column is now sequential.  Save (2) your updated LOT file, and the next time you open the game your new custom menu icon should appear.



If I can be of any help if you get stuck, don't hesitate to PM me.


David
D. Edgren

Please call me David...

Three Rivers Region- A collaborative development of the SC4 community
The 3RR Quick Finder [linkie]


I aten't dead.  —  R.I.P. Granny Weatherwax

Skype: davidredgren

Andreas

#4
Nice tutorial, David, although you can save some work by selecting the original icon, right-click and then click on "Copy Entry ID". Then right-click on the new PNG file and select "Paste Entry ID". Once you ReIndex the files, the copied ID should show up. :)

As an alternative, if you exported the LE default icon anyway, just delete it in Windows Explorer and rename a copy of your custom icon to the name of the file that you just deleted. Then go back to the Reader and import it - if you didn't delete the TGI file that was created when exporting the icon, the IDs that are stored there will be used for the new icon (this will also skip the step of manually selecting a filetype).

EDITWow, my friend- that's what I get for teaching myself how to use the Reader then trying to pass myself off as an expert.  Either of those methods will certainly save anyone a bit of time, although I'm so set in my ways I can now do it the way I described in my sleep.  Thanks! -DE
Andreas

TheTeaCat

Very Handy tutorial David &apls &apls
Thanks for sharing this

And Andreas too for the additional hints  :thumbsup: &apls

:satisfied:
TTC
Kettle's on. Milk? Sugars?    ps I don't like Earl Grey  $%Grinno$%
Reduce, Reuse, Recycle - If you're not part of the solution , you're part of the problem!
"Never knock on Death's door: Ring the bell and run away! Death really hates that!"
Tales at TeaTime      Now A proper NUT      TTC plays GRV II

Pat

Very good tut David and I think you spent your free day well at that...

Don't forget the SC4D Podcast is back and live on Saturdays @ 12 noon CST!! -- The Podcast soon to Return Here Linkie

FrankU

Wow David,
That's complicated. I think I'll stick to the tip given by RippleJet.
For me, I don't see what the advantages are of using the Reader. In LEprop it was just some mouseclicks. I did seven files within ten minutes, including editing the icons!
Thanks aal of you for the information.  &apls

bat

Very great tutorial there, dedgren! Nice work! ;)