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

andy33b

Hi all,

Lately I was thinking of a simple tool to help me reorder the items in the menus.
Actually every lot creator assings a value to "item order" and "occupant group" at its free will, and the the menus are becoming heavily scattered and "unreadable".


  • 1st step would be a tool that extracts the menu-icon and name from all the lots and display them in a list together with the files from which they were extracted. This way I (and everyone else here) would have a good help to find the needed files for iLive reader to reassign a new value to "item order".
  • In 2nd step this tool will be expanded so it can reodorder the items. This tool could look like a windows explorer: on the left side the menu-tree, on the right side the list with icon, name, filename of the lots in the menu-branch. The items in the list can be moved up and down (maybe also moved to another menu-branch).
    With a click on a special <Go>-button the tool writes new values to "item order" (and maybe also "occupant group") of all the lots depending on their new position in the list.

I was thinking of doing this tool myself, but with my limited knowledge in Delphi 7, it would take me a few weeks (if not months) to perform this task. But I'm sure for one of the programming-guru it wouldn't take more than 2-3 days to do this, so if one is willing to sacrifice his free time I would be grateful.
My problems in programming it myself would be on how to embed the picture in the list and program the drag-n-drop functionality (haven't done this so far). And somebody would have to provide me the knowledge to read the SC4-files or something like an SDK to read them.

Thanks
-andy33b-

wouanagaine

A good idea indeed, especially the 2nd step with drag&drop features



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

Diggis

Watch this space.... Wou has spoken...  :P

xxdita

A program to change the item order could be very helpful, but changing the occupant group for a lot isn't enough to actually change the lot to a different RCI type, and would probably just cause more confusion than it's worth I think.
Though a program that could easily and properly change the RCI type of a lot... that could be interesting.

Quote from: Diggis
Watch this space.... Wou has spoken...  :P

Watching  ;D

figui

first forums inhabitant from Uruguay..   first forums citizen from Uruguay..  first forums councilman from Uruguay..   first forums mayor from Uruguay..  first forums governor from Uruguay..
...i'm still the only one from Uruguay!

________

JoeST

* star.torturer bookmarks thread

If only I could program...

Joe
Copperminds and Cuddleswarms

RebaLynnTS

I don't think the idea is to change the RCI type of the lot, but rather what menu it shows up in.

I am not sure how to read the values of the SC4 files, or I could do this in short order.
Becca

Look for me at ... Becca At Bat

JoeST

#7
Wish I could help you with that Becca, but maybe wou would share the info with you.

Joe

[size=0]hmmm, looks like my 700th post[/size]
Copperminds and Cuddleswarms

RebaLynnTS

Becca

Look for me at ... Becca At Bat

HandsOn

Quote from: xxdita on February 11, 2008, 02:14:30 AM
A program to change the item order could be very helpful, but changing the occupant group for a lot isn't enough to actually change the lot to a different RCI type, and would probably just cause more confusion than it's worth I think.
Though a program that could easily and properly change the RCI type of a lot... that could be interesting.

Watching  ;D

Stupid question: does it have to be done in Delphi 7?? Or could it be done in any language (say C#, VB8, etc..)?


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

JoeST

#10
I guess it could be done in any language, just the OP could program in Delphi 7.

It all depends on the reading of/writing to SC4 files

Another thread for this kinda stuff:

http://sc4devotion.com/forums/index.php?topic=2198.0

Joe
Copperminds and Cuddleswarms

Andreas

Mathe Man from the SFBT once drafted a tool like this, but due to the ubiquitous RL, it never exceeded the first planning stages. But obviously, there is no need to reinvent the wheel once again, so I suppose wouanagaine could re-use quite a bit of his code for such a tool. So expect "some" suggestions once you have posted the first beta (one of them will be to make it multilingual  ;D ).
Andreas

xxdita

I understand the basic desire is to simplify changing the menu orders, but andy33b had also requested changing Occupant Groups, one of the steps in Creating a functional landmark. Unless the purpose is only to move the building to a different menu perhaps? Not sure that this is such a good idea though.
I would however like this program to function on more than just the landmarks menu. Hopefully it would work on all plop menus, to make organizing everything less tedious than it currently is. This would seriously help those of us that run with a way too full plugins folder.
I have absolutely no coding knowledge though, so no clue what language you'd need to use HandsOn.

SC4BOY

Too full a plugins menus? hehe *looks around innocently"

Just one point about any language issues... be aware that the end user normally needs a "support library" and environment of some sort. This needs to be considered. That is one advantage of using whatever Wou uses (Microsoft C and DirectX I think )

I'd estimate that 70% of the support issues on Wou's tools is that people don't have the support in place (they just don't bother to read/follow the readme's).

HandsOn

Presuming that it would not be possible to add menu categories (otherwise someone like Wou would have already done it), the only function could be the organising according to a "most used" type of arbitrary sort. Which would definitly be helpful because SC4 seems to arrange the menus as according to the local weather everytime you add a plug-in. Which explains it in my case - the weather here mostly sucks!

Thus I premptively surmise:
Since this would not be done in-game (would not work, I think) but in a fashion similar to any of the other tools, no graphic interaction is required; all that is needed is the knowledge of how SC4 does it. Where is that information ultimately stored? In what form? I can pretty much program most things (except, alas, the girlfriend), but I don't know what I am looking at and where.

What might make sense is to create the program also as an installer: thus you assign where in a given sub-menu branch the latest jeronjii creation goes.

SO, someone tell me what's wrong with my ass-u-me rehearsal thus far?


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

wouanagaine

if I recall correctly, SC4 arrange items based on item menu order, lot size and price, and someone ( Andreas ? ) need to refresh us in which order thoses 3 keys are used
As the only things that can be change is item menu order, it may lead to some impossible setup


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

Diggis

The Order overrides everything.  I would guess price is next, and then lot size but only at a guess.

HandsOn

Quote from: wouanagaine on February 12, 2008, 07:28:08 AM
if I recall correctly, SC4 arrange items based on item menu order, lot size and price, and someone ( Andreas ? ) need to refresh us in which order thoses 3 keys are used
As the only things that can be change is item menu order, it may lead to some impossible setup

Mais, since plug-ins insert items into the menu, it should be possible to determine where these are inserted. I've seen park items show up in the power menu, and a recent installation of sunken highway walls rearranged the park menu in a dismal, very interupted manner.


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

jeronij

#18
After having changed many many lots in my menus, I have something to say about this ...  ;D

The most important value is the Item Order value. It determines the position from the lot in the menu. The valid values are from -32768 to 32768 (hexadecimal values). To second important value is the item cost, and I wasnt aware of the lot size, but never had problems about that, so I guess it is the third value.

The problem comes when you want to change the occupant group. You can change order in the same menu, and between some menus without problems, for instance, you can move lots from the parks menu to the landmarks menu without problems, and without having to change nothing but the occupant group, but in some cases you cant do this. For some menus, the lots need to have specific properties, and if they are not present, they wont show up. For instance, you can't simply move a park lot to the airport or seaport menus... you have to tweak them and add some properties for this to work. I cant be more precise, because I adapted to this situation, and I moved to where it was simple and easy, but serious experimenting about this issue should be done, prior to release any tool which may do this task.

Other that this, I fully support this idea  :thumbsup: ,specially after having manually changed several hundreds of lots  ::)
I am currently not active - Please, contact Tarkus for any site related matter. Thanks for enjoying SC4D :D


Autism Awareness;  A Father Shares
Mallorca My Mayor Diary


JoeST

QuoteThe valid values are from -32768 to 32768 (hexadecimal values).
May I correct you? The Unit32 field tag allows for 8 hex digits (32Bits), or a number between 0 and 4294967295510 or FFFFFFFF16 which means that it could go between -2147483648 and 2147483648. But I may be wrong, its not like I am a computing student or anything  $%Grinno$%

Joe
Copperminds and Cuddleswarms