Announcement

Collapse
No announcement yet.

[Mod] Auto Missionaries

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

  • #16
    Originally posted by Seranthor
    about what happens to the missionary if there are no more cities.....

    I had no open border treaties with anyone, and all my cities had that particular religion and it appeared to me that the missionary just went on auto pilot running amok in neutral lands (bouncing, if you will, off the boundaries of any other civilizations).
    Check back on him in 40 years, maybe he'll have decided to enter somebody's land as he was originally ordered.
    If I'd known then what I know now, I'd never have done all the stuff that led me to what I know now...

    Former member, MOO3 Road Kill...er, Crew

    Comment


    • #17
      Originally posted by Seranthor
      about what happens to the missionary if there are no more cities.....

      I had no open border treaties with anyone, and all my cities had that particular religion and it appeared to me that the missionary just went on auto pilot running amok in neutral lands (bouncing, if you will, off the boundaries of any other civilizations).
      Hah, that sounds pretty funny

      Would it be too much trouble to ask if you would upload that save game or maybe e-mail it to me so i can see what he's trying to do and fix it?

      PM me for e-mail address if you prefer that way

      Thanks!

      Comment


      • #18
        I get a error when python is initiating. And in the logs it says that it failed to load the module AutoMissionary.

        Both files (eventmanager and AutoMissionary) are in the same folder (My Documents\My Games\Sid Meier's Civilization 4\CustomAssets\python).

        Anyone have any ideas what is wrong.

        Comment


        • #19
          Originally posted by MW2
          I get a error when python is initiating. And in the logs it says that it failed to load the module AutoMissionary.

          Both files (eventmanager and AutoMissionary) are in the same folder (My Documents\My Games\Sid Meier's Civilization 4\CustomAssets\python).

          Anyone have any ideas what is wrong.
          This is the PythonErr log you are referring to right? Does it mention anything specific ?

          Comment


          • #20
            Its the PythonDbg.log and the lines related to the failed import are:

            load_module CvAdvisorUtils

            load_module AutoMissionary

            AutoMissionary

            import failed

            load_module CvAppInterface

            The Python error log is:

            Traceback (most recent call last):
            File "", line 1, in ?
            File "", line 52, in load_module
            File "CvEventInterface", line 13, in ?
            File "", line 52, in load_module
            File "CvEventManager", line 26, in ?
            ImportError
            :
            No module named AutoMissionary

            ERR: Call function onEvent failed. Can't find module CvEventInterface
            ERR: Call function onEvent failed. Can't find module CvEventInterface
            ERR: Call function onEvent failed. Can't find module CvEventInterface



            IT seems that this is a python error, rather than anything related to your code as I've copied and pasted your class straight into eventmanager and it works fine then.

            After testing that, I created a new module myself and tried importing it and I get the same error. So it seems for some reason my game can't import new modules which weren't originally part of the game. Which doesn't make much sense.

            Comment


            • #21
              yeah you're right, it looks like it's not letting you import from any new files!

              I wonder why it does that to you and not alot of other people...

              Comment


              • #22
                It works for me. Loaded fine after I put it in the right folder per your instructions. However, right now I'm looking at a missionary who is sitting two plots from a city of mine without the target religion and he isn't choosing to go there. The log doesn't list my city in the list of distances it prints. Instead it is getting stuck because I currently don't have open borders with anyone else and he can't go anywhere. So he picks a place, wastes the turn and then is available again next turn. Let me know if you want to look at the save game or anything.

                Comment


                • #23
                  Originally posted by abman
                  It works for me. Loaded fine after I put it in the right folder per your instructions. However, right now I'm looking at a missionary who is sitting two plots from a city of mine without the target religion and he isn't choosing to go there. The log doesn't list my city in the list of distances it prints. Instead it is getting stuck because I currently don't have open borders with anyone else and he can't go anywhere. So he picks a place, wastes the turn and then is available again next turn. Let me know if you want to look at the save game or anything.

                  I sent you a PM- I'm hoping you could send me the savegame so I can look into what's going on and try to fix it.

                  Thanks for your help!

                  Comment


                  • #24
                    OK I finally had some time tonight to look into the issues people have reported so far.

                    I have fixed some bugs in my code and am releasing a new beta version of this mod.

                    What was wrong?

                    For anyone interested (or skip to bottom if you dont care how it works), couple of things....

                    one, I used a wrong function for testing to see if the player can see a foreign city. I used isVisible which I now think tests if you have LOS of that city (like when it has your state religion so you can sorta spy on them). What I really wanted was the isRevealed function.

                    also related to that function, I was using player.getTeam() as who to test has visibilty on the city not realizing I used the same variable name for the players I iterated through and the active player- so basically I was just testing if the players had visibility to their own cities! So now I'm keeping a separate var for your teamtype to test on all the cities.

                    second, the ID's I was using to key my missionaries and make sure they went to unique cities was not correct. I used getID() from the City object thinking it would be unique to the game but its only unqiue to the player! In fact it's like an index so there will be lots of duplicates! Instead I'm now using a concatenation of the city's x, y coords which will definitely be unique (can't have two cities on the same plot!)

                    oh and I almost forgot- if you click 'a' on a missionary now and there are either no more cities left to convert or he cannot reach them, you will hear the civ error sound effect.



                    So, if you have some time please check out the new version and see if you can find any other problems with it.

                    Thanks again for all your help!


                    and one little side note: since I changed what IDs the missionaries would use any save game that had a missionary registered under the previous version of this mod might run into a conflict...

                    (edit: link to file moved to original post)
                    Last edited by TheDarkside; November 17, 2005, 10:21.

                    Comment


                    • #25
                      Thanks! Working much better now. Queuing up to go prostheletize the New World right now. The only issue I've had with the new build is that the missionaries will target cities in civilizations with theocracy and a different state religion. This means the missionary will go there and then not be able to do anything once he arrives because he can't spread a nonstate religion. This could be a problem if you have one city in such a situation between your missionaries and an open civilization. They'll never queue the open one while the theocracy civ is closer. Maybe you can add a check after it selects the closest city to see if that has theocracy + a different state religion, and to pick the next city on the list if that is the case.

                      Comment


                      • #26
                        Originally posted by abman
                        Thanks! Working much better now. Queuing up to go prostheletize the New World right now. The only issue I've had with the new build is that the missionaries will target cities in civilizations with theocracy and a different state religion. This means the missionary will go there and then not be able to do anything once he arrives because he can't spread a nonstate religion. This could be a problem if you have one city in such a situation between your missionaries and an open civilization. They'll never queue the open one while the theocracy civ is closer. Maybe you can add a check after it selects the closest city to see if that has theocracy + a different state religion, and to pick the next city on the list if that is the case.
                        Ah! something I totally overlooked!

                        good catch!

                        Comment


                        • #27
                          Please read the rules for posting files. You should link to your latest download from the first post.
                          Creator of the Civ3MultiTool

                          Comment


                          • #28
                            Originally posted by Gramphos
                            Please read the rules for posting files. You should link to your latest download from the first post.
                            I wanted to but once you remove a file it looks like you cannot attach files anymore (everytime I click Edit on the OP I see no attach file option )

                            edit: ok I added a link to a file I uploaded through Apolyton's directory area but it's not as nice as having an attached file
                            Last edited by TheDarkside; November 17, 2005, 10:20.

                            Comment

                            Working...
                            X