Announcement

Collapse
No announcement yet.

Barbarians become civilized?

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

  • Barbarians become civilized?

    I thought of a weird idea a couple of days ago. What if barbarians, once they achieve a certain point in their "evolution" become full fledged ai-civilizations? Not sure if this is a good idea. I tried coding it and I almost have it working. Basically when barbarians have 2 or more cities, they have a chance of becoming a new random nation. The way i accomplished barbarians having cities is to set the "BarbarianLeader" flag for settlers, and also I added a 10 percent chance of a barbarian leader (a settler or diplomat, in my ruleset) appearing whenever a horde of barbarians is unleashed from a hut.

    I'd like to know if anyone thinks 1) I'm crazy or 2) thinks this is a good idea.

    Later.

    Moses

  • #2
    It is an ok idea. But you don't have to make the barbarians create settlers, they can just conqour their cities (Which is also more realistic).
    http://www.hardware-wiki.com - A wiki about computers, with focus on Linux support.

    Comment


    • #3
      quote:

      Originally posted by moseslei on 05-08-2000 09:21 PM
      I thought of a weird idea a couple of days ago. What if barbarians, once they achieve a certain point in their "evolution" become full fledged ai-civilizations? Not sure if this is a good idea.


      This was discussed on the freeciv-dev list, but I can't find a link to the actual messages. (check http://arch.freeciv.org ) The barbarians do conquer cities and use them to produce more units but they cannot research technologies.
      [This message has been edited by paulz (edited May 09, 2000).]
      --
      Paul Zastoupil

      Comment


      • #4
        Sounds like a good idea, although I do agree with Thue that barbarian settlers are unnecesary.

        Also, if barbarians would form a random nation, it should not be possible if no civs have been eliminated. If you are playing with the highest possible number of civs allowed by the server, a conflict would be created when the barbarians are "promoted", and the server might crash.

        But this should be rather easily fixable. Just add a ristrictor that tells the server that when # of civs still alive = the max civ count set in the server options, the barbarians can't get their promotion, even if the other prequisites are met. As soon as one civ is eliminated, they can be replaced by the barbarians, if they still have what it takes at that point.

        Comment


        • #5
          The server hopefully allready checks if there is room for another nation when one is created. This already happens fairly often when a players capital is captured and the empire is in civil war.
          http://www.hardware-wiki.com - A wiki about computers, with focus on Linux support.

          Comment


          • #6
            You're right. Forgot about that...

            Comment


            • #7
              Anyone willing to try my patch? It's from 1.10.0 (not CVS, too unstable for me...)

              ftp://ftp.freeciv.org/freeciv/incoming/barbcivil.diff

              I found that it works fine without the barbarians having settlers, also. (How stupid was I to think that it wouldn't.) Running it with the default ruleset is fine, although to test it I like to put barbarians on 4 "raging hordes" :-)

              If anyone tries it please tell me what you think.

              Moses

              Comment


              • #8
                I didn't actually compile or test the code, but looking at it here are some things that should be corrected:
                  [*]The barbarian players are not garantied to have the last player numbers. You should iterate through all the players to find them[*]In addition to checking if there is a nation (danish, dutch, ect) available (you do this), you need to check if creating the player would raise the number of nonbarbarian players above MAX_NUM_PLAYERS. Remember that MAX_NUM_PLAYERS only count non-barbarian players. (just run through the players and count them)[*]I would create a capital for them, done by inserting a palace in one of their cities.[*]You should make a new event for barbarians becoming civilized. And I don't think you should tell the players where the event takes place. (ie give 0,0 coordinats I think it is)[*]You shouldn't give a new barbarian nation a predefined number of techs. This will almost certainly lead to unfair situations early or late in the game.[/list=a]
                http://www.hardware-wiki.com - A wiki about computers, with focus on Linux support.

                Comment


                • #9
                  Ad 4) In addition to creating the palace ( "pcity->improvements[B_PALACE]=1;") I think you need to set "pplayer->capital=1;" (this decides if the next city the player builds should be the capital. One means it shall not). Anyway, it can't hurt to be safe.

                  Ad 5) Maybe find the average number of techs of the other players and then give the new player up to that number
                  http://www.hardware-wiki.com - A wiki about computers, with focus on Linux support.

                  Comment


                  • #10
                    paulz is right, it should be sent to freeciv-dev@freeciv.org . Be sure to subsrcibe at http://www.freeciv.org/mailinglists.html , or at least include a note with the mail that the other people on the mailing list should CC you.

                    Just a few more point about your patch:
                    6) You should run through the players cities and send them send_city_info(0, pcity), and the units too send_unit_info(0, punit), to make sure they are updated in the client.
                    7) You should read the http://www.freeciv.org/contribute.html page about how freeciv developers prefer their patches. (just diff -ur untouched__freeciv_dir modified_freeciv_dir > patch.diff)
                    http://www.hardware-wiki.com - A wiki about computers, with focus on Linux support.

                    Comment


                    • #11
                      Patches should really be submitted to freeciv-dev. And anyone who is taking the time to write them ought to be on freeciv-dev. It will be much easier to get testers for your patch and it will have to appear there before it gets commited anyway.
                      --
                      Paul Zastoupil

                      Comment


                      • #12
                        moseslei: When do you have the updated patch? Remember, I only critiqued it to get the errors corrcted so the patch could get into CVS, and later the next freeciv version.
                        http://www.hardware-wiki.com - A wiki about computers, with focus on Linux support.

                        Comment


                        • #13
                          Sorry, I won't be having time to write any code again for (quite possibly) more than a week or two. I'll try to send the update to freeciv-dev then. I'm not on freeciv-dev, really just because I have no time to read all the discussion there and I feel bad having to mark all of them as read without actually reading them. As this isn't really a civ2 feature I doubt it'll considered to be in CVS anyway, but as soon as I make those corrections I will submit it.

                          Comment


                          • #14
                            *Thue wawes his CVS write access*
                            And I at least consider it a worthy features, allthough other people also have a say, of course. If nothing else it can be a toggleable option, which should make it acceptable to everybody.
                            http://www.hardware-wiki.com - A wiki about computers, with focus on Linux support.

                            Comment


                            • #15
                              Thanks for the encouragement :-) why am I still on line? I should be doing schoolwork, or if not, writing code (probably schoolwork). later.

                              Moses

                              Comment

                              Working...
                              X