• Welcome to SC4 Devotion Forum Archives.

Tool to reorder items in game-menu

Started by andy33b, February 10, 2008, 11:50:22 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

wouanagaine

My 0.02€ here  as I clearly don't want to program that tool, it is time I start playing at a 100% scale again  ::)

-don't rush for coding, make sure you understand all in&out of menu and OG ( does not seem everyone get to this point )
-There is no such thing as just getting the info from the examplar, you'll have to write back to the file and don't screw the users files ( remember on SC4TF days how many times I've thought I had the writing file code correct but was proven wrong ? ), or the V.08a of SC4DatPacker where some users experiments brown boxes ?
-To make the tool effective, you'll have to load all the maxis files & plugins, so think about RAM ( python which is the language I'm using is not effective on that subject, so it was a bad choice ), any language with a Garbage collector and out of coder memory management will suxs ( look at all my tools but the latest SC4DatPacker, they all use way much too RAM but I can't control it, the language control me ), and do lazy code ( XTools testers can attest how "funny" it is to have to wait for loading ), and handle the correct file loading order
-Remember that the info for the menu is in the building examplar, but you'll have to search if such a building examplar is used in a lot ( no need to order it if it does not show up in SC4 )
-Remember that there is a awfull big number of totally screwed modded files out there. some that are not readable, some that will have menu information, but proved to be growable lot, some that are plopable but don't have menu information or missing some of the needed properties
-Remember that there is not only english/us lot makers, so support unicode from the start ( see how many problem I have with unicode with my tools ? )
-Test, test and test, have a quite large testers group with different plugins, OS and languages
-Be prepared to handle the support thread !

Wish you luck  :thumbsup:

New Horizons Productions
Berethor ♦ beskhu3epnm ♦ blade2k5 ♦ dmscopio ♦ dedgren ♦ emilin ♦ Ennedi ♦ Heblem ♦ jplumbley
M4346 ♦ moganite ♦ Papab2000 ♦ Shadow Assassin ♦ Tarkus ♦ wouanagaine
Divide wouanagaine by zero and you will in fact get one...one bad-ass that is - Alek King of SC4

RebaLynnTS

Becca

Look for me at ... Becca At Bat

andy33b

Quote from: wouanagaine on February 13, 2008, 12:10:36 AM
-There is no such thing as just getting the info from the examplar, you'll have to write back to the file and don't screw the users files ( remember on SC4TF days how many times I've thought I had the writing file code correct but was proven wrong ? ), or the V.08a of SC4DatPacker where some users experiments brown boxes ?
That's why I suggested a two step approach. While the first step is done it becomes evident which are the problematic files.

Quote from: wouanagaine on February 13, 2008, 12:10:36 AM
-To make the tool effective, you'll have to load all the maxis files & plugins, so think about RAM ( python which is the language I'm using is not effective on that subject, so it was a bad choice ), any language with a Garbage collector and out of coder memory management will suxs ( look at all my tools but the latest SC4DatPacker, they all use way much too RAM but I can't control it, the language control me ), and do lazy code ( XTools testers can attest how "funny" it is to have to wait for loading ), and handle the correct file loading order
you don't have to keep all the files open in the RAM. As long as you keep the filename with the menu-icon & instance-number it is simple to reopen the file. Most probably you'll have to do it so anyway, since mods can "overwrite" an exemplar.
What was the correct order? First files then subfolders, and everything in assending order (or was it the other way round)? ()what()
<Scan a directory tree (recursive task), build a list of the desired items (and dismiss unwanted and maybe problematic items), while building up scan for duplicate list-items and replace their content> is not that difficult (If your programing language has a good support for lists), but needs time to be programmed and will in the compiled app consume quite some time.

Quote from: wouanagaine on February 13, 2008, 12:10:36 AM
-Remember that there is a awfull big number of totally screwed modded files out there. some that are not readable, some that will have menu information, but proved to be growable lot, some that are plopable but don't have menu information or missing some of the needed properties
I don't expect a program that does everyting (in german "Eierlegende Woll-Milch-Sau"), but rather a tool that does 80% of the job. I'm happy if I can reduce the handwork from "several" night-shifts to only 1.
While writing new values to "item order" don't use an increment of 1 but rather of 100 or more. This way there is enough room for additional handwork (-> the remaining 20%) after the automated process.

Quote from: wouanagaine on February 13, 2008, 12:10:36 AM
-Remember that there is not only english/us lot makers, so support unicode from the start ( see how many problem I have with unicode with my tools ? )
&mmm Would be a big problem for myself. But if I understand it right not that much for RebaLynnTS.

-andy33b-

wouanagaine

Correct loading order is the following =>

-Parse files in folder in alphabetical order ( ASCII ordering, case insensitive, differ from what windows explorer shows  )
-then parse subfolders in alphabetical order

if one file has duplicates within itself, use the first version
if one file has duplicates with previous files, use the new version


New Horizons Productions
Berethor ♦ beskhu3epnm ♦ blade2k5 ♦ dmscopio ♦ dedgren ♦ emilin ♦ Ennedi ♦ Heblem ♦ jplumbley
M4346 ♦ moganite ♦ Papab2000 ♦ Shadow Assassin ♦ Tarkus ♦ wouanagaine
Divide wouanagaine by zero and you will in fact get one...one bad-ass that is - Alek King of SC4

HandsOn

Maybe I'm just being too simple here, but the main problem that would warrant the program is the disorder of plug-in placement in the menu. Now, I would first want to go to the source. That is, as NAM and creators of similar ilk have shown, it is possible to "bundle" parts of a plug-in into a single icon, asking the user to use the TAB key to select which lot to plop. If, and I am really dreaming here, I guess, everyone who made lots that go together - such as trails or parkways, etc., used that single-icon approach, half the problem would be solved. I know there's MML (or some such) but I for one never seem to get that right. And in some instances, there are "construction lots" for the same items appearing in different menus (an underground plaza - great stuff - that shows up under parks, misc. transport, and landmarks is a good example).

The loading of my "parks" menu alone has me twiddling my thumbs for quite a while, and my guess is that its the number of icons SC4 generates on the fly. Of course, all of this could be hogwash..?!


Why not visit The Empire MD
Just updated on July 2nd, 2008
And after the game's done.. - The Storyteller's Logbook

Diggis

Hands on, unfortunatly, as has been stated many a time, the TAB ring is restricted to transit networks only.  It can't be used for lots.

With the MML's they all have to be in the Landmark menu, as well as where you look for them.  I can't explain why one would show up in more than 1 menu (+ the landmarks) unless the lots they replaced do.

jplumbley

Quote from: HandsOn on February 13, 2008, 08:27:36 AM
That is, as NAM and creators of similar ilk have shown, it is possible to "bundle" parts of a plug-in into a single icon, asking the user to use the TAB key to select which lot to plop. If, and I am really dreaming here, I guess, everyone who made lots that go together - such as trails or parkways, etc., used that single-icon approach, half the problem would be solved.

Unfortunately what you have just isolated is a function that is only available to Network Puzzle Pieces...  It is not possible to put lots into such a menu icon.  The menu icon for the TAB-rings are defined in the Transit RULS and cannot reference Lot Exemplars or anything other than Puzzle Piece Models.

MML is the closest thing we can get to a TAB-ring icon.  Unfortunately, it takes alot of modding to create an MML and a complete update of the set of lots the MML is dealing with.  It would be much nicer if we could use this, but it just isnt possible.
"You learn something new everyday."

http://img517.imageshack.us/img517/169/nhpjplumbleykv3.gif
Bringing the new horizons closer to reality.

Berethor ♦ beskhu3epnm ♦ blade2k5 ♦ dmscopio jplumbley ♦ moganite ♦ M4346 ♦ Dedgren ♦ Ennedi Shadow Assassin ♦  Tarkus ♦ wouanagaine
Street Addon Mod - SAM

Diggis

Quote from: jplumbley on February 13, 2008, 10:17:46 AM
MML is the closest thing we can get to a TAB-ring icon.  Unfortunately, it takes alot of modding to create an MML and a complete update of the set of lots the MML is dealing with.  It would be much nicer if we could use this, but it just isnt possible.

Actually they aren't too bad to Mod.  Depending on the size.  It's more an issue of tedium and that you have to wait till a set is finished before doing the MML as they can't be added serparatly.

HandsOn

Quote from: jplumbley on February 13, 2008, 10:17:46 AM
Unfortunately what you have just isolated is a function that is only available to Network Puzzle Pieces...  It is not possible to put lots into such a menu icon.  The menu icon for the TAB-rings are defined in the Transit RULS and cannot reference Lot Exemplars or anything other than Puzzle Piece Models.

MML is the closest thing we can get to a TAB-ring icon.  Unfortunately, it takes alot of modding to create an MML and a complete update of the set of lots the MML is dealing with.  It would be much nicer if we could use this, but it just isnt possible.

Maybe the reason they do show up in more than one menu lies with me. There's always a good chance I did something wrong. But in the case of (I forgot whose) a set of embankment walls and with the underground malls, the MML icon's with the bulldozer show up in different menus. And only the one in the landmark menu proclaims when it has already been placed.

Shame about the Tab restriction. That would have simply been to good to be true.


Why not visit The Empire MD
Just updated on July 2nd, 2008
And after the game's done.. - The Storyteller's Logbook

RebaLynnTS

If the custom submenu thing ever gets off the ground, that would solve a lot of problems. Also, I designed a small app that can quickly create MMLs, but I still have to figure out how to read and write to the sc4 files (working on that now).
Becca

Look for me at ... Becca At Bat