|
Author
|
Topic: Barbarians become civilized? Current Date/Time:
May 20, 2000 09:51:02
|
moseslei Settler Falls Church VA USA May 2000
|
 |
posted May 08, 2000 21:21
  |
 |
 |  |
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 |
Thue Freeciv Developer
b.02-15-99
|
 |
posted May 09, 2000 05:51
 |
 |
 |  |
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). |
paulz Freeciv Host/Webmaster San Diego, CA, USA May 2000
|
 |
posted May 09, 2000 11:41
  |
 |
 |  |
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).] |
Kumiorava Warlord of the Elastic Mammals b.02-15-99
|
 |
posted May 09, 2000 17:58
 |
 |
 |  |
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. |
Thue Freeciv Developer
b.02-15-99
|
 |
posted May 09, 2000 18:28
 |
 |
 |  |
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. |
Kumiorava Warlord of the Elastic Mammals b.02-15-99
|
 |
posted May 10, 2000 20:33
 |
 |
 |  |
You're right. Forgot about that...  |
moseslei Settler Falls Church VA USA May 2000
|
 |
posted May 10, 2000 22:06
  |
 |
 |  |
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 |
Thue Freeciv Developer
b.02-15-99
|
 |
posted May 11, 2000 11:13
 |
 |
 |  |
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.
|
Thue Freeciv Developer
b.02-15-99
|
 |
posted May 11, 2000 11:36
 |
 |
 |  |
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 |
paulz Freeciv Host/Webmaster San Diego, CA, USA May 2000
|
 |
posted May 11, 2000 12:33
  |
 |
 |  |
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. |
Thue Freeciv Developer
b.02-15-99
|
 |
posted May 11, 2000 14:56
 |
 |
 |  |
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) |
Thue Freeciv Developer
b.02-15-99
|
 |
posted May 12, 2000 13:13
 |
 |
 |  |
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. |
moseslei Settler Falls Church VA USA May 2000
|
 |
posted May 13, 2000 08:15
  |
 |
 |  |
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. |
Thue Freeciv Developer
b.02-15-99
|
 |
posted May 13, 2000 08:35
 |
 |
 |  |
*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. |
moseslei Settler Falls Church VA USA May 2000
|
 |
posted May 13, 2000 08:50
  |
 |
 |  |
Thanks for the encouragement :-) why am I still on line? I should be doing schoolwork, or if not, writing code (probably schoolwork). later.Moses |
moseslei Settler Falls Church VA USA May 2000
|
 |
posted May 20, 2000 09:40
  |
 |
 |  |
On a side note, Thue, how do I go about creating a new event type? Wouldn't this involve changing the client as well (which I'm hesitant to do)?Moses |
moseslei Settler Falls Church VA USA May 2000
|
 |
posted May 20, 2000 09:41
  |
 |
 |  |
*this used to be a repeat of the last post, I accidentally pressed submit twice* [This message has been edited by moseslei (edited May 20, 2000).] |
Thue Freeciv Developer
b.02-15-99
|
 |
posted May 20, 2000 09:51
 |
 |
 |  |
Actually I don't know. (haven't done it myself) Maybe you should just make it a no-event for now, or maybe ask on freeciv-dev what to do. |