Extending the generic property system

With religions as dynamic properties I think much of what you just suggested could be made much easier implemented.

Some cool stuff brewing here!
 
Any chance that national cultures will change to spread like religion or corporations? I'm the "copyright owner", as it stands, of 20+ cultures, which means they occur everywhere I spread to and magically stop at my borders. Toulouse on the other continent gets Indonesian culture, and the next turn the Indonesian hero appears in my capital over here.

I suggest it would be way cooler if Indonesian (continuing the example) existed only in Toulouse initially, and then spread first to Toulouse's neighbours rather than to my other (faraway) cities, giving their nearby city/ies as much right to the (useless but I digress) Indonesian UU as Toulouse. As religion and corporations do, the culture would spread to some of my home-continent cities sooner rather than later - because they are the same civ, and because of trade routes etc. But I would really appreciate it if the exclusivity of national cultures to one civ could be broken (obviously it could be an option rather than forced on everyone).

Does that make sense?
 
Any chance that national cultures will change to spread like religion or corporations? I'm the "copyright owner", as it stands, of 20+ cultures, which means they occur everywhere I spread to and magically stop at my borders. Toulouse on the other continent gets Indonesian culture, and the next turn the Indonesian hero appears in my capital over here.

I suggest it would be way cooler if Indonesian (continuing the example) existed only in Toulouse initially, and then spread first to Toulouse's neighbours rather than to my other (faraway) cities, giving their nearby city/ies as much right to the (useless but I digress) Indonesian UU as Toulouse. As religion and corporations do, the culture would spread to some of my home-continent cities sooner rather than later - because they are the same civ, and because of trade routes etc. But I would really appreciate it if the exclusivity of national cultures to one civ could be broken (obviously it could be an option rather than forced on everyone).

Does that make sense?

This is being discussed and slowly thought through. Just meeting some resistance by ppl about memory overhead for all of those properties. I'm currently working on understanding the property structure better so I can optimize the memory usage so we can get it accomplished. Worst comes to worst it can be a modmod first before the higher ups (hydro and SO etc) can get a feel for how well it works .
 
Could similar uses be used for Diseases and/or Languages?
Diseases, probably not - still have a lot to do to finalize systems there and will probably work more closely with AIAndy on that from this point so we can hammer out a better way than has been done so far. But the problem is with 1D Properties we're talking about it being applicable when all spread and diffusion patterns are pretty much mathematically identical and don't need to be redefined between them. Diseases can't at all be said to be this way as each are unique. I think something MORE like what I was trying to do with the combat mod stuff is the right direction there.

But Languages? May be a very good idea and could interact with the way cultures spread and gain or lose influence too considering that each culture could be tagged with a given language (or as supportive of all languages.)

Any chance that national cultures will change to spread like religion or corporations? I'm the "copyright owner", as it stands, of 20+ cultures, which means they occur everywhere I spread to and magically stop at my borders. Toulouse on the other continent gets Indonesian culture, and the next turn the Indonesian hero appears in my capital over here.

I suggest it would be way cooler if Indonesian (continuing the example) existed only in Toulouse initially, and then spread first to Toulouse's neighbours rather than to my other (faraway) cities, giving their nearby city/ies as much right to the (useless but I digress) Indonesian UU as Toulouse. As religion and corporations do, the culture would spread to some of my home-continent cities sooner rather than later - because they are the same civ, and because of trade routes etc. But I would really appreciate it if the exclusivity of national cultures to one civ could be broken (obviously it could be an option rather than forced on everyone).

Does that make sense?
Total sense. That's the seed from which this whole conversation is taking place basically. This is exactly what I'd prefer we model our culture system into.
 
Could similar uses be used for Diseases and/or Languages?

For the highly contagious ones like smallpox and the plague it would be a good model. Not so much for others.

Any chance that national cultures will change to spread like religion or corporations? I'm the "copyright owner", as it stands, of 20+ cultures, which means they occur everywhere I spread to and magically stop at my borders. Toulouse on the other continent gets Indonesian culture, and the next turn the Indonesian hero appears in my capital over here.

I suggest it would be way cooler if Indonesian (continuing the example) existed only in Toulouse initially, and then spread first to Toulouse's neighbours rather than to my other (faraway) cities, giving their nearby city/ies as much right to the (useless but I digress) Indonesian UU as Toulouse. As religion and corporations do, the culture would spread to some of my home-continent cities sooner rather than later - because they are the same civ, and because of trade routes etc. But I would really appreciate it if the exclusivity of national cultures to one civ could be broken (obviously it could be an option rather than forced on everyone).

Does that make sense?

This is what is being discussed. The "magically stop at my borders" is not yet modeled and is the factor I would want for religion spread. However not all religions would spread if/when we have evolving religions.

As far as I can tell both Religion (and Culture) would need two properties. One which is on/off indicating its presence - this would be used for the religion spread function. The other already exists in the game but not as a property and that would be the influence inside the city. The later is affected by buildings and is used in the "Religion going away" option we currently have
 
Oh dear! I want missionaries to become tactical so we can reduce their numbers to 3 each. And I want religions to spread like in another mod - the World Religions mod. However having said that it may also be necessary to have two or three different kinds of religion - one set for the nomadic eras, another for the city states to nationhood eras and the final set for the later eras (organised religion onwards)

That isn't too realistic though, and not really fun IMO either.

What would be interesting though would be the possibility of making Missionaries national units but greatly enhancing religion spread (and decay) algorithms with the Property System so as to be actually useful and a factor in strategy. For instance, you could send a missionary to spread the faith to a distant city, no matter the countervailing forces (except for State Religion and the like of course), but if you don't plan it right that new religious colony could very quickly decay due to surrounding hostile opinion.

That would also make religious promos and buildings more interesting. Imagine being able to influence the religious patterns of your enemy by setting up a SOD of Crusaders or the like on their doorstep.

The huge problem here is that this runs into processing time real fast, so we might want to be conservative with complex interactions like that.
 
No that the basics for the captives system is in place I find I need to get the Extended Diplomacy back underway since parts of the next phase of captives needs to interact with Indigenous Peoples. What I think I need is a property at the nation/player level that represents the relationship of that nation with Indigenous People. This is a single integer. It is affected by actions such as pillaging or building over a village and missions by diplomats and missionaries. The value is used by events, negative values lead to bad events and positive values lead to good events.

Is this a correct use of properties and if so how would I go about defining and using it?
 
No that the basics for the captives system is in place I find I need to get the Extended Diplomacy back underway since parts of the next phase of captives needs to interact with Indigenous Peoples. What I think I need is a property at the nation/player level that represents the relationship of that nation with Indigenous People. This is a single integer. It is affected by actions such as pillaging or building over a village and missions by diplomats and missionaries. The value is used by events, negative values lead to bad events and positive values lead to good events.

Is this a correct use of properties and if so how would I go about defining and using it?
Yes, that is a correct use.
Check this for some information of how you add a new property:
http://forums.civfanatics.com/showpost.php?p=11327747&postcount=58
Not everything in there is correct any more (like the order of properties in the file does not matter any more and you can even add them in modules).
Check the other property tutorial (and the many examples in the XML that use it) for information on how to make the properties automatically decay or add sources to buildings or other things.

Mission outcomes can already add (or remove) properties, but currently only to to the city. I will change that to allow to specify which game object to add to.
Outcome missions can also have a cost in properties and that one allows you to specify which object (like player, city or unit) has to pay the property cost.
Events can be given a maximum and minimum property value to occur (currently used for flammability).
You can get or change property values from Python (although it seems like currently only the one on city and player is exposed) by using getProperties on the player (or city) which gives you the property object. Use methods on it like getValueByProperty(propertyID) or changeValueByProperty(propertyID, amount).
 
@AIAndy & DH

But if you make a new property don't you have to make the + the bad and the - the good? For instance if I have +25 Air Pollution the AI will try to lower it. Thus making -25 Air Pollution a good thing to have. In fact Flammability, Crime, Disease, Air Pollution and Water Pollution all follow the + means bad and - means good model. Having a new system like Electricity should have to follow the same system because having +10 Electricity will to the AI be a bad thing. Even though it logically makes sense to read. Is there some sort of tag that inverts the properties so the AI will understand if you make + be good and - be bad?
 
@AIAndy & DH

But if you make a new property don't you have to make the + the bad and the - the good? For instance if I have +25 Air Pollution the AI will try to lower it. Thus making -25 Air Pollution a good thing to have. In fact Flammability, Crime, Disease, Air Pollution and Water Pollution all follow the + means bad and - means good model. Having a new system like Electricity should have to follow the same system because having +10 Electricity will to the AI be a bad thing. Even though it logically makes sense to read. Is there some sort of tag that inverts the properties so the AI will understand if you make + be good and - be bad?

No - can be either way - just give it a negative AIWeight if you want to reverse the AI's opinion of it
 
No - can be either way - just give it a negative AIWeight if you want to reverse the AI's opinion of it

On what? A building? So if every modern building used electricity they should have a - Electricity (since they are using it) and also a negative AI weight even if their other stats are worth making?

Or should only the power plants be given a more positive AI weight because they are providing electricity. But then it might cause more poolluton from say a Coal Power Plant which creates tons of pollution.
 
On what? A building? So if every modern building used electricity they should have a - Electricity (since they are using it) and also a negative AI weight even if their other stats are worth making?

Or should only the power plants be given a more positive AI weight because they are providing electricity. But then it might cause more poolluton from say a Coal Power Plant which creates tons of pollution.

On the property definition. Like this for crime - the AIWeight is negative so the AI tries to lower it:

Code:
		<PropertyInfo>
			<Type>PROPERTY_CRIME</Type>
			<Description>TXT_KEY_PROPERTY_CRIME</Description>
			<Strategy>TXT_KEY_PROPERTY_CRIME_STRATEGY</Strategy>
			<ValueDisplayText>TXT_KEY_PROPERTY_CRIME_DISPLAY</ValueDisplayText>
			<ChangeDisplayText>TXT_KEY_PROPERTY_CRIME_CHANGE</ChangeDisplayText>
			<ChangeAllCitiesDisplayText>TXT_KEY_PROPERTY_CRIME_CHANGE_ALL_CITIES</ChangeAllCitiesDisplayText>
			<PrereqMinDisplayText>TXT_KEY_PROPERTY_CRIME_PREREQ_MIN</PrereqMinDisplayText>
			<PrereqMaxDisplayText>TXT_KEY_PROPERTY_CRIME_PREREQ_MAX</PrereqMaxDisplayText>
			<bSourceDrain>1</bSourceDrain>
			<iAIWeight>-100</iAIWeight>
			<AIScaleType>AISCALE_CITY</AIScaleType>
			<iOperationalRangeMin>0</iOperationalRangeMin>
			<iOperationalRangeMax>1000</iOperationalRangeMax>
 
Ah ok. Thanks for explaining. That should be useful if I ever get around to adding Electricity as a property.

Or Quality of Life for that matter.

@AIAndy: Will Property Visibility be in the next Property System update? Also is it possible to make Property interactions with other Properties using the Integer Expression system currently?
 
Or Quality of Life for that matter.

@AIAndy: Will Property Visibility be in the next Property System update?
We will see. But I don't recommend making it invisible until it is properly tested (if then).

Also is it possible to make Property interactions with other Properties using the Integer Expression system currently?
Well, the amount in the constant source is an integer expression and property value is exposed to the expression system. More of the normal integers in the property manipulators can be changed if requested.

Then there are the Property interactions which are somewhat similar to sources and propagators but model interactions and conversions between different properties on the same object.
 
Is There a GAMEOBJECT_TECH ?

How do you influence Technologies with Properties?

Example, if we wanted Techs to modify Crime?
-1 Crime at Compulsory Education
-1 Crime at Computers

EDIT: found it.
 
I am running into a problem with the properties.

For instance I wanted to add -1 Tourism to Pollution (Light Smog). It already has a +5 to Disease property on it. When I add the code to tourism in the core it will now show tourism but if I add it to my mod it will not show the Disease.

In short it appears as if whichever property is listed last gets priority and overwrites the other. Thus making properties modular basically impossible.

Is there a way to solve this or do I need to start adding the tourism property to the other files and thus make tourism non-optional?
 
So the feedback is ...

Dancing Hoskuld said:
From previous expriance they can't be modular. That is why I removed the Malaria stuff because it was removing all the other disease stuff.

Thunderbrd said:
Your problem is correct. Properties may not be made modular the way AIAndy set it up. He'd have to come back and do a lot more work on things to make it modular capable. DH has been ing about this as well.

Looks like the only way to make it work is to make is non-modular which also means non-optional. :undecide:

This sucks because it was the one time I was really making an effort to make my stuff modular and now I can't. :(
 
So the feedback is ...

Looks like the only way to make it work is to make is non-modular which also means non-optional. :undecide:

This sucks because it was the one time I was really making an effort to make my stuff modular and now I can't. :(
Properties not being modular is a very broad statement that should not be the case in that generality (except by bug). Likely we are just talking about inheritance semantics that are easy to change.

Please specify what XML exactly you tried and what you expected to happen and what instead happened.

If you want sources to add up on inheritance instead of overriding (with the disadvantage of losing the possibility to change sources in a module except by overriding the building), then just comment out the
if (*.empty())
lines in CvPropertyManipulators::copyNonDefaults. That should cause the manipulators to add up.
 
Back
Top Bottom