[Mod Development] Diplomacy Insults

Do you want to tell the King where to put his ring?

  • Yes, I would love to.

    Votes: 15 93.8%
  • Nay, not for me. Long live the King!

    Votes: 1 6.3%

  • Total voters
    16
Back from hols. That is pretty sweet :) Cant wait for the new ver. New mod sounds interesting too!

This change is already in my recent release of Privateers, Pirates, and Buccaneers. Do you have your own custom Mod you play? If so I could show you had to add this change?
 
Any idea if that live map is poss at all Kailric


Anything is possible :) But I am a novice so I may not can figure out somethings. So you want a diplomacy contract option that allows you to what .. see each others units and the inside of cities but your are not allies?

Do ya'll play Vanilla or do you use a mod when you play?
 
Yeah pretty much bang on there.

I play AOD 2 v1.11

I'll check into it sometime tonight and tomorrow and see what I can do. Do you know how to merge mods? I can just post the SDK changes and stuff and you can merge them with AOD?
 
Had a gander through a fair few xml files and a scan through some of the DLL files, but couldnt find where Permanent Alliance was defined and where/how it was structured. Im hoping its structured in such a way that it stacks the attributes that are enabled whilst in permanent alliance. If so it means that it could be possible to just add in the extra options by breaking down the permanent alliance.
 
Had a gander through a fair few xml files and a scan through some of the DLL files, but couldnt find where Permanent Alliance was defined and where/how it was structured. Im hoping its structured in such a way that it stacks the attributes that are enabled whilst in permanent alliance. If so it means that it could be possible to just add in the extra options by breaking down the permanent alliance.

I haven't played any multiplayer and I am not sure if the AI asks to do Pernament Alliances but I couldn't figure out much either. I know if you are both on the same team you can see each others plots. So I am assuming makeing a Pernament Alliance puts you on the same team.

Anyway, I wrote the below code that will make it so that all Human players see each other's units, or see what they see. It worked for me with the AI units, so it should work with Humans by setting the "isHuman()" tag. If you know how to edit and build the SDK then just add add this code to the CvPlot.cpp file.


Code:
void CvPlot::changeAdjacentSight(TeamTypes eTeam, int iRange, bool bIncrement, CvUnit* pUnit)
{
	if(pUnit != NULL)
	{
		if(!pUnit->isOnMap())
		{
			return;
		}
	}
//tk
if (pUnit != NULL)
    {
        if (pUnit->isHuman())
        {
            for (int iI = 0; iI < MAX_PLAYERS; iI++)
            {
                if (((PlayerTypes)iI) != pUnit->getOwner())
                {
                
                    if (GET_PLAYER((PlayerTypes)iI).isAlive())
                    {
                        if (GET_PLAYER((PlayerTypes)iI).isHuman())
                        {
                            pUnit->plot()->changeAdjacentSight(GET_PLAYER((PlayerTypes)iI).getTeam(),  iRange, bIncrement, NULL);
                        }
                    }
                }
            }
        }
    }
    //tkend
 
On occasion the AI ask to permy it up.

Sadly my knowledge of all things code is very limited. I can read it but when it comes down to writing my own stuff and compiling, i havent done it.

How easy would this be to add to a current mod?
 
On occasion the AI ask to permy it up.

Sadly my knowledge of all things code is very limited. I can read it but when it comes down to writing my own stuff and compiling, i havent done it.

How easy would this be to add to a current mod?

Really easy if you can build DLLs. Just pop that code in the right file, build the DLL, pop that in your mod and there you go.
 
Im downloading visual studio as we speak but its taking a fair while to do so. Im assuming it cant be as easy as just altering it via notepad and then testing it?
 
Im downloading visual studio as we speak but its taking a fair while to do so. Im assuming it cant be as easy as just altering it via notepad and then testing it?

I use codeblocks. You need a way to build the DLL and notepad can't do that. You can edit in notepad though, but I use the free codeblocks. There is an excellent tutorial here for Codeblocks here:


http://forums.civfanatics.com/showthread.php?t=166933
Its for Civilization but works just the same.

Edit: if you can't figure it out I can prolly do it for you when I get the chance. You will need to put the AODII source code in the SDK then edit the file, then build the DLL.
 
Top Bottom