Jump to content

548 posts in this topic Last Reply

Highlighted Posts

Posted:
Last Online:  
 

Unfortunately, yes. It uses Node 22 under the hood, which does not support Windows 7 anymore. I know it's not feasible for everyone, but as Microsoft has dropped support for Windows 7, I strongly advise upgrading to at least Windows 10.

If you're still on Windows 7 because your main computer is a Mac, then I might be able to release a version for Mac as well. It would require transferring files between your Mac and Windows, so not ideal, but it is a possible workaround.

  • Thanks 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:  
 
27 minutes ago, smf_16 said:

Unfortunately, yes. It uses Node 22 under the hood, which does not support Windows 7 anymore. I know it's not feasible for everyone, but as Microsoft has dropped support for Windows 7, I strongly advise upgrading to at least Windows 10.

If you're still on Windows 7 because your main computer is a Mac, then I might be able to release a version for Mac as well. It would require transferring files between your Mac and Windows, so not ideal, but it is a possible workaround.

No, that's not necessary. I'll just use linux version then.

  • Like 1

Share this post


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

I don't have access to Linux myself unfortunately, so hard to verify what's going on, but could you paste a screenshot of what you're seeing when it freezes?


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:  
 
17 hours ago, smf_16 said:

I don't have access to Linux myself unfortunately, so hard to verify what's going on, but could you paste a screenshot of what you're seeing when it freezes?

Sure, here it is.

new submenus hiccup.JPG

Share this post


Link to post
Share on other sites
Posted:
Last Online:  
 
10 hours ago, Vena Marissa said:

Sure, here it is.

new submenus hiccup.JPG

At this point, it should open a browser window. Maybe the browser opens in the background?

Bildschirmfoto vom 2024-12-08 22-08-25.png

Share this post


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

Definitely seems to be an issue with the browser not opening indeed. It should probably work if you open the url manually, but unfortunately the tool picks an open port at random, so the url isn't very predictable. I will try to show the url in an next version (something like visit "http://localhost:<PORT>" if the browser doesn't open automatically.

As a workaround for now, you might need to figure out the port that is being used by the command line tool, and then once you have that, visit http://localhost:<PORT> in your browser. I don't know how to figure out the ports that are used by a certain process on Linux though, but I'm sure you can find it somewhere on the internet.


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:  
 

@smf_16 It's working now but, is it possible if I can just select the icon directly through terminal instead have to open a browser first in the next version?

icon picking.JPG

Share this post


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

@Vena Marissa There's actually a very good reason why it uses the browser and does not ask you to select it via the terminal. That's because this way the icon template can be applied automatically to any image you upload. Otherwise you'd have to apply the icon template manually using something like GIMP or Photoshop. With the browser, I can use the canvas api to do that automatically. It also allows copy-paste and drag-and-drop functionality.

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

I have to come back here with some issues I seem unable to solve on my own.

#1) Item Order: I understand that setting the item order will effect the position within the games menu. Obviously, I would like to have my custom menus on top of each menu. However, I don't understand how to figure out the item order property values of the menu entries already existing (either vanilla or from this mod).

#2) MMPs seem to have their own will. I added some of them to different custom submenus, but they insist on showing up in different places (I guess most of them decide to go to the flora menu. Am I doing something wrong here?

 

Share this post


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

I have to come back here with some issues I seem unable to solve on my own.

#1) Item Order: I understand that setting the item order will effect the position within the games menu. Obviously, I would like to have my custom menus on top of each menu. However, I don't understand how to figure out the item order property values of the menu entries already existing (either vanilla or from this mod).

#2) MMPs seem to have their own will. I added some of them to different custom submenus, but they insist on showing up in different places (I guess most of them decide to go to the flora menu. Am I doing something wrong here?

 

Question 1: The item order is based on a hexadecimal number. The higher the number, the further to the bottom of a menu the item appears. You can use negative numbers, if you want, by making the first digit after the 0x a F, and then counting backwards (e.g. 0xffffffff = -1, 0xfffffffe = -2). By the way, Maxis items have very low positive numbers, and if you don't use the Item Order property at all, it counts as 0.

To make your menus appear above other items, you just need to make sure they use a lower value in the Item Order property than all other items.

Question 2: Somehow, the MMP's are working differently than lots. Please read this post how to modify MMP's to make them be listed in submenus; I can confirm it works, but I seriously don't know why:

 

  • Like 2

11241036 Lotting/Modding Thread - Support for all of my uploaded plugins

Visit my CJ Maxiland, where I'm taking on an enlarged version of Timbuktu!

 

Share this post


Link to post
Share on other sites
Posted:
Last Online:  
 
6 minutes ago, 11241036 said:

You can use negative numbers, if you want, by making the first digit after the 0x a F, and then counting backwards (e.g. 0xffffffff = -1, 0xfffffffe = -2)

Small addition: in my cli, you should be able to input actual negative values as well. Under the hood these should be converted to the proper "backwards" number (though I have not verified this).


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:  
 
15 minutes ago, papiouuu said:

How do you delete the default custom menus?

In the submenu folder just delete the ones you do not want.

the whole folder such as  COMMERCIAL or the individual ones inside each folder

  • Like 1

Share this post


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

A question directed towards whoever knows the answer:

Is the ResourceLoadingHooks dll required for submenu functionality/plugin stability, or can it be ignored if runtime alteration of plugins is not a desired feature?

Share this post


Link to post
Share on other sites
Posted:
Last Online:  
 
31 minutes ago, xnight34 said:

ResourceLoadingHooks dll

If the submenu uses exemplar patching, pretty much. If not, it's not required. The core functionality is there if you don't have it. But most of the provided and third party submenus won't function since they often use exemplar patching.

  • Yes 1
  • Thanks 2

Share this post


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

Is there a way to sort the entries within a submenu? I've created a submenu for the WMP Rural Docklands, which consist of four parts:

  • RD Set 1, 2 & 3
  • RD Expansions Set

In order to be quicker when building, I would like to have the different lots to appear grouped. I tried to achieve this by numbering the folders:

1_WMP_RDock_Set1
2_WMP_RDock_Set2
3_RDE
4_WMP_Docklands3
 

However, within the submenu, RD set 3 shows up first, followed by set 1 and 2, these beeing mixed up with the lots from the RDE set.

 

 

Share this post


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

    Is there a way to sort the entries within a submenu?

    Yes, the order is the same as when submenus aren't used. It is controlled by the Item Order property of the Building Exemplars of the lots. If two lots have the same Item Order, they are sorted by price.

    • Like 2

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    On 9.12.2024 at 11:28 PM, 11241036 said:

    Question 1: The item order is based on a hexadecimal number. The higher the number, the further to the bottom of a menu the item appears. You can use negative numbers, if you want, by making the first digit after the 0x a F, and then counting backwards (e.g. 0xffffffff = -1, 0xfffffffe = -2). By the way, Maxis items have very low positive numbers, and if you don't use the Item Order property at all, it counts as 0.

    To make your menus appear above other items, you just need to make sure they use a lower value in the Item Order property than all other items.

     

    I Have to come back at this "Item Order Property". Looks like I'm missing some basic maths knowledge. In order to have my custom menus topmost, I want to enter negative numbers, which I only can do using the hex system.However, if I convert say -1 into hex (by using any of these decimal>hex-converters found online, I end up with FFFF, not 0xffffffff?

     

     

    • Like 1

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    24 minutes ago, Rady said:

    I end up with FFFF,

    That's just the shorthand for 0xffffffff. Negative numbers in computer is complicated sometimes. To this day, I can't fully grasp the concept. It involves something called null-one complementary or something like that.

    • Like 1

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    33 minutes ago, Jidan said:

    It involves something called null-one complementary or something like that.

    Two's complement.

    1 hour ago, Rady said:

    (by using any of these decimal>hex-converters found online, I end up with FFFF, not 0xffffffff?

    For a 32-bit number (Sint32), you can just add 4 F values to the left of the number. It looks like the online converters is using Sint16 instead of Sint32. You can also use the built-in Windows calculator in Programmer mode. It defaults to 64-bit numbers (QWORD), but can be changed to 32-bit (DWORD), 16-bit (WORD) or 8-bit (BYTE) by clicking that label.

    • Like 3

    Share this post


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

    Basically it all comes down to how the raw bytes are interpreted by the computer. In memory, only 0 and 1 exist, where ff is actually shorthand for 11111111 - 8 bits, meaning a byte. Now, if you tell the compiler that this byte is an unsigned 8 bit integer, then it can hold values between 0 and 255 inclusive, and ff is interpreted as 255. However, you can also tell it that the byte is actually a signed 8 bit integer, which means it can hold values from -128 to 127 inclusive. In that case ff is usually interpreted as -1 because of two's complement, which is just a conventional way of representing negative numbers with only 0 and 1 at your disposal. 0x80 is interpreted as -128.

    The same logic can be extrapolated to 16-bit, 32-bit or 64-bit numbers, but what's important to realise is that in order to properly interpret a number, you need to know the size in bits! That's why if you use an online hex converter, it's important to specify the size.

    Now, the item order property is a signed 32-bit integer, which means it can only hold values between −2,147,483,648 and 2,147,483,647. That means that if you input anything lower than -2,147,483,648 (0x80000000 written in two's complement), it overflows back to 2,147,483,647 because 0x80000000 - 1 is 0x7fffffff, which is 2,147,483,647 when interpreted using two's complement for 32 bit integers.

    • Confused 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:  
     

    By the way, I recently discovered an interesting quirk in the game that is also related to how bytes are interpreted. The game uses 64-bit signed integers for anything related to the budget. For example, demolishing costs in the network subfile are stored as a 64-bit little-endian integer, but when using the bulldoze tool, the ui of the game seems to intepret the first 4 bytes as an unsigned 32 bit little-endian integer. This means that if you set the demolishing costs of a tile to ff ff ff ff ff ff ff ff, which is -1§ when using two's complement for 64-bit LE integers, the bulldoze tool only reads the 4 first bytes ff ff ff ff and interprets this as a 32-bit unsigned integer, which means it shows that demolishing that tile will cost you §4,294,967,295, but when you actually demolish it, you get §1! Again, that's because in memory, all there is are 0's and 1s. It's just a matter of how you interpret this string of 0 and 1's.

    • Like 5
    • Confused 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:  
     
    On 10/15/2024 at 8:24 AM, Ulisse Wolf said:

    There already seems to be a consensus on content for airports so here is the second round for the airport menu and this time it also includes the airport menu for MMP

    I have been working on some (more) new airport lots, and I wanted to make them forward-compatible with this submenu structure. I also want to update my previous uploads to be compatible. I wanted to make sure I was doing it correctly, so to test this, I ended up building my own copy of some of the submenus under modular airports structure, in line with the IDs and structure you said in this post @Ulisse Wolf

    I also then wanted to test and play with the patch-creating function of the @smf_16 SC4 tool. 

    The point of my post is to say, I am now a decent way through creating a copy of these submenus and patching many airport lots (and getting familiar enough to do the rest quickly - though I haven't created any custom icons etc yet). It's helpful for my own needs right now, but is it helpful if I finish and share as well? 

    • Like 2

    Share this post


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

    Yes, I think it's definitely valuable to share it. I've already been thinking a bit about this, and I think it makes sense to collect as many submenus as possible in a kind of community effort.

    My idea for this would be the following. Let's create a repo on Github that has a specific folder structure that mimicks the menu structure from the game. Every folder has exactly 1 file called submenu.dat that contains the submenu definition itself, and possibly a lot of other files, preferably called package-id.dat that contains the exemplar patch that puts certain content in that submenu. It can also contain a lot of other folders that represent different submenus, each in turn containing a submenu.dat, package-id.dat and more subfolders.

    It should then be possible to create a build script that does two things:

    • Compile everything into a flat structure so that it can easily be downloaded and installed in your plugins.
    • Generate appropriate metadata for sc4pac so that every submenu has a dependency on its parent submenu. This means that if you install a submenu, for example with sc4pac add submenu:t-wrecks-industrial-revolution-mod-i-m-filler-set-1, then it installs all the required parent submenus as well.

    I'm not sure if it's clear what I'm saying, but it will be clearer id I get the chance to set up a proof of concept. I'm currently working on a lot of sc4pac stuff, but perhaps I can set something up soon.

    So yeah, the gist is: I think it's definitely useful to share them when you're finished.

     

    • 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:  
    Currently: Viewing Topic: Simtropolis Returns!
     
    4 hours ago, JoelMk2 said:

    I have been working on some (more) new airport lots, and I wanted to make them forward-compatible with this submenu structure. I also want to update my previous uploads to be compatible. I wanted to make sure I was doing it correctly, so to test this, I ended up building my own copy of some of the submenus under modular airports structure, in line with the IDs and structure you said in this post @Ulisse Wolf

    I also then wanted to test and play with the patch-creating function of the @smf_16 SC4 tool. 

    The point of my post is to say, I am now a decent way through creating a copy of these submenus and patching many airport lots (and getting familiar enough to do the rest quickly - though I haven't created any custom icons etc yet). It's helpful for my own needs right now, but is it helpful if I finish and share as well? 

    I have not yet started work on the airport submenu that I am currently busy with Terrain mods. So if you want to create the icons feel free to do so

     

    1 hour ago, smf_16 said:

    Yes, I think it's definitely valuable to share it. I've already been thinking a bit about this, and I think it makes sense to collect as many submenus as possible in a kind of community effort.

    My idea for this would be the following. Let's create a repo on Github that has a specific folder structure that mimicks the menu structure from the game. Every folder has exactly 1 file called submenu.dat that contains the submenu definition itself, and possibly a lot of other files, preferably called package-id.dat that contains the exemplar patch that puts certain content in that submenu. It can also contain a lot of other folders that represent different submenus, each in turn containing a submenu.dat, package-id.dat and more subfolders.

    It should then be possible to create a build script that does two things:

    • Compile everything into a flat structure so that it can easily be downloaded and installed in your plugins.
    • Generate appropriate metadata for sc4pac so that every submenu has a dependency on its parent submenu. This means that if you install a submenu, for example with sc4pac add submenu:t-wrecks-industrial-revolution-mod-i-m-filler-set-1, then it installs all the required parent submenus as well.

    I'm not sure if it's clear what I'm saying, but it will be clearer id I get the chance to set up a proof of concept. I'm currently working on a lot of sc4pac stuff, but perhaps I can set something up soon.

    So yeah, the gist is: I think it's definitely useful to share them when you're finished.

     

    I like this idea of using github which can simplify the creation of submenus.

    Also we can incorporate this idea with my idea of using github as a repository of SC4 mods that use LUA code.  These are two PoCs that I am currently working on as

    https://github.com/UlisseWolf/Five_Nights_at_Freddy_News_Ticket_SC4

    https://github.com/UlisseWolf/Colossus_Addon_Mod

    • Like 3

    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:  
     

    Alright, I've created a repository that explains my idea for the submenu collection (view it on GitHub here). I've added a small readme to it that explains the idea more into detail, but the gist is that adding new submenus is as easy as creating a new folder with a _menu.yaml and _icon.png file. Then you can add lots to that submenu by adding text files that contain all the Group/Instance pairs of the building exemplars that need to be moved to that submenu. Have a look at https://github.com/sebamarynissen/sc4-submenu-collection/tree/main/src/300-transport/400-misc/600-parking/100-kosc-modular-parking for an example.

    There is no build script for it yet, so it's not functional for the moment, but I have everything in place in my https://github.com/sebamarynissen/sc4 repo, so it's just a matter of writing the code, which I will try to do shortly.

    @Ulisse Wolf Tell me what you think about this. I'd be happy to add you (and probably @memo as well) as collaborators to the repository once it's functionality so that you can curate the "community submenus".

    • Like 4

    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:  
    Currently: Viewing Topic: Simtropolis Returns!
     
    1 hour ago, smf_16 said:

    Alright, I've created a repository that explains my idea for the submenu collection (view it on GitHub here). I've added a small readme to it that explains the idea more into detail, but the gist is that adding new submenus is as easy as creating a new folder with a _menu.yaml and _icon.png file. Then you can add lots to that submenu by adding text files that contain all the Group/Instance pairs of the building exemplars that need to be moved to that submenu. Have a look at https://github.com/sebamarynissen/sc4-submenu-collection/tree/main/src/300-transport/400-misc/600-parking/100-kosc-modular-parking for an example.

    There is no build script for it yet, so it's not functional for the moment, but I have everything in place in my https://github.com/sebamarynissen/sc4 repo, so it's just a matter of writing the code, which I will try to do shortly.

    @Ulisse Wolf Tell me what you think about this. I'd be happy to add you (and probably @memo as well) as collaborators to the repository once it's functionality so that you can curate the "community submenus".

    That should be fine. I am waiting for the script for final evaluations


    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

    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