Announcement

Collapse
No announcement yet.

[Mod] Abandon City (small mod)

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

  • [Mod] Abandon City (small mod)

    Jeg saw in some forum that the abandon city functionallity was missing. I also thought that this was missing.

    Looking further around in the forums and in the civ4 files, i realized how simple it is to change the game.

    The programmers who have writen the python code is furthermore obviosly tainted by Java.
    Java is a language which i've been teaching first year computer science students for 3 years, so this made the task of creating mods even more easy for me.

    In one hour i've incorporated and testet the interface change for my abandon button. I will continue with this small mod tomorrow after work.
    Attached Files

  • #2
    Awesome, I'm looking forward to this!

    Comment


    • #3
      yea! sign me up for this too.

      Comment


      • #4
        The interface is the hardest part.

        All you need to do now is hook the button up to the CyCity().kill() function and that's basically it.

        Comment


        • #5
          Unless you want abandoning a city take some time, in which case some more Python would have to be written. I think the coolest thing would be if all pop were converted to Emigrant units, who could join other cities, but only could travel for x turns withouth starving, depending on the ammount of food in the city when abandoning it. You should alsoe Have to have a military if you ant to pillage the tile of all the city improvments. (Maybe I should try to make my own abandon city mod (advanced ))
          Creator of the Civ3MultiTool

          Comment


          • #6
            You 'da man Thomas!

            I hope you'll include instructions so this mod can easily incorporate with other mods.

            Comment


            • #7
              Abandoning a city should take 1 or 2 turns per population point. It shouldn't be easy to abandon a huge city.

              The Gramphos idea of cranking out population who can join other cities is good as well. I don't think starvation should be an issue for them though.
              Formerly known as "CyberShy"
              Carpe Diem tamen Memento Mori

              Comment


              • #8
                How do i hook my button up to execute some code when it's clicked?

                I've looked through a lot of cy files, and its not described in http://civilization4.net/files/modding/PythonAPI/

                Thomas

                Comment


                • #9
                  Check Locutus' stickied post above titled 'Initial Python reference.' It talks about event handling. In this case maybe what you need to do is process an onMouseEvent or some such.

                  Comment


                  • #10
                    I've looked through that. And i've tried the onMouse event. It dos'nt seem to fire when i click the button. It fires when i click the terrain.

                    Comment


                    • #11
                      is it possible to change the raze status at all?

                      I mean, should it be that someone else razes a 20+ city with 5-7 wonders in just about 1 turn? unrealistic for me!

                      Is it possible to create a mod which makes it depending on the value of a city when it can be razed at the earliest? maybe between 2 and 6 turns?

                      Comment


                      • #12
                        yes.

                        But i need to make the connection between the button and the action i want to code.

                        Comment


                        • #13
                          I'm down to the same problem in my mod... I want to make either a button or a hyperlink type text which fires an event and executes some code... This should be trivial but I just can't figure out how to do it

                          Comment


                          • #14
                            And i've tried the onMouse event. It dos'nt seem to fire when i click the button. It fires when i click the terrain.
                            Hmm, well maybe try a kbd shortcut for now. I have onKbdEvent firing correctly when inside the city screen.

                            Comment


                            • #15
                              Originally posted by BaalRoGX
                              I mean, should it be that someone else razes a 20+ city with 5-7 wonders in just about 1 turn? unrealistic for me!
                              Given that a turn is typically at LEAST a year, razing a city in that time is fairly trivial.
                              --gev

                              Comment

                              Working...
                              X