Apolyton Archive  |  Preserved copy of the Apolyton Civilization Site and its forums as they stood in September 2005. Read-only; nothing here can be posted to or replied to.  |  Forum index |  About this archive |  The 1998–2001 UBB forums
Today on Apolyton WARDELL INTERVIEW PROMO A.C.S. HISTORY CHAPTER 4 GET CIV4 /w FREE PLUS! A.C.S. PHOTO GALLERY GET A.O.M. V1.1
Apolyton Civilization Forums
main| civ2| civ3| civ4| smac| ctp2| ron| moo3| galciv| galciv2| alt| about|
ApolytonPLUS | register | search | faq | new posts | pm (-/-) | upload | members
hall of fame new! | civgroups | civgroups news | interviews | the column | radio | chat | directory | news | store | PLUS
Apolyton Civilization Forums : Powered by vBulletin version 2.0.3 Apolyton Civilization Forums > Call To Power II > CtP2-Creation/AI/Mods/Scenarios > Babarians
Show a Printable Version | Email This Page to Someone! | Receive updates to this thread | Report this to Apolyton news!

bottom of page
  
Author
Thread    < Last Thread     Next Thread > Post New Thread     Post A Reply
stankarp is offline stankarp
Prince
australia
Feb 2002
time: 05:23
  Old Post 09-09-2004 01:41
Edit/Delete Message Reply w/Quote
#1 Report this post to a moderator
Babarians Support Apolyton, buy Civilization III: Complete

A few questions regarding Babarians.

I have played a lot, particularly Cradle, and
a) it seems that Babarians peter out after 200-250 turns. There are a few around but they dont seem to be the problem they were at turn 100.
b) am I right in thinking that there are in built spawn point(s) on the map where they appear from the random generation function. I have played some games where there is hardly a babarian in the game and others where they keep appearing, coming from the same direction. The cocnclusion being they keep appearing at a particular point on the map.

Tamerlin is offline Tamerlin
King
Toulouse (South-western France)
Apr 2002
time: 06:23
  Old Post 09-09-2004 06:38
Edit/Delete Message Reply w/Quote
#2 Report this post to a moderator
Support Apolyton, buy GURPS/ Alpha Centauri

As far as I know barbarians are generated in the shaded area of the map under the fog of war. When you have enough cities or radar towers to "clear" the map around your empire they are no more spawning like rabbits.

The Big Mc is offline The Big Mc
King
Of the universe / England
Oct 2001
time: 05:23
  Old Post 09-09-2004 12:57 Visit The Big Mc's homepage!
Edit/Delete Message Reply w/Quote
#3 Report this post to a moderator
Get a bigger avatar today!

Some one could create some slic to automatically generate barbarians after the fog has gone.

Tamerlin is offline Tamerlin
King
Toulouse (South-western France)
Apr 2002
time: 06:23
  Old Post 09-09-2004 17:56
Edit/Delete Message Reply w/Quote
#4 Report this post to a moderator
Tired of ads?

I am not against the current sytem, England and France have not known any invasion of barbarians since the Middle Age.

The Big Mc is offline The Big Mc
King
Of the universe / England
Oct 2001
time: 05:23
  Old Post 09-09-2004 20:38 Visit The Big Mc's homepage!
Edit/Delete Message Reply w/Quote
#5 Report this post to a moderator
Support Apolyton, buy Alpha Centauri

What about in the American war of independence.

A group of American barbarians ( yes American barbarians because they were not sanctioned by the American government.) invaded a port in Britain.

However they forgot the matches so were unable to scuttle any ships(yes this bit is true they even ask for a light. From the towns folk).

Or pirates for that matter what are pirates if not barbarians.

Tamerlin is offline Tamerlin
King
Toulouse (South-western France)
Apr 2002
time: 06:23
  Old Post 09-09-2004 22:02
Edit/Delete Message Reply w/Quote
#6 Report this post to a moderator
Remove this text

quote:
Originally posted by The Big Mc
What about in the American war of independence.


The Native Americans could be considered as a nation or as agroup of nation, in the same spirit the future Americans could also be seen as invaders.

quote:
A group of American barbarians ( yes American barbarians because they were not sanctioned by the American government.) invaded a port in Britain.


More dissidents of a nation than barbarians IMO.

quote:
However they forgot the matches so were unable to scuttle any ships(yes this bit is true they even ask for a light. From the towns folk).


I think you are right after all, they were barbarians.

quote:
Or pirates for that matter what are pirates if not barbarians.


In this case I agree though many of them were actually corsairs paid by another nation. As far as I know, piracy is nowadays a minor threat concentrated in the poorest area of the world. Whatever the case I don't think that barbarians should appear in your inner territory once you have secured your frontiers.

Of course if you play as the Greeks, you already have enough barbarians on the map without any need to add some.

stankarp is offline stankarp
Prince
australia
Feb 2002
time: 05:23
  Old Post 10-09-2004 14:23
Edit/Delete Message Reply w/Quote
#7 Report this post to a moderator
Avatar Enlargement: We've got the solution

Hi, back in loged in land. I changed my security settings after my computer started doing strange things and then could not log in.

I think that a comment above points to the problem. The Babarians are hard coded, so they are tailored for the original game. Turn 250 in the old game is a fair way in so the Barbarians are probably dropping out by that stage.

"Some one could create some slic to automatically generate barbarians after the fog has gone."

My thought exactly and I have made a code that allows for the creation of several immobile Babarian Leaders (ala Alexander scenario). These will be spawn points for random babarians later in the game and also for Attila and the Hun Horde andGhengis and the Mongols.

However, I cant quiet get the code right to assign the spawn function to the babarians.

Can anyone fix this for me.

HandleEvent(BeginTurn) 'BarbSpawn_Test' post {
tmpPlayer = 0;
player[0] = tmpPlayer;
location_t tmpLoc;
barbsSpawn = barbsSpawn + 1;
if (barbsSpawn >= 10) {
barbsSpawn = 0;
for (i = 0; i < player[0].units; i = i + 1) {
GetUnitByIndex(tmpPlayer, i, tmpUnit);
if(tmpUnit.type == UnitDB(UNIT_BARBARIAN_LEADER)){
SpawnBarbs (0, tmpUnit.location, 0, 1); // Spawn between 1 and 6 Barbarians 1 square away from leaders


}
}
}
}
SpawnBarbs is the function from the AG scenario that creates the barbarians.

Tamerlin is offline Tamerlin
King
Toulouse (South-western France)
Apr 2002
time: 06:23
  Old Post 10-09-2004 16:07
Edit/Delete Message Reply w/Quote
#8 Report this post to a moderator
Got spare money?

I am SLIC "blind" so I will leave The Big Mc the task to study your code and correct it.

stankarp is offline stankarp
Prince
australia
Feb 2002
time: 05:23
  Old Post 10-09-2004 18:30
Edit/Delete Message Reply w/Quote
#9 Report this post to a moderator
Support Apolyton, pre-order Civilization IV

I didn,t know anything about SLIC for a long time but gradually learnt.

This is the first time I have tried to do things with the Barbarians, assigning functions to different players is still a bit confusing.

Immortal Wombat is offline Immortal Wombat
Prince
in perpetuity
Dec 2000
time: 05:23
  Old Post 10-09-2004 19:09 Visit Immortal Wombat's homepage!
Edit/Delete Message Reply w/Quote
#10 Report this post to a moderator
Enter the AD-FREE zone

quote:
Originally posted by stankarp
code:
HandleEvent(BeginTurn) 'BarbSpawn_Test' post { tmpPlayer = 0; player[0] = tmpPlayer; location_t tmpLoc; barbsSpawn = barbsSpawn + 1; if (barbsSpawn >= 10) { barbsSpawn = 0; for (i = 0; i < player[0].units; i = i + 1) { GetUnitByIndex(tmpPlayer, i, tmpUnit); if(tmpUnit.type == UnitDB(UNIT_BARBARIAN_LEADER)){ SpawnBarbs (0, tmpUnit.location, 0, 1); // Spawn between 1 and 6 Barbarians 1 square away from leaders } } } }


The major bug appears to be in the SpawnBarbs function. If the code you used was exactly the same as the AtG one, then the code above generates between 0 and 0 barbarians. You want the first figure to be 6 (for example).

Also, once every 10 BeginTurns might be a little too frequent perhaps - if you're playing with 8 players, that's almost once every human turn. Consider a check as to which player's turn it is, and spawn every 10 barbarian turns.

code:
int_t barbsSpawn; HandleEvent(BeginTurn) 'BarbSpawn_Test' post { tmpPlayer = 0; if(player[0] == tmpPlayer){ location_t tmpLoc; barbsSpawn = barbsSpawn + 1; if (barbsSpawn >= 10) { barbsSpawn = 0; for (i = 0; i < player[0].units; i = i + 1) { GetUnitByIndex(tmpPlayer, i, tmpUnit); if(tmpUnit.type == UnitDB(UNIT_BARBARIAN_LEADER)){ SpawnBarbs (6, tmpUnit.location, 0, 1); // Spawn between 1 and 6 Barbarians 1 square away from leaders } } } }

stankarp is offline stankarp
Prince
australia
Feb 2002
time: 05:23
  Old Post 11-09-2004 03:54
Edit/Delete Message Reply w/Quote
#11 Report this post to a moderator
Remove this text

Great to see you back IW.

Now I see where I went wrong.

Trying the change now.

"if (barbsSpawn >= 10)"

This was only for testing of course, dont want Barbarians every 10 turns.

Thanks again.

The Big Mc is offline The Big Mc
King
Of the universe / England
Oct 2001
time: 05:23
  Old Post 12-09-2004 04:25 Visit The Big Mc's homepage!
Edit/Delete Message Reply w/Quote
#12 Report this post to a moderator
Support Apolyton, buy Civilization 2

I have just drafted an idea for a much more complicated barbarian model.

Four types of barbarians creation types

Random

Barbarians appear randomly on the map

Regional
A region is specified which has a lot of barbarians often being only 5 or 6 tiles big.

Leader

A random barbarian leader is generated which changes with age.

Camp

A barbarian camp works similar to the leader


The hard bit is going to be to get the barbarian unit DB to add and remove units depending on age

There will also be an option to allow you to attack barbarian leaders and camps to steel gold of the barbarians.

stankarp is offline stankarp
Prince
australia
Feb 2002
time: 05:23
  Old Post 12-09-2004 13:31
Edit/Delete Message Reply w/Quote
#13 Report this post to a moderator
Tired of ads?

My code so far -

Places one Barbarian Leader every 30 X 45 map area. Each 100 turns, each surviving BL spawns units appropriate to the age.

Normal random spawning continues.

On turn 325 (about 100 AD), Attila, a Wonder Unit spawns along with an army at one of the BL's.

Working on the same for Ghenis Khan and the Mongols.

E is offline E
King
July 24,2005 Ctp2 Tiles in sig!
May 1999
time: 21:23
  Old Post 28-09-2004 21:33 Visit E's homepage!
Edit/Delete Message Reply w/Quote
#14 Report this post to a moderator
Support Apolyton

sourcecode\ctp2_code\gs\gameobj\barabarians.cpp and barabrians.h show a lot of how they are generated and what units, but i cant make much sense out of it

J Bytheway is offline J Bytheway
Emperor
England
Jul 2001
time: 05:23
  Old Post 30-09-2004 23:45 Visit J Bytheway's homepage!
Edit/Delete Message Reply w/Quote
#15 Report this post to a moderator
Got spare money?

I had a look. The way the barbarian generation is performed is really bizarre (and I found at least two bugs in the code ).

If there is exactly one human player, then they are placed as follows:

A human city is selected at random, and then neighbours of this are selected at random repeatedly (essentially this generates a random walk around the map) for at most 4000 steps until it finds a land square not visible to the human player which is at least as far from the nearest human city as a given minimum distance, and then places the barbs there.

If there are zero or more than one human players, then they are placed as follows:

Random squares on the map are chosen (for at most 400 attempts) until a land square is found which no player can see, and the barbs are placed there.

There are several problems with the SP algorithm:

Barbs will always be placed "just out of sight" for the human player, and whether other players can see the square is ignored (although this is a bug - it isn't supposed to be ignored). This is very unfair, and strange.

This method is likely to produce barbs on the borders between the human player and the AIs, exactly in the warzones where all the troops will be and so the barbs will probably be easily dealt with.

If that doesn't happen, then they will be placed just inside the neigbouring AI civs, possibly right next to their cities (in fact, it might try to place them inside their cities!) which is also not good.

The way in which the code randomly walks around in the SP algorithm is quite silly, and could easily result in it getting stuck and no barbs being produced when a large portion of the map is visible to the human player. This is particularly true on a map with much water.

E is offline E
King
July 24,2005 Ctp2 Tiles in sig!
May 1999
time: 21:23
  Old Post 01-10-2004 00:12 Visit E's homepage!
Edit/Delete Message Reply w/Quote
#16 Report this post to a moderator
Support Apolyton, buy GURPS/ Alpha Centauri

Awesome J!

Great work and research. Bytheway which bugs did you fix?

how do you recomend we change this?

I guess we can do it the civ3 way...create a tile improvement (or maybe use goody huts) to generate barbarian units until they are taken by a player

Look only for tiles not owned but may be visible

I hope you are interested in giving the barbarians a good adjustment. Maybe a combination of the unseen areas, the u-owned tiles, and using goody huts or barbarian camps would be cool.

J Bytheway is offline J Bytheway
Emperor
England
Jul 2001
time: 05:23
  Old Post 01-10-2004 00:25 Visit J Bytheway's homepage!
Edit/Delete Message Reply w/Quote
#17 Report this post to a moderator
Help yourself to an AD-FREE life

quote:
Originally posted by E
Great work and research. Bytheway which bugs did you fix?


I didn't fix any, I just found some . I'll refrain from changing anything for the moment - I think I'll set up a poll on the subject.

J Bytheway is offline J Bytheway
Emperor
England
Jul 2001
time: 05:23
  Old Post 01-10-2004 00:41 Visit J Bytheway's homepage!
Edit/Delete Message Reply w/Quote
#18 Report this post to a moderator
Increase Your PM Length

Well, I posted a poll here (In the wrong forum ).

  < Last Thread     Next Thread > Post New Thread     Post A Reply
All times are GMT. The time now is 05:23.
Apolyton Time is 00:23.
    top of page
Rate This Thread:
Forum Jump:
Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is ON
vB code is ON
Smilies are ON
[IMG] code is ON
 




Contact Us - Apolyton Civilization Site - Support Us!

Building a better Apolyton through better information. Click here and take our poll!
Non-US visitors, click here!

Powered by: vBulletin Version 2.0.3
Copyright ©2000, 2001, Jelsoft Enterprises Limited.

Page generated in 0.0528 seconds (91.65% PHP - 8.35% MySQL) with 30 queries
Page Loading Time:

Support Apolyton: Amazon USA | Amazon UK | Amazon DE | Amazon FR |
Support Apolyton and get FREE PLUS, Buy from Chips&Bits: Galactic Civilizations | Galactic Civilizations: Deluxe Edition | Call to Power 2 | Civilization: The Boardgame | GURPS/ Alpha Centauri | Alpha Centauri | Civilization IV | Civilization III: Complete |


Front Page | Civilization IV | Civilization III | Civilization II | Call to Power II | Alpha Centauri | Master of Orion III
Rise of Nations | Galactic Civilizations | Galactic Civilizations II | Misc
Alt.Civs | Civ I | C:CtP I | About | News | Directory | Apolyton Store | Forums | Chat | Columns | Interviews | Newsletter
Scenario League | CSC | Clash of Civs | Spanish Site | CtP Maps | Cradle of Civ | WesW's Ctp1/2 Site | Civ3 Haven

apolyton.net | apolyton.com | civilization2.net | civilization3.net | civilization4.net | civilizationiv.info | calltopower.net | galciv.net | galciv2.net | moo3.net