Changing CS attitudes in current game

In City States.ltp, at the indicated lines

Code:
 76:	item["Selected"] = ({put_extra_here} and Players[g_PlopperSettings.Player]:GetPersonality() == (p-1))
117:	item["Selected"] = ({put_extra_here} and Players[g_PlopperSettings.Player]:GetMinorCivTrait() == (t-1))

Seems to Work. I've got two lines going:

Spoiler :
76:
item["Selected"] = ((g_PlopperSettings and g_PlopperSettings.Player and Players[g_PlopperSettings.Player]:IsAlive() and Players[g_PlopperSettings.Player]:IsMinorCiv() and Players[g_PlopperSettings.Player]:GetPersonality()) == (p-1))

117:
item["Selected"] = ((g_PlopperSettings and g_PlopperSettings.Player and Players[g_PlopperSettings.Player]:IsAlive() and Players[g_PlopperSettings.Player]:IsMinorCiv() and Players[g_PlopperSettings.Player]:GetMinorCivTrait()) == (t-1))


Once Again thanks for the help!

\Skodkim
 
And now you've got that working, it wouldn't be too much effort to add other controls, for example, to change the active players current friendship value with the selected CS (for a hint take a look at the ActivePlayer pane and how the current gold amount gets changed)
 
Yeah, those are usually pretty easy to Work with (have done it before).

Problem is I dont know the command to set influence. Tried searching the web with no luck. took I wil guess and searched through Civ files for SetInfluence but no luck either.

I don't suppose you know this ;)

\Skodkim
 
Code:
Players[iMinor]:GetMinorCivFriendshipWithMajor(iMajor)
Players[iMinor]:ChangeMinorCivFriendshipWithMajor(iMajor, iChange)

so you can do set as
Code:
Players[iMinor]:ChangeMinorCivFriendshipWithMajor(iMajor, iFriendship - Players[iMinor]:GetMinorCivFriendshipWithMajor(iMajor))
 
Maybe I'm not using it right but I get a runtime error with the following two functions:

Get:
function()
return Players[iMinor]:GetMinorCivFriendshipWithMajor(iMajor);
end

Set:
function(value)
Players[iMinor]:ChangeMinorCivFriendshipWithMajor(iMajor, iFriendship - Players[iMinor]:GetMinorCivFriendshipWithMajor(iMajor));
end

\Skodkim
 
You'll need to set iMajor, iMinor and iFriendship to appropriate values - those are just "placeholders"

If you want to alter the active player, iMajor will be Game.GetActivePlayer()
For the minor selected in your panel, iMinor will be g_PlopperSettings.Player
And iFriendship is the parameter in the Set function, so function(iFriendship)
 
Sorry, I just don't get it. Have been trying to code the easiest part of it: just making it possible to edit the human players influence with a CS and that's even out of my reach. I don't think I'll be possible to do it, let alone do what I wanted to do if I was to continue: Make it possible to edit all players influence with all city states.

I'm just going to leave it here. You've been a great help and I achrived more than I came for :)

\Skodkim
 
Back
Top Bottom