Announcement

Collapse
No announcement yet.

AI & Diplomacy stuff...

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #31
    Nordicus & Wes,

    The Peace Treaty is not a Peace(stop a war) Treaty, it is a Peace(like Alliance) Treaty. It is just like a No Trespassing Agreement, it lasts x number of rounds and then automatically expires. I have got a lot more offers for a Peace Treaty from neutral to likeing civs. One Civ, the worst one, automatically wants to renew the Treaty with me when it expires. This is what is happening to Wes. As you get more powerful, the offers decrease considerably. Personally I like this although I am not sure the Peace Treaty actually has any kind of benefit. If the length of the Treaty could be increased that would be good.

    The terrain improvements vary quite a bit but in general the other Civs seem to build one farm and then go on to road building. Once they get a fair amount of roads, they will pick back up on the farming as long as they have a grassland to farm. The AI doesn't seem to like to improve any other terrain type except water. I think this is a drawback for the AI in the later parts of the game.

    The tech trading is considerably better than it was. Again with neutral to likeable Civs. As the turns increase, the tech trading decreases considerably with warlike Civs.

    I am just starting to really evaluate the No Trespassing issues in my game. It is better but I haven't thrown everything at it yet to see what happens. Can't wait for that. Let's see how mad they will get. More importantly is what the other Civs reactions will be to my Civ and to the other Civ.

    I'll keep you posted as I find out more.
    Later,
    Don
    Don,
    CtPMaps (Hosted by Apolyton)

    Comment


    • #32
      Hi all, just thought I'd give an idea that happened to pop up while I was playing CTP today..

      Is there anyway for the Ai to tell you why they are attacking your civ in the first place? Example I slaved a few people of one guy and then the next turn he attacks me...if I go to the diplomatic screen maybe he should say something like "Your violent slaving makes me angry GRRRRRRR...."

      Well, just an idea....
      Monkey I am proud to be!
      Trim the sails and roam the sea!
      Trim the sails and roam the sea!
      ...Stefu

      Comment


      • #33
        Hey Nordicus,

        Check your email before you spend much more time testing/altering the files.

        Don
        Don,
        CtPMaps (Hosted by Apolyton)

        Comment


        • #34
          Hi, Monkey...

          No, that's a really good idea. I wanted generally more specific answers, like you're saying about the reason for the attack and the slaving. In my case, it was grovelling--if I was bootin the ***t outta an AI civ, I want the guy to beg me to stop, depending on what personality type he is (Cleric, SciMany, whatever). I mean, who knows, I just might. That seems a helluva lot more realistic then him calling me names and such when he's down to his last two cities.

          Unfortunately, I've only been able so far to change the mundane phrases it says and expand its vocabulary (as well as tone it down a bit). As for specific answers, it looks like that code will have to be added. All it has right now (if you peek in your dip_str and info_str files in the english/gamedata folder) are groups of phrases and adjectives the AI juggles randomly per meeting. But in the next version I'll definitely see about making it less random and adding "reasons" for what it does. But I'll make a note of that one.

          What's strange is that the diplomacy is more, or seems more, complex than Civ2 (I'm only going by what I know of it as in Playstation) was, there's just not enough in the string files; meaning that there isn't nearly enough dialogue and diplomacy options (buttons on the screen to press) to bring it all out. It's as if they did the AI stuff, in the aidata folder, first, then the string files in the english/gamedata folder last. There's dozens of reasons why (exactly why), maybe a few hundred why, the AI civ would attack you, depending on which of the 7 (including Barbarian) AI personality types he is, but only a few random quotes he can say. (Take a peek in the default/aidata folder and snoop around, or count how many (fli) files there are...compared to a meager one (dip_str) for the actual dialogue ) It's kinda sad.
          But I've been thinking of doing a second file with more specific dialogue in it...but I'll likely start a new thread about it.

          Anyway, thanks for the suggestion: very good point. And I'm on that once these current tests are done.

          Later.

          N.
          Existence is Futile.

          Comment


          • #35
            Don:

            I have 8 files done that will lengthen the time inbetween the AI asking for anything. Each AIP(ersonaltiy) type has a different number it follows for offering *whatever.*
            The number represents how many turns that go by before it will ask again. I made this number higher for all types, some more than others. But this should normalize the frequency of the AI offering Peace Treaty (about which, BTW, you were right).
            I can't recall who...wait, found it. (I was talking to Atahualpa.) I'll quote it:

            Yeah, I know. I personally like how in Civ2 you could make (and so could the AI) an offer of Peace Treaty (NOT a Cease Fire, even though in CTP they're basically identical) to another civ, yunno? Like when you first meet them, are not at war, and wish to have a 'something' stating that you'd like to maintain peace with them. Hopefully, with the changes I made, the AI will offer more like these and accept them too (depending on if you're peaceful or warlike). I've tried to change the name of "Cease Fire" anywhere I see it to "Peace Treaty," also, since you can't have a Cease Fire if you're not firing anything to begin with! But it is silly, the AI being so picky, esp. if it's losing--I tried to make the AI be more willing to accept a Peace Treaty, as well as offer one, when it's getting beaten. It's what a sane human player would do, so why not the AI?
            So, so far so good. The AI is doing it now, but maybe too often.


            As for WAIS (the Wandering AI Syndrome) : I have changed a few things in these two aidata files:
            diplomacy_begin
            diplmacy_pre_incoming

            But I'm going to go back in to see what else may be done, and I'll check the other files.
            So, I'm sending you and Wes these eight:

            personalitySlaver
            personalityCleric
            personalitySciFew
            personalitySciMany
            personalityWarFew
            personalityWarMany
            personality (and)
            personalityDefault

            I left the Barbarians only. (For now: there's a few things I'd to change about them too.)

            Anyway, off to fix that WAIS.
            Later.
            Existence is Futile.

            Comment


            • #36
              Nordicus,

              I can't wait to get the new files. Are you sending something that says what you have changed. It doesn't have to be official like you would send when the mod is ready for distribution. Just a few lines if that is possible. This makes it easier to debug if a problem arises. BTW, thanks for the above info. I did not know the treaty lengths were in those files.

              Have you run across anything in your file manipulation that would trigger a message when you are at war? On 2 occasions, while heavily fighting a Civ, I had icons pop up and tell me I was no longer at war with 2 other Civs. Well thats great but I didn't know I was at war with them. Last I knew we were on a peaceful basis and they liked me. I never attacked either of them and they never attacked me. Of course, I have been doing a lot of bad things to the other Civs while testing this diplomacy stuff.

              Don


              Don,
              CtPMaps (Hosted by Apolyton)

              Comment


              • #37
                Don:

                Heh...heh...I just tried sending the new files to someone wanting copies, but my server's all mangled and full of wonkiness.
                So, I think I attacked Harlan's server prematurely; it might be mine with the bug up its butt.

                Anyway, I'm using IE 5 tonight (funny, cuz I was just singing the praises of Netscape to someone earlier...and it (IE) seems to be working beautifully...is that irony?).

                So, I have files and will try again in a bit to get them to you guys.
                The 8 personality_*whatever* fli files have no read me yet (but all the changes are in there, marked, right after CD's or whoever's outcommented notes...yeah, I'm getting better: this way I don't have spend a whole evening looking back and forth like watching a tennis game between the changed and unchanged files, trying to look line by line for what the ***k it did worng!!!)--Wes will no doubt call this "Nordicus Rule #2"--

                Have you run across anything in your file manipulation that would trigger a message when you are at war? On 2 occasions, while heavily fighting a Civ, I had icons pop up and tell me I was no longer at war with 2 other Civs. Well thats great but I didn't know I was at war with them. Last I knew we were on a peaceful basis and they liked me. I never attacked either of them and they never attacked me. Of course, I have been doing a lot of bad things to the other Civs while testing this diplomacy stuff.

                Well, we've been a bad boy, haven't we? No, this is good, cuz I wanted to see how they reacted to the human player being a warlike ***hole (no offense--I'm the same way). How many have formed alliances against you?
                Doesn't sound familiar. If only there's a way to have a message Declaring War from the AI and an option to do so for the human player. It sure seems like they justed declared war on you, but that can't be. Maybe you so involved in your AI civ butt-kicking that you merely forgot with whom you were at war? Ya think?
                If not, keep up to date on that--if you're sure about it, then I'll get into that.

                It sounds............I'm just looking at the info_str file now...I haven't looked further, but this would of course contain those messages. Hmmm...I'll take a look at this.

                Later.

                [This message has been edited by Nordicus (edited November 02, 1999).]
                Existence is Futile.

                Comment


                • #38
                  Hi Guys,

                  I have been following the thread here and it seems to me that using slic it may be possible to add opptions to the Diplomacy Screen. That may also be what is required to make all those out-commented Activision things work in the different Diplomacy files. Maybe what is lacking is a button or whatever that can be used to use those different options when activated. Just a thought.

                  Timothy Pintello

                  P.S. Nordicus and Wes, I hope to be able to do some testing on those files ya'll sent me tonight.

                  Comment


                  • #39
                    Pintello & Guys,

                    I thought about this last night after I posted my last message. From what I know, only SLIC will do what I mentioned. It could also do a few other useful things I thought about, especially if some code was 'borrowed' from PowerSLIC. It kind of irked me because 2 turns ago I had an Alliance with one Civ and a big ol happy face with the other. (It must of been those late-night secret negotiations between all the other Civs. )

                    Any way, back to the point. While I want to see this, I hesitate for a couple of reasons. 1) I don't know SLIC. 2) SLIC will make it very hard to incorporate the Mod into CTP. If I understand this right, the new file would have to be merged with an old one, instead of just overwriting the old one.

                    Just thinking out loud but if anybody knows anything about this I would appreciate the input.

                    Don
                    Don,
                    CtPMaps (Hosted by Apolyton)

                    Comment


                    • #40
                      Don, Timothy, guys...

                      Yeah, I emailed you roughly about this. I know Slic a little, but like I said, not enough for something like that. If it's in the file, I use logical deduction to figure out how to create a block of code, I don't have extensive knowledge of the language itself. But if know the basics, I can usually bumble along through it and get it to work.
                      But I'm off right now to do more snooping.

                      Later.

                      ------------------
                      "There can be no maximum of creation without a concomitant maximum of destruction, no supreme good without supreme evil"--Heller, paraphrasing Nietzsche.

                      "Stimpy...YOU...EEEEDDDDDEEEEEIIIOOTTT!!!"--Ren.

                      "Ich Wollen Antreffen Das Heilmittel!!!"

                      "I SHALL FIND THE CURE!!!"--Nordicus, about WAIS (Wandering AI Syndrome).

                      "Like Wes said...."

                      Existence is Futile.

                      Comment


                      • #41
                        Wes, guys...

                        Wes, I've been going through some files. I found this--have you seen this? It's in set_inst_priority:

                        if (a1to5_num_cities) //added by TLL 13/6/99
                        {
                        zero_roads
                        } else {
                        no_roads
                        }
                        I thought it was interesting and it relates to the AI building roads. Thought you might be interested as well.

                        Also, I've cleaned up the dip_str some more.

                        And finally, I found this:


                        inputs


                        Now the TRI statements here are problematical because few_incursions, many_incursions and no_incursions are also duplicated in the diplomacy files. Since these are calls from two separate functions, it may be that true returns here may have totally screwed with diplomacy at the other end.

                        Since it doesn't seem like total_military_incursions is used anywhere I'd recommend removing the tri statements here or at least renaming them, in order to avoid conflict with diplomacy. I wonder if there is a possibility that this might be screwing up the diplomacy AI? For all my cursory looks at diplomacy AI, it seems that it is a model of some complexity. In practice though, it falls short. Whether its because the model didn't go far enough or because of conflicting functions will have to bear investigation. Anyway, that will come later, after I look at the diplomacy files.
                        These are some of CD's notes. In the file inputs, I found

                        input total_military_incursions
                        //removed TLL 13/6/99 - to avoid conflict with similarly named strings in diplomacy AI
                        It is absolutely amazing how much code is just sitting in this game, not being used for anything. It's just there. I was fascinated.

                        Anyway, I agree with that, but I'd just like to know exactly what was taken out, since there's a few mentions of incursions (i.e. trespassing).
                        This is from diplomacy_pre_incoming (regarding your trespassing on the AI)

                        input military_incursions
                        left no_incursions(military_incursions, 0, 0.2)
                        tri few_incursions(military_incursions, 2, 1.8)
                        right many_incursions(military_incursions, 3, 1)
                        Here's one in dip_pre_outgoing (for trespassing on the AI)
                        input military_incursions
                        left no_incursions(military_incursions, 0, 0.2)
                        tri few_incursions(military_incursions, 2.0, 1.8)
                        right many_incursions(military_incursions, 3, 1)
                        And this is from diplomacy_begin (AI trespassing on your civ)

                        /////////////////////////////////////////////////////////////////////
                        ////////// HOW MANY SOLDIER DO I HAVE IN FOREIGN LAND? /////////////
                        /////////////////////////////////////////////////////////////////////

                        input my_military_incursions
                        left no_my_incurions(my_military_incursions, 0, 0.5)
                        tri some_my_incurions(my_military_incursions, 2, 1)
                        right many_my_incurions(my_military_incursions, 4, 2)
                        I've adjusted these already, but here is a copy of what CD took out, from a back-up of raw CTP inputs:

                        input total_military_incursions
                        tri no_incursions(total_military_incursions, 0.0, 0.1)
                        tri one_incursion(total_military_incursions, 1.0, 0.1)
                        tri few_incursions(total_military_incursions, 3.0, 1.9)
                        right many_incursions(total_military_incursions, 6.0, 1.0)
                        What the heck am I getting at? I have no idea. I think CD probably did the right thing, considering all the warnings about duplicate code, but something doesn't add up here.
                        There are only inputs for "my" military incursions (the AI's trespassing). There's blocks of code concerning if you trespass on the AI, but nothing about the AI trespassing--at least, I have not seen it or found it.
                        If I knew the 'magic word' (I dunno, "retreat" or something) that would prevent the AI from being such a pain in the ass, I'm sure I could rig up something using many_my_incursions. I dunno.
                        I'm going to dig for something that makes the AI withdraw when you ask, maybe something can be included that will make it automatically withdraw under certain conditions. So you don't even have to ask them to bugger off.
                        O that would be nice--but only in certain circumstances.
                        Any ideas from you guys?

                        Later.

                        ------------------
                        "There can be no maximum of creation without a concomitant maximum of destruction, no supreme good without supreme evil"--Heller, paraphrasing Nietzsche.

                        "Stimpy...YOU...EEEEDDDDDEEEEEIIIOOTTT!!!"--Ren.

                        "Ich Wollen Antreffen Das Heilmittel!!!"

                        "I SHALL FIND THE CURE!!!"--Nordicus, about WAIS (Wandering AI Syndrome).

                        "Like Wes said...."


                        [This message has been edited by Nordicus (edited November 02, 1999).]
                        Existence is Futile.

                        Comment


                        • #42
                          This type of stuff is what I mean when I say this game was rushed out unfinished. There are blocks of stuff in the script.slc and some of the strings about all kinds of diplomacy options that weren't implemented. And this is why I'll be pissed if they want us to pay $25 for an expansion disk that simply puts in these options that should have been there in the first place.

                          OK, enough ranting. The problem, it seems to me, is that the AI thinks nothing of breaking its no trespassing agreements. If you could find something referring to that, that might be the key. Keep digging.

                          Comment


                          • #43
                            Wes:

                            Hey, easy, relax
                            No, all that up there is being used; but the unused stuff I saw would fill a couple threads, though, that's for sure. And we don't need to pay that: smart guys like us? We'll figure it out

                            Yes. You are right. The AI does not give a furry pile of......if it trespasses or not.
                            These:
                            input my_military_incursions
                            left no_my_incurions(my_military_incursions, 0, 0.5)
                            tri some_my_incurions(my_military_incursions, 2, 1)
                            right many_my_incurions(my_military_incursions, 4, 2)


                            define whether or not the AI is trespassing and how much.

                            These
                            i_will_leave_his_lands
                            yes_i_will_leave_his_lands

                            are the magic words. The bottom one is used when the AI agrees to remove its unit(s) from your territory. Such as in:

                            if( yes_i_will_leave_his_lands
                            and (yes_cease_fire or yes_alliance))
                            {
                            best_reason_to_accept
                            }
                            Now the only problem now is (a) how do I word it, (b) where do I put it, and (c) how do I define several of them to make it realistic?
                            I have some ideas about the first two. But I'm not sure how to have it so only regular, non-special units are pulled back. Of course I'd also have to define the situations in which the AI would automatically do this. There will be many situations when it's gonna do it. But I can make it stop during alliances--if it is not at war with anyone.

                            All that I can work out, I think, but I can't locate any code regarding "special" units.

                            Well, I'll keep looking.

                            O I feel a vaccine is near!

                            Later.

                            N.


                            ------------------
                            "There can be no maximum of creation without a concomitant maximum of destruction, no supreme good without supreme evil"--Heller, paraphrasing Nietzsche.

                            "Stimpy...YOU...EEEEDDDDDEEEEEIIIOOTTT!!!"--Ren.

                            "Ich Wollen Antreffen Das Heilmittel!!!"

                            "I SHALL FIND THE CURE!!!"--Nordicus, about WAIS (Wandering AI Syndrome).

                            "Like Wes said...."

                            Existence is Futile.

                            Comment


                            • #44
                              Nordicus: Glad you are making progress! I think that you have hit upon the same problem as I found when modifying the diplomacy - there isn't really a way of translating diplomatic sentiments into real-worl actions.

                              If you want to stop the AI trespassing, then I believe that the only way to do it would be to load the pull units into citiies aip, which would prevent the ai exploring. Or you could create an aip which demands ~ 3 units/city, and reduce the harassment priority. But none of these measures would prevent the AI from tresspasing on one person specifically. Also there is no way of referencing a specific civ in the flis, except in the various diplomacy ones where there is an 'understanding' that they apply to each civ in each turn.

                              So unfortunately I believe that, barring ugly hacks like the above, the AI will continue to have to be booted out each turn

                              BUT - just thought this second - maybe you could do it in SLIC? Yeah, I know that's the 'universal solvent', but think. When the AI breaks a no-tresspassing agreement, a box drops in to tell you. Can slic make a diplomatic demand for you? If so, it could demand that they withdraw a troop automatically, without informing you. If they refuse, they certainly have broken the agreement.

                              Maybe this is just a half-witted idea, and it's still an ugly hack, but it might just work (queue B-movie theme tune )
                              [This message has been edited by Simpson (edited November 03, 1999).]

                              Comment


                              • #45
                                Hi Nordicus,

                                I don't think you will have a problem with unconventional troops. Yesterday when I was testing your files I was able to land a Diplomat on the soil of an AI I had a no trespassing treaty with and establishing an embassy with out breaking the treaty. However, when I tried to take a boat into waters belonging to one of the same AI's cities I got the usual "Sir are you sure you want to break the no trespassing treaty" message.

                                Timothy Pintello

                                Comment

                                Working...
                                X