View Full Version : New Diplomacy with barbarians


Dancing Hoskuld
Apr 24, 2012, 05:24 PM
It may not make it into v23 but I am working on some new diplomacy options for interaction with Barbarians and Indigenous People. I am taking ideas from the Barbarian Envoy (http://forums.civfanatics.com/downloads.php?do=file&id=13910) by Capt_Blondbeard , and White Lies, Black Ops (http://forums.civfanatics.com/downloads.php?do=file&id=13313) by ooggbboo mods.

So far I am just doing the simple stuff. Converting the code to use C2C's mission and outcome systems and events for the results. So far I am working on:-

Barbarian Envoy
Your diplomat enters a barbarian city and talks to them, ie give them some money. With the following results.

They convert to your state religion.
They give you some units.
They join your nation.
They ignore you. IE they want more money. ;)



White Lies, Black Ops
Goody Huts become Indigenous People after they have been explored.

So far all you can do with them is assimilate them into your nation if they are with in your borders. This gives good events.
Leaving them alone should give other events but doesn't yet
Raising their village to put your own improvements on them should lead to bad events but does not yet.

hotrodlincoln
Apr 24, 2012, 06:19 PM
There should be some downsides to letting indigenous people stay, as well. Perhaps they could cause revolt instability, by providing hiding places for criminals, rebels, escaped slaves, terrorists, etc and also because they provide a model of governance that differs from your own nation. Perhaps they may even spawn hidden nationality units every once in a while that raze tile improvements, like native Americans reacting to settlers on their land by burning down crops.

There should definitely be bonuses to having them, but it shouldn't be so cut-and-dried that nobody ever destroys indigenous villages.

T C
Apr 24, 2012, 09:06 PM
I also feel that leaving the indigenous people in place should be a double edged sword. Stability and crime penalty would be good.

What do you plan to do with the goody hut bonuses? Will they stay as they are or change. If they change, I would like to see the free technology changed to something like 'the villagers share some of their knowledge' and say 10-20% towards a particular tech.

Shouldn't there be a fifth option with barbarian envoy, i.e. the barbarians kill your envoy and steal the gold. ;)

I would also love to see some more options, like recruiting barbarian mercenaries or bribing the barbarians to attack an enemy civilization. However, I don't know if either are possible.

Dancing Hoskuld
Apr 25, 2012, 04:23 PM
@hotrodlincoln & T_C, you obviously never played WLBO:mischief:

There should be some downsides to letting indigenous people stay, as well. Perhaps they could cause revolt instability, by providing hiding places for criminals, rebels, escaped slaves, terrorists, etc and also because they provide a model of governance that differs from your own nation. Perhaps they may even spawn hidden nationality units every once in a while that raze tile improvements, like native Americans reacting to settlers on their land by burning down crops.

There should definitely be bonuses to having them, but it shouldn't be so cut-and-dried that nobody ever destroys indigenous villages.

Assimilating costs a hefty amount of money and means that the indigenous people moves them into your cities so you can work the land. It costs money. Most events are good from then on if your policy towards them is good. IE you have to work to keep up good relations. iirc later your spies can become "agent provocators" and stir up trouble with other people's IPs but I have not gotten that far yet.

Using the land they are on by a city is supposed to improve relations at the cost of production and food but have not found where this is done. It is also supposed to cause a bunch of events.

Pillaging or improving the plot where the IPs are is bad.

Leaving them alone is so-so.

I also feel that leaving the indigenous people in place should be a double edged sword. Stability and crime penalty would be good.

What do you plan to do with the goody hut bonuses? Will they stay as they are or change. If they change, I would like to see the free technology changed to something like 'the villagers share some of their knowledge' and say 10-20% towards a particular tech.

Shouldn't there be a fifth option with barbarian envoy, i.e. the barbarians kill your envoy and steal the gold. ;)

I would also love to see some more options, like recruiting barbarian mercenaries or bribing the barbarians to attack an enemy civilization. However, I don't know if either are possible.

Goody huts remain the same. However I think we are going to have to review them as they don't seem to be working fully especially the goody islands. Goody islands are currently exempt from this, until I can find some sea terrains.

Il Principe
Apr 25, 2012, 11:53 PM
Will IPs be sesitive to civics? Because I just canīt imagine them to be too happy with fascism or nationalism( but maybe your own population is, always good to have a minority you can blame ).
Federalism on the other hand could provide an easy way to integrate them into your nation.
And slavery... well the slaves have to come from somewhere .

Dancing Hoskuld
Apr 26, 2012, 12:04 AM
Will IPs be sesitive to civics? Because I just canīt imagine them to be too happy with fascism or nationalism( but maybe your own population is, always good to have a minority you can blame ).
Federalism on the other hand could provide an easy way to integrate them into your nation.
And slavery... well the slaves have to come from somewhere .

You forget that assimilation in the ancient eras probably meant kill all the males and welcome the females thus the culture afterwards if the IP culture. Classic example is Normandy when the former vikings were settled there.

As for slaves where do you think we got the word family from. :)

Vokarya
May 01, 2012, 09:03 PM
Are there plans for more advanced diplomat units? Or to have the diplomats be used for diplomacy with other full civilizations? Thought I'd ask. I actually really liked the Embassy mechanic from Civ I-II.

Dancing Hoskuld
May 01, 2012, 09:16 PM
Are there plans for more advanced diplomat units? Or to have the diplomats be used for diplomacy with other full civilizations? Thought I'd ask. I actually really liked the Embassy mechanic from Civ I-II.

I have art for classical, industrial and modern diplomats plus the Great Diplomat and the diplomat specialist. Then there is Orion Veteran's mod to pillage. :mischief:

WLBO has a whole suite of diplomacy with other civs, marry your daughter off or exchange sons as hostages to strengthen ties. Warfare agreements - don't kill non combatants, exchange prisoners, ransom the rich. And so on and on, not all were implemented and I am not sure how many we will be able to implement.

It uses the event system a great deal but "we" seem to have killed it with too many events. It may need looking at to allow events of different types to happen in the same turn. So we may need to split the events into natural, political and so on. Ori may have ideas on that.

Not all WLBO is good, terrorist organizations spring up and have to be dealt with, minorities inside your nation may get restless, this on top of revolutions!

Il Principe
May 01, 2012, 11:27 PM
WLBO has a whole suite of diplomacy with other civs, marry your daughter off or exchange sons as hostages to strengthen ties. Warfare agreements - don't kill non combatants, exchange prisoners, ransom the rich.

Drool. If this could be ported... I realy like the idea of warfare agreements... with unhappiness and damaged relations of you break them. Or maybe not if you run intollerant or state church and go against the infedels :)


Not all WLBO is good, terrorist organizations spring up and have to be dealt with, minorities inside your nation may get restless, this on top of revolutions!

I would actually like that. It could be tied to relgions and rev maybe? Run a atheist nation with high high rev index.. get relgiously motivated terror groups.
And the possibilietes in destabilazing others by secretly supporting their terrorists :evil:

Thunderbrd
May 04, 2012, 12:20 AM
Yeah, sounds like those would add to gameplay for those who already appreciate revolutions.

ls612
May 04, 2012, 06:36 PM
Yeah, sounds like those would add to gameplay for those who already appreciate revolutions.

That means JosEPh is going to hate this. :lol::p

Dancing Hoskuld
May 04, 2012, 06:48 PM
That means JosEPh is going to hate this. :lol::p

No, because he does not play with rev on.

:( I am finding much less in the WLBO mod than I expected. I think that much of it must have been done in the SDK which I avoid. I will still be adding some of he stuff, it just wont be as extensive as I thought. :(

ls612
May 04, 2012, 06:57 PM
No, because he does not play with rev on.

:( I am finding much less in the WLBO mod than I expected. I think that much of it must have been done in the SDK which I avoid. I will still be adding some of he stuff, it just wont be as extensive as I thought. :(

I was joking, I have no idea what he thinks about this. Sad to hear about the lack of stuff from WLBO though, that was a good mod.

Dancing Hoskuld
Jun 06, 2012, 05:19 PM
I have been thinking that this could be as close as we can get to the Civ V "City States" idea. Especially when I extend it to diplomatic relations with IPs in neutral and other nations territory.

Thunderbrd
Jun 06, 2012, 11:08 PM
Is it possible to get the source codes on his dll changes?

Dancing Hoskuld
Jul 05, 2012, 05:58 PM
Just an update. I will now be including some AI nations diplomacy in this as suggested by Gregori here (http://caveman2cosmos.xoomsite.com/Ideatracker/view.php?id=5).

I have to activate the Ind. Peoples python for it to stat being playable. Events are be included.

Then onto barbarian diplomacy - most of the python is done I just need to link to the missions. Note to self - Must request some buttons.

T C
Jul 05, 2012, 06:00 PM
Very excited about this, can't wait to see it. :)

Dancing Hoskuld
Jul 05, 2012, 09:10 PM
I need mission buttons for:-
Assimilate Ind. peoples
Request Aid (Ind. peoples or Barbarians)
Spread State Religion (to barbarian city)
Speak with barbarian city leaders

Vokarya
Jul 05, 2012, 09:29 PM
Is the Python for this not quite finished yet? I got a few Python popups.

325312325313325314

They are all of these two types:

AttributeError: 'CyPlayer' object has no attribute 'getNativeOpinion"
AttributeError: 'int' object has no attribute 'ePlayer'


I don't think it's hurting anything, but it makes me wonder if something is not happening that is supposed to happen.

Dancing Hoskuld
Jul 05, 2012, 09:37 PM
Is the Python for this not quite finished yet? I got a few Python popups.

325312325313325314

They are all of these two types:

AttributeError: 'CyPlayer' object has no attribute 'getNativeOpinion"
AttributeError: 'int' object has no attribute 'ePlayer'


I don't think it's hurting anything, but it makes me wonder if something is not happening that is supposed to happen.

Noting should be happening at all yet! I am not getting those errors when I play but it is good to see them. Do you have the PythonErr.log that has them in. It will give me the python line numbers.

Vokarya
Jul 05, 2012, 09:44 PM
Noting should be happening at all yet! I am not getting those errors when I play but it is good to see them. Do you have the PythonErr.log that has them in. It will give me the python line numbers.

Here is my current log. I did not screenshot it, but I did also see a couple of messages in the Event Interface along the lines of "An indigenous tribe has given gold to the X Civilization!", so something is happening already.

I also noticed a third kind of error message: AttributeError: 'CyPlayer' object has no attribute 'CreateRandomCityBonus'. It's in the log as well.

Dancing Hoskuld
Jul 05, 2012, 09:52 PM
They indicate that I have missed something from the WLBO mod. Hopefully not something in its SDK which we don't have access to. At least it does give something I can work on on this stuff everywhere else with it I was hitting a wall.

Dancing Hoskuld
Jul 21, 2012, 03:11 AM
@AIAndy, the Indigenous Peoples thing is an improvement. Is there a GOMType of GOM_IMPROVEMENT? and am I on the right track with
<Action>
<MissionType>MISSION_DIPLOMAT_ASSIMULATE_IND_PEOPLE</MissionType>
<iCost>20</iCost>
<PlotCondition>
<Has>
<GOMType>GOM_IMPROVEMENT</GOMType>
<ID>IMPROVEMENT_INDIGENOUS_PEOPLE</ID>
</Has>
</PlotCondition>

AIAndy
Jul 21, 2012, 05:13 AM
@AIAndy, the Indigenous Peoples thing is an improvement. Is there a GOMType of GOM_IMPROVEMENT? and am I on the right track with
<Action>
<MissionType>MISSION_DIPLOMAT_ASSIMULATE_IND_PEOPLE</MissionType>
<iCost>20</iCost>
<PlotCondition>
<Has>
<GOMType>GOM_IMPROVEMENT</GOMType>
<ID>IMPROVEMENT_INDIGENOUS_PEOPLE</ID>
</Has>
</PlotCondition>

The PlotCondition is correct, but it needs to be on the outcome, not the action (I could add one to the action as well though).

Dancing Hoskuld
Jul 21, 2012, 05:26 AM
OK. The mission is the level that "I" would have put it at but the action would be better in this case to the outcomes since all outcomes will have the same condition in these cases. I am coming down with a head cold so I probably shouldn't be doing stuff anyway.

BTW the problem I reported elsewhere about saves not loading - looks like it is to do with the saving of data from Python. I must have misinterpreted something and broke the saves.

ls612
Jul 21, 2012, 05:39 AM
I hope that we can wait on the v25 freeze until this is in, but I'm on vacation atm, so I'm not going to push the issue too hard.

AIAndy
Jul 21, 2012, 05:55 AM
OK. The mission is the level that "I" would have put it at but the action would be better in this case to the outcomes since all outcomes will have the same condition in these cases. I am coming down with a head cold so I probably shouldn't be doing stuff anyway.
I am just copying the code over to the mission so you will be able to have a plot and unit condition on both levels.

BTW the problem I reported elsewhere about saves not loading - looks like it is to do with the saving of data from Python. I must have misinterpreted something and broke the saves.
What exactly caused that and can you fix it so the saves can be read again?

AIAndy
Jul 21, 2012, 06:24 AM
Eek, now that I look at the Python serialization I notice that we use two different APIs that attempt to change ScriptData. That probably causes some serious issues in the persistence of Python variables in general.
Something needs to change there as it is a real mess.

AIAndy
Jul 21, 2012, 06:56 AM
I am just copying the code over to the mission so you will be able to have a plot and unit condition on both levels.
PlotCondition and UnitCondition are available on outcome mission level.

Dancing Hoskuld
Jul 29, 2012, 11:51 PM
OK, I have everything except the final bit of Python written - the bit that saves stuff about player-Indigenous peoples attitudes. However the mission buttons aren't showing up?

I forgot to link the how to set up a branch to the modders documentation.:blush: @AIAndy would you please set one up and give me a link that explains how to use it. I can then put all the stuff in there and you can have a look and tell me what I have done wrong.

BTW @Hydro would it be possible to get three diplomacy buttons

- Assimilate Indigenous Peoples
- Praise Indigenous Peoples
- Speak to Barbarian Leaders

AIAndy
Jul 30, 2012, 12:48 AM
OK, I have everything except the final bit of Python written - the bit that saves stuff about player-Indigenous peoples attitudes. However the mission buttons aren't showing up?

I forgot to link the how to set up a branch to the modders documentation.:blush: @AIAndy would you please set one up and give me a link that explains how to use it. I can then put all the stuff in there and you can have a look and tell me what I have done wrong.

BTW @Hydro would it be possible to get three diplomacy buttons

- Assimilate Indigenous Peoples
- Praise Indigenous Peoples
- Speak to Barbarian Leaders
http://forums.civfanatics.com/showpost.php?p=11689034&postcount=3313

If the links there are not understandable I can also post a simple step by step guide.
Use Branch/tag in the TortoiseSVN context menu to create the branch (create it in the branches folder with a name of your choosing), then use Switch to change your local copy to that branch and now you can commit to that branch in the same way as you committed to the normal trunk.

Hydromancerx
Jul 30, 2012, 02:27 AM
BTW @Hydro would it be possible to get three diplomacy buttons

- Assimilate Indigenous Peoples
- Praise Indigenous Peoples
- Speak to Barbarian Leaders

Sure I will try to get some when I have some time.

Hydromancerx
Jul 30, 2012, 04:07 PM
BTW @Hydro would it be possible to get three diplomacy buttons

- Assimilate Indigenous Peoples
- Praise Indigenous Peoples
- Speak to Barbarian Leaders

Ok here are the 3 icon/buttons plus an extra. You see I found a cool graphic of the Olmec head which I use to be the symbol for Indigenous Cultures. Thus "Assimilate Indigenous Peoples" and "Praise Indigenous Peoples" use the same symbol with different tweaks. So I included a button with just the symbol in case it was needed in the future. "Speak to Barbarian Leaders" is a combo of the Barbarian flag inside a speech bubble. Enjoy! :goodjob:

Dancing Hoskuld
Jul 30, 2012, 05:35 PM
Thank you. I will need some more for AI nation diplomacy but not for quite awhile. I will also need some for "Faces of God" but I will be able to provide the art there.