Jump to content
RobertaME

(Mod) AMPS Development Thread

785 posts in this topic Last Reply

Highlighted Posts

  • Original Poster
  • Posted:
    Last Online:  
     
    4 hours ago, Kloudkicker said:

    Changing their usage would help bring up the number for substations. Might not be a bad idea. They are a little large in comparison to the transformers.

    That's what I'm thinking. It'll be a pain because I've already got them coded as transformers, plus it means looking for replacements in those power capacities, but I think it's worth the effort.

    So unless someone objects, I'm going to proceed forward with changing them to more Distribution Substations.

    Quote

    I will run with it then. Will do.

    Sounds good and easy enough.

    Thank you! You're helping to keep me free working on the back-end code... which means I might have an Alpha release this weekend! (sans a few transformers)

    The loadbalance.lua is looking good! We'll see if it stands up to real load testing in the next few days. (the math is VERY complex and has a LOT of variables, so it needs stress testing to see if I can break it before I release an alpha version to see if you all can break it! ;^) Special thanks to @rivit for helping me find the code bug that was making for weirdness in my tests. <3

    Still looking for a good Wind Farm Maintenance Facility in the STEX and LEX backlogs. With people working from home though, internet availability is spotty, and money-earners get first dibs. :^/

    One the up-side, I found a re-lot I did a few years back (it took me DAYS and luckily was on a secondary drive during the Great HD Crash of 2019) of one of the buildings I'm using as a Transmission Substation; @Takingyouthere's Transformer lot. One f the thinks I DIDN'T like about that lot was that the power lines that visually linked with the Maxis high-voltage lines pointed toward the side of the lot that required road access... so it looked funky. I took a few days just moving props around on the lot until I had the lines reversed to the other side of the lot. (I also had an Army Base fix on the old Maxis lot share that fixed the issue with the Army Base needing road on what is visually the back of the lot, but that is lost to the great bit bucket in the sky) Anyway, so now I can use my re-lot (which still requires the original) in my mod instead of trying to re-do that work all over again. (yea!)

    Original   602330f7ea9d7_10MVATransmissionSubstation(original).jpg.64b17cfa103972a78f1ea36ef213aba4.jpg    Relot   6023307fb5541_10MVATransmissionSubstation.jpg.a2d604854b0b36825a32a071589b4402.jpg

    Thoughts welcome!

    • Like 1

    Share this post


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

    I've now incorporated your changes and made a small app that can demonstrate your algorithm. Attached in zip its a VB.net app and can be run from anywhere. (only on Windows I'm afraid)

    Looks like this.PowerModEmu.png.2a8f58059a3819ea68a2010901f9001e.pngMove sliders about.

     

    What it showed almost straight away is that there is also an implicit condition where Total Used Loads must meet Demand - which is different from the default game logic which says Total Supply must meet Demand. I've added this check to the code - an example. 10000 demand, 6000 base load, 1900 Intermediate Load and 2000 Peak load will not trigger ACTUAL_USED but does not meet Total Demand. In these cases a Brownout is signalled.

    Additionally, I've made the load factors variable. This means you can play with the design balance too - it doesn't change the principle of the algorithm just the tipping points.

    SC4PowerModEmu.zip

    • Like 6

    Share this post


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

    What it showed almost straight away is that there is also an implicit condition where Total Used Loads must meet Demand - which is different from the default game logic which says Total Supply must meet Demand.

    Not sure exactly what you mean by "Total Used Loads" versus "Total Supply". The equations only kick in when a plant type CAN'T meet demand, so at any point less than that the game runs as normal with power plants producing less than capacity. It only causes effects when you're hit your caps of Pmin 20%, Bmax 60%, or Imax 40%.

    This has a side effect of encouraging players to NOT overbuild their Base and Intermediate power facilities before they can readily use them. A large surplus of these power types increases load, which decreases power plant life across the board. (and I feel adequately represents the "Intermediate Glut" effect you were taking about before... let me know if you think this isn't enough)

    17 minutes ago, rivit said:

    I've added this check to the code - an example. 10000 demand, 6000 base load, 1900 Intermediate Load and 2000 Peak load will not trigger ACTUAL_USED but does not meet Total Demand. In these cases a Brownout is signalled.

    The new code doesn't need to account for insufficient power generated... the base game already does that. In your example, 6GWh + 1.9GWh + 2GWh generated = 9.9GWh which is 1% below demand. What will actually happen is that all plants will run at 101% and their degradation kicks into high gear. (and your Utilities advisor starts complaining) My routines don't touch that aspect or power management.

    One thing my code CAN'T do is properly distribute the load to each plant by type. Each power plant takes an equal share of the load, regardless of type. That's baked into the game executable, as far as I can tell. :^/

    I'm working on a process where the Query will "lie" to you and tell you the power it SHOULD be generating instead of its equal share, but aging and other effects based on load are unfortunately out of my hands. (unless someone knows of a way using LUA code to adjust the production of a specific power plant... it was hard enough to actually affect the general simulation using nothing but LUA, let alone specific plants)

    Cool "reality checker" though! (I just used Excel because it's fast and easy :^Þ )

    • Like 3

    Share this post


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

    I DIDN'T like about that lot was that the power lines that visually linked with the Maxis high-voltage lines pointed toward the side of the lot that required road access... so it looked funky.

    If you are referring to the arrow that is visible in the preview before placing, that is not the road requirment side. Most of the time it is just a reference for the front of the lot. Access to most lots are usually from all side. Unless it is a switch point and is directional based or a Transit/network enabled lot, it doesn't matter where the arrow is facing. It will auto snap to the road by nature, but if you spin the building(Home and End keys) without moving the mouse it can be placed in any direction. There are other special times when it is necessary to follow the auto snap feature.

    AIndyTrans.jpg.773c2da3e6e468e40fdeb99bc202cc59.jpgAIndyTrans1.jpg.114e47ac65b62f8654d3222c626c5b75.jpg

    AParkFormer1.jpg.25165fcd3db03dfc57a8f7210b5e5ea4.jpgAParkFormer2.jpg.4d90419a29fb05accab1f8496ca30649.jpg

    The parks are more fun to make, more items available from Maxis not in HD, for a good variety.

    If you are happy with them, That gives you 6 park 250kVA, 6 plaza 250kVA, and 7 industrial 500kVA transformers to play with. I didn't check yet, but I am sure there are no more new dependencies added. I will check after I get a break. But in the meantime let me know what is on your mind with the lots( like more lights in the indy ones?). I wouldn't mind playing around with the plaza designs some more if you haven't done anything to them yet. I will try and bundle all of these into a folder for you for easier DL. I should learn it anyway.

    Peace,
    Kloudkicker

    • 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
    Posted:
    Last Online:  
     
    2 hours ago, RobertaME said:

    Still looking for a good Wind Farm Maintenance Facility

    What kind of specs are you looking for, like lot size. Not sure what it could look like, most maintenance is done to the turbine, on the wind farm. Found this on the web https://bdconstructioninc.com/portfolio/wind-farm-om-buildings/. I'll give one a try.

    • 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
  • Original Poster
  • Posted:
    Last Online:  
     
    33 minutes ago, Kloudkicker said:

    If you are referring to the arrow that is visible in the preview before placing, that is not the road requirment side. Most of the time it is just a reference for the front of the lot. Access to most lots are usually from all side. Unless it is a switch point and is directional based or a Transit/network enabled lot, it doesn't matter where the arrow is facing. It will auto snap to the road by nature, but if you spin the building(Home and End keys) without moving the mouse it can be placed in any direction. There are other special times when it is necessary to follow the auto snap feature.

    Funny, I got "no road" zots with the Army Base and that transformer when I tried to flip them around. That's why I spent so much time fixing them. :shrug::

    34 minutes ago, Kloudkicker said:

    The parks are more fun to make, more items available from Maxis not in HD, for a good variety.

    If you are happy with them, That gives you 6 park 250kVA, 6 plaza 250kVA, and 7 industrial 500kVA transformers to play with. I didn't check yet, but I am sure there are no more new dependencies added. I will check after I get a break. But in the meantime let me know what is on your mind with the lots( like more lights in the indy ones?). I wouldn't mind playing around with the plaza designs some more if you haven't done anything to them yet. I will try and bundle all of these into a folder for you for easier DL. I should learn it anyway.

    Peace,
    Kloudkicker

    The 250kVA parks look GREAT! The 6MVA Industrial lots look perfect as well! I haven't done anything with the 1500kVA Commercial lots yet.

    The new transformer lots needed are the 500 kVA high-density Residential / Commercial lots that are plaza based (higher Residential NIMBY than the 250kVA lots, but not TOO horrible) and the 3MVA Industrial lots that should be like the 6MVA ones you made, but on a 1x1 lot. That covers everything but the smallest 25 and 50 kVA lots that will probably have to wait until Simmer2 releases his Mega Prop Pack vol 5 that may include some of the things he was working on. (either that or if someone else makes some pole-mount and pad-mount transformers like them)

    2 minutes ago, Kloudkicker said:

    What kind of specs are you looking for, like lot size. Not sure what it could look like, most maintenance is done to the turbine, on the wind farm. Found this on the web https://bdconstructioninc.com/portfolio/wind-farm-om-buildings/. I'll give one a try.

    Basically like that, but with Wind Turbine piece props scattered around to make them look like spare parts. (maybe things that look like turbines, spare blades and masts, etc.) Things that would look appropriate in a SC4 Industrial sector. Lot size 4x4. (stats unimportant, they'll get re-done anyway)

    You rock! <3

     

    • Like 2

    Share this post


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

    The new code doesn't need to account for insufficient power generated... the base game already does that.

    Good - that's why I called it an implicit rule - this little demo app also needs to enforce it or you can make illegal scenarios.

    • Like 2

    Share this post


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

    Good - that's why I called it an implicit rule - this little demo app also needs to enforce it or you can make illegal scenarios.

    Ah! I follow now! Thanks!

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    9 minutes ago, RobertaME said:

    3MVA Industrial lots that should be like the 6MVA ones you made, but on a 1x1 lot.

    This I can do, I'll make 6 lots like that.

    12 minutes ago, RobertaME said:

    500 kVA high-density Residential / Commercial lots that are plaza based

    What are you thinking for this? Throw me some ideas and I'll try.

    15 minutes ago, RobertaME said:

    The 250kVA parks look GREAT! The 6MVA Industrial lots look perfect as well! I haven't done anything with the 1500kVA Commercial lots yet.

    OK, I am clear on the power sizes I'm making and will make the file names to match. As far as the plaza 1500kVA goes, I will rearrange them a little. And will put them all in one folder. So please hold off on those for now.

    The maintenance building should be straight forward and simple, I'm on board with that also.

    • Like 1
    • 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
    Posted:
    Last Online:  
     

    Here is something I threw together. Well, merged buildings together is more like it. Now after making it on a 4x4 lot, it turned out fairly decente. Look it over and let me know what you think. WindMaintenance.jpg.91a372a2dc15b69444a590d2870b7888.jpgWindMaintenance2.jpg.461a20aa2294311eed542625105485c8.jpg

    • Like 3
    • 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
    Posted:
    Last Online:  
     

    So here is 4 pictures to look at. And 3 things to go over real quick.

    1. I noticed I had a prop family that was not what I thought it was and had to remove them. Here is the revised 6 industrial 1x2 6MVA lots. Is cell tower OK in there?

    2. I was referring to earlier about "being able to be placed anywhere", was for the area they are intended for but away from the road as they don't need road access. I the pictures is what I mean for the parking lot lot. It does not look to bad in here but I could imaging that they might in other cases. No biggy thou, I just thought I would mention it, just in case. And now I can show you as to what I had meant. Moving ON.

    3. There is a new lot at the intersection. A 1x1 indy lot. It could be the 3MVA you were looking for. U tell me. I merged two 1500kVa transformers together. So its wider now and thought it was worth a shot. BANG. 1500kVA +1500kVA = 3MVA right?. I did the math??? LOL. From here it looks like a car to me, LOL, a electric car maybe.

    A1Indy4.jpg.74377b21739e3082f68fb892ff14285b.jpgA1Indy2.jpg.7965fccebd486a3a1f85fb77e2528290.jpgA1Indy3.jpg.978bef171fc584594734f344af86742c.jpgA1Indy1.jpg.b238bb2185a81b10502bc5074c4bfda6.jpg

    • Like 2
    • 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
    Posted:
    Last Online:  
     

    A few possible options for the 3MVA and 500kVA transformers. Its the best I can do with these packages that I know of in them.

    The indy 3MVA option like the last post, but in a smaller enclosure it not so bad. I did reverse the megered transformeres so the grills are not looking like tires(on right). LOL That can/will be corrected in the left one with the tower.( I tried four transformers together but that is impossible to make took good. LOD takes over like a BOSS.AMerge1.jpg.51ebb13d2def065af133d0faae41e3e9.jpgAMerge2.jpg.3e9e8d6b0befe103aa967a1e5bffeb03.jpg

    Below I took the 250kVA box and merged two the only way they would look good was long ways. And for the Com/Res look I thought half grass, half walkway. And no trees for the high density look. Back angle is the only one for below pics that is a little off on blending of boxxes.2Merge1.jpg.c151389bf5db959a6d02608a1455e1e5.jpg2Merge2.jpg.70a5f4f9076623b5307873d287fe0111.jpg2Merge3.jpg.7bfbd56ce4769f5ff6e9e301f6ab6d4c.jpg

    I am going to check the new update for the new prop and catalogue for any new props that will be of some benefits to the project. Options are getting thin with the "current" set.

    Speak up, I am all ears, and 3 arms.

    • Like 3
    • 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
  • Original Poster
  • Posted:
    Last Online:  
     
    19 hours ago, Kloudkicker said:

    This I can do, I'll make 6 lots like that.

    What are you thinking for this? Throw me some ideas and I'll try.

    OK, I am clear on the power sizes I'm making and will make the file names to match. As far as the plaza 1500kVA goes, I will rearrange them a little. And will put them all in one folder. So please hold off on those for now.

    The maintenance building should be straight forward and simple, I'm on board with that also.

    I haven't done anything with the Transformer lots you put up earlier. I'm buried in LUA code and LTEXT entries at the moment. Trying to coordinate all this together is like herding cats... too many and all wanting to do something different. :^/

    Once you're happy with the way they look, zip them up together and I'll take a run at bundling them into random lot sets.

    Thanks for understanding my "magnificent obsession" with electricity! When I was a little girl, it was my way of "connecting" with my dad. He was a Avionics Technician with the 152nd TRG and taught me electronics. (my older sister had ZERO interest) So I tend to get obsessive over proper naming and definitions... keeping them straight also helps prevent confusion. ;^)

    14 hours ago, Kloudkicker said:

    Here is something I threw together. Well, merged buildings together is more like it. Now after making it on a 4x4 lot, it turned out fairly decente. Look it over and let me know what you think.

    Looks good! Once you post it up, it'll become a dependency, same as Simmer2's Power lots!

    12 hours ago, Kloudkicker said:

    So here is 4 pictures to look at. And 3 things to go over real quick.

    1. I noticed I had a prop family that was not what I thought it was and had to remove them. Here is the revised 6 industrial 1x2 6MVA lots. Is cell tower OK in there?

    2. I was referring to earlier about "being able to be placed anywhere", was for the area they are intended for but away from the road as they don't need road access. I the pictures is what I mean for the parking lot lot. It does not look to bad in here but I could imaging that they might in other cases. No biggy thou, I just thought I would mention it, just in case. And now I can show you as to what I had meant. Moving ON.

    3. There is a new lot at the intersection. A 1x1 indy lot. It could be the 3MVA you were looking for. U tell me. I merged two 1500kVa transformers together. So its wider now and thought it was worth a shot. BANG. 1500kVA +1500kVA = 3MVA right?. I did the math??? LOL. From here it looks like a car to me, LOL, a electric car maybe.

    1. The Cell tower looks fine. Makes it fit in well with the other lots.

    2. Ah... I get it. Me = dense. Moving on...

    3. LOL! It does look a little like a car! Still looks good, though. FYI, transformer power doesn't scale linearly... it's logarithmic. Double the size and you go up an order of magnitude. (x10) That's why a half size 1500 kVA transformer is about right (a little big even) for a 50 kVA transformer and why a 6 MVA transformer isn't much bigger than twice the size.

    Hope this helps!

    3 hours ago, Kloudkicker said:

    A few possible options for the 3MVA and 500kVA transformers. Its the best I can do with these packages that I know of in them.

    The indy 3MVA option like the last post, but in a smaller enclosure it not so bad. I did reverse the megered transformeres so the grills are not looking like tires(on right). LOL That can/will be corrected in the left one with the tower.( I tried four transformers together but that is impossible to make took good. LOD takes over like a BOSS.

    Below I took the 250kVA box and merged two the only way they would look good was long ways. And for the Com/Res look I thought half grass, half walkway. And no trees for the high density look. Back angle is the only one for below pics that is a little off on blending of boxxes.

    I am going to check the new update for the new prop and catalogue for any new props that will be of some benefits to the project. Options are getting thin with the "current" set.

    Speak up, I am all ears, and 3 arms.

    See my above comment regarding size doubling. For 2x the power, the transformer would only need be 30% larger. Does that help... or did I just become a PITA? ::blush::

    The 500 kVAs should blend well with large apartments and hi-rises.

    I'm sure whatever you come up with will look great! I appreciate the help while I fight with the back-end. (code issues... I crashed the game and am tracing down what happened... ugh!)

    Edit: Nailed down PART of the problem... without a spellchecker I'm hopeless! Typos and LUA code do NOT mix! Still having issues though, so I'm going to have to go over my code with a fine tooth comb and make sure I fixed ALL my typos.


      Edited by RobertaME  

    More stuff
    • Like 2

    Share this post


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

    I can follow what your saying. AC is a little strange to me, never learned large scale, and when 3 phase gets involved I have ADD all of sudden. But DC is my bread and butter. So I'm good to go. 

    • Like 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
    Posted:
    Last Online:  
     

    I have all the lots done that we talked about and going to do a further test on all of them. I should be having a ploping good time. O, I found a lost file(bonus) in another folder I forgot to move. That makes the 1x2 lot up to 8 in total. Six for the others. This is what I have... Plus the building I still have to go back and finish up and test. Moving right along.

    I hope the LUA magic is flowing for you. This group might be headed your way in a day or two, tops.

    ATransformerListOfMySmalls.jpg.4a75cdc2cdcb25292b9a6245a0917a0f.jpg

    • Like 1
    • Yes 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
    Posted:
    Last Online:  
     

    A birds eye view of all 32 lots, 5 time. Only need to slide the slide over to the right a tad and put a fire in the fire pit. Not to shabby. May have to change out one grass for something else. But other than that, they are real close to being ready.:bunny:

    Don't do it.jpg

    • Like 2
    • 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
  • Original Poster
  • Posted:
    Last Online:  
     
    6 minutes ago, Kloudkicker said:

    A birds eye view of all 32 lots, 5 time. Only need to slide the slide over to the right a tad and put a fire in the fire pit. Not to shabby. May have to change out one grass for something else. But other than that, they are real close to being ready.:bunny:

    Looks FANTASTIC!

    One thing... is it just me or do those 1500 kVA transformers look black? Might just be the picture...

    When you're all set, zip them up together and I'll have a go at grouping them into random plop lots, so when you plop any of the same type, you get a different one each time, then ship them back to you!

    You are AWESOME!

    • Like 3

    Share this post


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

    I didn't think the last building was too small but I wanted to see what it would look like 5x5 instead. I still have the other one to be used. It upsized in front and to the right, so I just went along with it and shifted the building left and was going for a pond in front grass area. More room for large props. Took a hot minute to find the matching grass color. Just wanted to see what you thought. We could even be both If you wanted. Its up to you. And nothing is permeant, I tend to change my mind on textures and props last minute. To get it just right. Than better then right. And than perfect. You know. LOL

    Options4all).jpg.bd5423cf772220d3fc938536cce8c130.jpg


      Edited by Kloudkicker  
    • Like 2

    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
  • Original Poster
  • Posted:
    Last Online:  
     

    Looks good! Either way is fine. Going BOTH will require adjusting the LUAs to account for it, but I left PLENTY of room in the tables for extra. (all total my mod can handle 256 power-related lots using Occupant Groups BB350000-BB3500FF; 16 of which are set aside for Electrical Features like this... of which only 3 are used right now... in total only 67 out of 256 Occupant Groups used)

    Just let me know which way you're going and I'll adjust accordingly. (maybe make the larger one have higher Reward Requirements, like already having 50 Wind Turbines built? Thoughts welcome!)

    • Like 1

    Share this post


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

    To be honest, when it comes to what you have planned using the code, that is fuzzy to me. How you feel like handling it is up to you. That took 25 min tops to alter to 5x5, nothing really. I just wanted to offer up options for you, more or less. The ball is in you court.

     

    Update: my thoughts are, um, if there is both, then the parking lot needs to be different. If there could be both in one city, it needs to look different. And maybe a small building, like the front half or something, on the 4x4 lot. IDK, I will finish up the first one we talked about and check it in game. And go from there.


      Edited by Kloudkicker  

    Update

    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
    Posted:
    Last Online:  
     

    Just got done doing a rough test on it. Looks good to me. Forgot to test night mode. Me BIG dummy, LOL. Also I have to run it with my plugin folder. Which I forgot to do to the ones you have, I am ashamed to admit. Good news, my sims loved the new building so much, they were lining up to get the first available jobs.

    All the same depends that I sent to you as before in PM. Hopefully I will have it ready for you when you send back the others. Don't see why not. *:8) Any suggestions?NewShopInTown2.jpg.8d894f1c03a36ec50924a469bb35f625.jpgNewShopInTown4.jpg.c244b6d95ca949e4d47cb2152c8f2920.jpgNewShopInTown.jpg.69d9b26f88eb8494f6e844de58903a19.jpgNewShopInTown3.jpg.7180a7ff71d5fba5292879526cfe0014.jpg

    Um, not really, it was the LM and MR and park effects in it from a blank lot. They get excited so easy. Its like they are not real. Weird

    • Like 2

    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
  • Original Poster
  • Posted:
    Last Online:  
     

    Love it almost as much as your Sims. ;^)

    Sorry I haven't had a chance to dig into the transformer set you sent me yet. Tomorrow is laundry day, so I'll have time in between loads to tackle it and bundle them as random plops. I may yet still make my Alpha release deadline this weekend, too. We'll see. Working on the unlock prerequisites for lots ATM. Here's what I have so far:

    Prerequisites.jpg.d9ce74222687b15feee858bb7eccf628.jpg

    I'm defining all the values as tuning_constant.xxx, (i.e. tuning_constant.24_NAT_GAS_ENERGY_DEMAND) so once the formulas are set, I can tweak the values without changing the underlying formulas, so if someone out there thinks one or more of these variables is off, just say the word and it can be changed with ease.

    Yes, this means that the only Maxis power plants you have at the start of a fresh city are the Coal, Oil, and Waste to Energy Plant (that and others if you have them installed, a bunch of other stuff from the STEX and LEX, etc.) and everyone's favorite, the Natural Gas plant, is one of the hardest to get.

    Edit: Oh, I'm also covering a new Custom Query with (appropriate) SFX and actually USEFUL info. (in addition to a few better joke stats... ::giggle::)


      Edited by RobertaME  

    More stuff
    • Like 4

    Share this post


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

    Wow, you are really into this. Hardcore if you ask me. But it seems to come easy to you, so that is pretty cool.

    Just thought I would inform you of a new up and coming batter, AP. He has built a really nice collection of wind industries lots. Here is his files page link. It may be something to think about including, or even for personal use. Cheers

    • Like 3

    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
    Posted:
    Last Online:  
     
    22 hours ago, RobertaME said:

    Love it almost as much as your Sims. ;^)

    Sorry I haven't had a chance to dig into the transformer set you sent me yet. Tomorrow is laundry day, so I'll have time in between loads to tackle it and bundle them as random plops. I may yet still make my Alpha release deadline this weekend, too. We'll see. Working on the unlock prerequisites for lots ATM. Here's what I have so far:

    Prerequisites.jpg.d9ce74222687b15feee858bb7eccf628.jpg

    I'm defining all the values as tuning_constant.xxx, (i.e. tuning_constant.24_NAT_GAS_ENERGY_DEMAND) so once the formulas are set, I can tweak the values without changing the underlying formulas, so if someone out there thinks one or more of these variables is off, just say the word and it can be changed with ease.

    Yes, this means that the only Maxis power plants you have at the start of a fresh city are the Coal, Oil, and Waste to Energy Plant (that and others if you have them installed, a bunch of other stuff from the STEX and LEX, etc.) and everyone's favorite, the Natural Gas plant, is one of the hardest to get.

    Edit: Oh, I'm also covering a new Custom Query with (appropriate) SFX and actually USEFUL info. (in addition to a few better joke stats... ::giggle::)

    I love charts and graphs and diagrams and and.... That one, I must admit, has got me really interested. The way you "guys" talked about it made me think it was "over the top" so to speak. But looking at that, it looks manageable. I am not to far into a new region, just a shit ton of hours building infrastructure across a dozen cities I have not played yet. And one giant city, going one my first one million sims, with a dozen or so supporting cities. That could be redone to upgrade to this new mod in a few days. I am going to give a good test drive first when you release the test version.


      Edited by Kloudkicker  

    Grammar
    • Like 3

    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
  • Original Poster
  • Posted:
    Last Online:  
     
    5 minutes ago, Kloudkicker said:

    I love chats and graphs and diagrams and and.... That one, I must admit, has got me really interested. The way you "guys" talked about it made me think it was "over the top" so to speak. But looking at that, it looks manageable.

    I'm hoping it's not overwhelming. I've tried to make it intuitive, so it's easy to pick up on, plus give all the supporting context info, so each lot shows its build requirements in the build menu just like the Maxis lots do and the advisors give altered responses, but with improvements.

    5 minutes ago, Kloudkicker said:

    I am not to far into a new region, just a shit ton of hours building infrastructure across a dozen cities I have not played yet. And one giant city, going one my first one million sims, with a dozen or so supporting cities. That could be redone to upgrade to this new mod in a few days. I am going to give a good test drive first when you release the test version.

    Just remember the mantra...

    BACK UP YOUR REGION FIRST!!!

    Seriously, I would hate for my mod to mess up your growing region. It's best to build from a blank one if possible. Trying to shoe-horn this into an existing city could have issues, due to the Exemplar and LUA overrides I use. I'm overriding several key LUA files and all the power plant Exemplars to do what I need to do. That's what was causing my CTDs the other day... and I was working in a region that I'd started under pre-Alpha version of my mod.

    It should play nice with other mods, but using it in existing cities might easily get them borked. I don't recommend it.

    • Like 3

    Share this post


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

    So I determined that there's an issue with the general idea of the mod. Since the smallest Transmission Substation is 10 MVA, and power plants depend on the size of the Transmission Station you have, when you plop your first one you get inundated with messages from your advisors about new power plants you can build... all at once.

    So I had a thought. What if not all power plants required a Transmission Station? What if some of the smaller plants only needed Distribution Substations? Plants that produce less than 5,000 MWh/month? (Wind, Solar, smaller Natural Gas, etc.) That way, as you build your Distribution Substations you get fewer messages at once as power plants become available in a smoother curve.

    I really need feedback on this point as it means changing the reward LUAs to suit. It's not a big deal, it's just changing one variable, but it's changing it in quite a few places... so I need feedback from the community regarding what level it should be at. (I think 5,000 MWh is good because 10 MVA is equal to 5840 MWh, but I think the W2E plant SHOULD need Transmission stations... thoughts welcome)

    Edit: For reference, there are 33 power plants supported in my mod. (not counting generators) Making the cut at 5000 MWh makes 18 of them buildable without Transmission Stations; the largest being Simmer2's 8 MW Geothermal plant.

    Edit 2: On re-consideration, I think I should draw the line a little lower so it drops the largest plant buildable without Transmission Stations down to being shoRt-mAn123's 6.5 MW Coal Power Plant at 4000 MWh/month. I could REALLY use some input here, so PLEASE leave a comment. I'm open to suggestions.


      Edited by RobertaME  

    Even more junk
    • Like 3

    Share this post


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

    The idea that smaller plants need smaller distribution facilities seems intuitive to me. At the start we just want to get going - fancy work later.  In essence we are building n small pyramids which over time are destined to become one big pyramid of power.

    If I've got a farm in the middle of nowhere I'd have just a windmill with wires, a small town some solar (say) with a distribution station. As it all gets bigger I need more things to connect and distribute just to handle the loads. By then I need options.

    • Like 3
    • Thanks 1

    Share this post


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

    Edit: For reference, there are 33 power plants supported in my mod. (not counting generators) Making the cut at 5000 MWh makes 18 of them buildable without Transmission Stations; the largest being Simmer2's 8 MW Geothermal plant.

    Edit 2: On re-consideration, I think I should draw the line a little lower so it drops the largest plant buildable without Transmission Stations down to being shoRt-mAn123's 6.5 MW Coal Power Plant at 4000 MWh/month. I could REALLY use some input here, so PLEASE leave a comment. I'm open to suggestions.

    It probably would be more flexible and easier for others getting started using the mod doing these changes you propose. Having some that are less restrictive would make small cities or such a less of a task to deal with. Most people have never thought of the power grid in such a fashion. It could provides different "levels" to achieve the over all idea of a fluctuating power system depending on my variables. One being day peak demand,  which could take time to adjust to with a lot of people playing on day time only. And not getting bombarded with the prompts would be nice. My 2 cents.

    • Like 1
    • 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
  • Original Poster
  • Posted:
    Last Online:  
     

    This leads to an issue where transmission capacity can and should be less than distribution capacity, since smaller plants don't need the transmission capacity, but they take up distribution capacity. It also means I'll need to track Small Power Plants separately from large ones... which means it requires a re-write of the gridbalance.lua... as follows:

    --
    -- gridbalance.lua
    --
    
    -- This LUA written by RobertaME Feb 2021 --
    -- These variables are used by the Rewards LUA to determine if the grid is powerful enough to add a new power plant.
    -- kVA is equal to 1.25 times kW rating; thus a 10 MW power plant has a potential kVA load of 12,500 kVA, or 12.5 MVA.
    -- This is based on power industry standard definitions and practices.
    
    -- Total kVA of each grid section, other than Production --
    TRANSFORMER_RATING = (sc4game.automata.get_source_building_count(hex2dec("BB350010"))*KVA_BB350010) + (sc4game.automata.get_source_building_count(hex2dec("BB350011"))*KVA_BB350011) + (sc4game.automata.get_source_building_count(hex2dec("BB350012"))*KVA_BB350012) + (sc4game.automata.get_source_building_count(hex2dec("BB350013"))*KVA_BB350013) + (sc4game.automata.get_source_building_count(hex2dec("BB350014"))*KVA_BB350014) + (sc4game.automata.get_source_building_count(hex2dec("BB350015"))*KVA_BB350015) + (sc4game.automata.get_source_building_count(hex2dec("BB350016"))*KVA_BB350016) + (sc4game.automata.get_source_building_count(hex2dec("BB350017"))*KVA_BB350017) + sc4game.automata.get_source_building_count(hex2dec("BB350018"))*KVA_BB350018) + (sc4game.automata.get_source_building_count(hex2dec("BB350019"))*KVA_BB350019) + (sc4game.automata.get_source_building_count(hex2dec("BB35001A"))*KVA_BB35001A) + (sc4game.automata.get_source_building_count(hex2dec("BB35001B"))*KVA_BB35001B) + (sc4game.automata.get_source_building_count(hex2dec("BB35001C"))*KVA_BB35001C) + (sc4game.automata.get_source_building_count(hex2dec("BB35001D"))*KVA_BB35001D) + (sc4game.automata.get_source_building_count(hex2dec("BB35001E"))*KVA_BB35001E) + (sc4game.automata.get_source_building_count(hex2dec("BB35001F"))*KVA_BB35001F)
    DISTRIBUTION_RATING = (sc4game.automata.get_source_building_count(hex2dec("BB350020"))*KVA_BB350020) + (sc4game.automata.get_source_building_count(hex2dec("BB350021"))*KVA_BB350021) + (sc4game.automata.get_source_building_count(hex2dec("BB350022"))*KVA_BB350022) + (sc4game.automata.get_source_building_count(hex2dec("BB350023"))*KVA_BB350023) + (sc4game.automata.get_source_building_count(hex2dec("BB350024"))*KVA_BB350024) + (sc4game.automata.get_source_building_count(hex2dec("BB350025"))*KVA_BB350025) + (sc4game.automata.get_source_building_count(hex2dec("BB350026"))*KVA_BB350026) + (sc4game.automata.get_source_building_count(hex2dec("BB350027"))*KVA_BB350027) + sc4game.automata.get_source_building_count(hex2dec("BB350028"))*KVA_BB350028) + (sc4game.automata.get_source_building_count(hex2dec("BB350029"))*KVA_BB350029) + (sc4game.automata.get_source_building_count(hex2dec("BB35002A"))*KVA_BB35002A) + (sc4game.automata.get_source_building_count(hex2dec("BB35002B"))*KVA_BB35002B) + (sc4game.automata.get_source_building_count(hex2dec("BB35002C"))*KVA_BB35002C) + (sc4game.automata.get_source_building_count(hex2dec("BB35002D"))*KVA_BB35002D) + (sc4game.automata.get_source_building_count(hex2dec("BB35002E"))*KVA_BB35002E) + (sc4game.automata.get_source_building_count(hex2dec("BB35002F"))*KVA_BB35002F)
    TRANSMISSION_RATING = (sc4game.automata.get_source_building_count(hex2dec("BB350030"))*KVA_BB350030) + (sc4game.automata.get_source_building_count(hex2dec("BB350031"))*KVA_BB350031) + (sc4game.automata.get_source_building_count(hex2dec("BB350032"))*KVA_BB350032) + (sc4game.automata.get_source_building_count(hex2dec("BB350033"))*KVA_BB350033) + (sc4game.automata.get_source_building_count(hex2dec("BB350034"))*KVA_BB350034) + (sc4game.automata.get_source_building_count(hex2dec("BB350035"))*KVA_BB350035) + (sc4game.automata.get_source_building_count(hex2dec("BB350036"))*KVA_BB350036) + (sc4game.automata.get_source_building_count(hex2dec("BB350037"))*KVA_BB350037) + sc4game.automata.get_source_building_count(hex2dec("BB350038"))*KVA_BB350038) + (sc4game.automata.get_source_building_count(hex2dec("BB350039"))*KVA_BB350039) + (sc4game.automata.get_source_building_count(hex2dec("BB35003A"))*KVA_BB35003A) + (sc4game.automata.get_source_building_count(hex2dec("BB35003B"))*KVA_BB35003B) + (sc4game.automata.get_source_building_count(hex2dec("BB35003C"))*KVA_BB35003C) + (sc4game.automata.get_source_building_count(hex2dec("BB35003D"))*KVA_BB35003D) + (sc4game.automata.get_source_building_count(hex2dec("BB35003E"))*KVA_BB35003E) + (sc4game.automata.get_source_building_count(hex2dec("BB35003F"))*KVA_BB35003F)
    
    -- Total kVA of each large power plant type and category --
    ELEC_F_RATING = (sc4game.automata.get_source_building_count(hex2dec("BB350040"))*KVA_BB350040) + (sc4game.automata.get_source_building_count(hex2dec("BB350041"))*KVA_BB350041) + (sc4game.automata.get_source_building_count(hex2dec("BB350042"))*KVA_BB350042) + (sc4game.automata.get_source_building_count(hex2dec("BB350043"))*KVA_BB350043) + (sc4game.automata.get_source_building_count(hex2dec("BB350044"))*KVA_BB350044) + (sc4game.automata.get_source_building_count(hex2dec("BB350045"))*KVA_BB350045) + (sc4game.automata.get_source_building_count(hex2dec("BB350046"))*KVA_BB350046) + (sc4game.automata.get_source_building_count(hex2dec("BB350047"))*KVA_BB350047) + sc4game.automata.get_source_building_count(hex2dec("BB350048"))*KVA_BB350048) + (sc4game.automata.get_source_building_count(hex2dec("BB350049"))*KVA_BB350049) + (sc4game.automata.get_source_building_count(hex2dec("BB35004A"))*KVA_BB35004A) + (sc4game.automata.get_source_building_count(hex2dec("BB35004B"))*KVA_BB35004B) + (sc4game.automata.get_source_building_count(hex2dec("BB35004C"))*KVA_BB35004C) + (sc4game.automata.get_source_building_count(hex2dec("BB35004D"))*KVA_BB35004D) + (sc4game.automata.get_source_building_count(hex2dec("BB35004E"))*KVA_BB35004E) + (sc4game.automata.get_source_building_count(hex2dec("BB35004F"))*KVA_BB35004F)
    CLEAN_I_RATING = (sc4game.automata.get_source_building_count(hex2dec("BB350050"))*KVA_BB350050) + (sc4game.automata.get_source_building_count(hex2dec("BB350051"))*KVA_BB350051) + (sc4game.automata.get_source_building_count(hex2dec("BB350052"))*KVA_BB350052) + (sc4game.automata.get_source_building_count(hex2dec("BB350053"))*KVA_BB350053) + (sc4game.automata.get_source_building_count(hex2dec("BB350054"))*KVA_BB350054) + (sc4game.automata.get_source_building_count(hex2dec("BB350055"))*KVA_BB350055) + (sc4game.automata.get_source_building_count(hex2dec("BB350056"))*KVA_BB350056) + (sc4game.automata.get_source_building_count(hex2dec("BB350057"))*KVA_BB350057) + sc4game.automata.get_source_building_count(hex2dec("BB350058"))*KVA_BB350058) + (sc4game.automata.get_source_building_count(hex2dec("BB350059"))*KVA_BB350059) + (sc4game.automata.get_source_building_count(hex2dec("BB35005A"))*KVA_BB35005A) + (sc4game.automata.get_source_building_count(hex2dec("BB35005B"))*KVA_BB35005B) + (sc4game.automata.get_source_building_count(hex2dec("BB35005C"))*KVA_BB35005C) + (sc4game.automata.get_source_building_count(hex2dec("BB35005D"))*KVA_BB35005D) + (sc4game.automata.get_source_building_count(hex2dec("BB35005E"))*KVA_BB35005E) + (sc4game.automata.get_source_building_count(hex2dec("BB35005F"))*KVA_BB35005F)
    CLEAN_B_RATING = (sc4game.automata.get_source_building_count(hex2dec("BB350060"))*KVA_BB350060) + (sc4game.automata.get_source_building_count(hex2dec("BB350061"))*KVA_BB350061) + (sc4game.automata.get_source_building_count(hex2dec("BB350062"))*KVA_BB350062) + (sc4game.automata.get_source_building_count(hex2dec("BB350063"))*KVA_BB350063) + (sc4game.automata.get_source_building_count(hex2dec("BB350064"))*KVA_BB350064) + (sc4game.automata.get_source_building_count(hex2dec("BB350065"))*KVA_BB350065) + (sc4game.automata.get_source_building_count(hex2dec("BB350066"))*KVA_BB350066) + (sc4game.automata.get_source_building_count(hex2dec("BB350067"))*KVA_BB350067) + sc4game.automata.get_source_building_count(hex2dec("BB350068"))*KVA_BB350068) + (sc4game.automata.get_source_building_count(hex2dec("BB350069"))*KVA_BB350069) + (sc4game.automata.get_source_building_count(hex2dec("BB35006A"))*KVA_BB35006A) + (sc4game.automata.get_source_building_count(hex2dec("BB35006B"))*KVA_BB35006B) + (sc4game.automata.get_source_building_count(hex2dec("BB35006C"))*KVA_BB35006C) + (sc4game.automata.get_source_building_count(hex2dec("BB35006D"))*KVA_BB35006D) + (sc4game.automata.get_source_building_count(hex2dec("BB35006E"))*KVA_BB35006E) + (sc4game.automata.get_source_building_count(hex2dec("BB35006F"))*KVA_BB35006F)
    CLEAN_P_RATING = (sc4game.automata.get_source_building_count(hex2dec("BB350070"))*KVA_BB350070) + (sc4game.automata.get_source_building_count(hex2dec("BB350071"))*KVA_BB350071) + (sc4game.automata.get_source_building_count(hex2dec("BB350072"))*KVA_BB350072) + (sc4game.automata.get_source_building_count(hex2dec("BB350073"))*KVA_BB350073) + (sc4game.automata.get_source_building_count(hex2dec("BB350074"))*KVA_BB350074) + (sc4game.automata.get_source_building_count(hex2dec("BB350075"))*KVA_BB350075) + (sc4game.automata.get_source_building_count(hex2dec("BB350076"))*KVA_BB350076) + (sc4game.automata.get_source_building_count(hex2dec("BB350077"))*KVA_BB350077) + sc4game.automata.get_source_building_count(hex2dec("BB350078"))*KVA_BB350078) + (sc4game.automata.get_source_building_count(hex2dec("BB350079"))*KVA_BB350079) + (sc4game.automata.get_source_building_count(hex2dec("BB35007A"))*KVA_BB35007A) + (sc4game.automata.get_source_building_count(hex2dec("BB35007B"))*KVA_BB35007B) + (sc4game.automata.get_source_building_count(hex2dec("BB35007C"))*KVA_BB35007C) + (sc4game.automata.get_source_building_count(hex2dec("BB35007D"))*KVA_BB35007D) + (sc4game.automata.get_source_building_count(hex2dec("BB35007E"))*KVA_BB35007E) + (sc4game.automata.get_source_building_count(hex2dec("BB35007F"))*KVA_BB35007F)
    PETRO_I_RATING = (sc4game.automata.get_source_building_count(hex2dec("BB350080"))*KVA_BB350080) + (sc4game.automata.get_source_building_count(hex2dec("BB350081"))*KVA_BB350081) + (sc4game.automata.get_source_building_count(hex2dec("BB350082"))*KVA_BB350082) + (sc4game.automata.get_source_building_count(hex2dec("BB350083"))*KVA_BB350083) + (sc4game.automata.get_source_building_count(hex2dec("BB350084"))*KVA_BB350084) + (sc4game.automata.get_source_building_count(hex2dec("BB350085"))*KVA_BB350085) + (sc4game.automata.get_source_building_count(hex2dec("BB350086"))*KVA_BB350086) + (sc4game.automata.get_source_building_count(hex2dec("BB350087"))*KVA_BB350087) + sc4game.automata.get_source_building_count(hex2dec("BB350088"))*KVA_BB350088) + (sc4game.automata.get_source_building_count(hex2dec("BB350089"))*KVA_BB350089) + (sc4game.automata.get_source_building_count(hex2dec("BB35008A"))*KVA_BB35008A) + (sc4game.automata.get_source_building_count(hex2dec("BB35008B"))*KVA_BB35008B) + (sc4game.automata.get_source_building_count(hex2dec("BB35008C"))*KVA_BB35008C) + (sc4game.automata.get_source_building_count(hex2dec("BB35008D"))*KVA_BB35008D) + (sc4game.automata.get_source_building_count(hex2dec("BB35008E"))*KVA_BB35008E) + (sc4game.automata.get_source_building_count(hex2dec("BB35008F"))*KVA_BB35008F)
    PETRO_B_RATING = (sc4game.automata.get_source_building_count(hex2dec("BB350090"))*KVA_BB350090) + (sc4game.automata.get_source_building_count(hex2dec("BB350091"))*KVA_BB350091) + (sc4game.automata.get_source_building_count(hex2dec("BB350092"))*KVA_BB350092) + (sc4game.automata.get_source_building_count(hex2dec("BB350093"))*KVA_BB350093) + (sc4game.automata.get_source_building_count(hex2dec("BB350094"))*KVA_BB350094) + (sc4game.automata.get_source_building_count(hex2dec("BB350095"))*KVA_BB350095) + (sc4game.automata.get_source_building_count(hex2dec("BB350096"))*KVA_BB350096) + (sc4game.automata.get_source_building_count(hex2dec("BB350097"))*KVA_BB350097) + sc4game.automata.get_source_building_count(hex2dec("BB350098"))*KVA_BB350098) + (sc4game.automata.get_source_building_count(hex2dec("BB350099"))*KVA_BB350099) + (sc4game.automata.get_source_building_count(hex2dec("BB35009A"))*KVA_BB35009A) + (sc4game.automata.get_source_building_count(hex2dec("BB35009B"))*KVA_BB35009B) + (sc4game.automata.get_source_building_count(hex2dec("BB35009C"))*KVA_BB35009C) + (sc4game.automata.get_source_building_count(hex2dec("BB35009D"))*KVA_BB35009D) + (sc4game.automata.get_source_building_count(hex2dec("BB35009E"))*KVA_BB35009E) + (sc4game.automata.get_source_building_count(hex2dec("BB35009F"))*KVA_BB35009F)
    PETRO_P_RATING = (sc4game.automata.get_source_building_count(hex2dec("BB3500A0"))*KVA_BB3500A0) + (sc4game.automata.get_source_building_count(hex2dec("BB3500A1"))*KVA_BB3500A1) + (sc4game.automata.get_source_building_count(hex2dec("BB3500A2"))*KVA_BB3500A2) + (sc4game.automata.get_source_building_count(hex2dec("BB3500A3"))*KVA_BB3500A3) + (sc4game.automata.get_source_building_count(hex2dec("BB3500A4"))*KVA_BB3500A4) + (sc4game.automata.get_source_building_count(hex2dec("BB3500A5"))*KVA_BB3500A5) + (sc4game.automata.get_source_building_count(hex2dec("BB3500A6"))*KVA_BB3500A6) + (sc4game.automata.get_source_building_count(hex2dec("BB3500A7"))*KVA_BB3500A7) + sc4game.automata.get_source_building_count(hex2dec("BB3500A8"))*KVA_BB3500A8) + (sc4game.automata.get_source_building_count(hex2dec("BB3500A9"))*KVA_BB3500A9) + (sc4game.automata.get_source_building_count(hex2dec("BB3500AA"))*KVA_BB3500AA) + (sc4game.automata.get_source_building_count(hex2dec("BB3500AB"))*KVA_BB3500AB) + (sc4game.automata.get_source_building_count(hex2dec("BB3500AC"))*KVA_BB3500AC) + (sc4game.automata.get_source_building_count(hex2dec("BB3500AD"))*KVA_BB3500AD) + (sc4game.automata.get_source_building_count(hex2dec("BB3500AE"))*KVA_BB3500AE) + (sc4game.automata.get_source_building_count(hex2dec("BB3500AF"))*KVA_BB3500AF)
    CARBON_I_RATING = (sc4game.automata.get_source_building_count(hex2dec("BB3500B0"))*KVA_BB3500B0) + (sc4game.automata.get_source_building_count(hex2dec("BB3500B1"))*KVA_BB3500B1) + (sc4game.automata.get_source_building_count(hex2dec("BB3500B2"))*KVA_BB3500B2) + (sc4game.automata.get_source_building_count(hex2dec("BB3500B3"))*KVA_BB3500B3) + (sc4game.automata.get_source_building_count(hex2dec("BB3500B4"))*KVA_BB3500B4) + (sc4game.automata.get_source_building_count(hex2dec("BB3500B5"))*KVA_BB3500B5) + (sc4game.automata.get_source_building_count(hex2dec("BB3500B6"))*KVA_BB3500B6) + (sc4game.automata.get_source_building_count(hex2dec("BB3500B7"))*KVA_BB3500B7) + sc4game.automata.get_source_building_count(hex2dec("BB3500B8"))*KVA_BB3500B8) + (sc4game.automata.get_source_building_count(hex2dec("BB3500B9"))*KVA_BB3500B9) + (sc4game.automata.get_source_building_count(hex2dec("BB3500BA"))*KVA_BB3500BA) + (sc4game.automata.get_source_building_count(hex2dec("BB3500BB"))*KVA_BB3500BB) + (sc4game.automata.get_source_building_count(hex2dec("BB3500BC"))*KVA_BB3500BC) + (sc4game.automata.get_source_building_count(hex2dec("BB3500BD"))*KVA_BB3500BD) + (sc4game.automata.get_source_building_count(hex2dec("BB3500BE"))*KVA_BB3500BE) + (sc4game.automata.get_source_building_count(hex2dec("BB3500BF"))*KVA_BB3500BF)
    CARBON_B_RATING = (sc4game.automata.get_source_building_count(hex2dec("BB3500C0"))*KVA_BB3500C0) + (sc4game.automata.get_source_building_count(hex2dec("BB3500C1"))*KVA_BB3500C1) + (sc4game.automata.get_source_building_count(hex2dec("BB3500C2"))*KVA_BB3500C2) + (sc4game.automata.get_source_building_count(hex2dec("BB3500C3"))*KVA_BB3500C3) + (sc4game.automata.get_source_building_count(hex2dec("BB3500C4"))*KVA_BB3500C4) + (sc4game.automata.get_source_building_count(hex2dec("BB3500C5"))*KVA_BB3500C5) + (sc4game.automata.get_source_building_count(hex2dec("BB3500C6"))*KVA_BB3500C6) + (sc4game.automata.get_source_building_count(hex2dec("BB3500C7"))*KVA_BB3500C7) + sc4game.automata.get_source_building_count(hex2dec("BB3500C8"))*KVA_BB3500C8) + (sc4game.automata.get_source_building_count(hex2dec("BB3500C9"))*KVA_BB3500C9) + (sc4game.automata.get_source_building_count(hex2dec("BB3500CA"))*KVA_BB3500CA) + (sc4game.automata.get_source_building_count(hex2dec("BB3500CB"))*KVA_BB3500CB) + (sc4game.automata.get_source_building_count(hex2dec("BB3500CC"))*KVA_BB3500CC) + (sc4game.automata.get_source_building_count(hex2dec("BB3500CD"))*KVA_BB3500CD) + (sc4game.automata.get_source_building_count(hex2dec("BB3500CE"))*KVA_BB3500CE) + (sc4game.automata.get_source_building_count(hex2dec("BB3500CF"))*KVA_BB3500CF)
    CARBON_P_RATING = (sc4game.automata.get_source_building_count(hex2dec("BB3500D0"))*KVA_BB3500D0) + (sc4game.automata.get_source_building_count(hex2dec("BB3500D1"))*KVA_BB3500D1) + (sc4game.automata.get_source_building_count(hex2dec("BB3500D2"))*KVA_BB3500D2) + (sc4game.automata.get_source_building_count(hex2dec("BB3500D3"))*KVA_BB3500D3) + (sc4game.automata.get_source_building_count(hex2dec("BB3500D4"))*KVA_BB3500D4) + (sc4game.automata.get_source_building_count(hex2dec("BB3500D5"))*KVA_BB3500D5) + (sc4game.automata.get_source_building_count(hex2dec("BB3500D6"))*KVA_BB3500D6) + (sc4game.automata.get_source_building_count(hex2dec("BB3500D7"))*KVA_BB3500D7) + sc4game.automata.get_source_building_count(hex2dec("BB3500D8"))*KVA_BB3500D8) + (sc4game.automata.get_source_building_count(hex2dec("BB3500D9"))*KVA_BB3500D9) + (sc4game.automata.get_source_building_count(hex2dec("BB3500DA"))*KVA_BB3500DA) + (sc4game.automata.get_source_building_count(hex2dec("BB3500DB"))*KVA_BB3500DB) + (sc4game.automata.get_source_building_count(hex2dec("BB3500DC"))*KVA_BB3500DC) + (sc4game.automata.get_source_building_count(hex2dec("BB3500DD"))*KVA_BB3500DD) + (sc4game.automata.get_source_building_count(hex2dec("BB3500DE"))*KVA_BB3500DE) + (sc4game.automata.get_source_building_count(hex2dec("BB3500DF"))*KVA_BB3500DF)
    OTHER_I_RATING = (sc4game.automata.get_source_building_count(hex2dec("BB3500E0"))*KVA_BB3500E0) + (sc4game.automata.get_source_building_count(hex2dec("BB3500E1"))*KVA_BB3500E1) + (sc4game.automata.get_source_building_count(hex2dec("BB3500E2"))*KVA_BB3500E2) + (sc4game.automata.get_source_building_count(hex2dec("BB3500E3"))*KVA_BB3500E3) + (sc4game.automata.get_source_building_count(hex2dec("BB3500E4"))*KVA_BB3500E4)
    OTHER_B_RATING = (sc4game.automata.get_source_building_count(hex2dec("BB3500E5"))*KVA_BB3500E5) + (sc4game.automata.get_source_building_count(hex2dec("BB3500E6"))*KVA_BB3500E6) + (sc4game.automata.get_source_building_count(hex2dec("BB3500E7"))*KVA_BB3500E7) + sc4game.automata.get_source_building_count(hex2dec("BB3500E8"))*KVA_BB3500E8) + (sc4game.automata.get_source_building_count(hex2dec("BB3500E9"))*KVA_BB3500E9)
    OTHER_P_RATING = (sc4game.automata.get_source_building_count(hex2dec("BB3500EA"))*KVA_BB3500EA) + (sc4game.automata.get_source_building_count(hex2dec("BB3500EB"))*KVA_BB3500EB) + (sc4game.automata.get_source_building_count(hex2dec("BB3500EC"))*KVA_BB3500EC) + (sc4game.automata.get_source_building_count(hex2dec("BB3500ED"))*KVA_BB3500ED) + (sc4game.automata.get_source_building_count(hex2dec("BB3500EE"))*KVA_BB3500EE)
    
    -- Total kVA of each small power plant type and category --
    S_ELEC_F_RATING = (sc4game.automata.get_source_building_count(hex2dec("BB350140"))*KVA_BB350040) + (sc4game.automata.get_source_building_count(hex2dec("BB350141"))*KVA_BB350041) + (sc4game.automata.get_source_building_count(hex2dec("BB350142"))*KVA_BB350042) + (sc4game.automata.get_source_building_count(hex2dec("BB350143"))*KVA_BB350043) + (sc4game.automata.get_source_building_count(hex2dec("BB350144"))*KVA_BB350044) + (sc4game.automata.get_source_building_count(hex2dec("BB350145"))*KVA_BB350045) + (sc4game.automata.get_source_building_count(hex2dec("BB350146"))*KVA_BB350046) + (sc4game.automata.get_source_building_count(hex2dec("BB350147"))*KVA_BB350047) + sc4game.automata.get_source_building_count(hex2dec("BB350148"))*KVA_BB350048) + (sc4game.automata.get_source_building_count(hex2dec("BB350149"))*KVA_BB350049) + (sc4game.automata.get_source_building_count(hex2dec("BB35014A"))*KVA_BB35004A) + (sc4game.automata.get_source_building_count(hex2dec("BB35014B"))*KVA_BB35004B) + (sc4game.automata.get_source_building_count(hex2dec("BB35014C"))*KVA_BB35004C) + (sc4game.automata.get_source_building_count(hex2dec("BB35014D"))*KVA_BB35004D) + (sc4game.automata.get_source_building_count(hex2dec("BB35014E"))*KVA_BB35004E) + (sc4game.automata.get_source_building_count(hex2dec("BB35014F"))*KVA_BB35004F)
    S_CLEAN_I_RATING = (sc4game.automata.get_source_building_count(hex2dec("BB350150"))*KVA_BB350050) + (sc4game.automata.get_source_building_count(hex2dec("BB350151"))*KVA_BB350051) + (sc4game.automata.get_source_building_count(hex2dec("BB350152"))*KVA_BB350052) + (sc4game.automata.get_source_building_count(hex2dec("BB350153"))*KVA_BB350053) + (sc4game.automata.get_source_building_count(hex2dec("BB350154"))*KVA_BB350054) + (sc4game.automata.get_source_building_count(hex2dec("BB350155"))*KVA_BB350055) + (sc4game.automata.get_source_building_count(hex2dec("BB350156"))*KVA_BB350056) + (sc4game.automata.get_source_building_count(hex2dec("BB350157"))*KVA_BB350057) + sc4game.automata.get_source_building_count(hex2dec("BB350158"))*KVA_BB350058) + (sc4game.automata.get_source_building_count(hex2dec("BB350159"))*KVA_BB350059) + (sc4game.automata.get_source_building_count(hex2dec("BB35015A"))*KVA_BB35005A) + (sc4game.automata.get_source_building_count(hex2dec("BB35015B"))*KVA_BB35005B) + (sc4game.automata.get_source_building_count(hex2dec("BB35015C"))*KVA_BB35005C) + (sc4game.automata.get_source_building_count(hex2dec("BB35015D"))*KVA_BB35005D) + (sc4game.automata.get_source_building_count(hex2dec("BB35015E"))*KVA_BB35005E) + (sc4game.automata.get_source_building_count(hex2dec("BB35015F"))*KVA_BB35005F)
    S_CLEAN_B_RATING = (sc4game.automata.get_source_building_count(hex2dec("BB350160"))*KVA_BB350060) + (sc4game.automata.get_source_building_count(hex2dec("BB350161"))*KVA_BB350061) + (sc4game.automata.get_source_building_count(hex2dec("BB350162"))*KVA_BB350062) + (sc4game.automata.get_source_building_count(hex2dec("BB350163"))*KVA_BB350063) + (sc4game.automata.get_source_building_count(hex2dec("BB350164"))*KVA_BB350064) + (sc4game.automata.get_source_building_count(hex2dec("BB350165"))*KVA_BB350065) + (sc4game.automata.get_source_building_count(hex2dec("BB350166"))*KVA_BB350066) + (sc4game.automata.get_source_building_count(hex2dec("BB350167"))*KVA_BB350067) + sc4game.automata.get_source_building_count(hex2dec("BB350168"))*KVA_BB350068) + (sc4game.automata.get_source_building_count(hex2dec("BB350169"))*KVA_BB350069) + (sc4game.automata.get_source_building_count(hex2dec("BB35016A"))*KVA_BB35006A) + (sc4game.automata.get_source_building_count(hex2dec("BB35016B"))*KVA_BB35006B) + (sc4game.automata.get_source_building_count(hex2dec("BB35016C"))*KVA_BB35006C) + (sc4game.automata.get_source_building_count(hex2dec("BB35016D"))*KVA_BB35006D) + (sc4game.automata.get_source_building_count(hex2dec("BB35016E"))*KVA_BB35006E) + (sc4game.automata.get_source_building_count(hex2dec("BB35016F"))*KVA_BB35006F)
    S_CLEAN_P_RATING = (sc4game.automata.get_source_building_count(hex2dec("BB350170"))*KVA_BB350070) + (sc4game.automata.get_source_building_count(hex2dec("BB350171"))*KVA_BB350071) + (sc4game.automata.get_source_building_count(hex2dec("BB350172"))*KVA_BB350072) + (sc4game.automata.get_source_building_count(hex2dec("BB350173"))*KVA_BB350073) + (sc4game.automata.get_source_building_count(hex2dec("BB350174"))*KVA_BB350074) + (sc4game.automata.get_source_building_count(hex2dec("BB350175"))*KVA_BB350075) + (sc4game.automata.get_source_building_count(hex2dec("BB350176"))*KVA_BB350076) + (sc4game.automata.get_source_building_count(hex2dec("BB350177"))*KVA_BB350077) + sc4game.automata.get_source_building_count(hex2dec("BB350178"))*KVA_BB350078) + (sc4game.automata.get_source_building_count(hex2dec("BB350179"))*KVA_BB350079) + (sc4game.automata.get_source_building_count(hex2dec("BB35017A"))*KVA_BB35007A) + (sc4game.automata.get_source_building_count(hex2dec("BB35017B"))*KVA_BB35007B) + (sc4game.automata.get_source_building_count(hex2dec("BB35017C"))*KVA_BB35007C) + (sc4game.automata.get_source_building_count(hex2dec("BB35017D"))*KVA_BB35007D) + (sc4game.automata.get_source_building_count(hex2dec("BB35017E"))*KVA_BB35007E) + (sc4game.automata.get_source_building_count(hex2dec("BB35017F"))*KVA_BB35007F)
    S_PETRO_I_RATING = (sc4game.automata.get_source_building_count(hex2dec("BB350180"))*KVA_BB350080) + (sc4game.automata.get_source_building_count(hex2dec("BB350181"))*KVA_BB350081) + (sc4game.automata.get_source_building_count(hex2dec("BB350182"))*KVA_BB350082) + (sc4game.automata.get_source_building_count(hex2dec("BB350183"))*KVA_BB350083) + (sc4game.automata.get_source_building_count(hex2dec("BB350184"))*KVA_BB350084) + (sc4game.automata.get_source_building_count(hex2dec("BB350185"))*KVA_BB350085) + (sc4game.automata.get_source_building_count(hex2dec("BB350186"))*KVA_BB350086) + (sc4game.automata.get_source_building_count(hex2dec("BB350187"))*KVA_BB350087) + sc4game.automata.get_source_building_count(hex2dec("BB350188"))*KVA_BB350088) + (sc4game.automata.get_source_building_count(hex2dec("BB350189"))*KVA_BB350089) + (sc4game.automata.get_source_building_count(hex2dec("BB35018A"))*KVA_BB35008A) + (sc4game.automata.get_source_building_count(hex2dec("BB35018B"))*KVA_BB35008B) + (sc4game.automata.get_source_building_count(hex2dec("BB35018C"))*KVA_BB35008C) + (sc4game.automata.get_source_building_count(hex2dec("BB35018D"))*KVA_BB35008D) + (sc4game.automata.get_source_building_count(hex2dec("BB35018E"))*KVA_BB35008E) + (sc4game.automata.get_source_building_count(hex2dec("BB35018F"))*KVA_BB35008F)
    S_PETRO_B_RATING = (sc4game.automata.get_source_building_count(hex2dec("BB350190"))*KVA_BB350090) + (sc4game.automata.get_source_building_count(hex2dec("BB350191"))*KVA_BB350091) + (sc4game.automata.get_source_building_count(hex2dec("BB350192"))*KVA_BB350092) + (sc4game.automata.get_source_building_count(hex2dec("BB350193"))*KVA_BB350093) + (sc4game.automata.get_source_building_count(hex2dec("BB350194"))*KVA_BB350094) + (sc4game.automata.get_source_building_count(hex2dec("BB350195"))*KVA_BB350095) + (sc4game.automata.get_source_building_count(hex2dec("BB350196"))*KVA_BB350096) + (sc4game.automata.get_source_building_count(hex2dec("BB350197"))*KVA_BB350097) + sc4game.automata.get_source_building_count(hex2dec("BB350198"))*KVA_BB350098) + (sc4game.automata.get_source_building_count(hex2dec("BB350199"))*KVA_BB350099) + (sc4game.automata.get_source_building_count(hex2dec("BB35019A"))*KVA_BB35009A) + (sc4game.automata.get_source_building_count(hex2dec("BB35019B"))*KVA_BB35009B) + (sc4game.automata.get_source_building_count(hex2dec("BB35019C"))*KVA_BB35009C) + (sc4game.automata.get_source_building_count(hex2dec("BB35019D"))*KVA_BB35009D) + (sc4game.automata.get_source_building_count(hex2dec("BB35019E"))*KVA_BB35009E) + (sc4game.automata.get_source_building_count(hex2dec("BB35019F"))*KVA_BB35009F)
    S_PETRO_P_RATING = (sc4game.automata.get_source_building_count(hex2dec("BB3501A0"))*KVA_BB3500A0) + (sc4game.automata.get_source_building_count(hex2dec("BB3501A1"))*KVA_BB3500A1) + (sc4game.automata.get_source_building_count(hex2dec("BB3501A2"))*KVA_BB3500A2) + (sc4game.automata.get_source_building_count(hex2dec("BB3501A3"))*KVA_BB3500A3) + (sc4game.automata.get_source_building_count(hex2dec("BB3501A4"))*KVA_BB3500A4) + (sc4game.automata.get_source_building_count(hex2dec("BB3501A5"))*KVA_BB3500A5) + (sc4game.automata.get_source_building_count(hex2dec("BB3501A6"))*KVA_BB3500A6) + (sc4game.automata.get_source_building_count(hex2dec("BB3501A7"))*KVA_BB3500A7) + sc4game.automata.get_source_building_count(hex2dec("BB3501A8"))*KVA_BB3500A8) + (sc4game.automata.get_source_building_count(hex2dec("BB3501A9"))*KVA_BB3500A9) + (sc4game.automata.get_source_building_count(hex2dec("BB3501AA"))*KVA_BB3500AA) + (sc4game.automata.get_source_building_count(hex2dec("BB3501AB"))*KVA_BB3500AB) + (sc4game.automata.get_source_building_count(hex2dec("BB3501AC"))*KVA_BB3500AC) + (sc4game.automata.get_source_building_count(hex2dec("BB3501AD"))*KVA_BB3500AD) + (sc4game.automata.get_source_building_count(hex2dec("BB3501AE"))*KVA_BB3500AE) + (sc4game.automata.get_source_building_count(hex2dec("BB3501AF"))*KVA_BB3500AF)
    S_CARBON_I_RATING = (sc4game.automata.get_source_building_count(hex2dec("BB3501B0"))*KVA_BB3500B0) + (sc4game.automata.get_source_building_count(hex2dec("BB3501B1"))*KVA_BB3500B1) + (sc4game.automata.get_source_building_count(hex2dec("BB3501B2"))*KVA_BB3500B2) + (sc4game.automata.get_source_building_count(hex2dec("BB3501B3"))*KVA_BB3500B3) + (sc4game.automata.get_source_building_count(hex2dec("BB3501B4"))*KVA_BB3500B4) + (sc4game.automata.get_source_building_count(hex2dec("BB3501B5"))*KVA_BB3500B5) + (sc4game.automata.get_source_building_count(hex2dec("BB3501B6"))*KVA_BB3500B6) + (sc4game.automata.get_source_building_count(hex2dec("BB3501B7"))*KVA_BB3500B7) + sc4game.automata.get_source_building_count(hex2dec("BB3501B8"))*KVA_BB3500B8) + (sc4game.automata.get_source_building_count(hex2dec("BB3501B9"))*KVA_BB3500B9) + (sc4game.automata.get_source_building_count(hex2dec("BB3501BA"))*KVA_BB3500BA) + (sc4game.automata.get_source_building_count(hex2dec("BB3501BB"))*KVA_BB3500BB) + (sc4game.automata.get_source_building_count(hex2dec("BB3501BC"))*KVA_BB3500BC) + (sc4game.automata.get_source_building_count(hex2dec("BB3501BD"))*KVA_BB3500BD) + (sc4game.automata.get_source_building_count(hex2dec("BB3501BE"))*KVA_BB3500BE) + (sc4game.automata.get_source_building_count(hex2dec("BB3501BF"))*KVA_BB3500BF)
    S_CARBON_B_RATING = (sc4game.automata.get_source_building_count(hex2dec("BB3501C0"))*KVA_BB3500C0) + (sc4game.automata.get_source_building_count(hex2dec("BB3501C1"))*KVA_BB3500C1) + (sc4game.automata.get_source_building_count(hex2dec("BB3501C2"))*KVA_BB3500C2) + (sc4game.automata.get_source_building_count(hex2dec("BB3501C3"))*KVA_BB3500C3) + (sc4game.automata.get_source_building_count(hex2dec("BB3501C4"))*KVA_BB3500C4) + (sc4game.automata.get_source_building_count(hex2dec("BB3501C5"))*KVA_BB3500C5) + (sc4game.automata.get_source_building_count(hex2dec("BB3501C6"))*KVA_BB3500C6) + (sc4game.automata.get_source_building_count(hex2dec("BB3501C7"))*KVA_BB3500C7) + sc4game.automata.get_source_building_count(hex2dec("BB3501C8"))*KVA_BB3500C8) + (sc4game.automata.get_source_building_count(hex2dec("BB3501C9"))*KVA_BB3500C9) + (sc4game.automata.get_source_building_count(hex2dec("BB3501CA"))*KVA_BB3500CA) + (sc4game.automata.get_source_building_count(hex2dec("BB3501CB"))*KVA_BB3500CB) + (sc4game.automata.get_source_building_count(hex2dec("BB3501CC"))*KVA_BB3500CC) + (sc4game.automata.get_source_building_count(hex2dec("BB3501CD"))*KVA_BB3500CD) + (sc4game.automata.get_source_building_count(hex2dec("BB3501CE"))*KVA_BB3500CE) + (sc4game.automata.get_source_building_count(hex2dec("BB3501CF"))*KVA_BB3500CF)
    S_CARBON_P_RATING = (sc4game.automata.get_source_building_count(hex2dec("BB3501D0"))*KVA_BB3500D0) + (sc4game.automata.get_source_building_count(hex2dec("BB3501D1"))*KVA_BB3500D1) + (sc4game.automata.get_source_building_count(hex2dec("BB3501D2"))*KVA_BB3500D2) + (sc4game.automata.get_source_building_count(hex2dec("BB3501D3"))*KVA_BB3500D3) + (sc4game.automata.get_source_building_count(hex2dec("BB3501D4"))*KVA_BB3500D4) + (sc4game.automata.get_source_building_count(hex2dec("BB3501D5"))*KVA_BB3500D5) + (sc4game.automata.get_source_building_count(hex2dec("BB3501D6"))*KVA_BB3500D6) + (sc4game.automata.get_source_building_count(hex2dec("BB3501D7"))*KVA_BB3500D7) + sc4game.automata.get_source_building_count(hex2dec("BB3501D8"))*KVA_BB3500D8) + (sc4game.automata.get_source_building_count(hex2dec("BB3501D9"))*KVA_BB3500D9) + (sc4game.automata.get_source_building_count(hex2dec("BB3501DA"))*KVA_BB3500DA) + (sc4game.automata.get_source_building_count(hex2dec("BB3501DB"))*KVA_BB3500DB) + (sc4game.automata.get_source_building_count(hex2dec("BB3501DC"))*KVA_BB3500DC) + (sc4game.automata.get_source_building_count(hex2dec("BB3501DD"))*KVA_BB3500DD) + (sc4game.automata.get_source_building_count(hex2dec("BB3501DE"))*KVA_BB3500DE) + (sc4game.automata.get_source_building_count(hex2dec("BB3501DF"))*KVA_BB3500DF)
    S_OTHER_I_RATING = (sc4game.automata.get_source_building_count(hex2dec("BB3501E0"))*KVA_BB3500E0) + (sc4game.automata.get_source_building_count(hex2dec("BB3501E1"))*KVA_BB3500E1) + (sc4game.automata.get_source_building_count(hex2dec("BB3501E2"))*KVA_BB3500E2) + (sc4game.automata.get_source_building_count(hex2dec("BB3501E3"))*KVA_BB3500E3) + (sc4game.automata.get_source_building_count(hex2dec("BB3501E4"))*KVA_BB3500E4)
    S_OTHER_B_RATING = (sc4game.automata.get_source_building_count(hex2dec("BB3501E5"))*KVA_BB3500E5) + (sc4game.automata.get_source_building_count(hex2dec("BB3501E6"))*KVA_BB3500E6) + (sc4game.automata.get_source_building_count(hex2dec("BB3501E7"))*KVA_BB3500E7) + sc4game.automata.get_source_building_count(hex2dec("BB3501E8"))*KVA_BB3500E8) + (sc4game.automata.get_source_building_count(hex2dec("BB3501E9"))*KVA_BB3500E9)
    S_OTHER_P_RATING = (sc4game.automata.get_source_building_count(hex2dec("BB3501EA"))*KVA_BB3500EA) + (sc4game.automata.get_source_building_count(hex2dec("BB3501EB"))*KVA_BB3500EB) + (sc4game.automata.get_source_building_count(hex2dec("BB3501EC"))*KVA_BB3500EC) + (sc4game.automata.get_source_building_count(hex2dec("BB3501ED"))*KVA_BB3500ED) + (sc4game.automata.get_source_building_count(hex2dec("BB3501EE"))*KVA_BB3500EE)
    
    -- Total kVA of each large power plant by type (Intermediate, Base, Peak) --
    -- This is used in the definitions below and also in Advisor messages and custom Queries --
    LARGE_I_RATING = CLEAN_I_RATING + PETRO_I_RATING + CARBON_I_RATING + OTHER_I_RATING
    LARGE_B_RATING = CLEAN_B_RATING + PETRO_B_RATING + CARBON_B_RATING + OTHER_B_RATING
    LARGE_P_RATING = CLEAN_P_RATING + PETRO_P_RATING + CARBON_P_RATING + OTHER_P_RATING
    
    -- Total kVA of each small power plant by type (Intermediate, Base, Peak) --
    -- This is used in the definitions below and also in Advisor messages and custom Queries --
    SMALL_I_RATING = S_CLEAN_I_RATING + S_PETRO_I_RATING + S_CARBON_I_RATING + S_OTHER_I_RATING
    SMALL_B_RATING = S_CLEAN_B_RATING + S_PETRO_B_RATING + S_CARBON_B_RATING + S_OTHER_B_RATING
    SMALL_P_RATING = S_CLEAN_P_RATING + S_PETRO_P_RATING + S_CARBON_P_RATING + S_OTHER_P_RATING
    
    -- Total kVA of all large power plants and electrical features --
    -- This is used in the definition below and for use in Advisor messages and custom Queries --
    LARGE_PLANTS_RATING = LARGE_I_RATING + LARGE_B_RATING + LARGE_P_RATING + ELEC_F_RATING
    
    -- Total kVA of all small power plants and electrical features, other than Generators (which do not count against grid load requirements) --
    -- This is used in the definition below and for use in Advisor messages and custom Queries --
    SMALL_PLANTS_RATING = SMALL_I_RATING + SMALL_B_RATING + SMALL_P_RATING + S_ELEC_F_RATING
    
    -- Add Imported Power to the grid load requirement --
    -- While a lack of grid capacity will not prevent importing power, the imported power is accounted for to determine what power plants you can build --
    -- The factor of 0.584 applied to Imported power coverts the unit from MWh/month to kVA --
    -- This is based on an assumed Power Factor of 0.8 that is used by most power plant companies when designing their plants. --
    LARGE_POWER_RATING = LARGE_PLANTS_RATING + (game.g_power_imported/0.584)
    
    -- This value gives the current difference between the grid power production versus the grid transmission capacity --
    -- When setting up the reward LUA for large power plants, use the condition, "TRANSMIT_AVAILABLE < KVA_BB3500xx" --
    -- where xx is the 2-hex code for that power plant (eg. The Coal Plant is code C9, defined in the tuning constants LUA) --
    TRANSMIT_AVAILABLE = TRANSMISSION_RATING - LARGE_POWER_RATING
    
    -- This value gives the current difference between the grid transmission capacity versus the grid distribution capacity --
    -- When setting up the reward LUA for each Transmission Substation or small power plant, use the condition, "DISTRIB_AVAILABLE < KVA_BB3500xx" --
    -- where xx is the 2-hex code for that Transmission Substation (eg. the 10 MVA substation is code 30, defined in the tuning constants LUA) --
    DISTRIB_AVAILABLE = DISTRIBUTION_RATING - ( TRANSMISSION_RATING + SMALL_PLANTS_RATING )
    
    -- This value gives the current difference between the distribution grid capacity versus the grid transformer capacity --
    -- When setting up the reward LUA for each Distribution Substation, use the condition, "TRANSFORM_AVAILABLE < KVA_BB3500xx" --
    -- where xx is the 2-hex code for that Distribution Substation (eg. the 1 MVA substation is code 20, defined in the tuning constants LUA) --
    TRANSFORM_AVAILABLE = TRANSFORMER_RATING - DISTRIBUTION_RATING

    Can someone check my math to be sure its right? Thanks!

    This also means that when you add a Transmission Station to the grid, it takes a big chunk of distribution grid capacity, even if it's not being used. (or not being used at full capacity)


      Edited by RobertaME  

    Fixed an error, doubling the number of constants unnecessarily
    • Like 4

    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