On Power (electrical)

Great! This definitely could be the major step forward for C2C in the next release (unless you introduce multimaps)!

A few comments on this already well thought-out idea:

  1. Please make sure that the effects are always visible and obvious for the player. I´d like to the some messages displayed like "Your Leather Factory in London has been temporarily shut down because of power failures."
  2. Please don´t make it game breaking. Just building that one more factory should not bring down all the grid. Maybe a random city should temporarily loose the power.
  3. Please don´t over-complicate it (I like many of your suggestions, Thunderbrd, but then ...). It should always be obvious to the player where the current problems come from and what could be done about it. I also would not like to see the tile influence, already don´t like it with pollution.
  4. As a kind of historical approach I´d love to see at first that small power plants are built in every city and only later on you built those huge plants just somewhere and connect the cities with power lines. I am not sure though, how this could be implemented.

While I have seen in the past that new ideas introduced by the C2C team are usually well planned and all my initial concerns were needless, I thought expressing them anyway wouldn´t hurt ;) ...
 
Nice suggestion :D

I wonder, if it will be possible to ruin enemy empire with just spies (with Revolutions on).
 
I am in opposition to add electrice as property. It should be resource !!!

Here you have 100% workable code to stockpiling resource from EoW mod

Spoiler :

Assets\XML\Terrain
CIV4TerrainSchema.xml - (look for on labels <!-- VET AmountResourses -->)

CIV4YieldInfos.xml
Code:
<iFontButtonIndex>2</iFontButtonIndex>
CIV4FeatureInfos.xml
Code:
<ArtDefineTag>ART_DEF_FEATURE_JUNGLE</ArtDefineTag>
<YieldTypeStructs>
<YieldTypeStruct>
<YieldType>YIELD_WOOD</YieldType>
<iYieldChange>60</iYieldChange>
<iYieldPrice>1</iYieldPrice>
</YieldTypeStruct>
</YieldTypeStructs>
</YieldChanges>

CIV4BonusInfos.xml
Code:
<TechObsolete>NONE</TechObsolete>
<YieldTypeStructs>
<YieldTypeStruct>
<YieldType>YIELD_MARBLE</YieldType>
<iYieldChange>0</iYieldChange> Produced resources without improvement
<iYieldMinAmount>30000</iYieldMinAmount>
<iYieldMaxAmount>120000</iYieldMaxAmount>
</YieldTypeStruct>
</YieldTypeStructs>
</YieldChanges>

CIV4ImprovementInfos.xml
Code:
<YieldTypeStructs>
<YieldTypeStruct>
<YieldType>YIELD_COAL</YieldType>
<iYieldPrice>4</iYieldPrice>
<iYieldForPrice>400</iYieldForPrice>
</YieldTypeStruct>
</YieldTypeStructs>
.....
<BonusTypeStructs>
<BonusTypeStruct>
<BonusType>BONUS_COAL</BonusType>
<bBonusMakesValid>1</bBonusMakesValid>
<bBonusTrade>0</bBonusTrade>
<iDiscoverRand>10000</iDiscoverRand>
<YieldTypeStructs>
<YieldTypeStruct>
<YieldType>YIELD_COAL</YieldType>
<iYieldChange>400</iYieldChange>
</YieldTypeStruct>
</YieldTypeStructs>
<YieldChanges>
<iYieldChange>0</iYieldChange>
<iYieldChange>1</iYieldChange>
<iYieldChange>0</iYieldChange>
</YieldChanges>
</BonusTypeStruct>
<BonusTypeStructs>


Icons for resources
CvGameTextMgr.cpp
void CvGameTextMgr::assignFontIds(int iFirstSymbolCode, int iPadAmount) (look for on labels VET AmountResourses)

Load XML tags
CvXMLLoadUtilitySet.cpp
void CvXMLLoadUtility::SetImprovementBonuses(CvImprovem entBonusInfo** ppImprovementBonus) (look for on labels VET AmountResourses)
CvInfos.cpp (look for on labels VET AmountResourses)

Algorithms
CvPlot.cpp
void CvPlot::doTurn()
void CvPlot::updateYield(YieldTypes eUpdateYield)
int CvPlot::calculateImprovementYieldChange(Improvemen tTypes eImprovement, YieldTypes eYield, PlayerTypes ePlayer, bool bOptimal, bool bBestRoute, bool bWithBonus, bool bForRealCity) const
int CvPlot::calculateNatureYield(YieldTypes eYield, TeamTypes eTeam, char cModFeature) const
int CvPlot::getYieldParametr(PlotYieldFunc Func, YieldTypes eYield) const


CvPlayer.cpp
void CvPlayer::changeExpensesByPlot(CvPlot* pPlot, char cMod)


CvGameCoreUtils.cpp (look for on labels VET AmountResourses)


And link to mod
http://www.4shared.com/archive/WXtyyVN8/EoW_12.html

With that system we could add resource production/consumption to all resources we want to not only electricity

@Koshling
Do you found something usefull in multithreading code in EOW mod?
 
Great! This definitely could be the major step forward for C2C in the next release (unless you introduce multimaps)!

A few comments on this already well thought-out idea:

  1. Please make sure that the effects are always visible and obvious for the player. I´d like to the some messages displayed like "Your Leather Factory in London has been temporarily shut down because of power failures."
  2. Please don´t make it game breaking. Just building that one more factory should not bring down all the grid. Maybe a random city should temporarily loose the power.
  3. Please don´t over-complicate it (I like many of your suggestions, Thunderbrd, but then ...). It should always be obvious to the player where the current problems come from and what could be done about it. I also would not like to see the tile influence, already don´t like it with pollution.
  4. As a kind of historical approach I´d love to see at first that small power plants are built in every city and only later on you built those huge plants just somewhere and connect the cities with power lines. I am not sure though, how this could be implemented.

While I have seen in the past that new ideas introduced by the C2C team are usually well planned and all my initial concerns were needless, I thought expressing them anyway wouldn´t hurt ;) ...
1) That already takes place if a city suffers a power outage for the buildings that 'require' power to function I believe but if it doesn't yet it does need to be added.

2) What would happen is that a city that runs out of power would power down but during the round(s) it cannot meet its power demand the power would build up. Then the next round it probably could. So you'd have whatever was saved during that powered down round (the buildings demanding power would not be active since there isn't access to power and thus they'd give the city a break) becoming the margin from which future round consumption deficits would be able to draw upon. Thus you'd certainly have a bad round but you wouldn't have to go into total panic mode with a city that's entirely shut down until you can get it more power. I'm thinking that will be easy enough for the player and ai to react to but we'd have to see it in game to be sure I think.

3)I think since we have visibility on properties we get a concept of if we're running in the positive or negative and that's all we'd really need to make sure we're doing as players - possibly keep in mind HOW positive or negative we're running would be good too. It'd definitely become critical to ensure your cities have power but it could be compensated for - particularly since we can often buy buildings at that stage of the game.

As for the tile visibility... Don't think we can currently turn that off but we'd have to ask AIAndy if that can be toggled now or if we need to do something to make it so. I actually really think that it would be useful for the player to see how much power is on 'the grid' so I don't think you'd want it off. You'd at least want to be able to see it when you wish to look for it (why is my lumber mill not working???) Maybe we should setup bug-options to toggle each property's tile display on/off huh?

4) Diffusion of power from one city to another would create a network of cities feeding each other energy so huge reactors could power nations. We'd want to do away with 'free powerplant in every city on the continent' for the big wonders and move towards just having them put out a LOT of power. As the power spreads from one tile to the next, that huge amount of power could reach other cities and help at least with providing them too with energy.

This is why I think electricity as a property would be the shiznit. So many things we can toggle about the way the property math works as it is we could really get quite realistic with it.

One thing that comes to mind though... civ ownership of a tile should be the limits of the grid unless we have a trade agreement that charges so much each round for the amount of power that crosses over. THAT would take some programming. And may take too much processing. Perhaps we should just set the grid limit within a given 'team'. That still may take some added programming - something similar to what I need for morale I think.

Well, most power lines are built alongside existing roads anyway, so IMHO there isn't much need for a whole new grid for connecting cities.
http://images.fineartamerica.com/images-medium-large/power-lines-and-a-dirt-road-chris-fullmer.jpg
We could consider it another Route feature and auto-couple the diffusion abilities through tiles with the routes... hmm... For a start this would work pretty well I think. May not even require further dll programming, just some complex xml work, but I'm not sure.

Nice suggestion :D

I wonder, if it will be possible to ruin enemy empire with just spies (with Revolutions on).
That's the thing... spies would have an enormous new advantage. Go in, take out the power plant so as to cause sudden riots and panic in the streets and deactivate most of the commerce taking place in a city for a bit. Will make the later game all the more important to guard against spies no? And this is rather realistic really. That's exactly one of the highest priority targets in modern warfare. It will really suit well with the ability to bombard/bomb specific buildings that I want to eventually work in too. And yet, more advanced civilizations would be able to offer energy support to a city from outside, wired in from other city generators that are operating just fine (thus the invasion force would want to cut all routes...)

I am in opposition to add electrice as property. It should be resource !!!

Here you have 100% workable code to stockpiling resource from EoW mod

Spoiler :

Assets\XML\Terrain
CIV4TerrainSchema.xml - (look for on labels <!-- VET AmountResourses -->)

CIV4YieldInfos.xml
Code:
<iFontButtonIndex>2</iFontButtonIndex>
CIV4FeatureInfos.xml
Code:
<ArtDefineTag>ART_DEF_FEATURE_JUNGLE</ArtDefineTag>
<YieldTypeStructs>
<YieldTypeStruct>
<YieldType>YIELD_WOOD</YieldType>
<iYieldChange>60</iYieldChange>
<iYieldPrice>1</iYieldPrice>
</YieldTypeStruct>
</YieldTypeStructs>
</YieldChanges>

CIV4BonusInfos.xml
Code:
<TechObsolete>NONE</TechObsolete>
<YieldTypeStructs>
<YieldTypeStruct>
<YieldType>YIELD_MARBLE</YieldType>
<iYieldChange>0</iYieldChange> Produced resources without improvement
<iYieldMinAmount>30000</iYieldMinAmount>
<iYieldMaxAmount>120000</iYieldMaxAmount>
</YieldTypeStruct>
</YieldTypeStructs>
</YieldChanges>

CIV4ImprovementInfos.xml
Code:
<YieldTypeStructs>
<YieldTypeStruct>
<YieldType>YIELD_COAL</YieldType>
<iYieldPrice>4</iYieldPrice>
<iYieldForPrice>400</iYieldForPrice>
</YieldTypeStruct>
</YieldTypeStructs>
.....
<BonusTypeStructs>
<BonusTypeStruct>
<BonusType>BONUS_COAL</BonusType>
<bBonusMakesValid>1</bBonusMakesValid>
<bBonusTrade>0</bBonusTrade>
<iDiscoverRand>10000</iDiscoverRand>
<YieldTypeStructs>
<YieldTypeStruct>
<YieldType>YIELD_COAL</YieldType>
<iYieldChange>400</iYieldChange>
</YieldTypeStruct>
</YieldTypeStructs>
<YieldChanges>
<iYieldChange>0</iYieldChange>
<iYieldChange>1</iYieldChange>
<iYieldChange>0</iYieldChange>
</YieldChanges>
</BonusTypeStruct>
<BonusTypeStructs>


Icons for resources
CvGameTextMgr.cpp
void CvGameTextMgr::assignFontIds(int iFirstSymbolCode, int iPadAmount) (look for on labels VET AmountResourses)

Load XML tags
CvXMLLoadUtilitySet.cpp
void CvXMLLoadUtility::SetImprovementBonuses(CvImprovem entBonusInfo** ppImprovementBonus) (look for on labels VET AmountResourses)
CvInfos.cpp (look for on labels VET AmountResourses)

Algorithms
CvPlot.cpp
void CvPlot::doTurn()
void CvPlot::updateYield(YieldTypes eUpdateYield)
int CvPlot::calculateImprovementYieldChange(Improvemen tTypes eImprovement, YieldTypes eYield, PlayerTypes ePlayer, bool bOptimal, bool bBestRoute, bool bWithBonus, bool bForRealCity) const
int CvPlot::calculateNatureYield(YieldTypes eYield, TeamTypes eTeam, char cModFeature) const
int CvPlot::getYieldParametr(PlotYieldFunc Func, YieldTypes eYield) const


CvPlayer.cpp
void CvPlayer::changeExpensesByPlot(CvPlot* pPlot, char cMod)


CvGameCoreUtils.cpp (look for on labels VET AmountResourses)


And link to mod
http://www.4shared.com/archive/WXtyyVN8/EoW_12.html

With that system we could add resource production/consumption to all resources we want to not only electricity

@Koshling
Do you found something usefull in multithreading code in EOW mod?
I like the idea but electricity flows and transfers from one location to the next in such a way that a civilization wide resource wouldn't be too fitting I think, even a volumetric one. Not to say that I don't feel we should have volumetric resources... I just think the property system could handle this in a really cool way. And volumetric resources would be at least a big merge project if not just a huge programming project all around either way. Can't speak for Koshling on this but my personal focus is simply elsewhere. The proposals I'm putting forward are for the team to consider, not something I'm currently suggesting I'll do the leg work on unless its very supplementary.
 
@TB
In modern world electricity is something that can be traded beetwen nations. So in game terms it fits better to resources.
 
As for the tile visibility... Don't think we can currently turn that off but we'd have to ask AIAndy if that can be toggled now or if we need to do something to make it so. I actually really think that it would be useful for the player to see how much power is on 'the grid' so I don't think you'd want it off. You'd at least want to be able to see it when you wish to look for it (why is my lumber mill not working???) Maybe we should setup bug-options to toggle each property's tile display on/off huh?

It is not so much the visibility of the properties on tiles. I don´t like the concept at all. I just see a lot of numbers on every tile that have an effect on a nearby city (and maybe even on further away cities) which I don´t understand. How do they calculate? How will they change when I build another improvement? And what does that mean for my city? Or for my Empire? When I want to optimize my Empire then I have to regularly check every tile - a few milliseconds for the AI but minutes for me. I already need about 4 to 6 weeks of most of my available spare time to just finish a single game. Controlling tile properties could easily prolong this by a week or more - without adding any fun.
 
It is not so much the visibility of the properties on tiles. I don´t like the concept at all. I just see a lot of numbers on every tile that have an effect on a nearby city (and maybe even on further away cities) which I don´t understand. How do they calculate? How will they change when I build another improvement? And what does that mean for my city? Or for my Empire? When I want to optimize my Empire then I have to regularly check every tile - a few milliseconds for the AI but minutes for me. I already need about 4 to 6 weeks of most of my available spare time to just finish a single game. Controlling tile properties could easily prolong this by a week or more - without adding any fun.

Why would the electricity property be present on tiles at all - surely it's just a city property? Properties generally can effect whatever subset of entities you like (tiles, cities, players, units), and can have transfers between them however you want to set it up within certain constraints.

To represent a grid we'd probably need TWO properties:

Electricity - property on cities (only)
Grid Capacity - property on Players (only)

Might work like this:

Buildings:

Power station (generates property electricity for the city it is built in)
Grid connection

Property manipulators:

One that transfers a percentage of electricity to the owner's 'grid capacity' which is active in any given city if and only if that city has a grid connection

Another that transfers a fixed amount of Grid capacity into electricity in each city provided that the total grid capacity is positive and the city has a grid connection

I'm pretty sure that can be done with the current property manipulator XML, though I'm not sure exactly how. Anyway, the basic idea is a player-wide pool that cities producing electricity feed int, and cities also take out of. We would **probably** want to split the contributing and receiving grid connections into separate buildings
 
1. Cities should be the main producer and consumer of electricity, but I'd also love to see large arrays of Solar Pannels (Improvement) in the desert and big Offshore Windparks near the coast that produce electricity. Also, Factories and Towns should consume electricity.

2. I also think Routes as Energy Powerlines are ok. Maybe give later routes more capacity for electricty then the earlier ones. And of course water tiles would need a new, early "route" that transfers energy from Windparks to the coast.

3. Buildings could have a priority tag that decides if they get electricity or not. Like a Water Pumping Station / Airport / Hospital would have higher priority then a Public Pool. If the Power a city has is less than what it consumes, the high priority buildings get primary energy. This should not be a boolen tag, but a integer tag. The higher the integer, the higher the priority. For buildings in the same priority class the building date could be the factor that decides which one gets the power.

4. Electricity should be able to be stored in the later game. Otherwise it should not (not sure if this is possible).

5. Some buildings can get a +/- Electricity per Pop: Solar Roofs, Computer Network... While others can be manipulated via techs and/or civics.

6. While Electicity can't be lower than 0, it probably should be in the game. So you can easily detect if you have -2 or -200000 Energy. (Crime can't be negative as well. I imagine strangers in the park that gift money to random people deep in the night)

7. Electricity should be tradeable with other nations. Maybe a new Diplomacy thing like open boarders that will allow electricity through boarders? Or even better: From Capital to Capital.

Note that most of this is far beyond my skills. Previous in this mod, there was much more teamwork then now. At least it seemed so. Every cycle the whole team worked on one major project. I don't want to tell people what they should do. This seems wrong to me and I for myself don't want to be forced to do something as well. But I'd really like to see a bit more teamwork again. Like this discussion in this thread :goodjob:
 
Sorry if my suggestion will be little off-topic.

In mod "Master of magic"
some resources represented in global numerical way
"100 iron"
"100 lether"

so some unit \ building use them and make -20 by every turn.
other units \ building produce them and make + 30
so in 5 turn we will have something like 150 iron.

C2C can make using such way resources like :
food
light manufacturing goods
heavy manufacturing goods
weapons
fuel
electrecity

in terms of topic :
Using Hydro power station \ Coal power station - we can produce something like 500 kilowats each turn, and then if some building use them, player will have power shortage as his reserv will be zero)

in this way we can represent resources consumption )
 
@TB
In modern world electricity is something that can be traded beetwen nations. So in game terms it fits better to resources.

Well, most power lines are built alongside existing roads anyway, so IMHO there isn't much need for a whole new grid for connecting cities.
http://images.fineartamerica.com/images-medium-large/power-lines-and-a-dirt-road-chris-fullmer.jpg

Oh, that must be nice.:mischief: The large distances with no population mean that some states here in Australia don't have a single grid covering all the population areas, let alone connections between the grids of each state. :mischief:Being able to get to a neighbouring country by land must be nice too.:D

2. I also think Routes as Energy Powerlines are ok. Maybe give later routes more capacity for electricty then the earlier ones. And of course water tiles would need a new, early "route" that transfers energy from Windparks to the coast.

the problem with using routes is that routes are defined/coded as means of moving units from A to B. Having a route for electricity will mean that units can use it also. Unless we come up with a different set of route types which would be useful elsewhere anyway.

Why would the electricity property be present on tiles at all - surely it's just a city property?

Improvements like cottages/hamlets/towns and workshops/factories would use electricity where as wind farms and solar panel improvements would provide power.
 
In mod "Master of magic"
some resources represented in global numerical way
"100 iron"
"100 lether"

so some unit \ building use them and make -20 by every turn.
other units \ building produce them and make + 30
so in 5 turn we will have something like 150 iron.

C2C can make using such way resources like :
food
light manufacturing goods
heavy manufacturing goods
weapons
fuel
electrecity

in terms of topic :
Using Hydro power station \ Coal power station - we can produce something like 500 kilowats each turn, and then if some building use them, player will have power shortage as his reserv will be zero)

in this way we can represent resources consumption )

Civ5 has that, too. I haven´t played it for a very long time, but iirc you e.g. have a certain amount of coal, depending on how many mines you have and how plentiful the coal is in each mine (probably random). Then you can only build as much coal plants (or other things) with it. The more I think about it, I would prefer to have electricity also as a resource and not a property.
 
To have electricity as a resource would first require a VERY major project of designing a volumetric resource system. Yes we want one but it's hell to design and a bigger hell to balance.

To those who would resist electricity as a property, perhaps what we need to do to appease is make properties more easily understood and more clearly expressed. We should be doing that along the way anyhow.

Answering the micromanagement concerns about tile property values... It's like measuring the amount of overflow from a pool (the city) spilling out into the environment. When the city begins to reduce the property, the flow begins to pour back into the city and eventually the negative absorbs up the overflow in the environment. It is possible for us to eventually have crime, disease, etc affect the value of a plot but for now it really doesn't do this because we haven't implemented it. So it's not all that big a deal to track crime and disease on tiles much. In fact, the main usefulness of the display for crime on tiles is to get an idea where hidden criminal units might be hunkering down. The tile values don't actually do anything but serve to transfer their values to adjacent tiles. A terribly crime ridden city could feasibly start having that enormous crime overflow diffuse all the way to start adding crime to nearby cities as well. Otherwise not too important. And with power, you'd see little more than, ok, I've got some here, or I don't. And the plot displays could give an overland clue to the electrical well-being of nearby cities.

The trading issue could be sorted out still... It might just take a little added programming to enable some interesting new property trade agreements.
 
My problem with it is this:

Electricity is just an energy source like all the others. In the game currently as I understand it, some energy sources are resources (coal, oil, uranium...), and the others (steam, electricity, solar, water/hydro, wind, any others?) exist only as assumed produced by techs and/or buildings as prereqs for other techs and buildings (to be exact/pedantic solar and wind of course don't as they are assumed to be universally available :lol:).

I recommend having a quick look at the big picture, to see whether electricity is really so special that it should be treated in a unique way. And whether any other energy source would be better treated some other way as well.

Most if not all of the things we do with electricity today, we used to do without it, ie. using other fuels or manually. Some of them we still do eg. hanging cloth items up to dry (yes I know there's an electric alternative!...) there are many many examples.

The "age of electricity" is only a century old (albeit a very eventful century). Could it be superseded, like steam was (kind of was, since we still use it to make electricity:crazyeye:)? In speculating about the future, I suggest it is necessary to consider the possibility.

In other words, I think that because we have lived entirely in the electrical age, we tend to overestimate its importance, and thus single it out for special treatment which it may not deserve.

Sorry to rant. There's more than 2 cents' worth there (imho), but I'm not charging a cent for it. :D
 
I was thinking of Koshling's suggestion that Electricity should only be in cities. If we'd base Improvements like Solar Panels and Offshore Windpark on forts, wouldn't it be possible to let them create power without the need of electricity on plots?
 
Back
Top Bottom