Jump to content

548 posts in this topic Last Reply

Highlighted Posts

  • Original Poster
  • Posted:
    Last Online:  
     
    3 hours ago, 11241036 said:

    I've seen that there are submenus for the Residential/Industrial/Commercial menu, but usually, these menus just contain the zoning functions. How can I actually place a ploppable building there? I know, with the availability of the Growify DLL, this makes sense, but I just don't know how. Is it actually enough to put a ploppable lot into the respective submenu?

    Yes, you can add buildings to those submenus, just like for any other submenu, by assigning the submenu ID explicitly. Additionally, ploppable landmarks with jobs as well as ploppable residentials (if correctly modded) will automatically appear in those menus, so a lot of existing content automatically appears there without a need for adding submenu IDs explicitly.

    3 hours ago, 11241036 said:

    Did I understand this right that there are ongoing efforts to sooner or later place all available lots here on the STEX in submenus? Are you planning to update the existing lots, or are you doing that differently? How does that affect any upload that is already submenu-compatible?

    There's certainly not a crew of people that is going to update every lot on the STEX. I don't have any plans for that. However, as part of restoration efforts and general bugfixing, some lots out there have received updates to also make them submenu-compatible, in the same process – mainly thanks to @Tyberius06 and @Ulisse Wolf.

    I think it is important to note that, instead of waiting for something to happen (for someone to do something), this is something where everyone can contribute. If anyone has modified their plugins to move them into submenus, some of that work could be shared. Auxiliary files could be added to the original STEX uploads. Or sets of exemplar patches could be distributed.

    Of course, creators making their own content submenu-compatible would be the best scenario.

    3 hours ago, 11241036 said:

    But I hope you understand that I don't feel like updating all of my files whenever a new version of the Submenus DLL comes out. Is there a way to make that process easier in case the Submenus DLL mod is greatly altered?

    The intent behind the discussion in this topic was to find a common ground for a useful set of submenus – precisely to define a base set anyone can build on. I don't have any plans for further changes, except for the Flora submenus that are still open for discussion. And maybe the other menus that currently lack submenus like fire stations or water utility, but this can be categorized automatically by the DLL.

    3 hours ago, 11241036 said:
    1. Is that a big problem when I'm just putting some of my content into their own submenus? I just think some of my uploads don't fit into any of the currently available categories, e.g. my tunnel relots, traffic blockers, waterfall lots.

    That's fine I think. Some content that does not clearly belong to a submenu is going to remain in the top-level menus anyway. If there's a suitable standard submenu, that should be preferred. For example, there's no need for 10 top-level submenus for different modular park sets. The examples you mention seem quite special though, so there's probably no need to define "standard" submenus for them.

    • Like 4
    • Thanks 1

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    So I tried to modify my first .dat file in order to show up in the "small hospital" submenu. I added the respective property to the building exemplars, but it doesn't show up in the submenu. Apparently I've done something wrong. I have to admit that I haven't used iLives reader before, so I might as well have done something wrong here. Here are the entries of one of the building exemplars. What seems odd to me is that the value doesn't show up in the "value" box, so I assume I did something wrong with adding this property.

    Please feel free to move this subject to another forum topic - I assumed this to be more relevant in connection with the submenu.dll mod then with using the iLive Reader.

     

    Thanks

    Reader.jpg

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     

    @Rady First install the submenu-specific property names for Reader 0.93. This gives you correct names for the new properties (instead of Unknown).

    Value is actually the ID of the Property name. It's automatically filled out if you select the correct name: Building Submenus.

    Data type must by Uint32.

    Values is where you enter the submenu ID.

    2024-11-03_10_37_13.png.95397b40324091dcd7b5165fa7ab8a19.png

    You can also simply copy this property from any other file that already has it instead of creating it from scratch.

    • Like 1

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    Yes! Thank you - working fine.

     

    As I already have a bunch of custom content installed, may I further dwell on the "exemplar patching" method. I don't fully understand what to do:

    1. what exactly is a "cohort" file? How do I create it? Is it just a simple .dat file? How do I set the GroupID? Where would it go (top level of plugins directory?)

    2. Where would I find the Group and Instance ID of the files im pointing to? For example, within the one dat file I already modified, there are three bulding exemplars. In the DIR file there are 6 entries with different combinations of Group and Instance ID.

    Again, sorry if I'm asking because of lack of Reader knowledge, I however havent found a useful manual for using the Reader. If someone coan point me towards a useful guide, I will have a look there.

     

     

     

     

    Dir.jpg

    Small Graveyards.dat

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     
    1 hour ago, Rady said:

    1. what exactly is a "cohort" file? How do I create it? Is it just a simple .dat file? How do I set the GroupID? Where would it go (top level of plugins directory?)

    Just start from an existing Cohort file. For example, open the file "plaza-submenu.dat" which includes a Cohort file for some of the in-game plazas. Copy the Cohort to a new .dat file. Right-click and "Generate new instance" to assign a random Instance ID. Change the Exemplar Name and the other properties.

    2024-11-03_12_30_59.png.05cfd6a89cdc829b338709d48515ac51.png

    These are Group and Instance IDs of building Exemplars contained in SimCity_1.dat.

    Use the field at the bottom to paste a replacement text.

    1 hour ago, Rady said:

    Where would I find the Group and Instance ID of the files im pointing to? For example, within the one dat file I already modified, there are three bulding exemplars. In the DIR file there are 6 entries with different combinations of Group and Instance ID.

    Lot files usually contain Exemplars of Exemplar Type "Buildings" and "LotConfigurations". You'll need the Group ID and Instance ID of the "Buildings" Exemplars only. Only use Buildings Exemplars that contain the property "Item Icon" (otherwise it's a growable or a prop that don't appear in the menus anyway).

    • Like 4

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    About this exemplar patching, I was reading a bit about it yesterday, and I was wondering what exactly enables this. Is it the submenu DLL itself, or is it the resource loading hooks DLL?

    I assume exemplar patching can also be used in the context of the additional building styles DLL, where you create a "patch" exemplar that sets the appropriate properties.

    I'm thinking of updating my sc4 command line tool with some commands that could generate patch exemplars for submenus or building styles for all building exemplars in a certain directory. That would allow us to easily create them for existing plugins as was done for example here.

    • Like 2

    Visit www.growifier.com for ploppable residentials

    Love playing hearts and other card games? Have a look at www.whisthub.com!

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    59 minutes ago, smf_16 said:

    Is it the submenu DLL itself, or is it the resource loading hooks DLL?

    It is a combination of the two. The exemplar patching is implemented in the submenu DLL, and the resource loading hooks DLL provides a way for DLLs to modify exemplars as the game loads them.

    • Like 1

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    So, if I understand correctly, if you want exemplar patching to work for the additional building styles as well, you'd need the submenus DLL to be installed?


    Visit www.growifier.com for ploppable residentials

    Love playing hearts and other card games? Have a look at www.whisthub.com!

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     

    Exactly. I guess the Exemplar Patching functionality could be moved to a third DLL, but I didn't think there's a need to, as the submenus DLL alone doesn't have many noticeable side effects.

    1 hour ago, smf_16 said:

    I assume exemplar patching can also be used in the context of the additional building styles DLL, where you create a "patch" exemplar that sets the appropriate properties.

    Yes, especially after the recent updates to the Additional Building Styles DLL that introduced additional properties. This makes it easy to avoid any conflicts that patching the Occupant Groups property could have had.

    Creating patches to automatically move buildings into submenus is a bit tricky if the buildings themselves don't have enough info to categorize them, but with some configuration options it could work.

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    9 hours ago, memo said:

    but I didn't think there's a need to, as the submenus DLL alone doesn't have many noticeable side effects.

    I agree. You already have that infrastructure in place, so there is no need to move it into another DLL. If the exemplar patching was going to be moved into another DLL, I think that it would probably make more sense to have it be built-in to the resource loading hooks DLL, instead of requiring yet another DLL dependency.

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    2 minutes ago, memo said:

    Exactly. I guess the Exemplar Patching functionality could be moved to a third DLL, but I didn't think there's a need to, as the submenus DLL alone doesn't have many noticeable side effects.

    Well, I could imagine a case where someone wants Exemlar Patching to work, but for some reason does not want their menus to be automatically divided into submenus. It feels "cleaner" to me to have a separate DLL, especially as I see a lot of opportunities for Exemplar Patching in "normal" mods as well.

    7 minutes ago, memo said:

    Creating patches to automatically move buildings into submenus is a bit tricky if the buildings themselves don't have enough info to categorize them, but with some configuration options it could work.

    Yeah, with "automatic" I meant just writing the values in the exemplars, but what values you write needs to be specified as options, not derived from the files. For example, something like

    sc4 set-menu ./path/to/folder 0x12345678
    sc4 set-style ./path/to/folder 0x12345678

    which then generates a patch exemplar automatically for all building exemplars in the specified folder (where the set-menu would filter on having the Icon Group being set).

    • Like 1

    Visit www.growifier.com for ploppable residentials

    Love playing hearts and other card games? Have a look at www.whisthub.com!

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    8 minutes ago, Null 45 said:

    If the exemplar patching was going to be moved into naother DLL, I think that it would probably make more sense to have it be built-in to the resource loading hooks DLL, instead of requiring yet another DLL dependency.

    Agree, I think it would make perfect sense in the resource loading hooks DLL. That's actually what I thought happened before I asked my question.


    Visit www.growifier.com for ploppable residentials

    Love playing hearts and other card games? Have a look at www.whisthub.com!

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     
    8 minutes ago, smf_16 said:

    Well, I could imagine a case where someone wants Exemlar Patching to work, but for some reason does not want their menus to be automatically divided into submenus.

    Then you can just install the DLL without any of the .dat files for the standard menus. There are some edge cases when it comes to third party submenus, but for the most part that should work.

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    6 hours ago, memo said:

    Lot files usually contain Exemplars of Exemplar Type "Buildings" and "LotConfigurations". You'll need the Group ID and Instance ID of the "Buildings" Exemplars only. Only use Buildings Exemplars that contain the property "Item Icon" (otherwise it's a growable or a prop that don't appear in the menus anyway).

    I understand. So the Group and Instance ID are those from the "Parent Cohort" entry od the Building Exemplar?

     

    Cohort.jpg

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    @Rady No, you need to right-click the Exemplar file and then "Copy entry ID". This will copy the TGI of the file to your clipboard. Not sure if there's a way in Reader to actually see it.

    In the meantime however, I've added experimental support for automatically generating submenu patches via a new command to my sc4 command line tool

    sc4 create-submenu-patch

    You can get it via npm with

    npm install -g sc4@next

    More info about this, can be found in this thread. Please note the @next instead of the usual @latest tag, this is for stable versions, which I don't consider it yet for the moment. Once you have this new version, open up a cmd in a folder that contains files that you want to move to a submenu, and then run

    sc4 create-submenu-patch <button_id>

    This will by default scan all .dat and .sc4* files in the current directory (it does not scan directories recursively by default), find all lots that appear in a menu somewhere, and then create a patch file called "Submenu patch.dat" in the current working directory that will move all lots to the menu with the given button id.

    Instead of scanning only the current directory, you can scan multiple directories as well. You can do this by specifying the files as glob patterns, for example

    sc4 create-submenu-patch --output="path/to/output/file.dat" 0x83E040BB folder/* recursive/**/*

    which will scan all files in folder, but no subfolders of it, and all files in recursive and all of its subfolders (due to the **). Run

    sc4 create-submenu-patch --help

    to display the available options in the command.

    I've done some tests myself (most notably with this set of lots) and it seems to be working nicely. Makes it way easier to group lots in submenus instead of having to do it manually in the Reader. Let me know if anyone of you finds any issues. If it's stable enough (I doubt this), I'm thinking of releasing a web tool for this as well (similar to what I did with growifier.com) so that it becomes easier for people who are not familiar with using the command line.

    • Like 6

    Visit www.growifier.com for ploppable residentials

    Love playing hearts and other card games? Have a look at www.whisthub.com!

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    For those who are not familiar with Node and npm, I've found a way to release my sc4 command line tool as a standalone exe as well (Windows only). You can donwload it here. I suggest you save it in a folder that you add to your PATH so that the sc4 command is available in every folder when you open a command prompt. Alternatively you can just put the sc4.exe in the same folder as the files you want to create a patch for. Then open a command prompt in that folder (click on the address bar in Windows Explorer while in that folder, then type cmd and hit Enter). Then you can run the program as

    sc4 create-submenu-patch <menu_id>

    I'm current reworking my command line tool a bit and maybe plan to release it as a general tool on the STEX in the future. Obviously the growify command has been made obsolete by the Growify DLL, but I'm planning to add some more useful commands to it to bulk-edit files, which I think can be useful in this exciting age of submenus and additional building styles where a huge set of existing content will have to be made compatible by hand.

    I'm also planning on documenting on how it can be used as a JavaScript library so people who know a little bit of programming will be able to write custom scripts to do all kinds of fancy stuff. I'll probably open a dedicated thread for that when it's the time. For now, it should already be useful to create submenu patches in bulk.

    • Like 3

    Visit www.growifier.com for ploppable residentials

    Love playing hearts and other card games? Have a look at www.whisthub.com!

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    On 3.11.2024 at 12:40 PM, memo said:

    Lot files usually contain Exemplars of Exemplar Type "Buildings" and "LotConfigurations". You'll need the Group ID and Instance ID of the "Buildings" Exemplars only. Only use Buildings Exemplars that contain the property "Item Icon" (otherwise it's a growable or a prop that don't appear in the menus anyway).

    As expected, I failed to reproduce these steps. I copied the "cohort file" from the plaza submenu, pasted it into a new dat file, clicked "Generate new instance", renamed and saved it. What hits me strange is that this file doesn't have values in the "Parent Cohort" Property? They are all "0x00000"?

    I then opened the first dat file that I would like to be referenced by this exemplar patch, selected the first building exemplar and then selected "Copy entry ID". However, nothing seems to be copied to the clipboard. Insterad, I double-clicked the exemplar file and got into the detail view. Is it possible that these are the values needed? I included the respecitve dat file in case you want to have a look into it. 

     

    Cohort.jpg

    Exemplar.jpg

    Small Graveyards.dat

    exemplar-patch-small-hospital.dat

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    @Rady Have you tried using my command line utility to do it for you? This is a lot easier if you don't have a lot of experience with the reader yet.

    If you do want to do it yourself in Reader, then you can still have a look at this code. I added a lot of comments to make it clear what it's doing, and it's actually these exact steps that you have to reproduce manually:

    • Create a brand new file in reader and add a Cohort file to it. Generate a unique instance for that Cohort.
    • To that Cohort file, add a property with name 0x0062e78a and as values the list of group-instance pairs of the lots you want to put in a submenu
    • To the same Cohort file, add another property 0xAA1DD399 with as values the menu button id (which is also a Uint32, written in hexadecimal).
    • Like 3

    Visit www.growifier.com for ploppable residentials

    Love playing hearts and other card games? Have a look at www.whisthub.com!

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     
    21 hours ago, Rady said:

    What hits me strange is that this file doesn't have values in the "Parent Cohort" Property? They are all "0x00000"?

    That's correct. Parent Cohorts define a hierarchical structure of distinct Cohort files. If a Cohort or Exemplar file references a Parent Cohort, the properties of the Parent Cohort are implicitly included in the original Cohort or Exemplar file. This is generally irrelevant for Exemplar Patches, so the Parent will be 0,0,0.

    21 hours ago, Rady said:

    I then opened the first dat file that I would like to be referenced by this exemplar patch, selected the first building exemplar and then selected "Copy entry ID". However, nothing seems to be copied to the clipboard. Insterad, I double-clicked the exemplar file and got into the detail view. Is it possible that these are the values needed?

    When you open a DBPF file, the main display is a big table listing all its entries (Exemplars, Cohorts, FSHs, etc.). Three of those columns are "Type", "Group", "Instance" – partially visible in your picture. From that table, the Group and Instance IDs for the respective Exemplar files are the ones you're after.

    Also note that, if some of the entries in your file are compressed (Column "Compressed"=Y) and you modify the structure of the file, you usually need to right-click the table to "Reindex" and "Regenerate Directory File" before saving.

    • Like 1

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    Jesus, what I'm drawn into here? I just wanted to have my custom content neatly arranged in my SC4 menu .. instead I'm drowning in a SC4 programmers course :-) Having said this, let me comment on your suggestions:

    On 3.11.2024 at 11:07 PM, smf_16 said:

    More info about this, can be found in this thread. Please note the @next instead of the usual @latest tag, this is for stable versions, which I don't consider it yet for the moment. Once you have this new version, open up a cmd in a folder that contains files that you want to move to a submenu, and then run

    
    sc4 create-submenu-patch <button_id>

    This will by default scan all .dat and .sc4* files in the current directory (it does not scan directories recursively by default), find all lots that appear in a menu somewhere, and then create a patch file called "Submenu patch.dat" in the current working directory that will move all lots to the menu with the given button id.

    I'm not sure whether I understand correctly what this tool will do. My plugins folder is arranged by creater name, not content type. So, of course it is very likely that within one folder there are dat files of different content. Like, my "NBVC" folder contains the files for:

    • Riprap Sewall
    • Rocks ans Stones
    • Stone Paths

    Obviously, I would like to have these plugins show up in different parts of the (custom) menu. For example, I would like to have the Seawalls in a "Sewalls" submenu (probably in the Transport > Ships man menu button), the Rock and Stones in a submenue in the standard "Tree" menu (sorry, I don't remember the correct naming of the standard SC4 menu), and the Stone Paths likewise as a submenu of the "Streets" menu.

    If I start above mentioned command within the NBVC folder - in which custom menu will they show up then? What exactly do you mean by "move all lots to the menu with the given button id"?

    34 minutes ago, memo said:

    That's correct. Parent Cohorts define a hierarchical structure of distinct Cohort files. If a Cohort or Exemplar file references a Parent Cohort, the properties of the Parent Cohort are implicitly included in the original Cohort or Exemplar file. This is generally irrelevant for Exemplar Patches, so the Parent will be 0,0,0.

    When you open a DBPF file, the main display is a big table listing all its entries (Exemplars, Cohorts, FSHs, etc.). Three of those columns are "Type", "Group", "Instance" – partially visible in your picture. From that table, the Group and Instance IDs for the respective Exemplar files are the ones you're after.

    Also note that, if some of the entries in your file are compressed (Column "Compressed"=Y) and you modify the structure of the file, you usually need to right-click the table to "Reindex" and "Regenerate Directory File" before saving.

    Great, understood - except for the last paragraph, but nevertheless I followed your advice :-) Let's see what I can learn form smf_16 with regard to his command line tool ...

    On a side note - thank's for your patience!

     

    • Like 1

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    In the meantime I've released a new version of my command line tool (download link). Instead of needing to open a command prompt, you can now just click it and it will open up an interactive interface by default. Also no need to remember the submenu ids anymore, you can just select them.

    image.png.55141f2c6e101ac3f31b677398d7995f.png

    @Rady you have to understand that the tool will scan a certain directory in which it will find all lots and then put them in a submenu. That means that if you have lots that need to be added to separate menus, you need to first move them to a separate folder, run the tool in that folder, and then move them back. I actually suggest using an approach where you set up a directory structure outside of your plugins folder that looks like this:

    + folder/outside/plugins
    |--+ Highway signage menu
    |  |-- file-1.sc4lot
    |  |-- file-2.sc4desc
    |--+ Landmarks menu
    |  |-- file-3.dat
    |-- sc4.exe
    

    There's no need to actually move the plugins from your plugin folder. Just copy them to this "working directory", run the sc4.exe tool and select the appropriate folders, and then you can copy the generated "submenu_patch.dat" file anywhere in your plugins folder.

    • Like 3

    Visit www.growifier.com for ploppable residentials

    Love playing hearts and other card games? Have a look at www.whisthub.com!

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    1 hour ago, smf_16 said:

    Iyou have to understand that the tool will scan a certain directory in which it will find all lots and then put them in a submenu. That means that if you have lots that need to be added to separate menus, you need to first move them to a separate folder, run the tool in that folder, and then move them back. I actually suggest using an approach where you set up a directory structure outside of your plugins folder that looks like this:

    
    + folder/outside/plugins
    |--+ Highway signage menu
    |  |-- file-1.sc4lot
    |  |-- file-2.sc4desc
    |--+ Landmarks menu
    |  |-- file-3.dat
    |-- sc4.exe
    

    There's no need to actually move the plugins from your plugin folder. Just copy them to this "working directory", run the sc4.exe tool and select the appropriate folders, and then you can copy the generated "submenu_patch.dat" file anywhere in your plugins folder.

    I'm kind of getting it :-) So my next challenge is to get your sc4tool up and running under linux ... I'll keep you posted :D

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    If you're running Linux, then you're better off installing it via npm. You have to install Node.js for this, then fire up a terminal somewhere an type npm i -g sc4@next.  This makes the sc4 command globally available. Just run sc4 then in a terminal and it should start the interactive interface.

    • Like 2

    Visit www.growifier.com for ploppable residentials

    Love playing hearts and other card games? Have a look at www.whisthub.com!

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    I've created a new release of my sc4 tool (download link) with some further improvements. It now supports dragging & dropping files onto the exe. This means that you can just select all files that you want to add to a submenu, and then drag & drop them on the sc4.exe. Subsequently it will open up the interactive interface without the need to specify what files you want it to scan. That way you no longer need to organise everything into a directory, just drag & drop and you're good to go.

    I've also modified the growify, historical and pipes actions to support dragging & dropping an .sc4 savegame. This is especially powerful if you configure Windows to open any `.sc4` files with the exe. That allows you to just double click a city to growify it for example (allthough I still recommend the growify DLL for this). In theory you can also configure it to open `.sc4desc` files with the exe, so the same approach can be used for the submenu functionality as well, but that's probably less useful because you probably don't want to generate submenu patches one-by-one, but in bulk.

    I will probably report on further development in my thread, but specific questions regarding the submenu patching functionality can obviously still be added to this thread.

    • Like 1
    • Thanks 2

    Visit www.growifier.com for ploppable residentials

    Love playing hearts and other card games? Have a look at www.whisthub.com!

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    Just wanted to say the submenu generator is great. It is making it much easier to group my items. That said, I have not figured out how to generate the patch file with a custom ID. When I select that option, enter the ID and run it, the patch does have all the Exemplar Patch Targets but the Building Submenus value is always 0x00000000. I have to edit the file and paste the correct ID. Can you check this out? Thanks

    • Like 2
    • Thanks 1

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    3 hours ago, smf_16 said:

    I've created a new release of my sc4 tool (download link) with some further improvements. It now supports dragging & dropping files onto the exe. This means that you can just select all files that you want to add to a submenu, and then drag & drop them on the sc4.exe. Subsequently it will open up the interactive interface without the need to specify what files you want it to scan. That way you no longer need to organise everything into a directory, just drag & drop and you're good to go.

    I've also modified the growify, historical and pipes actions to support dragging & dropping an .sc4 savegame. This is especially powerful if you configure Windows to open any `.sc4` files with the exe. That allows you to just double click a city to growify it for example (allthough I still recommend the growify DLL for this). In theory you can also configure it to open `.sc4desc` files with the exe, so the same approach can be used for the submenu functionality as well, but that's probably less useful because you probably don't want to generate submenu patches one-by-one, but in bulk.

    I will probably report on further development in my thread, but specific questions regarding the submenu patching functionality can obviously still be added to this thread.

    I just tested the tool with airport lots and noticed that the program is not reading the airport lots preventing the creation of the submenu.

    You can frare experiments with airport lots using these

    https://www.sc4evermore.com/index.php/downloads/download/19-transportation/7-sc4d-LEX-legacy-ultimate-airport-pack

    • Like 1

    Federal Republic of SiculiaFederal Republic of Sonora

       Ain Member  Wiki

    NAM Team - Co-developer of Pedestian Revolution Mod - Railway Department (Hybrid Railway | HRW Expert) - MTA Member - BAT Creator

    Ulisse Wolf YouTube Channel - Ulisse Wolf Mastodon Profile

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    @Ulisse Wolf Seems like the problematic file is "8 Prefabricated Airports/SWAP/Airport_Runways_Expandable.dat". If I remove that file, there are no more errors. I'm not sure why it chokes on this file, but I'm investigating it. It looks like there are two Exemplars in the file with the exact same TGI, but it doesn't show like that in Reader.

    Interestingly it also only finds 129 lots to put in a submenu, while there are definitely more lots in the entire pack. I've investigated it, and looks like there's a problem with the way I determine when a lot appears in a menu. I'm checking two things here: 

    • I check that the exemplar type is set to 0x02 (Building Exemplar)
    • I check that the exemplar has the Item Icon property set (0x8A2602B8)

    However, it's possible that these properties are specified in a parent cohort, and I don't read in values from parent cohorts (as that would require me to parse the entire plugin folder first). If I only check for the Icon property, then there are 789 lots. There are apparently 5 lots that use a parent cohort for their icons. I guess that's acceptable, right?

    Anyway, I'll modify the tool so that it only looks at the Item Icon property, and no longer at the exemplar type. Does anyone have another idea based on what I can identify a lot as appearing in the menu? Something that every lot is guaranteed to have and will not be in a parent cohort.

     

     

    airport.jpg

    • Like 2

    Visit www.growifier.com for ploppable residentials

    Love playing hearts and other card games? Have a look at www.whisthub.com!

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    I've released a new version where I now use the LotResourceKey to determine whether a lot appears in a menu or not. If I remember correctly this is actually what determines whether the lot appears in a menu, and it's also not very likely to appear in a parent cohort. At least it works for the entire airport set now.

    • Like 3

    Visit www.growifier.com for ploppable residentials

    Love playing hearts and other card games? Have a look at www.whisthub.com!

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    On 03/11/2024 at 7:07 PM, smf_16 said:

    I've done some tests myself (most notably with this set of lots) and it seems to be working nicely. Makes it way easier to group lots in submenus instead of having to do it manually in the Reader. Let me know if anyone of you finds any issues. If it's stable enough (I doubt this), I'm thinking of releasing a web tool for this as well (similar to what I did with growifier.com) so that it becomes easier for people who are not familiar with using the command line.

    Hi @smf_16!! Very thanks for this tool! It is very simple to use!!! *:yes: I did simple tests, but the tool is powerful and pratic. I used npm version and a just file with a lot of lots (MYOS Make Your Own Sign) and it works very well.

    672e94415e4fa_Capturadetela2024-11-04161208.png.093ec1e97212133e434b2da2d517ea0c.png

    672e944654f3b_Capturadetela2024-11-04162656.png.f6b0df14a776dfe830b814bac10a90bc.png

     

    On 05/11/2024 at 4:31 PM, smf_16 said:

    For those who are not familiar with Node and npm, I've found a way to release my sc4 command line tool as a standalone exe as well (Windows only)

    That's nice!!! Thanks! 

    7 hours ago, smf_16 said:

    I've created a new release of my sc4 tool (download link) with some further improvements. It now supports dragging & dropping files onto the exe.

    That's very nice! Thank you so much. *:yes: I prefer the "exe" although I have used and have no problems using node.js.

    Is it possible to indicate (via the command line) a png image to be added to the submenu output file? *:)

     

    • Like 2

    "Nenhum sucesso no mundo compensa o fracasso no lar." - "No other success can compensate for failure in the home."
    Como fazer da sua família um time de sucesso! - How to make your family a successful team!
     

    Share this post


    Link to post
    Share on other sites

    Sign In or register to comment...

    To comment in reply, you must be a community member

    Sign In  

    Already have an account? Sign in here.

    Sign In Now

    Create an Account  

    Sign up to join our friendly community. It's easy!  

    Register a New Account


    ×

    Thank You for the Continued Support!

    Simtropolis depends on donations to fund site maintenance costs.
    Without your support, we just would not be in our 24th year online!  You really help make this a great community. *:thumb:

    But we still need your support to stay online. If you're able to, please consider a donation to help us stay up and running. This helps sustain a platform where we can share our community creations for years to come.

    Make a Donation, Get a Gift!

    Expand your city with the best from the Simtropolis Exchange.
    Make a Donation and get one or all three discs today!

    STEX Collections

    By way of a "Thank You" gift, we'd like to send you our STEX Collector's DVD. It's some of the best buildings, lots, maps and mods collected for you over the years. Check out the STEX Collections for more info.

    Each donation helps keep Simtropolis online, open and free!

    Thank you for reading and enjoy the site!

    More About STEX Collections