New Civics Screen

That's a cool feature just like good ol Civ4 :king::goodjob:

See, Gundobad isnt so bad after all. He's impressionable, indulgent and cautious as well as appalled :D:p

I guess that could also be used for certain Techs or Censures. Ie being Excommunicated makes rivals hate you till you get it lifted, and there could be certain Techs the Pope or others disapprove of getting, or Enlightenment techs that help your relations. In Civ4 BtS IIRC a tech diplo effect made everyone not want to attack civs with nuclear weapons.

BTW do you know how many total "steps" / points there are on the diplomacy scale from Furious to Pleased? There are only 4 or 5 different texts for it but I'm hoping its more of a range than that.

At the moment Civics and Techs have two separate checks, so I need to combine them into one, so that they can be checked all at once. As of now this effect only checks for Civics, I'll update it to check for all and all future additions will check for both. Civics are checked with the isCivic() function, I'll edit that to check for techs as well.

Here is the code for the "steps" from Furious to Pleased.
Code:
AttitudeTypes CvPlayerAI::AI_getAttitude(int iAttitudeVal)
{
	if (iAttitudeVal >= 10)
	{
		return ATTITUDE_FRIENDLY;
	}
	else if (iAttitudeVal >= 3)
	{
		return ATTITUDE_PLEASED;
	}
	else if (iAttitudeVal <= -10)
	{
		return ATTITUDE_FURIOUS;
	}
	else if (iAttitudeVal <= -3)
	{
		return ATTITUDE_ANNOYED;
	}
	else
	{
		return ATTITUDE_CAUTIOUS;
	}
}
 
BTW do you know how many total "steps" / points there are on the diplomacy scale from Furious to Pleased? There are only 4 or 5 different texts for it but I'm hoping its more of a range than that.
Considering I managed to get -9 with the indians in RaR once (oops) I would say the scale goes way past 4-5. I think I have seen everything between -11 and +8, but I'm not sure.

-4 is a lot and enough to make the AI think about declaring war. That would make slavery useless as half the civs would declare war on you as they will encourage each other to do so.
 
Considering I managed to get -9 with the indians in RaR once (oops) I would say the scale goes way past 4-5. I think I have seen everything between -11 and +8, but I'm not sure.

-4 is a lot and enough to make the AI think about declaring war. That would make slavery useless as half the civs would declare war on you as they will encourage each other to do so.

The scale is actually has range maximum from -100 to 100. The -4 for Slavery was just an example as I haven't even started to mod in any actual Diplomacy Civic effects for each Leaderhead. However, in the example pic with Gundobad, not all default values are shown.

Each Leader AI has a starting base value like <iBaseAttitude>4</iBaseAttitude> for Gundobad. Then this value gets modified by Handicap values, Number of Team members, War Successes, Open Borders, Trade Relations, things they "remember" like Insults, etc, etc. So, the base value goes up and down until it arrives at a single value, and this value is sent through the above :AI_getAttitude function to get the overall Attitude. So, depending on the other values even with a -4 to Slavery Gundobad could still consider you his best bud. :hatsoff:

So, with the values that are shown in the Gundobad example, you know that the +2 + -4 = -2, so -2 + the base of 4 = 2, thus we can see why his Attitude is Cautious and with one more +1 it would be back to Pleased.
 
The scale is actually has range maximum from -100 to 100
Wow thats a lot more than I thought! :crazyeye: But like Night said, with the vanilla system at some point they're so happy or so mad that any further changes won't make much additional difference in game.

In the EventTriggerInfos.xml system, which allows the trigger to check stuff from another player as well as the human player, would it be possible to add tags to check min and max relation thresholds with that otherplayer, and a tag <bOtherPlayerKing> that could select your King as the otherplayer to be checked?

If that's possible, it would become easy to mod a wide variety of good or bad Events involving relations with King/Pope or other players, making diplo relations have more interesting consequences.
 
In the EventTriggerInfos.xml system, which allows the trigger to check stuff from another player as well as the human player, would it be possible to add tags to check min and max relation thresholds with that otherplayer, and a tag <bOtherPlayerKing> that could select your King as the otherplayer to be checked?

If that's possible, it would become easy to mod a wide variety of good or bad Events involving relations with King/Pope or other players, making diplo relations have more interesting consequences.

Yep, that's completely possible and would be a pretty simple addition as far as adding the trigger. We should make a compiled note somewhere of all the new event triggers we want.
 
I'm currently working on new default unit fix (#11). In order to get as clean code as possible I wonder if we should make the default growth unit UNITCLASS_COLONIST like in vanilla. This mean serfs would need to be this class. This makes the code to find the default class much simpler and with less risk of bugs.

The growth unit will then be the unit with the highest ID where the player has the needed civic(s) to both enable a unit and set it as default growth unit, though it can never pick a unit with a lower ID than the default one.

Note that it says unit, not unitclass. This mean if civ A has unit 0 as UNITCLASS_COLONIST while civ B has 10 as UNITCLASS_COLONIST , and they both have civics to set unit 3 as new growth unit, only civ A will grow unit 3 as civ B will keep his default 10. This should allow some interesting XML setups without future DLL changes.

What do you say? Is this approach worth the needed XML changes to switch out the default class?
 
As long as it is not overly complicated for Monkey modders to figure out then I'd say go for it!
It would me easier to figure out (I think) as there will not be a unit with special meaning UNITCLASS_COLONIST is set in GlobalDefines and can be overwritten by GlobalDefinesALT if needed.

This would apply to the Default Luxury Food growth unit also right?
I will add this once the normal growth is working. My plan is to set the default growth unit to NO_UNIT and then when allowing luxury food we can enable a unit for it. As for picking a unit when multiple are available, then yes it will use the highest unitID available. It would be tricky to have different rules.
 
Pushed new Civic Effect: Prohibit Civics
Code:
<ProhibitsCivics>
     <ProhibitedCivic>
          <Civic>CIVIC_STATE_CONTROL</Civic>
     </ProhibitedCivic>
</ProhibitsCivics>

You can now set one or more Prohibited Civics in CivicInfos.xml. If one Civic Prohibits another you will not be able to have them both active at the same time. On the Civic Screen you will not be able to select both Civics.

NOTE: In order for this to work correctly all Civics must have corresponding Prohibited Civics. For Example, if State Control prohibits Parliament then Parliament must also prohibit State Control or that system will not work correctly.

I also changed the code so that Civics will always work as Techs. When you choose a Civic it gets added to your list of researched Techs, or removed will you deselect the Civic, so that all Effects that check for Techs will check Civics as well.

There is one more Civic Effect I am looking at doing and there is one new effect that Nightinggale is working on. When I get done with mine I'll be working on completing the Anarchy effects, and making sure things like Initial Civic cost are working along with the rest of the whole new Civic Screen system. When that's all done I'll add all the new Civics and their Effects to M:C and then we'll be ready to merge into master for testing.

There are currently 5 Civic Categories, but at some point I have planned to add a 6th Military category so a Player can set how they want to run their Military. This will be added when I do the whole Combat overhaul that is planned.

By the way, from my understanding "Parliament" is more of a England term, but I know the other Civs had similar Government setups. When the idea of a Parliament come into being, if English kings wanted to raise taxes they would have to call Parliament in order to do so, or really upset the people. Anyway, if anyone knows of the names of the other Civs Parliament types let me know here so that we can hopefully add it to the different languages at some point. I have a book somewhere that talks about some of them.
 
hmmm, I wonder if we could make 'collections' of civic specific techs, so that maintaining a certain system would allow to research a bunch of bonus techs that would make that system work better, or give special units and buildings. So for slavery you could make techs that improve the productivity of slaves or a special slave working building that produces extra production, like a plantation that can only be worked by slaves and produces a large yield in the city, then when you change you lose access to all the extra bonus techs that you haven't researched, but gain a new set to work on. That could be interesting..
 
hmmm, I wonder if we could make 'collections' of civic specific techs, so that maintaining a certain system would allow to research a bunch of bonus techs that would make that system work better, or give special units and buildings. So for slavery you could make techs that improve the productivity of slaves or a special slave working building that produces extra production, like a plantation that can only be worked by slaves and produces a large yield in the city, then when you change you lose access to all the extra bonus techs that you haven't researched, but gain a new set to work on. That could be interesting..

Hmm, that would be doable, and perhaps interesting. The Tech Tree would probably need to be updated for such a system. Perhaps showing the 'collections' Techs, but having them greyed out if not under the correct Civic. That way don't have to worry about generating a place for them, but then again there is almost unlimited space scrolling down so the Civic specific Techs could start a new line when you have access to them, then be removed when you don't. I wonder how this would work under the currently system...

Hmm, If you started a line of Techs with a Civic being the first tech, then each Tech after that would work as normal. We would need to add new xml tags, however, to Civics, like AllowsTechs, that lists all the techs that that Civic Allows to Research. Then when the Civic is removed, all those Tech Effects are removed as well. You would need to be able to removed the Tech Effect without removing the fact that you have researched that Tech.

This looks doable and not very complicated. If there is ever a need for such a system then maybe it will get worked in at some point.
 
Well I think right now it could work without any additions being made. (unless the civic_option not being a tech would break it)

Basically you set the civic as the first needed tech, and subsequent techs require the Civic and it's preceeding tech. Then when you switch civics you can no longer research that branch.

Then if we make the techs only effect elements that are unlocked by the civic for example Slaves for Slavery, then when you switch civics, you lose all the tech benefits as well, and if you switch back you can pick up the research where you left off.

On the tech screen, you just have all the civics at the bottom in the same layout as they are in the civic menu, it would be quite large, but you would only need to look down there when thinking about the civics, the rest of the time it is just out of sight out of mind. :D
 
Basically you set the civic as the first needed tech, and subsequent techs require the Civic and it's preceeding tech. Then when you switch civics you can no longer research that branch.

This effect would need to be coded because when you switch Civics there is no code to remove the Effects from the Techs in the Civic line. You want be able to research further, but will still have the effects.
 
"Then if we make the techs only effect elements that are unlocked by the civic for example Slaves for Slavery, then when you switch civics, you lose all the tech benefits as well, and if you switch back you can pick up the research where you left off."

This is when this bit comes in.

I might be considering this wrong, I thought it would be possible to have certain units or buildings work under the civics, like unlocking slaves?

Then when you switch civics those units are no longer unlocked and you cannot use them anymore..

No I think I am considering this the wrong way round, because censures lock out certain units and buildings, not unlock them..

It could still be done, it would just require you to lock everything in each civic that is available from one in the same set.. (I think...)
 
NOTE: In order for this to work correctly all Civics must have corresponding Prohibited Civics. For Example, if State Control prohibits Parliament then Parliament must also prohibit State Control or that system will not work correctly.
Edit readPass2
Either assert if they are unmatched or loop all prohibited civics and set current civic to prohibited. That should make XML monkey work easier as desynced setups will not be allowed by the DLL.
Do note that I heavily modified CvCivicInfo::readPass2() in master branch. Maybe it isn't a good idea to modify it in civics branch right now as it will cause conflicts when merging.
 
While the Civics/Techs system is undergoing renovation, one feature I would most love to see brought back from the original Inventor modcomp is that Techs can actually belong to several Categories (such as Military, Cultural, Religious, Industrial, Economic etc). There is still the tag <InventionCategory> in M:C, but it's not really used since everything has to have MEDIEVAL_TECH in this tag. If belonging to categories were brought back, this could be used to let leaders/techs/civics grant a discount to research in certain tech categories by a TraitInfos tag; and maybe could even allow easier viewing of the tree by using one tab per category like the Founding Fathers screen does. What do you think?:king:
 
Back
Top Bottom