Jump to content
RobertaME

(Mod) AMPS Development Thread

785 posts in this topic Last Reply

Highlighted Posts

Posted:
Last Online:  
Currently: Viewing Forums Index
 
3 minutes ago, RobertaME said:

One difference is that I figured out that you don't NEED to return the variable, so I didn't... I just returned the raw value.

Perfect. That's an eloquent solution by packing more in there. And, I certainly don't know everything so I sometimes over code since I've seen it work. Same as I often use more lines than the code requires to calculate or assign things and then smoosh them together later as it helps me understand what I'm asking Lua to do for me.

I've very happy to see you've got that working. I believe we can still pass parameters to your version if that would help out. However, if each needs to be significantly different then coding each one would work as well.

  • Like 5

Chance favors the prepared mind. ― Louis Pasteur  
Remember, a few hours of trial and error can save you several minutes of looking at the README. -- I Am Devloper (on Twitter)

Clickable ---> The Best of Cori's Posts  (scroll down a wee bit there)    Something fun: MySimtropolis - Invitation to become a SimCity 4 MySim

Are you new here? Check out the Introduction and Guide to Simtropolis.

Share this post


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

    Perfect. That's an eloquent solution by packing more in there. And, I certainly don't know everything so I sometimes over code since I've seen it work. Same as I often use more lines than the code requires to calculate or assign things and then smoosh them together later as it helps me understand what I'm asking Lua to do for me.

    I've very happy to see you've got that working. I believe we can still pass parameters to your version if that would help out. However, if each needs to be significantly different then coding each one would work as well.

    Thanks! I owe it all to you! I know you know a lot of this stuff already... I'm just jazzed that I got it to parse and work the same way you did!

    Right now I'm integrating the formulas to run as one call that tests ALL building counts at once, iterates the global variables, and returns the relevant value. I'm sure there is a better way to call the function than through a Description LTEXT, but for the moment it works and will allow the project to proceed.

    THANK YOU!!!!!!!

    Edit: I just successfully tested a function that packs the entire count for all 16 Distribution Substations as well as the supporting math into one call. I then did a test, starting from 1/1/00 I planted 3 gazebos, put the game on turtle, and sat there doing nothing. On 3/26/00 I got the notification that Wind Turbines were available. I was worried that not selecting a menu would result in the function never being called, but it worked without me having touched the menu after 1/1 and having never hovered over the wind turbine, so the functions do apparently call in the background without specific user activity forcing it.

    @CorinaMarie

    You mentioned an idea for updating the variables more frequently... while daily or even weekly like I was thinking may be too often, waiting three months is a bit much. I'd love to hear your ideas on what we could do to improve on the frequency of the function calls.

    Thanks!


      Edited by RobertaME  

    More stuff
    • Like 5

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
    Currently: Viewing Forums Index
     

    What a wonderfully productive day this has been, and with confidence we can say:

    Roberta's Power Project is back on the Grid!

    :ooh:

    • Like 6
    • Yes 1

    Quick Links

    “SimCity 4 is not just a game, but a tool driven by our own imagination and creativity.”

    Buy me a coffee

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     
    40 minutes ago, Cyclone Boom said:

    What a wonderfully productive day this has been, and with confidence we can say:

    Roberta's Power Project is back on the Grid!

    :ooh:

    At this point, I think @CorinaMarie deserves more of the credit. A few pages back the question of a name for this mod came up. Since this is such a collaboration, I think it's appropriate that my name not be a part of it. It may be my idea, but it never would have gotten anywhere without the help of @Simmer2, @Kloudkicker, @CorinaMarie, and many others' contributions.

    In that vein, I'd like to propose that we call it the Simtropolis Power Authority Mod. Would that cause confusion, being as the acronym for it is SPAM, which is already taken? If we just call it Simtropolis PAM for short, that might help. (PAM for VERY short)

    Thoughts welcome!


      Edited by RobertaME  

    Emphasis
    • Like 3

    Share this post


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

    At this point, I think @CorinaMarie deserves more of the credit. A few pages back the question of a name for this mod came up. Since this is such a collaboration, I think it's appropriate that my name not be a part of it. It may be my idea, but it never would have gotten anywhere without the help of @Simmer2, @Kloudkicker, @CorinaMarie, and many others' contributions.

    In that vein, I'd like to propose that we call it the Simtropolis Power Authority Mod. Would that cause confusion, being as the acronym for it is SPAM, which is already taken? If we just call it Simtropolis PAM for short, that might help. (PAM for VERY short)

    Thoughts welcome!

    PGMM (Power Grid Management Mod)

    or does it need to be a pronounceable acronym?

    SPAGM (Simtropolis or SimCity Power And Grid Management) mod

    GAP (Grid and Power) mod

    RFAPGAMMOD (Roberta's Fabulously Awesome Power Grid and Management Mod of Doom)

    SARNPTFAASAPAAGMOD (Simtropolis And Roberta Now Present The Fabulously Awesome And Stupendously Amazing Power Authority And Grid Management Mod Of Doom)

     

    • Like 3
    • Haha 2

    Share this post


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

    RFAPGAMMOD (Roberta's Fabulously Awesome Power Grid and Management Mod of Doom)

    You're a dork... but I love you!

    Seriously though... I think the name should reflect that this is a collaborative effort of a lot of the people here at Simtropolis... so I feel very strongly that no one's name be attached to it and that it be named after the site that made it possible. I also like the idea of making it a real-sounding company name... like a real in-game power company.

    I know I said I was going to run a poll, but until I do, or someone gives good reason to do otherwise, this mod will for the time being be referred to as...

    The Simtropolis Power Authority Mod

    SPA for short.

    Any objections?

    • Like 4

    Share this post


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

    Teamwork always wins. Good job everyone.

    So... care to share your new creation? Like... what IS it? It's AWESOME looking, but curiosity and all...

    ...I GOTS to know!

    • Like 1

    Share this post


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

    So... care to share your new creation? Like... what IS it? It's AWESOME looking, but curiosity and all...

    ...I GOTS to know!

    Transformer and cable spareparts yard?

    • Like 2

    Share this post


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

    Looking good Kloudkicker!  No electric company should be without at least one and preferably more than one of these lots throughout their territory.

    • Like 1

    Share this post


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

    Update: I can't sleep... :^Þ

    Seriously though, I managed to compact the entire grid balance equation set into one function call. It successfully tests for ALL facilities, both power and power handling, (power plants and substations/transformers) assigns them their values, compares them, and determines variables for unlock reward scripts... all in one package that ALSO reports Distribution Capacity available for Build Menu Descriptions.

    working.jpg.8547576d617a3d9778f5a45f128a5d85.jpg

    An updated test DAT: Test2.zip

    One thing concerns me though. What happens when there are no new facilities to unlock? When the reward LUAs have no reason to update the Needs descriptions, the function calls might not be made at all. We REALLY need an alternate way to call these functions.

    In the mean time, I'm going to integrate this function into the full mod and see that it still works. ::fingers crossed::

    • Like 6

    Share this post


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

    Update: I can't sleep... :^Þ

    Seriously though, I managed to compact the entire grid balance equation set into one function call. It successfully tests for ALL facilities, both power and power handling, (power plants and substations/transformers) assigns them their values, compares them, and determines variables for unlock reward scripts... all in one package that ALSO reports Distribution Capacity available for Build Menu Descriptions.

    working.jpg.8547576d617a3d9778f5a45f128a5d85.jpg

    An updated test DAT: Test2.zip

    One thing concerns me though. What happens when there are no new facilities to unlock? When the reward LUAs have no reason to update the Needs descriptions, the function calls might not be made at all. We REALLY need an alternate way to call these functions.

    In the mean time, I'm going to integrate this function into the full mod and see that it still works. ::fingers crossed::

    This looks really cool. And it’s fun to follow this work. Looking forward to release!

    • Like 1
    • Thanks 1

    20huskies

    Share this post


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

    @Kloudkicker There is also an electrical parts supply for general contractors. Aptly named if I may say so lol

    PJJk1a8.jpg

    • Like 5
    • Haha 1

    There are those who lead and those who follow. Don't look too far...

    Visit my lots and BATs thread here at ST https://community.simtropolis.com/forums/topic/71467-simmer2s-lots-and-bats-lab/?page=3#comment-1663504

    Or at SC4D https://sc4devotion.com/forums/index.php?topic=17211.920

    w11resized2.png

    Share this post


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

    There is also an electrical parts supply for general contractors.

    I can't believe I forgot about that. I need to play more often. I've used it a few times sadly. Looks really nice, BTW.

    • Like 4

    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 a question regarding future power lots releases. Is there going to be an LTEX file that will need to be included with any new work in order to make it compatible with this mod?

    Or does this mod somehow automatically adds any new power lots by reading the occupant groups, in to the fold.

    Thank you

    • Like 3

    There are those who lead and those who follow. Don't look too far...

    Visit my lots and BATs thread here at ST https://community.simtropolis.com/forums/topic/71467-simmer2s-lots-and-bats-lab/?page=3#comment-1663504

    Or at SC4D https://sc4devotion.com/forums/index.php?topic=17211.920

    w11resized2.png

    Share this post


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

    I have a question regarding future power lots releases. Is there going to be an LTEX file that will need to be included with any new work in order to make it compatible with this mod?

    Or does this mod somehow automatically adds any new power lots by reading the occupant groups, in to the fold.

    Thank you

    New power related lots will have to be balanced and fit into the existing framework. They'll need specifically assigned Occupant Group IDs that match assigned stats for the lot based on its type, category, and various stats that are not currently a part of the game... namely kVA load/tolerance. Unfortunately, there's a lot of "judgement call" involved in all this, and there's limited space in the data tables. The theoretical limit is 239 power plants, transformers, substations, generators, and electrical features, but it's more complex than that. There can only be 16 of each type and category of thing... so 16 Transformers maximum, 16 Clean Intermediate Power Plants, 16 Carbon Base plants, etc., and some categories and types fill up fast... such as Carbon Base. I already have 12, leaving only 4 slots available for future additions, while some combinations are completely vacant. (for example, there are no current Carbon Peak or Petroleum Base power plants... but due to the nature of the way the functions are written, there has to be an allotment for them... in case SOMEONE comes up with one)

    It's not a perfect system... I could have started with larger tables... but I had to start SOMEWHERE and 44 power plants, 36 transformers, 16 substations, and 3 Electrical features is already a LOT of choices. The area most likely to see expansion is in the realm of Electrical Features... those things that are PART of the power system but aren't power plants, substations, or transformers. An example are your Step-up Transformers and Inverters from your Modular Solar Panel set. Right now though, they and @Kloudkicker's Wind Farm Maintenance Facility are the ONLY Electrical features, so there's room for quite a few more before I have to start making hard decisions. One that's a shoe-in for first addition when I get things sorted are your Tesla battery lots... there goes 4 slots right there!

    Each lot I integrate also has to have custom advisor listings as every single one is technically a reward lot... which REQUIRES a write-up explaining its advantages and drawbacks. They also need to fit into the existing naming system, have complete Description LTEXT files filled out, and award conditions set. (most award conditions are simply having enough Distribution or Transmission capacity, but there are other requirements for some lots that create a logical progression... like needing lots of IHT to get access to Clean Coal... etc.)

    All this probably sounds overly complicated, but trying to get so many varied and different power systems to all balance against one another, none making any others "obsolete", none that can be called "useless", etc. can't be done by an automatic system. Perhaps with time an algorithm could be created that could assign a lot of these values that are appropriate to their design, but until then it's just me and a lot of math. ;^)

    I hope that explains things.

    Update:

    All working well with the new function calls in the full mod! I did end up inserting an argument into the run_grid_balance_variables function to determine what data to return: argument "T" returns Transmission Availability, "D" returns Distribution Availability, "X" return Transformer Availability, and entering no argument results in nothing being returned at all. This lets me use it in all five types of structures that have grid requirements (Large Power Plants, Small Power Plants, Transmission Substations, & Distribution Substations) as well as other calls that don't need a return.

    The last option was because I found I needed to add run_grid_balance_variables () before any Reward Conditional that called for TRANSMIT_AVAILABLE, DISTRIB_AVAILABLE, or TRANSFORM_AVAILABLE as the variables needed to be updated every time the reward is checked in order to remove lots from availability after adding one so you can't add more than the grid can handle.

    For example, say I put in twenty-one 500 kVA substations. That gives me 10,500 kVA for small power plants and Transmission Substations. If I then plop down a Wind Turbine, it needs to reduce DISTRIB_AVAILABLE from 10500 down to 9250 before the Reward Conditional checks again to see if the reward is still available. It is, so nothing changes other than how much unused distribution capacity I have left. I plop down seven more wind turbines, taking DISTRIB_AVAIL down to 500. As soon as I plop the 8th Wind Turbine, the reward conditional checks to see if I can keep going. Since DISTRIB_AVAIL was updated right before the IF statement that checks if there is enough Distribution Capacity, the IF returns the "Not Available" LTEXT, denying me the ability to plop a 9th turbine until I add two more substations to handle the load. (this example is using the SMALLEST substation... more likely people would use larger stations as they're more cost efficient... just keep them away from residential lots or else...)

    Anyway, it all works PERFECTLY! I still have to distribute the fix to all the lots, but once done that's half the battle. The upside of this solution is that run_grid_balance_variables will be called repeatedly every month when the rewards are checked, meaning it shouldn't take 2-3 months to clear a reward... but only a month typically.

    My issues with the loadbalance.lua totally make sense now... so I should be able to sort that part out finally. Having to convert everything over to functions will take the longest, but once done it should work as expected... and change how we play SC4! (if you use the mod, that is ;^)


      Edited by RobertaME  

    Typos
    • Like 5

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
    Currently: Viewing Forums Index
     
    18 hours ago, RobertaME said:

    You mentioned an idea for updating the variables more frequently... while daily or even weekly like I was thinking may be too often, waiting three months is a bit much. I'd love to hear your ideas on what we could do to improve on the frequency of the function calls.

    9 hours ago, RobertaME said:

    The upside of this solution is that run_grid_balance_variables will be called repeatedly every month when the rewards are checked, meaning it shouldn't take 2-3 months to clear a reward... but only a month typically.

    Between these two, it sounds like you have it resolved. Yes?

     

    17 hours ago, RobertaME said:

    SPA for short.

    Any objections?

    No objection, but may I humbly submit another one for consideration?

    Adjusted Modern Power of Simtropolis

    • Adjusted for all the work you've done creating this.
    • Modern because it is so much more up to date than Maxis vanilla.
    • Power since that's the category.
    • Simtropolis to fulfill your preference.

    And it lets the acronym be AMPS which is an aspect of electricity.

    • Like 8

    Chance favors the prepared mind. ― Louis Pasteur  
    Remember, a few hours of trial and error can save you several minutes of looking at the README. -- I Am Devloper (on Twitter)

    Clickable ---> The Best of Cori's Posts  (scroll down a wee bit there)    Something fun: MySimtropolis - Invitation to become a SimCity 4 MySim

    Are you new here? Check out the Introduction and Guide to Simtropolis.

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    19 minutes ago, CorinaMarie said:

    And it lets the acronym be AMPS which is an aspect of electricity.

    I concur. This is how it’s usually done in government, the acronym will spell a word related to the goal so that people can remember it easily.

    • Like 7

    20huskies

    Share this post


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

    Glad to see this mod being made. I've had issues with SimCity not really letting us make the more realistic aspects of the power grid. That said, I do remember them explaining how they couldn't honestly do it within the game at the time, given that it wasn't "possible" at the time. Like, they knew they could do it, but, the chaos that would result, would've been too much for them to deal with at the time of production. So, they stuck with a much more streamlined system, where the power follows the roads/zones, and of course, the power lines.

    I've used a handful of power mods to get the transformers, so I could connect the power lines down to the city, so, seeing this mod will be a ton of fun I think.

    I also, most certainly agree with the acronym AMPS, works way better than most of the others, though, they're pretty great too. I liked LAMA a lot though. XD

    Though, I've got a few questions in regards to this mod, and I understand it's a WIP, so, much of it can still change between now and release, but:

    1: Are you interested in utilizing WMP's Power Lots mod? Seems to have a bunch of the same stuff you're looking for. Though, I certainly understand not using it, as it seems like you may be getting higher quality stuff from others.

    2: Would the SFBT Microwave Power Plant be a good fit for this as well? Or honestly, would we even be able to get any kind of microwave plants for this? Something I rather miss from the old SC2K/3K era.

    3: Not sure if you're still going with the MML (a little confused on that); but, would it be possible to stack related lots together? Like, NAM has much of their stuff together, and I'd rather love it if we could find a way of getting more mods to stack related things together. As an example, I've got a modular park mod, that's just massively extended my park menu as a result. And, I'm not entirely sure if MML's are necessarily the best way to go about things. But, seeing as I've never made anything massive mod-wise (literally just been messing around with the vanilla lot editor), I'm sure I could be missing something about the MML. Personally, I rather love how the Tab key lets us cycle through things.

    4: And, maybe this one is an alternative to the last: would it be possible to get them to upgrade? I rather like how various structures within the game could upgrade, and I think that would be a great thing to have. That way, players could go up, say 3 levels, before needing to build a new plant. Granted, these may only be "marginal" in how much power produce. Think 100, 110, then 120 MW as an example; can be bigger of course. And, I'm sure there's some weird programming logic behind it which can easily make it more complicated.

    And, no worries, if you're nowhere near interested in implementing any of these. Programming's pretty complicated, and made especially worse here, due to modding a game where you can't access the source code. I barely know much about programming myself, but, have been reading up on programming/coding, and have even studied how games and such would work to get certain effects done. (Book knowledge, not practical knowledge :/ )

    I think the level of detail you're putting into it, is absolutely incredible. Well beyond what I would've ever done. However, I think that, rather than having TE lots for the power poles, they could simply just be street props. Though, it's kind of weird, thinking about it, since the Maxis team mentioned that the powerlines are all underground due to the complexity of the power grid. But, honestly, I think it's great to finally have above ground power lines, cause, not every town is like NYC where they're underground for safety reasons. In my area it's a weird hybrid currently.

    • Like 6

    I'm the guy who leaves 5 page essays as comments >.<

    "I thought of the tornado as a huge, eager, but destructive dog." ---Ocean Quigley

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    28 minutes ago, Ryuu Tenno said:

    2: Would the SFBT Microwave Power Plant be a good fit for this as well? Or honestly, would we even be able to get any kind of microwave plants for this? Something I rather miss from the old SC2K/3K era.

    3: Not sure if you're still going with the MML (a little confused on that); but, would it be possible to stack related lots together? Like, NAM has much of their stuff together, and I'd rather love it if we could find a way of getting more mods to stack related things together. As an example, I've got a modular park mod, that's just massively extended my park menu as a result. And, I'm not entirely sure if MML's are necessarily the best way to go about things. But, seeing as I've never made anything massive mod-wise (literally just been messing around with the vanilla lot editor), I'm sure I could be missing something about the MML. Personally, I rather love how the Tab key lets us cycle through things.

    4: And, maybe this one is an alternative to the last: would it be possible to get them to upgrade? I rather like how various structures within the game could upgrade, and I think that would be a great thing to have. That way, players could go up, say 3 levels, before needing to build a new plant. Granted, these may only be "marginal" in how much power produce. Think 100, 110, then 120 MW as an example; can be bigger of course. And, I'm sure there's some weird programming logic behind it which can easily make it more complicated.

    If you want to use the antimatter power plant as then upgrade in the mod, feel free.  The idea of upgrades sounds really fun. :8)

     

    • Like 5

    20huskies

    Share this post


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

    Between these two, it sounds like you have it resolved. Yes?

    Partially, yes. For unlocking lots, it works GREAT! It can still sometimes take multiple months though, and I can't discern a pattern as to why it's different every time. Sometimes unlocked lots will be available within seconds of ploping it's requisite lots, and sometimes they won't unlock for 2-3 months... regardless of play speed.  Do you know why this is and is there a way to circumvent it?

    After deploying the fix over most of the lots, (I have to insert a call to run_grid_balance_variables () in every reward conditional that depends on any variable in the function... and there are a LOT of reward conditionals in my mod so it took a lot of time to implement) I discovered a side issue, though. When a number of transformers are placed and it unlocks more than one substation at the same time, you can "use up" your available transformer capacity with one substation until it blocks you from ploping any more of that lot.. and it works perfectly in that regard, but the other unlocked substations are still available and can be ploped, even though you don't have the transformers to support that many substations.

    I'm guessing this is because the reward conditional isn't being called until AFTER you plop the building... so it's a way to "soft cheat" the system. You'll still have to "pay it back" later by ploping more transformers when you want more substations than you can get this way, but it still breaks the "rules" set by the mod.

    Do you know of a way to force a function call on a specific reward function? I don't want to call them all at once or anything, but if I could set it up to only force a call to other buildings of like type, i.e. force a call to all 9 substation lots anytime you build a substation, it would resolve this one last idiosyncrasy of the mod.

    If not, I can look into other options. I was thinking that when I get to finishing the loadbalance.lua I could come up with a way to increase load proportional to any part of the grid that is insufficient. In other words, say you have 10 MVA of distribution capacity, 10 MVA of transformer capacity, 8 MW of power, (equal to 10 MVA) and a demand of 7 MW. Then you bulldoze 2 MVA of transformers. That drops your power available by 20% to 6.4 MW. You start seeing brownouts around 8-10% of your city. Something like that to act as a "no cheating" catch.

    Thoughts welcome.

    2 hours ago, Ryuu Tenno said:

    Glad to see this mod being made.

    Thanks. I'm glad it is, too! :^Þ

    2 hours ago, Ryuu Tenno said:

    I do remember them explaining how they couldn't honestly do it within the game at the time, given that it wasn't "possible" at the time.

    What that meant is that SimCity 4 was rated for a 500 MHz P3, because that was the most common PC at the time of release in 2003. Sure, they could have done something like what I'm doing, and MORE even! However, it would have been impossible to play on a P3. Now with multi-core 3+ GHz PCs with 32 gig of ram, being common, we can stretch the "possible" into the "practical". See? ;^)

    2 hours ago, Ryuu Tenno said:

    also, most certainly agree with the acronym AMPS, works way better than most of the others, though, they're pretty great too

    Agreed, but I'm thinking the A in AMPS should be Allied, not Adjusted. Allied Modern Power of Simtropolis. I like Allied better because it denotes the collaboration of its creation as well as sounding like a company name in-game. I'm not settled on it yet, and I promised up-thread that I'd put it to a poll as release got near. We're not there... yet.

    2 hours ago, Ryuu Tenno said:

    Are you interested in utilizing WMP's Power Lots mod?

    I saw those when I was searching the STEX for files I used to have. I passed on them as they don't look as good as the ones I picked, and they don't fulfill any niche that the existing lots don't already fill. More is sometimes just more... not better.

    2 hours ago, Ryuu Tenno said:

    Would the SFBT Microwave Power Plant be a good fit for this as well?

    Passed on that as well, for realism's sake. Microwave power sounds great, until you consider the power loss from re-transmission, travel through hundreds of miles of atmosphere that soaks away a good chunk of the energy, then conversion losses again when you convert the microwave energy back into electrical energy on the ground. This on top of the already low efficiency of solar panels (25% efficient is REALLY good for PVs) and their short productive life leads to an extremely poor means of power generation. (I OWN solar panels on my house, a good 7.64 kW system that meets all our power needs... but I have no illusions about their longevity... 20 years is GOOD... 15 is PRACTICAL.. 30 is a MIRACLE)

    Interesting side note though: every power plant in the game is assigned a numerical code to denote its type. 1 for Coal, 2 for Fusion, 3 for Natural Gas... and 4 for Microwave. I found that in the depths of the Simcity1.dat somewhere... so Maxis was one point was going to include Microwave power plants, but never implemented it. ::shrug::

    2 hours ago, Ryuu Tenno said:

    would it be possible to stack related lots together?

    If you mean Tab-rings, the answer is an unfortunate "No". Tab-rings are not possible outside the transportation menu. I DO however, group all similar lots together in the menu, even if they are wildly different in cost. For example, I have all Solar power systems grouped together in ascending order of power output, then wind in ascending order, then geothermal, then nuclear, then fusion, then oil, then natural gas, then wood/coal, and finally waste. Each one is categorized together in ascending order of power output; the geothermal plants start with 2 MW at the top and end with 10 MW at the bottom. This helps in finding what you're looking for more easily because you can scroll quickly until you see the group you 're looking for, and the exact lot should be nearby.

    2 hours ago, Ryuu Tenno said:

    I'm not entirely sure if MML's are necessarily the best way to go about things.

    The alternatives are to either have 32 icons just for transformers or to drop 25 of them and just have 1 of each rating. Not trying to dismiss you here, but MML may well be the best way to go. There's initially only 7 transformers in the menu, one for every rating. You plop one and wait a bit... now you have 5-7 more styles to pick from. When you're done, polp down more substations than keylots and the menus of extra icons grey out, then hide on the next city load.

    Your thoughts here are welcome, but not all things are practical... or possible.

    2 hours ago, Ryuu Tenno said:

    would it be possible to get them to upgrade?

    Possible? Maybe. We got Upgrading City Halls now... but that was code that Maxis had already written but abandoned. Even then it took writing a DLL to get it to work. I'm NOT a programmer, despite the fact that I'm not doing too badly at it as a hobby. ;^) If it's doable, it's way above my pay grade to figure out. I'll be lucky if I get this all to work without dropping a boat anchor on your CPU clock. :^Þ

    2 hours ago, Ryuu Tenno said:

    I think the level of detail you're putting into it, is absolutely incredible.

    ::blush:: Thanks!

    2 hours ago, Ryuu Tenno said:

    not every town is like NYC where they're underground for safety reasons. In my area it's a weird hybrid currently.

    Same here. Half on poles, half underground. That's why I like the street TE lots. It lets you add that bit of color to a neighborhood without having to lose space to do it.

    Not many people realize just how BIG a single square is. Each side measures 16 meters... 50 feet. That makes each square 2500 square feet. That's as big as my house! My whole yard would basically be a 1x2 lot. Now you're going to use an entire 2500 square foot area for... a power pole?

    Also, if you have already established neighborhoods and you're finding that you need extra transformers. the ability to drop in a dozen or so without bulldozing anything or dealing with odd-sized lots is nice. If I can find a way to do it, I'll make each lot type NEED to have a transformer within a certain distance or greatly lose value or something. (not sure how or if that might work, but it's on the to-do list)

    Welcome to the thread!

    1 hour ago, 20huskies said:

    If you want to use the antimatter power plant as then upgrade in the mod, feel free.

    I saw that in my lot search in January. I didn't get it because the physicist in me refuses to have a physically impossible lot in my city.

    Antimatter is not a power source... it's a power storage medium... a fuel, if you will. A fuel that has to be MADE... which takes more energy to make than you get out of it when you destroy it in a power plant. The laws of Thermodynamics are brutal:

    1> You can't win

    2> You can't break even

    3> You can't even leave the game

    Antimatter's only advantage is that it can pack a LOT of energy into very little mass... so it's easily portable... if you can contain it easily. Other than that it's just like hydrogen fuel or electric cars. Making hydrogen fuel takes more energy than the car gets out of it... and the same goes for electric cars. Electric cars are touted as being 3 times as efficient as gasoline powered cars, but that by narrowing the focus to only the efficiency of the car itself, not the entire energy drain to GET that energy into each car. Gasoline has a source energy 26% greater than the energy content of the fuel... that is it only takes 26% of the energy IN the gas to get it into the tank of a car. (exploration, drilling, transport, refining, transport again, sell at the pump) Electricity has a source energy ratio of just under 200%... meaning for every KWh you put in a Tesla, you lose 2 KWh GETTING it there... so it actually consumes ten times as much energy in the supply chain as gasoline... which it is then more efficient with in the last stage. The end result is that neither one is really any more energy efficient than the other. It just comes down to personal preference.

    Wow... that sounded preachy. It's not MEANT to be... I just like sharing statistical data. (I recently read a data analysis of energy supply chains, so it's on my mind :^Þ )

    The More You Know.../͡   *


      Edited by RobertaME  

    Typos
    • Like 6

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
    Currently: Viewing Forums Index
     
    22 minutes ago, RobertaME said:

    Allied Modern Power of Simtropolis.

    I like that even better. Sounds more like a company name too and it rolls off the tongue well.

    • Like 6
    • Yes 1

    Chance favors the prepared mind. ― Louis Pasteur  
    Remember, a few hours of trial and error can save you several minutes of looking at the README. -- I Am Devloper (on Twitter)

    Clickable ---> The Best of Cori's Posts  (scroll down a wee bit there)    Something fun: MySimtropolis - Invitation to become a SimCity 4 MySim

    Are you new here? Check out the Introduction and Guide to Simtropolis.

    Share this post


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

    Partially, yes. For unlocking lots, it works GREAT! It can still sometimes take multiple months though, and I can't discern a pattern as to why it's different every time. Sometimes unlocked lots will be available within seconds of ploping it's requisite lots, and sometimes they won't unlock for 2-3 months... regardless of play speed.  Do you know why this is and is there a way to circumvent it?

    After deploying the fix over most of the lots, (I have to insert a call to run_grid_balance_variables () in every reward conditional that depends on any variable in the function... and there are a LOT of reward conditionals in my mod so it took a lot of time to implement) I discovered a side issue, though. When a number of transformers are placed and it unlocks more than one substation at the same time, you can "use up" your available transformer capacity with one substation until it blocks you from ploping any more of that lot.. and it works perfectly in that regard, but the other unlocked substations are still available and can be ploped, even though you don't have the transformers to support that many substations.

    I'm guessing this is because the reward conditional isn't being called until AFTER you plop the building... so it's a way to "soft cheat" the system. You'll still have to "pay it back" later by ploping more transformers when you want more substations than you can get this way, but it still breaks the "rules" set by the mod.

    Do you know of a way to force a function call on a specific reward function? I don't want to call them all at once or anything, but if I could set it up to only force a call to other buildings of like type, i.e. force a call to all 9 substation lots anytime you build a substation, it would resolve this one last idiosyncrasy of the mod.

    If not, I can look into other options. I was thinking that when I get to finishing the loadbalance.lua I could come up with a way to increase load proportional to any part of the grid that is insufficient. In other words, say you have 10 MVA of distribution capacity, 10 MVA of transformer capacity, 8 MW of power, (equal to 10 MVA) and a demand of 7 MW. Then you bulldoze 2 MVA of transformers. That drops your power available by 20% to 6.4 MW. You start seeing brownouts around 8-10% of your city. Something like that to act as a "no cheating" catch.

    Thoughts welcome.

    Thanks. I'm glad it is, too! :^Þ

    What that meant is that SimCity 4 was rated for a 500 MHz P3, because that was the most common PC at the time of release in 2003. Sure, they could have done something like what I'm doing, and MORE even! However, it would have been impossible to play on a P3. Now with multi-core 3+ GHz PCs with 32 gig of ram, being common, we can stretch the "possible" into the "practical". See? ;^)

    Agreed, but I'm thinking the A in AMPS should be Allied, not Adjusted. Allied Modern Power of Simtropolis. I like Allied better because it denotes the collaboration of its creation as well as sounding like a company name in-game. I'm not settled on it yet, and I promised up-thread that I'd put it to a poll as release got near. We're not there... yet.

    I saw those when I was searching the STEX for files I used to have. I passed on them as they don't look as good as the ones I picked, and they don't fulfill any niche that the existing lots don't already fill. More is sometimes just more... not better.

    Passed on that as well, for realism's sake. Microwave power sounds great, until you consider the power loss from re-transmission, travel through hundreds of miles of atmosphere that soaks away a good chunk of the energy, then conversion losses again when you convert the microwave energy back into electrical energy on the ground. This on top of the already low efficiency of solar panels (25% efficient is REALLY good for PVs) and their short productive life leads to an extremely poor means of power generation. (I OWN solar panels on my house, a good 7.64 kW system that meets all our power needs... but I have no illusions about their longevity... 20 years is GOOD... 15 is PRACTICAL.. 30 is a MIRACLE)

    Interesting side note though: every power plant in the game is assigned a numerical code to denote its type. 1 for Coal, 2 for Fusion, 3 for Natural Gas... and 4 for Microwave. I found that in the depths of the Simcity1.dat somewhere... so Maxis was one point was going to include Microwave power plants, but never implemented it. ::shrug::

    If you mean Tab-rings, the answer is an unfortunate "No". Tab-rings are not possible outside the transportation menu. I DO however, group all similar lots together in the menu, even if they are wildly different in cost. For example, I have all Solar power systems grouped together in ascending order of power output, then wind in ascending order, then geothermal, then nuclear, then fusion, then oil, then natural gas, then wood/coal, and finally waste. Each one is categorized together in ascending order of power output; the geothermal plants start with 2 MW at the top and end with 10 MW at the bottom. This helps in finding what you're looking for more easily because you can scroll quickly until you see the group you 're looking for, and the exact lot should be nearby.

    The alternatives are to either have 32 icons just for transformers or to drop 25 of them and just have 1 of each rating. Not trying to dismiss you here, but MML may well be the best way to go. There's initially only 7 transformers in the menu, one for every rating. You plop one and wait a bit... now you have 5-7 more styles to pick from. When you're done, polp down more substations than keylots and the menus of extra icons grey out, then hide on the next city load.

    Your thoughts here are welcome, but not all things are practical... or possible.

    Possible? Maybe. We got Upgrading City Halls now... but that was code that Maxis had already written but abandoned. Even then it took writing a DLL to get it to work. I'm NOT a programmer, despite the fact that I'm not doing too badly at it as a hobby. ;^) If it's doable, it's way above my pay grade to figure out. I'll be lucky if I get this all to work without dropping a boat anchor on your CPU clock. :^Þ

    ::blush:: Thanks!

    Same here. Half on poles, half underground. That's why I like the street TE lots. It lets you add that bit of color to a neighborhood without having to lose space to do it.

    Not many people realize just how BIG a single square is. Each side measures 16 meters... 50 feet. That makes each square 2500 square feet. That's as big as my house! My whole yard would basically be a 1x2 lot. Now you're going to use an entire 2500 square foot area for... a power pole?

    Also, if you have already established neighborhoods and you're finding that you need extra transformers. the ability to drop in a dozen or so without bulldozing anything or dealing with odd-sized lots is nice. If I can find a way to do it, I'll make each lot type NEED to have a transformer within a certain distance or greatly lose value or something. (not sure how or if that might work, but it's on the to-do list)

    Welcome to the thread!

    I saw that in my lot search in January. I didn't get it because the physicist in me refuses to have a physically impossible lot in my city.

    Antimatter is not a power source... it's a power storage medium... a fuel, if you will. A fuel that has to be MADE... which takes more energy to make than you get out of it when you destroy it in a power plant. The laws of Thermodynamics are brutal:

    1> You can't win

    2> You can't break even

    3> You can't even leave the game

    Antimatter's only advantage is that it can pack a LOT of energy into very little mass... so it's easily portable... if you can contain it easily. Other than that it's just like hydrogen fuel or electric cars. Making hydrogen fuel takes more energy than the car gets out of it... and the same goes for electric cars. Electric cars are touted as being 3 times as efficient as gasoline powered cars, but that by narrowing the focus to only the efficiency of the car itself, not the entire energy drain to GET that energy into each car. Gasoline has a source energy 26% greater than the energy content of the fuel... that is it only takes 26% of the energy IN the gas to get it into the tank of a car. (exploration, drilling, transport, refining, transport again, sell at the pump) Electricity has a source energy ratio of just under 200%... meaning for every KWh you put in a Tesla, you lose 2 KWh GETTING it there... so it actually consumes ten times as much energy in the supply chain as gasoline... which it is then more efficient with in the last stage. The end result is that neither one is really any more energy efficient than the other. It just comes down to personal preference.

    Wow... that sounded preachy. It's not MEANT to be... I just like sharing statistical data. (I recently read a data analysis of energy supply chains, so it's on my mind :^Þ )

    The More You Know.../͡   *

    Haha no worries, not preachy at all.  You are obviously smarter at this subject than I am, but the lot was intended to be fun, not entirely realistic and I certainly expected some criticism for that and that’s fair. Fitting realism into the game on that lot was tricky even with the little I knew about it.  But I totally understand since it looks like you want as much realism as possible in your mod, and that’s great!  I’m not intending to step on anyone’s toes if my style doesn’t fit.

    also, the electric car... I enjoyed reading that. Those lifecycle costs don’t always get a lot of press.

    Still looking forward to what you guys come up with!

    • Like 4

    20huskies

    Share this post


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

    Maybe after the Mod is finished and release there could be add-ons that include new ideas such a Microwave, Antimatter, Mana etc. as alternate power sources. 

    • Like 5

    Share this post


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

    I like the name AMPS a lot... nothing was wrong with SPA but thinking about it Spa happens to be the name of an SC4 content creator so there could be potential for confusion.  I can appreciate the concept of MMLs because being the kind of SC4 player I am my power menu is already overloaded ( *:D ) .  One of the interesting little traits of MMLs that I've discovered is that if an MML is present in a city when it is loaded up the corresponding lots in the menu will be unlocked.  Of course, it's usually most impractical to be exiting and reloading cities due to load times but it does allow one to avoid waiting the 3 months if for whatever reason they wanted to keep the game's date where it is (e.g. if they were working with seasonal tree MMPs that need a particular date on the calendar) .

    The idea of upgrades is intriguing.  IRL transformers (such as the ones at substations) and the related transmission lines do get upgraded.  Typically a substation might get upgraded if the number or voltage of the lines entering or leaving the substation increases.  So essentially these are two factors that might lead to an upgrade for a substation; more power entering, or more power leaving.  The lines on the other hand get reconductor upgrades but that is mostly just maintenance as opposed to an actual increase in capacity.

    I'm watching this with anticipation.

    • Like 5
    • Yes 1

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
    Currently: Viewing Forums Index
     
    6 hours ago, RobertaME said:

    After deploying the fix over most of the lots, (I have to insert a call to run_grid_balance_variables () in every reward conditional that depends on any variable in the function...

    Oh, my!

    However, would you mind to try removing that from every reward conditional and then try this? (Sample is still from your Test.zip (the first one), but I'm sure you'll see what I did.)

    a = create_reward_cityplanning('Some_Unique_8_Digit_Hex_String') -- Use the reward thinger to have a condition to check
    function a.condition()
        if  (1 == 1) then                   -- Will always evaluate True
            Calc_Load_Balance()             -- Change to the name of your function
        end
    end
    a.frequency = 1                         -- Check a.condition once per Sim Day
    a.timeout   = 1                         -- After check, dismiss in one Sim Day
    a.priority  = 0                         -- Zero urgency to pop up a message box
    a.news_only = 1                         -- Second way to say don't pop up a message box
    
    function Calc_Load_Balance()
      DISTRIBUTION_RATING = sc4game.automata.get_source_building_count(hex2dec('BB350020'))*kva_rating.ID_BB350020
      DISTRIB_AVAILABLE = DISTRIBUTION_RATING - (TRANSMISSION_RATING + SMALL_PLANTS_RATING)
    end

    The key thing I did here is to set up a separate conditional that is itself checked once per SimDay which will always evaluate to True. When it then calls the single copy of the load balance calculation function, that does update your global variables and then all the reward ones which check for DISTRIB_AVAILABLE (and such) have that data to work with.

    I'm currently guessing the hard coded function which updates the quantities for each of the track_buildings is itself run as a housekeeping type thing. That's as quick as per SimMonth (and I suppose on a particular day of the month which might be why you saw it update in just a few SimDays sometimes), but it might also be one of those the game will put off for an extra month or two if it feels overwhelmed with other tasks. So, if the count of each building hasn't changed yet, each time the load balance function is run it'll still be working with the same building counts it had the last time it ran.

    • Like 4

    Chance favors the prepared mind. ― Louis Pasteur  
    Remember, a few hours of trial and error can save you several minutes of looking at the README. -- I Am Devloper (on Twitter)

    Clickable ---> The Best of Cori's Posts  (scroll down a wee bit there)    Something fun: MySimtropolis - Invitation to become a SimCity 4 MySim

    Are you new here? Check out the Introduction and Guide to Simtropolis.

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    5 hours ago, CorinaMarie said:

    company name

    A company needs a HQ. Perhaps @mattb325 can alter his AMP building a bit so it has a big AMPS sign on top? 

     

    • Like 6

    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