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

Andreas

I don't think that "Lot Size" will affect the menu order. As said before, the most important property is "Item Order", followed by "Plop Cost". I believe that the third one is either the lot or building exemplar ID.
Andreas

jeronij

Quote from: star.torturer on February 12, 2008, 09:35:01 AM
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

I should have said "The valid values are from -32768 to 32768 (hexadecimal values) if I recall correctly"  ::)

Anyway, my experience says that these are the valid values  ;)
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


HandsOn

Quote from: jeronij on February 12, 2008, 09:04:36 AM...  ;D
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've always been lazy - especially when it comes to anything around computers. Thus I go for simplicity first -complexity, if it must, can come later. I still maintain that first task is to import some order. And now that we know this can be done, can someone tell me where I have to look if I want to do it - manually or programmatically? Changing the occupant group seems a - remote - secondary issue.. ()what()


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

jeronij

Every building exemplar has a property called Item Order. Iy may be present or not. If it is not present, you can add it by rigth clicking on the exemplar properties list (rigth side of the Reader screen) and selecting Add property. If you double click on the property you will open it and you can modify the value there. If you use the bottom field of the Exemplar Edit screen, you can introduce the decimal value, and when you hit Apply, the Reader will change it to the appropriated Hex value.

Programatically speaking.... no clue at all  $%Grinno$%
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

DONT BELIEVE THIS WITHOUT CONFIRMATION FROM SOMEONE ELSE:

The "record" in the sc4 file is referenced by its own ID called Instance, and the "record" type that you want is compound by Type: 0x6534284A and Group: 0xAD4BA465. The Property in that record has a Name of Item Order and a NameValue of 0x8A2602B9 where the DataType of this record is Unit32 (with range of -32768hex to 32768hex, according to JeroniJ) Rep of 0 (??) and 1 Value of the order wanted.

Hope this is right, and hope it helps

Joe
Copperminds and Cuddleswarms

RebaLynnTS

#25
Based on my lots I am working on right now, plop cost has no baring at all, on the order. In fact, other than Item order, I have not been able to find out what factors are effecting it.

Edit: Further testing reveals I was wrong (Brain fart, I forgot I had already changed the item order in a few of my lots as an experiment)
Becca

Look for me at ... Becca At Bat

jplumbley

For those confused about why Occupant Groups *should* be included in such a program.   This has nothing to do with changing the type of the lot, OGs (Occupant Groups), deal with much more beyond the type of lot and the building style.  The BSC has OGs for the BSC tracking mods, there are OGs for which Building Style you want the building to grow in, OGs for which type of lot it is (R, C, I), OGs for which menu the ploppable lot is to be placed in.

So, each menu has its own OG.  What if you have a set of landmarks you that you have and want them placed in the parks menu?  Then you will have to change the OG from the Landmark Menu and change it to the Parks Menu.  Now, the problem with changing the OG list, is every lot has a custom OG list and you only want to change one of them.  Im sure this is avoidable, but.. its a problem that must be dealt with.
___________________________________________________________

As stated already, there is 3 determining factors on how the game orders something in the menus:

1. Item Order Property

The lower the number the higher the position on the menu.  So, if one lot has a 1 and another lot has a 4 the lots with the 1 will be placed first.

2. Lot Size

When a lot has the same Item Order Property value, it will then place the lots in order of thier size.  Like so,

1x1
1x2
1x3
2x2
2x3
3x2
3x3
4x4
etc.

3.  Item Cost

Finally, if the Item Order and the Lot Size are the same the game will order the lots by cost.  Like so:

2x2, $100
2x2, $150
2x2, $175
_____________________________________________________________________

Hopefully, this makes a bit more sense.  I think the original poster has a very good idea and it can be implemented quite well.  It is widely known, that your menus are a mess and this can only help you finding stuff if you setup the Item Orders yourself.  Good luck on this program and I hope someone will actually do it.  ::)
"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

JoeST

QuoteIt is widely known, that your menus are a mess and this can only help you finding stuff if you setup the Item Orders yourself
LOL, how true, I just spent all day sorting out my Item Orders, and they still appear all over the place, there is still no real structure, except a very rough grouping

Quote2. Lot Size

When a lot has the same Item Order Property value, it will then place the lots in order of thier size.  Like so,

1x1
1x2
1x3
2x2
2x3
3x2
3x3
4x4
etc.
I am contemplating that this is more on the Area of the lot, than the Lot Size. Just a contemplation, but maybe not

Joe
Copperminds and Cuddleswarms

RebaLynnTS

I will be more than happy to write the program, as soon as I find out how to read and write to and from sc4 files.
Becca

Look for me at ... Becca At Bat

HandsOn

Quote from: RebaLynnTS on February 12, 2008, 12:56:25 PM
I will be more than happy to write the program, as soon as I find out how to read and write to and from sc4 files.

That, ladies & gentle men, is the crux of the matter: thus, lest I repeat myself: where can that data be found. Is it the DAT file? But then, not every plug-in seems to have one (I maybe talking through my hat here).


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

RebaLynnTS

The info in question is in the building exemplar of the lot, or the buildings desc file. How to read it programatically is the only problem I have.
Becca

Look for me at ... Becca At Bat

HandsOn

Quote from: RebaLynnTS on February 12, 2008, 03:35:23 PM
The info in question is in the building exemplar of the lot, or the buildings desc file. How to read it programatically is the only problem I have.

Havent looked (it's late, too late here in the land of beer), but what lingo is it written in? I doubt it would be something as simple as ASCII text. But then thos brilliant folks who wrote the Reader and similar tools do read the exemplar, thus can they not tell us?


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

dragonshardz


Andreas

Quote from: HandsOn on February 12, 2008, 03:32:46 PM
That, ladies & gentle men, is the crux of the matter: thus, lest I repeat myself: where can that data be found. Is it the DAT file? But then, not every plug-in seems to have one (I maybe talking through my hat here).

Well, and that's exactly why I said it wouldn't be feasible to re-invent the wheel once again. ;) ilive wrote the Reader that is able to read and write SC4 files, then DarkMatter wrote DatGen, simrolle wrote SC4Tool, and wouanagaine wrote the X-Tool. Unfortunately, every program was written in another language, and the wheel (reading and writing DBPF files) was reinvented four times...
Andreas

RebaLynnTS

Fortunately, I can program in 38 languages, so if I get the info, all I have to do is use it.
Becca

Look for me at ... Becca At Bat

xxdita

Quote from: jplumbley on February 12, 2008, 12:10:45 PM
For those confused about why Occupant Groups *should* be included in such a program.   This has nothing to do with changing the type of the lot, OGs (Occupant Groups), deal with much more beyond the type of lot and the building style.  The BSC has OGs for the BSC tracking mods, there are OGs for which Building Style you want the building to grow in, OGs for which type of lot it is (R, C, I), OGs for which menu the ploppable lot is to be placed in.

The same argument could be applied to why it shouldn't be included in this program, but instead to something else already in development. Adding OG's is something that needs to be done to every building that is to be used in the game in order for it to function correctly. So to me, this sounds like a job for XTool.

jplumbley

Quote from: xxdita on February 12, 2008, 07:06:18 PM
The same argument could be applied to why it shouldn't be included in this program, but instead to something else already in development. Adding OG's is something that needs to be done to every building that is to be used in the game in order for it to function correctly. So to me, this sounds like a job for XTool.

Well, I am not saying this should or shouldnt be made... just pointing out what needs to be taken into consideration and it seems as though in this thread some people have bad information and I was just trying to sort out that information with some good info.  ::)
"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

RebaLynnTS

We can always use more of that good info stuff :)
Becca

Look for me at ... Becca At Bat

JoeST

#38
After a quick search on teh internetz, I found this (from Sims2Wiki) which continues to List of Formats by Name

FOUND ST RESOURCE: http://www.simtropolis.com/forum/messageview.cfm?catid=40&threadid=84838&enterthread=y

Looks like thats the business...

Joe
Copperminds and Cuddleswarms

andy33b

Quote from: HandsOn on February 11, 2008, 08:08:43 AM
Stupid question: does it have to be done in Delphi 7?? Or could it be done in any language (say C#, VB8, etc..)?
It's the language I am "more-or-less" able to program. The other option I have is LabVIEW, but I don't think it would be appropriate  ;). Delphi (at least in version 7) doesn't need any runtime library, just take the exe and run it.

Quote from: HandsOn on February 12, 2008, 07:38:28 AM
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.
That's why I'd like to be able to change the menu where the icon shows up...

Quote from: jplumbley on February 12, 2008, 12:10:45 PM
For those confused about why Occupant Groups *should* be included in such a program.   This has nothing to do with changing the type of the lot, OGs (Occupant Groups), deal with much more beyond the type of lot and the building style.  The BSC has OGs for the BSC tracking mods, there are OGs for which Building Style you want the building to grow in, OGs for which type of lot it is (R, C, I), OGs for which menu the ploppable lot is to be placed in.
To complete your posting: this thing holds several numbers, at least one for each menu. Eg. one for "transportation tools" (top menu), one for "misc transportation" (submenu) and maybe a few more. So if you'd like to change the place of an icon from "misc transportation" to "education", be sure to filter out and replace more than one number, or your occupant group ends with "transportation tools" & "education" and you won't find your icon anymore, since "education" isn't part of "transportation tools" but "civic tools".

...oh, I haven't said. The base of my Idea was a tool from ST that is named "RudeBoy's menu divider". It implements:

  • different "fake"-lots (just an Icon in the menu) to "divide" the menus (eg. misc transportation or parks) into various sections... That's not the part I'm refering to  :P, it's next...
  • a huge excel-sheet with order-values 0...0xFF??? for each game-menu. One put the filename, instance-number, and description of a lot at the wanted place in the excel-sheet and transfers the according order-value in the Reader into "item order". This way the menu-icons gets the order you like.
    Problem with this method is, you need "a few" night-shifts of handwork  :-[ if your plugin folder has 1GB or more. I'd like to have this process a bit automated and shortened.

-andy33b-