C2C - UEM - Ultimate-Earth-Map 100% MOD and SVN update compatible by Pit2015

AIWeight is in schema file, where ProcessInfo is located.
Wrong. These are the only tags defined for ProcessInfo:

<ElementType name="ProcessInfo" content="eltOnly">
<element type="Type"/>
<element type="bTypeDependency" minOccurs="0"/>
<element type="bForceOverwrite" minOccurs="0"/>
<element type="bForceDelete" minOccurs="0"/>
<element type="iForceInsertLocation" minOccurs="0"/>
<element type="AndDependencyTypes" minOccurs="0"/>
<element type="OrDependencyTypes" minOccurs="0"/>
<element type="Description" minOccurs="0"/>
<element type="Strategy" minOccurs="0"/>
<element type="TechPrereq" minOccurs="0"/>
<element type="ProductionToCommerceModifiers" minOccurs="0"/>
<element type="Button" minOccurs="0"/>​
</ElementType>

Learn to read the schema file.
 
Wrong. These are the only tags defined for ProcessInfo:

<ElementType name="ProcessInfo" content="eltOnly">
<element type="Type"/>
<element type="bTypeDependency" minOccurs="0"/>
<element type="bForceOverwrite" minOccurs="0"/>
<element type="bForceDelete" minOccurs="0"/>
<element type="iForceInsertLocation" minOccurs="0"/>
<element type="AndDependencyTypes" minOccurs="0"/>
<element type="OrDependencyTypes" minOccurs="0"/>
<element type="Description" minOccurs="0"/>
<element type="Strategy" minOccurs="0"/>
<element type="TechPrereq" minOccurs="0"/>
<element type="ProductionToCommerceModifiers" minOccurs="0"/>
<element type="Button" minOccurs="0"/>​
</ElementType>

Learn to read the schema file.
Then why it was somewhere in file at all?

But is it listed as an item under ProcessInfos in that schema?
Apparently no

Could be it added here?
 
Last edited:
Then why it was somewhere in file at all?
Because it applies to other types that are also included in that schema. You must declare a tag and then apply the tag under the types that will use it. There's a distinct difference between a declaration line and an application line. In any given schema, you can only declare the tag once but if you're going to use it anywhere, it must be declared.

<element type= is an application line, usually using minOccurs="0" afterwards to indicate it's not absolutely 100% necessary that this tag be used in the xml entry.

<ElementType name= is a declaration line, under which all the application lines are placed that can validly be used within that object. It ends with </ElementType>

Apparently no

Could be it added here?
Not with any effect. Again, the way the AI is selecting it is already a mystery in the code so any attempt to add it would just confuse that mystery further. Adding to the schema without coding is possible but that's just adding a confusing dead do-nothing unless the code is programmed to utilize that information, upload it and apply it.
 
It appears only four buildings have AI weight:
Community Discussions - Normal building (20)
Crime (Armed Communities) - Crime property building (100). WOW JUST WOW. It appears Joseph added it back in 2015. I wonder if it doesn't backfire.
Safety (Alcatraz) - Autobuilding (50)
Kings Tournament - Wonder (5)
If I did add AIWeight to Armed Communities back in 2015 (was I even modding back then?) it is Because it is the Only Crime that is Not a Crime and reduces Crime. It is Hydro's creation. The AI Needed at that time a means to reduce Crime. And by telling the AI it Must build that building It helped, at that time, the AI from being overwhelmed by Crime.

Now today do whatever you want to it. And no it did not backfire raxxo. So chillax bro chillax.
 
If I did add AIWeight to Armed Communities back in 2015 (was I even modding back then?) it is Because it is the Only Crime that is Not a Crime and reduces Crime. It is Hydro's creation. The AI Needed at that time a means to reduce Crime. And by telling the AI it Must build that building It helped, at that time, the AI from being overwhelmed by Crime.

Now today do whatever you want to it. And no it did not backfire raxxo. So chillax bro chillax.
It doesn't but there is no effect on autobuildings as this tag is only used to give generic value to a building when a direct choice is being made what to construct. Since an autobuilding like this can not be chosen to be constructed but is a byproduct of the crime level, it will not influence the AI either way. Perhaps it could and should be made to but it's not smart enough to see this value and consider that a good reason to maintain the level of crime needed for this building to autopopulate. Don't blame ya for tryin' though.
 
Early modding mistakes. Is anyone free of them?
 
Early modding mistakes. Is anyone free of them?
Nope. It's not really a mistake either so much since it's a completely inert 'error'. Nothing bad happens with this one. So no harm, no foul.
 
Wherever you use it, you should add a comment line to explain why it's there. Eventually that why can be converted to a coded reason and the artificial weight can be removed. There's a lot of wonders that may need this because they operate on python. Koshling went through and removed all applications of this tag when he was trying to redesign the construction AI but at this point, having them pointing out the code deficiencies would be helpful I think.

There are probably few hundred buildings, that are required for other buildings.

Finally one of AIs got to Modern era (Ultrafast/Nightmare/Tiny map).
It looks like they are missing a lot of buildings to build NASA.
I guess I have to add AI weight to buildings, that are required for buildings.
Also resource producers should get it too - Two last generattions, unless there is lot of ways to obtain them.

It could be pretty low - like <iAIWeight>5</iAIWeight>

I leave off earth buildings as life is simple here.
 
Last edited:
Try out <iAIWeight>1</iAIWeight> or <iAIWeight>2</iAIWeight> first unless the building is very important.
The tag is quite potent from what I understand.

Having it at 1 should be enough for the AI to build it at some time during the game.
It is working perfectly.
Too perfectly now.

They are building most if not all buildings with AIweight of 1.
That is buildings, that are required for other buildings, Industrial+ era resource producers and National Wonders that give free building and or are needed for something.

Problem is that air pollution went to +2000 in all cities but AI seems to be unphased by that.
I'm testing on Ultrafast/Tiny/Nightmare - very lopsided test but AI is strong despite that.

Can I commit like this, or I should reduce pollution unhealth/unhappines for them?
Instead of that I could increase pollution entries by 50% as temporary measure.
Other than that pollution doesn't hurt cities much.

Should I have introduce pollution reducing entries for Modern - Information factories?
That is like -1 air pollution with tech X.

NASA should be built anytime soon, Hunting Instructions always got built, and there is Community Discussion, that had AIweight since always.
I think I can set them to 1 anyway.

Yep, @Dancing Hoskuld I fixed Hunting Instructions with AI weight.

AI weight of 1 means that building, that always had value of 0 now has value of 1 - it will be built after some time.
891 buildings have it now.
There is no harm if building already has some value.

Buildings, that don't have it are either:
Aren't required for buildings.
If they produce resource, they are unlocked before Industrial era.
They are off earth buildings.
They don't have cost (autobuilt or effect building or property pseudobuilding or animal building)
They are World/Group wonders.
National wonders, that doesn't give free buildings or are needed for something.
 
Last edited:
Pollutions were areas I never got to finish or organize like I wanted. There were still tons of buildings that give too much of both for what they really were and their inherit size in relation to their global impacts. Example is Smokehouse which I did reduce, but for fear of an avalanche of protests did not take down to the level I felt was appropriate. And I did not want to hurt Hydro's feelings (big reason why the buildings did not get reduced more, but was an important factor in increasing the level to 2000 from 1000). T-brd wanted 3000 level back then, but I hesitated. And then the Flack came from using global Happiness and Unhappiness once the Minor and Major Pollution "outbreak" building were reached from high levels. So now you are johnny on the spot to finish what I did not.
 
Pollutions were areas I never got to finish or organize like I wanted. There were still tons of buildings that give too much of both for what they really were and their inherit size in relation to their global impacts. Example is Smokehouse which I did reduce, but for fear of an avalanche of protests did not take down to the level I felt was appropriate. And I did not want to hurt Hydro's feelings (big reason why the buildings did not get reduced more, but was an important factor in increasing the level to 2000 from 1000). T-brd wanted 3000 level back then, but I hesitated. And then the Flack came from using global Happiness and Unhappiness once the Minor and Major Pollution "outbreak" building were reached from high levels. So now you are johnny on the spot to finish what I did not.
I raised pollution operating level to 3000, and scaled up all pollution entry level by 50% in SVN 10297 as temporary measure to help AI with pollution problem, as it now eagerly wants to produce all resources in addition of building buildings needed by other buildings.
Those buildings got flat increment of value by 1 - it didn't matter if they had value for AI before.

Global happiness/healthiness are more impactful on larger maps and properties have easier time to reach equilibrium on slower speeds.
Since you and Thunderbrd wanted to scale up air/water pollution to 3000 I can keep those new levels.

Judges are meant to build ordinances, that reduce pollution strongly, but AI doesn't know, that it can build unit, that can make building.
AI weight can fix that, but @Thunderbrd said, that ordinances can be removed by judges - I'm not sure how that works.
I'm not sure if AI knows in what cities it has national wonders needed for ordinances, so it could move unit to city with such national wonder..
It knows, that units can build buildings - that is vanilla feature (originally only Great People could do this) - even it isn't too effective.
 
I'm not sure if AI knows in what cities it has national wonders needed for ordinances, so it could move unit to city with such national wonder..
Yeah that's another issue with ordinances and AI.

It's more likely to put ordinances in place than it is to remove them but are all ordinances GOOD to put in place? If we can assume THAT, then it might work to just inspire them to maintain some judges. AIweight on units might be tricky though and I don't know the coding on it... usually units are ordered BECAUSE the AI identifies a priority need for a role to be filled and then a unit is then picked as the best to fulfill that role. AI weight doesn't play into that evaluation and I've not seen where it does in the code. I don't know if it would mean that the AI thinks it should simply 'have one on hand' somewhere assigned to it's default AI or what. You could test it and see how it behaves I guess.
 
Yeah that's another issue with ordinances and AI.

It's more likely to put ordinances in place than it is to remove them but are all ordinances GOOD to put in place? If we can assume THAT, then it might work to just inspire them to maintain some judges. AIweight on units might be tricky though and I don't know the coding on it... usually units are ordered BECAUSE the AI identifies a priority need for a role to be filled and then a unit is then picked as the best to fulfill that role. AI weight doesn't play into that evaluation and I've not seen where it does in the code. I don't know if it would mean that the AI thinks it should simply 'have one on hand' somewhere assigned to it's default AI or what. You could test it and see how it behaves I guess.
Some ordinances ban certain buildings and others reduce properties.
Code:
<Buildings>
                <Building>
                    <BuildingType>BUILDING_CARPOOL</BuildingType>
                    <bBuilding>1</bBuilding>
                </Building>
                <Building>
                    <BuildingType>BUILDING_SMOKE_DETECTOR</BuildingType>
                    <bBuilding>1</bBuilding>
                </Building>
                <Building>
                    <BuildingType>BUILDING_FIRE_CODE</BuildingType>
                    <bBuilding>1</bBuilding>
                </Building>
                <Building>
                    <BuildingType>BUILDING_NEIGHBORHOOD_WATCH</BuildingType>
                    <bBuilding>1</bBuilding>
                </Building>
                <Building>
                    <BuildingType>BUILDING_YOUTH_CURFEW</BuildingType>
                    <bBuilding>1</bBuilding>
                </Building>
                <Building>
                    <BuildingType>BUILDING_EMISSION_ACT</BuildingType>
                    <bBuilding>1</bBuilding>
                </Building>
                <Building>
                    <BuildingType>BUILDING_CLEANAIR_ACT</BuildingType>
                    <bBuilding>1</bBuilding>
                </Building>
                <Building>
                    <BuildingType>BUILDING_CLEANWATER_ACT</BuildingType>
                    <bBuilding>1</bBuilding>
                </Building>
                <Building>
                    <BuildingType>BUILDING_TIRE_RECYCLE</BuildingType>
                    <bBuilding>1</bBuilding>
                </Building>
                <Building>
                    <BuildingType>BUILDING_SHUTTLE_SERVICE</BuildingType>
                    <bBuilding>1</bBuilding>
                </Building>
                <Building>
                    <BuildingType>BUILDING_PROSTITUTION_BAN</BuildingType>
                    <bBuilding>1</bBuilding>
                </Building>
                <Building>
                    <BuildingType>BUILDING_GAMBLING_BAN</BuildingType>
                    <bBuilding>1</bBuilding>
                </Building>
                <Building>
                    <BuildingType>BUILDING_ALCOCHOL_PROHIBITION</BuildingType>
                    <bBuilding>1</bBuilding>
                </Building>
                <Building>
                    <BuildingType>BUILDING_DRUG_PROHIBITION</BuildingType>
                    <bBuilding>1</bBuilding>
                </Building>
                <Building>
                    <BuildingType>BUILDING_SMOKING_PROHIBITION</BuildingType>
                    <bBuilding>1</bBuilding>
                </Building>
                <Building>
                    <BuildingType>BUILDING_NATIONAL_ALCOHOL_PROHIBITION</BuildingType>
                    <bBuilding>1</bBuilding>
                </Building>
                <Building>
                    <BuildingType>BUILDING_NATIONAL_DRUG_PROHIBITION</BuildingType>
                    <bBuilding>1</bBuilding>
                </Building>
                <Building>
                    <BuildingType>BUILDING_NATIONAL_SMOKING_PROHIBITION</BuildingType>
                    <bBuilding>1</bBuilding>
                </Building>
                <Building>
                    <BuildingType>BUILDING_NATIONAL_PROSTITUTION_BAN</BuildingType>
                    <bBuilding>1</bBuilding>
                </Building>
                <Building>
                    <BuildingType>BUILDING_NATIONAL_GAMBLING_BAN</BuildingType>
                    <bBuilding>1</bBuilding>
                </Building>
I guess property reducing ones are good and banning ones are mixed bag.

I added AI weight of 1 to judges, but AI didn't produce or at least didn't use them.
 
Last edited:
I added AI weight of 1 to judges, but AI didn't produce or at least didn't use them.
Might be good to figure out which. It's very possible that AI weight on units is not currently used anywhere otherwise you could see units with an AI weight be trained without an end and if it IS part of the evaluation, then it's probably only to help units within the span of the evaluation on certain UnitAI needs - this is hard to explain but it would mean that if 2 units are equally as good to fill a role, like City Defense, then the AI weight may tip the balance for the unit that has it.

This aspect of the code is as complex as it can get.
 
And then even for me it often isn´t easy to find out where the Ordinance should be built as it is only one city where I have to remember that I have built the corresponding National Wonder (usually long before the Ordinance can be built). Probably even more difficult for the AI, so I hope that we won´t see Judges being built in every city and then standing around and not knowing what to do...

Thinking about it it would be much easier to allow the Ordinances to be built everywhere (only once in the empire of course).
 
And then even for me it often isn´t easy to find out where the Ordinance should be built as it is only one city where I have to remember that I have built the corresponding National Wonder (usually long before the Ordinance can be built). Probably even more difficult for the AI, so I hope that we won´t see Judges being built in every city and then standing around and not knowing what to do...

Thinking about it it would be much easier to allow the Ordinances to be built everywhere (only once in the empire of course).
We could make them regular buildings for now - they would be kinda like hunting camps: buildable normally and placable by unit.

@Thunderbrd can I convert property reducing ordinances to regular or national buildings?
They need National Wonder anyway, so they can be regular buildings, but as national wonders they wouldn't litter city build list (if you let BUG show unbuildable buildings) once built in some city.

This way AI can build them, and player can build them trough use of judges or as normal buildings.
 
Last edited:
We could make them regulars building for now - the would be kinda like hunting camps: buildable normally and placable by unit.

@Thunderbrd can I convert property reducing ordinances to regular or national buildings?
They need National Wonder anyway, so they can be regular buildings, but as national wonders they wouldn't litter city build list (if you let BUG show unbuildable buildings) once built in some city.

This way AI can build them, and player can build them trough use of judges or as normal buildings.
Interesting proposal. I'd like to hear what others think on this matter first.
 
I'll present what those 11 property reducing ordinances do.
They will be National Wonder - will be visible in beginning of Wonder section - they are cheap as Judge (Judge still can place those).
Some effects are in main ordinance (for example global health) and others are in free building - Ordnance Effect (for example property reduction).

Neighborhood Watch (Police Academy, Labor Union X67): +5% Espionage, -10 Crime in all cities
Fire Code (National Fire Service, Civil Engineering X68): +1 Health, -10 Flammability in all cities
Carpool (Department of Motor Vehicles, Motorized Transportation X69): +1 Health, -25 Air Pollution in all cities
Commuter Shuttle Service (Department of Motor Vehicles, Motorized Transportation X69): +1 Health, -25 Air Pollution in all cities
Youth Curfew (Police Academy, Compulsory Education X70): +5% Espionage, -5 Crime in all cities.
Smoke Detector (National Fire Service, Electronics X77): +1 Health, -5 Flammability in all cities (Was +2 health in this city)
Automobile Emission Reduction Act (Department of Motor Vehicles, Ecology X82): +2 Health, -50 Air Pollution in all cities
Clean Air Act (Department of Energy, Ecology X82): +2 Health in all cities, -100 Air Pollution in all cities
Clean Water Act (Department of Water, Ecology X82): +2 Health in all cities, -100 Water Pollution in all cities
Tire Recycling Program (Garbage Collection Agency, Recycling X84): +1 Health, -25 Air Pollution in all cities (Removed +2 health in this city)
National Smoking Prohibition (Supreme Court, Urban Culture X87): +2 Health, -15 Air Pollution in all cities

Looks like Flammability and Crime reducing ordinances are so unimpressive compared to pollution crushing ordinances.
Fire Code/Smoke Detector could reduce Flammability by 50/25 per turn for example.
Same with Neighborhood Watch/Youth Curfew - they could reduce crime by 50/25 too, though their espionage bonus is nice.
 
Back
Top Bottom