Jump to content
RobertaME

(Mod) AMPS Development Thread

785 posts in this topic Last Reply

Highlighted Posts

  • Original Poster
  • Posted:
    Last Online:  
     

    UPDATE!

    Beta version 0.3.2 is now up on the STEX!

    • Like 4

    Share this post


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

    The lack of updates so far is because everything is going well with my transition to AMPS. I've turned another couple of cities (helped in no small part by a conveniently powerful, non-AMPS plant to supplement the shortcomings) and I have kept on playing.

    Now, I have run into some inconveniences, though just on the gameplay side. If it helps you, here are some things that have been kind of bothering me (and feel free to disregard them, of course):

    • There's a bit of a double whammy (triple, really, but more on that below) trying to implement AMPS in cities with terrain constraints. My region, with several cities built on steep slopes, or in thin slivers of coastal land, has several cities where I had to deindustrialise because, even for Hi–Tech, the density available is no match for what commerce or residential properties enable (not to mention the need for specific infrastructure to serve industrial needs, like freight rail and seaports). So, in the push for denser development, AMPS punishes me by taking away the strongest transformers and plants, since those are locked away behind Industrial population thresholds. Commercial lots consume a lot of juice, too!
    • On the topic of transformers, and electrical infrastructure in general: I feel like the park and landmark penalties are far too steep, especially their radius. For this one, a bit of context: during a time period in my late teens, I lived not too far from an electrical substation in Santiago, Chile. Now, I don't know how powerful this substation was, but I lived about 200 meters from it, which in SimCity tiles is about, 12? I do not ever remember hearing its 60hz buzzing, and this wasn't even a particularly loud neighbourhood -- as you can see in the photo below, it's mostly single-story, middle-class housing.

    huAzlYW.jpeg

    • (cont.) Now, 12 tiles is similar to the attenuation of a 2 MV distribution substation and I don't actually know how much Subestación La Reina was rated at -- but for what it's worth, it's got a five-star rating (?) and it looks pretty gnarly.
    • "So just put street transformers", I hear you say. Well, the thing about those, theoretically rated for low-density residential use, is that they're no good for small housing because you can't put residential lots pointing at them. Not to mention, I can't use them with anything but the default street, and also, I'd have to place around like a million of them. I actually have an idea for this, but more on that below.
    • So all of this makes me think: why can't we build any buried or otherwise sound-attenuated transformers and substations? I know they exist: for one, I live in downtown Buenos Aires, which lights up at night without having a single substation nearby and has at least two substations in a 10-block radius that I hadn't known of up until I started writing this post! Of course, my neighbourhood is pretty loud, but I've lived here for years without even worrying myself with the electrical infrastructure of the neighbourhood, and that is despite having rolling blackouts every single summer because of the unbearably hot, humid weather. I also know there's at least one electrical substation, this one feeding Line B of the B.A. Subte, literally on an unused platform on the most used station in the entire system -- yet I only know of its existence because I'm a huge train nerd (on a SimCity forum? Go figure). Here's a link in Spanish, in case you're interested. So, is there a chance for some sort of partly-buried, attenuated substations? Maybe at a hefty efficiency/cost penalty, I wouldn't mind paying extra.

    Finally, going back to the streetside transformers: I know we use them here in Buenos Aires (because the one serving my building exploded and left us with no power for a week in the midst of summer 2024) and they're actually quite pervasive. So, even though this would require substantial collaboration with, I don't know, the NAM team or someone, couldn't these transformers be automatically placed? Just add a random prop to show up every 10 street tiles or so, like with other street props, and then calculate a certain "base" transformer rate on account of street mileage. I don't know if suggesting this devalues AMPS and all that, but I think it could add a measure of realism.

    Well, it's a bit of a rambley post, but I had been thinking about this for a while and I wanted to get it all out. I'm also currently hooked on a Holter pressure monitor and it's breaking my concentration at regular intervals, so sorry if this looks all a bit… disjointed. The technical side of AMPS is working as intended, for what it's worth, but I felt like I had to say something besides "all's good".

    • Like 6
    • Thanks 1

    Check out Isla Bonita!

    Share this post


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

    The lack of updates so far is because everything is going well with my transition to AMPS.

    Glad to hear it!

    15 hours ago, Girafarig said:

    I have run into some inconveniences, though just on the gameplay side.

    AMPS was developed first by my brother and me as a set of rules we imposed on ourselves while building cities together to make them more realistic. (I did the plopping and bulldozing and stuff while he said, "put this there!" It was always a blast!) When we started making it as an actual mod in 2021 we were lucky enough to have @Kloudkicker and @Simmer2 here to make lots for AMPS. Unfortunately both of them seem to have been gone a while and you do NOT want me to make lots... I'm a terrible artist! (seriously, stick figures are high art for me!)

    As such, unless someone is willing to make alternative Transformer lots, the ones we have are all that will be. I'm more than willing to support an alternative lot set to @Kloudkicker's Transformers and @Simmer2's Substations, but someone would have to make them. (I'm also kinda picky in that they should be realistically sized and placed)

    Upthread there was a discussion about using props to put in PV panels on houses at random. It was decided that even if it were feasible it wouldn't be a good idea since it would throw a big monkey wrench into power management. (much like it does IRL, but that's just a little too much realism because it would be a big pain to deal with) Doing that with Transformers, such an important and integral part of the electric grid that everything else is dependent on would be chaos incarnate.

    IRL power companies place transformers wherever needed to keep lines short because Household voltage is subject to much higher resistance losses than Distribution voltage, decreasing efficiency and increasing load demand. In an ideal world we would simulate that in SC4 by having power only carried to RCI lots by transformers instead of being carried through zoned and plopped lots, but that's not possible given the limitations of the game engine. As such AMPS developed as a series of "give and take" concepts. While higher rating transformers are cheaper and more efficient per kVA they handle, they have the downside of being "eyesores" and have a definite NIMBY effect.

    This is actually very common IRL : a new substation was built near a housing tract where I live and property values within a few hundred yards plummeted. Even if you can't hear the hum, (most people can't) they're ugly and quite a number of people think they're dangerous to be around. What the city did to combat this was to put in green-space around the substation and beautified it, hiding most of it behind trees... and within months property values were back up. In SC4 this is reflected with just placing a few parks or plazas near your power facilities. In one city I'm testing I have a 10 MVA Transmission Station (the worst offender for negative Park and Landmark ratings) right next to a business district.

    Example.jpg.a471035d170cc2e7d91b6f358f75c2f6.jpg

    As you can see, with adequate parks and plazas around, (and the odd Mayor's statue) the effect of even -500 Park and Landmark rating with a 45 tile radius can be completely negated. It's just a matter of finding the balance. (many of those lots with parks and things above aren't even usable because they're more than 3 tiles from a road, so it's making good use of otherwise wasted space) Not far from this spot this city has a thriving High-tech industry complex, chugging right along.

    My brother John and I did a lot of testing back in 2021 with even worse park and landmark penalties. The values now in use in AMPS were arrived at after quite a bit of play-testing to strike the perfect balance between "annoyingly troublesome" and "so easy to overcome it's barely worth mentioning". Everything in AMPS is "give and take". Coal is cheap but pollutes like mad and can only provide Base Load... Oil is cheap and gives Peak Load, but is expensive to build and pollutes... Natural Gas is much cleaner and can load-follow, but it's expensive... 50 kVA transformers have no impact on desirability, but they're expensive and it can be difficult to find places for them... Commercial Transformers don't disturb businesses and are more efficient, but drive away housing and HT Industry unless you pay to put in some green-space... etc.

    The whole idea is that no power source or part of the grid is wholly "better" than everything else... just like IRL, there are trade-offs.

    All that having been said, as I mentioned above, if someone wants to make a set of non-impacting Transformer lots, (or lots for other road types) I'd be more than happy to add AMPS support. Just remember that game balance WILL play a part, so if they are efficient and low-impact, they'll be expensive or have some other downside to keep them from making other lots "obsolete".

    I hope that explains things better. I might think about adding some of this into the AMPS manual so people get a better idea of why things are the way they are. :^)

    Comments and suggestions more than welcome! (and thanks, @Girafarig for your feedback... I appreciate it greatly)

    • Like 5

    Share this post


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

    While I was developing CAM 2.5 I came across the Nulcear Health Bug. 

    The nuclear fission power plant has a parameter that goes to change the city's health quotient. Theoretically it is negative, but the people at Maxis put it positive, and so the nuclear fission power plant functions as if it were a radiology center in a hospital. 

    You can put this parameter in other power plants as well, allowing you to reduce public health. 

    Theoretically you can put solar panels on buildings and the buildings produce the energy (We are still talking about a few KW produced because you only need to put a paramenter in the exemplars of the buildings). You could do a seasonal prop and maybe an ordinance. But I would have to investigate more about the real possibilities but surely one has to use DLL to get the desired effects

    But then it becomes logistical hell in editing the various building exemplars present between SC4E and STEX and so it is something that new buildings present on SC4E and STEX enjoy more than past ones

     

    • 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:  
     
    9 hours ago, RobertaME said:

    This is actually very common IRL : a new substation was built near a housing tract where I live and property values within a few hundred yards plummeted. Even if you can't hear the hum, (most people can't) they're ugly and quite a number of people think they're dangerous to be around. What the city did to combat this was to put in green-space around the substation and beautified it, hiding most of it behind trees... and within months property values were back up. In SC4 this is reflected with just placing a few parks or plazas near your power facilities. In one city I'm testing I have a 10 MVA Transmission Station (the worst offender for negative Park and Landmark ratings) right next to a business district.

    Example.jpg.a471035d170cc2e7d91b6f358f75c2f6.jpg

    As you can see, with adequate parks and plazas around, (and the odd Mayor's statue) the effect of even -500 Park and Landmark rating with a 45 tile radius can be completely negated. It's just a matter of finding the balance. (many of those lots with parks and things above aren't even usable because they're more than 3 tiles from a road, so it's making good use of otherwise wasted space) Not far from this spot this city has a thriving High-tech industry complex, chugging right along.

    Yes, I guess my main issue with the substation penalty is the wide radius. 45 tiles is like 500 meters, isn't it? In an urban environment, with traffic, buses and the regular city noises, a bomb could go off 5 blocks away and I wouldn't ever find out about it.

    And this has in-game implications either: if you want to surround a station with parks and plazas, you need to surround it. Otherwise, you end up with weird shapes and undesirable spots away from the lot, with more desirable terrain closer to the offending lot.

    3AZdSX5.png

    The floating banana is the most noticeable (and most irrelevant, since it's just water) but there's also a reddish patch over to the mountainside, quite far from the power structures (center, near the beach), that is nevertheless penalised because it's too far away from the compensating parks, but not far enough from the large concentration of power lots.


      Edited by Girafarig  

    I can't embed images if there's a quote in the reply
    • Like 2

    Check out Isla Bonita!

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
    Currently: Viewing File: "THE THING" - Sport Center, by PGX
     
    10 hours ago, RobertaME said:

    As such, unless someone is willing to make alternative Transformer lots, the ones we have are all that will be.

    If you have a list of ideas of what you're looking for, and are willing to do the proper modding for them, I'd be happy to build some lots! It's been awhile since I've broken open PIMX. *:lol:

    • Like 4

    Looking for a prop or texture? The SC4 Prop & Texture Catalog might help! View online here.

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    On 5/20/2024 at 7:41 PM, Girafarig said:

    So, even though this would require substantial collaboration with, I don't know, the NAM team or someone, couldn't these transformers be automatically placed? Just add a random prop to show up every 10 street tiles or so, like with other street props, and then calculate a certain "base" transformer rate on account of street mileage.

    That's perfectly doable and wouldn't require coordination with the NAM team necessarily, by making or modifying a T21 mod, like the ones that include more trees on the roads and streets. You could, in fact, do something as simple as overriding a tree model by a transformer model and get it done, but in that case the transformer would appear wherever the tree is supposed to be.

    • Like 2

    matias93's Unexpected Mod Workshop (dev thread)             Ciudad del Lago in the making (dev City Journal)

    "Let us be scientists and as such, remember always that the purpose of politics
    is not freedom, nor authority, nor is any principle of abstract character,
    but it is to meet the social needs of man and the development of the society"

    — Valentín Letelier, 1895

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     
    11 hours ago, Ulisse Wolf said:

    While I was developing CAM 2.5 I came across the Nulcear Health Bug.

    I'm familiar with the issue. The facts of the matter are that there has never been any verifiable proof of negative health issues caused by EM fields, despite numerous studies on the issue. As such this isn't a realistic mechanic for a 'downside' to electrical feature lots. (not to mention the gameplay issues it would cause that would be worse than just a park rating reduction)

    There was actually a lengthy discussion about this in development. A good thought, but not practical. :^)

    3 hours ago, Girafarig said:

    the large concentration of power lots.

    That would be the issue. Transformers and Substations should be spread throughout a city. Yes... if you concentrate transformers and substations in one spot, it will become suck-land.

    Try spreading them around your city the way real cities spread them around. That way the negative park/landmark rating isn't so concentrated. Also try using Large parks that have larger effect radii. Five Large Flower Gardens and a Large Park will negate the downsides of even the worst offending stations. Softball Fields and Soccer Fields also have long radii that can counter the negative effects.

    Lastly you can use the map edge to push the negative effects off the map entirely. I do this a lot, placing most of my Transmission Stations near the edge of the map so half of the negative effect is no longer an issue. You placing them so that the negative ratings are off in the water also works since there's no downside to it.

    Lastly, if you're dead-set that you don't want to deal with the downsides, you can edit the "020-14F_All_Electrical.dat" file in the Reader and reduce the effect as low as you like. (all Transformer and substation lots are controlled in this one file)

    Edit.png.c8870bdddc707a35fc57164d579692d1.png

    Just some ideas to show that there are ways to work around the issues. :^)

    2 hours ago, nos.17 said:

    If you have a list of ideas of what you're looking for, and are willing to do the proper modding for them, I'd be happy to build some lots!

    Take a look at @Kloudkicker's KK Transformer Lots-Small and @Simmer2's SM2 Main Transformers and SM2 HV Transformer sets as well as @TakemeThere's Transformer Substation lot to get an idea of the kinds of lots needed as alternates.

    The basic idea is that there should be transformers in the following power ranges: 25kVA, 50 kVA, 250 kVA, 500 kVA, 1500 kVA, 3 MVA, and 6 MVA. Distribution Substations should be in the following ratings: 500 kVA, 1 MVA, 2MVA, 3 MVA, 5 MVA, 7 MVA, 10 MVA, 15 MVA, and 20 MVA. Transmission Stations should be in the following ratings: 10 MVA, 20 MVA, 35 MVA, 60 MVA, 90 MVA, and 120 MVA. These are the easiest to add AMPS support to because there are already slots assigned to those ratings.

    Of course if you want to make lots with different ratings, that's also doable. Just keep in mind that there are a limited number of new slots available for new rated lots. I'm more than happy to work with you to figure out what lots should have what ratings based on the size of the transformer or substation equipment. (I've done a lot of study on the matter and can eyeball it fairly well)

    Thanks for the feedback, everyone! I'll consider your offers and suggestions carefully. :^)

     

    • Like 5
    • Thanks 1

    Share this post


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

    You could, in fact, do something as simple as overriding a tree model by a transformer model and get it done

    Just curious... is there a way to count the number of props in a city? I ask because to implement such a process, the AMPS code would need to know the number of each transformer prop in the city to run the computation of how much power the city can manage... and I don't know of a variable in SC4 code that counts props.

    This was also the issue with the idea of doing the same with rooftop PV props. Even if you were willing to accept the chaos that would ensue from uncontrolled rooftop PV usage, there isn't a way (currently) to count the number of panels installed around a city... so no way to compute how much Intermediate Power would result from it.

    If you have an idea how this could be done, I am more than willing to listen and consider it... I'm always open to new suggestions! :^)

    • Like 2

    Share this post


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

    I'm familiar with the issue. The facts of the matter are that there has never been any verifiable proof of negative health issues caused by EM fields, despite numerous studies on the issue. As such this isn't a realistic mechanic for a 'downside' to electrical feature lots. (not to mention the gameplay issues it would cause that would be worse than just a park rating reduction)

    That post was referring to how the health reduction could be applied to dirty power plants, not the substations.

    13 hours ago, Ulisse Wolf said:

    You can put this parameter in other power plants as well, allowing you to reduce public health. 

    1 hour ago, RobertaME said:

    Just curious... is there a way to count the number of props in a city?

    It doesn't look like Maxis added a LUA function to do that, but it probably could be done from a DLL.

    • Like 1

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    12 hours ago, RobertaME said:

    Just curious... is there a way to count the number of props in a city? I ask because to implement such a process, the AMPS code would need to know the number of each transformer prop in the city to run the computation of how much power the city can manage... and I don't know of a variable in SC4 code that counts props.

    This was also the issue with the idea of doing the same with rooftop PV props. Even if you were willing to accept the chaos that would ensue from uncontrolled rooftop PV usage, there isn't a way (currently) to count the number of panels installed around a city... so no way to compute how much Intermediate Power would result from it.

    If you have an idea how this could be done, I am more than willing to listen and consider it... I'm always open to new suggestions! :^)

    I'm not sure if the game could count specific props from the inside, but now we are in the realm of crazy DLLs, so maybe?

    Without that, what I would think of doing would be this: T21 props are located in a semi-random fashion, as prop families over repetitive sequences of network tiles. For example, lamp posts are located as a family of 1 prop (so it's always the same for the same mix of density and wealth of the adjacent zoning) and a frequency of 1 over 2 (so they appear each every network tile). If you were to put a T21 transformer, lets say, every 32 network tiles, you would have to use a frequency of 1 over 4 (which I seem to remember is the maximum available, but I might be wrong), and then use a prop family with 7 blank props and 1 transformer prop. That way, you would know that, for every 32 tiles of the given network (let's say it's road) built in the city, you have 1 transformer. And the game can count network tiles, so that's feasible.

    Now, if you were to vary the density of transformers for zoning wealth and density (which makes complete sense), then I don't know if you could keep using this method, but maybe using overall stats for those factors would allow you to ponder for them in aggregate and still reach a reasonably close number.

    EDIT: Here's a guide on T21s, if you want to check how it's done:

     

    • Like 4

    matias93's Unexpected Mod Workshop (dev thread)             Ciudad del Lago in the making (dev City Journal)

    "Let us be scientists and as such, remember always that the purpose of politics
    is not freedom, nor authority, nor is any principle of abstract character,
    but it is to meet the social needs of man and the development of the society"

    — Valentín Letelier, 1895

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     
    14 hours ago, Null 45 said:

    That post was referring to how the health reduction could be applied to dirty power plants, not the substations.

    You are correct, I misread it. Apologies. However, dirty plants already create tons of air and water pollution, so they don't really need yet another downside.

    Regarding T21 transformer assignment, wealth level should in fact change not only density of transformers, but type as well. Low wealth lots should have 25 kVA power poles while a Middle or High wealth street would need 50 kVA pad transformers once the total of §§ and §§§ population reaches 1,000 sims. (not even sure how you could have it even know how many §§ and §§§ sims there are in a T21 Exemplar) The same would apply to Commercial-grade transformers, using 500 kVA units at first and then upgrading to 1/3rd as many 1,500 kVA transformers once the total of all Commercial Services reaches 1,000 jobs.

    The other thing to keep in mind is that each transformer costs §1 per month in maintenance... which could add up to quite a bit if they're on every street, road, and avenue and placed without the player's control. You can end up paying for far more transformers than you actually need. It's an interesting concept, however all that on top of it needing a DLL to even work (estimates based on network tile count wouldn't work) makes it just too much work for too little benefit.

    That having been said, if someone wants to take the concept and make their own mod that does this, by all means go for it! Just remember if you use the back-end code or assets from AMPS, it needs to be CC BY-NC-SA licensed.

    UPDATE: I'm still stress-testing AMPS in my own region. One thing I noticed is that there's an issue with PV Panels affecting the Independent Solar Power Plants count. I'll have to work out a better formula to account for the fact that PV Panels can either be Generators or Small Power Plants depending on whether you have a Step-up Transformer or not. (it gets weird when you have both)

    I've been especially conscious of the negative Park and Landmark effects and watching to see if they cause abandonment. So long as I put sufficient green space where it's needed, it doesn't seem to be an issue. If it were possible I would make the effects tied to a global variable that could be tweaked. Unfortunately, that's just not possible given the way Exemplars work. :^/

    Thank you all for your feedback and ideas! They are very much appreciated, even if I disagree. (nothing wrong with a little healthy debate, so long as it doesn't get political)

    • Like 5

    Share this post


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

    Taking a break from AMPS for a bit to work on a side project, reworking the Educational lots and integrating a bunch of STEX schools, libraries, museums, and colleges so they're balanced against each other. (I used to have a TON of schools, all with different stats to fill niche uses before the Great HD Crash of 2019... finally getting around to reinstalling them and don't like that some of the lots I like have "cheat" costs or EQ)

    While I was at it I decided to try my hand at @memo's Opera House Fix method that doesn't require bulldozing. (which is actually quite elegant) If it works out I MAY implement it in AMPS, at least for the default 8 Maxis power plants, so it can be adopted more easily. (no promises) If I do it though, it would make cities made with the current Beta version subject to the "Phantom Slider Bug" and require bulldozing (or to be more cautious, scrapping the entire city) to upgrade to the Beta version 0.4. Not sure if it's worth it at this point or not... feedback on the issue would be appreciated.

    Anyway, while I was making thousands of changes to Building Exemplars, it occurred to me that there WOULD be one way I might bite the bullet and buy a copy of the v.1.1.641 from GOG... if someone made a DLL that would allow the values in an Exemplar to read LUA global variables. So many cool things could be done if you could make Exemplar Properties variable based on LUA calculations. THAT would make the hassle of upgrading and reinstalling worth the effort. (it would solve the issue of making AMPS enforce load balancing by causing brownouts if you have insufficient Peak power)

    So @Ulisse Wolf and @Null 45... is it possible?

    • Like 6

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    4 hours ago, RobertaME said:

    So many cool things could be done if you could make Exemplar Properties variable based on LUA calculations.

    The exemplar properties are read-only from SC4's perspective.

    Also, there currently is no way for the LUA code to send its results back to a DLL. It is theoretically possible (the game itself does this), but the C++ code that would be required for a DLL to implement that is extremely complex and has not been deciphered yet.

    What are you trying to do? Change the power plant max output in response to the load balancing?

    I think I found a way to get the unmodified power consumption from a DLL, but it would require patching the game's code in memory and thus only work on version 641.

    • Like 2
    • Thanks 1

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     
    14 hours ago, Null 45 said:

    The exemplar properties are read-only from SC4's perspective.

    That's unfortunate. :^/

    14 hours ago, Null 45 said:

    Also, there currently is no way for the LUA code to send its results back to a DLL.

    That's sub-optimal. :^(

    14 hours ago, Null 45 said:

    What are you trying to do?

    In an ideal world? Have the AMPS Front Office lot's Power Consumed Property be variable so it increases load when there's unusable Base or Intermediate Load or a Peak Load shortfall to cause brownouts. It's the perfect solution because increased load shortens the life of your power plants and IRL excess B or I Load above Demand actually does cause stress on the grid, shortening power plant life. Same goes for insufficient Peak Power. It would also be fairly low-impact on computation cycles.

    14 hours ago, Null 45 said:

    I think I found a way to get the unmodified power consumption from a DLL

    That's actually less of a concern. As it stands right now I can get the Power Demand from the game.trend_value(game_trends.G_POWER_DEMANDED,0) variable. If I can figure out a way to get a Dummy Ordinance to adjust demand based on grid_logic_var.DEMAND_PERCENT only once a month or so so it doesn't lag the system, I can just divide G_POWER_DEMANDED by the same ratio to get raw demand. It requires that I rewrite the load balancing equations using a new variable:

    grid_logic_var.MWH_DEMAND_RAW = game.trend_value(game_trends.G_POWER_DEMANDED,0) / grid_logic_var.DEMAND_PERCENT

    It will introduce small rounding errors, but it should work. (grid_logic_var.DEMAND_PERCENT can never be less than 1, so if there's no unusable power and no Peak shortfall, you're just dividing by 1)

    Actually coding all those changes to use a new variable though will take time and patience.

    Thanks for looking into it, though. It's appreciated!

    • Like 4

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
    Currently: Viewing File: "THE THING" - Sport Center, by PGX
     
    On 5/22/2024 at 12:10 AM, RobertaME said:

    The basic idea is that there should be transformers in the following power ranges: 25kVA, 50 kVA, 250 kVA, 500 kVA, 1500 kVA, 3 MVA, and 6 MVA. Distribution Substations should be in the following ratings: 500 kVA, 1 MVA, 2MVA, 3 MVA, 5 MVA, 7 MVA, 10 MVA, 15 MVA, and 20 MVA. Transmission Stations should be in the following ratings: 10 MVA, 20 MVA, 35 MVA, 60 MVA, 90 MVA, and 120 MVA. These are the easiest to add AMPS support to because there are already slots assigned to those ratings.

    To clarify, you're just looking for more lots to better cover these ranges? The examples are otherwise helpful, thanks!

    On 5/22/2024 at 12:10 AM, RobertaME said:

    Of course if you want to make lots with different ratings, that's also doable. Just keep in mind that there are a limited number of new slots available for new rated lots. I'm more than happy to work with you to figure out what lots should have what ratings based on the size of the transformer or substation equipment. (I've done a lot of study on the matter and can eyeball it fairly well)

    I'll stick with the ranges you've provided. I think I'll just put some lots together, then your eyeballs will be very helpful for categorizing them. *:P

    • Like 4

    Looking for a prop or texture? The SC4 Prop & Texture Catalog might help! View online here.

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     
    29 minutes ago, nos.17 said:

    To clarify, you're just looking for more lots to better cover these ranges?

    More like an alternate set to @Kloudkicker's or @Simmer2's sets. The way I set up AMPS, it can support multiple sets with the same stats. It's not that I don't like the existing sets... I do... but I know my opinion is not the only one that counts. Also, having one set that includes all Hard Requirements (a full set of transformers, substations, and transmission stations) would be convenient for new adopters. (especially if they have few or no dependencies)

    35 minutes ago, nos.17 said:

    I think I'll just put some lots together, then your eyeballs will be very helpful for categorizing them. *:P

    I'd be more than happy to help categorize them! I may not be able to draw or do much of anything artistic, (including making lots) but I know electronics! :^Þ

    • Like 3

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
    Currently: Viewing File: "THE THING" - Sport Center, by PGX
     
    50 minutes ago, RobertaME said:

    More like an alternate set to @Kloudkicker's or @Simmer2's sets. The way I set up AMPS, it can support multiple sets with the same stats. It's not that I don't like the existing sets... I do... but I know my opinion is not the only one that counts. Also, having one set that includes all Hard Requirements (a full set of transformers, substations, and transmission stations) would be convenient for new adopters. (especially if they have few or no dependencies)

    Understood, sounds good! No dependencies likely is not really realistic as I don't actually have the modeling skills to make any of my own assets, but I'll define a "standard" set of dependencies and keep them relatively minimal.

    • Like 3
    • Thanks 1

    Looking for a prop or texture? The SC4 Prop & Texture Catalog might help! View online here.

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     
    18 minutes ago, nos.17 said:

    No dependencies likely is not really realistic as I don't actually have the modeling skills to make any of my own assets, but I'll define a "standard" set of dependencies and keep them relatively minimal.

    That's fine. No dependencies is nice, but not necessary by any means. I just know that for some people seeing a long list of dependencies can sometimes discourage downloading. @Kloudkicker's list is about as large as I think is acceptable. (of course, more dependencies often means nicer looking... so...)

    Some ideas:
    -Under @Kloudkicker's transformers, there are only Street TE lots. It might be a good idea to come up with other TE versions. (500 or 1,500 kVA Commercial Transformers in the median of an Avenue or alongside Roads, etc.) I know TE lots can't grow adjacent to them, but that issue exists for NAM TE lots as well and people figure ways around it. (putting them on side streets, making sure the adjacent lots have a tile touching non-TE network tiles, etc.)

    -Several people expressed concern about the negative Park and Landmark ratings of higher-rated Transformers and Substations. Perhaps a series of grid lots with parks and plazas already built in around them. Just keep in mind that such lots should be just as large and cost as much as though the player had placed the parks/plazas separately. (i.e. a 3 MVA Industrial Transformer that normally takes up 1 tile and would require 4 Small Plazas and a Playground to cancel out the negative effects should be a 3x2 lot and would cost §575 to build and §51/month instead of §125 build and §1/month to have no negative park/landmark rating , etc.)

    Looking forward to what you come up with!

    • Like 4

    Share this post


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

    Well, having an all-in-one transformer-and-park packages would go a long way in not having to place substations next to thermal springs.

    KQT4yZy.png

     

    • Like 1
    • Haha 1

    Check out Isla Bonita!

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    On 5/23/2024 at 10:26 AM, RobertaME said:

    Taking a break from AMPS for a bit to work on a side project, reworking the Educational lots and integrating a bunch of STEX schools, libraries, museums, and colleges so they're balanced against each other. (I used to have a TON of schools, all with different stats to fill niche uses before the Great HD Crash of 2019... finally getting around to reinstalling them and don't like that some of the lots I like have "cheat" costs or EQ)

    While I was at it I decided to try my hand at @memo's Opera House Fix method that doesn't require bulldozing. (which is actually quite elegant) If it works out I MAY implement it in AMPS, at least for the default 8 Maxis power plants, so it can be adopted more easily. (no promises) If I do it though, it would make cities made with the current Beta version subject to the "Phantom Slider Bug" and require bulldozing (or to be more cautious, scrapping the entire city) to upgrade to the Beta version 0.4. Not sure if it's worth it at this point or not... feedback on the issue would be appreciated.

    Anyway, while I was making thousands of changes to Building Exemplars, it occurred to me that there WOULD be one way I might bite the bullet and buy a copy of the v.1.1.641 from GOG... if someone made a DLL that would allow the values in an Exemplar to read LUA global variables. So many cool things could be done if you could make Exemplar Properties variable based on LUA calculations. THAT would make the hassle of upgrading and reinstalling worth the effort. (it would solve the issue of making AMPS enforce load balancing by causing brownouts if you have insufficient Peak power)

    So @Ulisse Wolf and @Null 45... is it possible?

    @RobertaME Have you seen this thread on improving the realism of education buildings and EQ dynamics over sims' lifespans?
     

    The attached Educational Realism Mod would also benefit greatly from Modpacc Zero's Opera House Fix method for avoiding the phantom slider bug when updating building exemplars in existing cities. 

    • Like 7

    Share this post


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

    Have you seen this thread on improving the realism of education buildings and EQ dynamics over sims' lifespans?

    As a matter of fact, I used the data from that thread to re-balance my educational buildings. I took a few hours and wrote some formulas in Excel that let me see the degradation graph based on real-time changes to each building.

    Education.png.c66ff8b852cb31c290aea56bf6839c1f.png

    The new values make it so if you want Sims with a 200 EQ you need the best of all education buildings: Elementary, High School, University, Main Library, Major Art Museum, and Opera House. (alternately you could have one of the Private Schools, a University, Main Library, Major Art Museum, and a Broadway Theater and you don't need the Opera House) Anything less than that will result in less EQ. You can still get over 100 EQ with only an Elementary, High School, and Library though. (how long it stays above 100 EQ depends on how good a Library you have) I based occupancy levels on the size of the buildings. (shown in the Sqrs column)

    Just a little side project. :^Þ

    • Like 7

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    On 5/24/2024 at 6:55 AM, RobertaME said:

    That's sub-optimal. :^(

    After a bit more digging, I think I found a way for DLLs to add new methods for the LUA code.

    It appears that SC4 has 2 ways of providing C++ methods for the LUA code to call, one for the game.<function> methods and another for the sc4game.<group>.<function> methods. My previous post was referring to the game.<function> methods, these are set from a hard-coded array in the EXE. The sc4game.<group>.<function> methods are added at runtime on the C++ side, but I am not 100% sure how it would work on the LUA side.

    The game defines the sc4game LUA methods in the advisor constants LUA file. I don't know if adding new methods to that type would require editing that file, or if you could add your methods in a separate LUA file and rely on the game to initialize the built-in sc4game structure before your code runs. I also don't have the skill with LUA to test that.

    • Like 3
    • Yes 1

    Share this post


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

    I have the LUA skill, but I lack on the C++ side. (my last encounter with that language group was C... not C#... not C+... C... and it was for all of a week when I was a teenager :^Þ )

    AFAIK , so long as the function is created before it's called, you can have the function defined in the same LUA it's called in. LUA is parsed top-down, so you would just have to make sure to define the function before you call it lower down in the LUA code. AMPS creates the function run_grid_balance_variables(ret_type) after creating the variable tables and then calls that function in the Reward code that follows, all in the same LUA, and again in the UI LUA that runs after the Code LUA. I can't see why it would be different for the defining of sc4game.<group>.<function> methods.

    I hope I understand your thoughts correctly. I'm not a professional programmer. I just have a highly logical mind and numbers like me. 8^)

    • Like 3

    Share this post


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

    Some of the advisor message links for buildings (mainly the generator ones) cause the red arrow bug. I'm assuming that's just an effect of the mod's extreme modularity - is that right? My answer is probably hidden somewhere in this thread, but it's too much for me to skim through.

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     
    On 5/30/2024 at 10:12 AM, asasnat said:

    Some of the advisor message links for buildings (mainly the generator ones) cause the red arrow bug.

    Can you be more specific as to which messages cause the bug? Are they the advisor messages of the availability of new power plants or grid features? Which ones? What version of AMPS are you running? What lots are installed in your game? Which lots are in use in the city in question?

    The more info you provide, the more likely I can identify the issue. :^)

    Thanks for the feedback! I look forward to more details.

    • Like 3

    Share this post


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

    Just an FYI on where things are at right now:

    I'm still working on a better implementation of the PV Panel count process so that it doesn't leave odd figures in the Independent Solar Power Plants section of the main query. I still haven't hit on just the right formula to resolve the issue.

    I have also decided that the v.0.4 version WILL include @memo's recommended modding process to eliminate the need to bulldoze all power lots before installing AMPS. This will be a MAJOR undertaking and will take some time to implement, (I haven't even begun the process yet) but I think it will be worth the effort.

    In the mean time I've been doing a deep-dive on education and how the various Building Exemplar properties affect different parts of the EQ process. I think I have it pretty much nailed down now and will be posting up my findings in a new thread Soon™.

    Comments and questions welcome, as always!

    • Like 7

    Share this post


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

    Another area that I'm working on is the behavior of Power Storage lots. Currently they convert Intermediate Power to Peak power until there is no more Intermediate power to convert, then converts Base Power to Peak. The new process will convert Unused Intermediate Power to Peak first, then Unused Base Power to Peak, then Used Intermediate, and lastly Used Base Power.

    The reason for this is that in one of my test cities I had a glut of Base Power from some Geothermal plants, but I was also producing about 10% of my power with 2.5 MW Solar Thermal plants. I couldn't use @Simmer2's Tesla Power Storage Packs to actually use my wasted Base Power because it was converting the usable Intermediate power first, so I'd have needed a TON of power Packs to actually be able to use all my Base Power. In reality the batteries would be used to smooth out ANY overage to cover later shortages first before looking to reduce Intermediate Power.

    Comments welcome.

    Edit: Started the new topic.

     

    • Like 5

    Share this post


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

    I actually found the Power Storage Packs quite underwhelming (in common with other things in that brand, ahem) -- they take up a lot of space for quite the meager conversion rate. BUT I do find the idea of storing power interesting, especially as pumped-storage hydro.

    Now, I know AMPS doesn't have any hydro plants listed (yet?), and there's just two dams in the entire STEX catalogue (I think), but maybe something could be done to give us pumped-stoage hydro? It seems simpler to plop, conceptually speaking, than regular hydro (since SC4 doesn't usually allow for regular water at different elevations, but you can just lay down MMP water) and it would fit into a nice niche without, I think, a lot of modding. Right?

    • Like 1

    Check out Isla Bonita!

    Share this post


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

    Hello all, good to see some familiar avatars.
    My ear was ringing and had to come see why and I was wonderfully surprised to see an friend has re-sprung. This has inspired me to hang out some myself.

    On 5/25/2024 at 12:46 PM, RobertaME said:

    It might be a good idea to come up with other TE versions.

    I looked into making the SAM street versions for @marksmango over a year ago but was not able to find the textures or know how to correctly extract them for use. Then I went on another leave of absence so that got nowhere. I bet @nos.17 will have a better chance at it.

    I'm really happy that AMPS has a little more "spark" in it.

    • Like 4
    • Thanks 1

    Kloudkicker
    Life's cold and I'm chillin
    Kloudkicker's Lot Creations
    Kloudkicker's Tech Tools, News and More

     

    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