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 > Miscellaneous > Archive > CtP2-Creation/AI/Mods/Scenarios-Archive > Clerics, Corporate branch and so on...
Show a Printable Version | Email This Page to Someone! | Receive updates to this thread | Report this to Apolyton news!

bottom of page
  
Author
Thread   
Pages (5): [ 1   2   3   4     >> ]
< Last Thread     Next Thread > Post New Thread     Post A Reply
mapfi is offline mapfi
Prince
Zurich, Switzerland
Jul 2002
time: 06:21
  Old Post 05-08-2002 18:19
Edit/Delete Message Reply w/Quote
#1 Report this post to a moderator
Clerics, Corporate branch and so on... Support Apolyton, buy Civilization III: Complete

The discussion about the use of clerics, teleevangelist and corporate branch started in the strategy forum
http://apolyton.net/forums/showthre...&threadid=56953
but really has to be part of this one, since we're talking about modifying.

To adjust the money given by selling indulgences to the city size is rather easy, some slic does it:

code:
HandleEvent(IndulgenceSaleMade) 'newsellindulgence' post{ AddGold(unit[0].owner, (city[0].population*5)); AddGold(city[0].owner, -(city[0].population*5)); }

Worked in my testing, so far... Just adds that amount of gold to the already generated one defined in the const.txt

Now what I'm looking for:
I'd like to replace the "5" with a factor according to the state of the city, unconverted, converted or converted to other faith like in the const.txt.
Any idea where I get the state of the city?

Pedrunn is offline Pedrunn
King
of Natal, Brazil
Jul 2001
time: 02:21
  Old Post 06-08-2002 08:39
Edit/Delete Message Reply w/Quote
#2 Report this post to a moderator
Re: Clerics, Corporate branch and so on... Support Apolyton or Terrorists Win

quote:
Originally posted by mapfi
Any idea where I get the state of the city?


I dont think we can

mapfi is offline mapfi
Prince
Zurich, Switzerland
Jul 2002
time: 06:21
  Old Post 06-08-2002 11:44
Edit/Delete Message Reply w/Quote
#3 Report this post to a moderator
Tired of ads?

could I continously create the data with global arrays? But that would probably take up too much memory...

Just another slic question, in the above code - should I put the two owners into user-defined variables before I use them in the function? There's soemthing in the documentation but I'm not sure if it's still valid since I see other modmakers using it also this way.

Immortal Wombat is offline Immortal Wombat
Prince
in perpetuity
Dec 2000
time: 05:21
  Old Post 06-08-2002 15:38 Visit Immortal Wombat's homepage!
Edit/Delete Message Reply w/Quote
#4 Report this post to a moderator
Get a bigger avatar today!

You can do, but you don't need to. Often it's easier for long code to put them into use-defined variables, but for something like that, what you have is fine.

I guess if you kept track of every conversion and reformation it might be possible, but the easiest way would be to have city arrays.
I don't know if we can use city arrays, or only int arrays.

Martin Gühmann is offline Martin Gühmann
Emperor
Berlin, Germany
Mar 2001
time: 06:21
Post  Old Post 06-08-2002 16:46 Visit Martin Gühmann's homepage!
Edit/Delete Message Reply w/Quote
#5 Report this post to a moderator
Get a bigger avatar today!

quote:
Originally posted by mapfi
Just another slic question, in the above code - should I put the two owners into user-defined variables before I use them in the function? There's soemthing in the documentation but I'm not sure if it's still valid since I see other modmakers using it also this way.


Unfortunatly sometimes you need to do it, ones I used something like this in a self defined function and the game crashed this way, in other situations you will get this way DebugSlic=Yes errors, I started to debug these, too.

But if nothing happens and it does what you wants then it is fine.

-Martin

Hermann the Lombard is offline Hermann the Lombard
Prince
Hoboken, NJ, USA
Jun 1999
time: 00:21
  Old Post 06-08-2002 20:55
Edit/Delete Message Reply w/Quote
#6 Report this post to a moderator
Re: Clerics, Corporate branch and so on... Help yourself to an AD-FREE life

quote:
Originally posted by mapfi
Now what I'm looking for:
I'd like to replace the "5" with a factor according to the state of the city, unconverted, converted or converted to other faith like in the const.txt.
Any idea where I get the state of the city?


I like your approach. If we can't get the state of the city, maybe make the const.txt value more important and the city size less important, perhaps zero for Other, five for Unconverted, and ten for Converted, (or even zero, ten, and twenty), and use a factor of "3" (or "2") instead of "5."

mapfi is offline mapfi
Prince
Zurich, Switzerland
Jul 2002
time: 06:21
  Old Post 06-08-2002 21:31
Edit/Delete Message Reply w/Quote
#7 Report this post to a moderator
Browse Apolyton AD-FREE

Not a bad idea if we just can't get that stupid city state...

I was also thinking about working on conversion: If the just converted city is the capital one could argue that you also might convert the civilizations leader, which then would proclaim the new religion as state religion (like it was done with christianity in old rome). Either all or maybe each city with a given probability would then also be converted.
The values for the clerics would have to be adjusted though, maybe lower the conversion factor and maybe not making the whole converting process too probable. But all in all rather easy slic and some txt adjustements.

What do you think?

Pedrunn is offline Pedrunn
King
of Natal, Brazil
Jul 2001
time: 02:21
  Old Post 06-08-2002 22:17
Edit/Delete Message Reply w/Quote
#8 Report this post to a moderator
Get a bigger avatar today!

Yeah it did not hit me that we can keep stored in global variable wich cities were converted.

And this idea may lead to a completely new feature.
Religion.
Probably controled by messagebox. Wich i dont know how far we can go. Yet, this is a major addition!

mapfi is offline mapfi
Prince
Zurich, Switzerland
Jul 2002
time: 06:21
  Old Post 06-08-2002 22:25
Edit/Delete Message Reply w/Quote
#9 Report this post to a moderator
Tired of ads?

Big project lurking around and attacking out of nowhere!

and I was just starting to get into this stuff...

mapfi is offline mapfi
Prince
Zurich, Switzerland
Jul 2002
time: 06:21
  Old Post 06-08-2002 23:11
Edit/Delete Message Reply w/Quote
#10 Report this post to a moderator
Support Apolyton, buy Galactic Civilizations: Deluxe Edition

Hasn't Locutus already worked on the concept of religion for his ctp3-mod?

Pedrunn is offline Pedrunn
King
of Natal, Brazil
Jul 2001
time: 02:21
  Old Post 06-08-2002 23:23
Edit/Delete Message Reply w/Quote
#11 Report this post to a moderator
Support Apolyton, buy Galactic Civilizations

hehehe

As i think.
Besides storing wich cities were converted you would also store the player who converted.
Everyturn the player who converted takes a small percentage of gold from the converted civ according to the city's population and an extra if he converted the capitol. (plus the gold from sell indulgences is bigger).
Every time a city is converted the city owner gets a choice to join the convertor religion. If he dont accept he still keeps losing its money (note he can still reform the city).

If he accepts all of his cities get converted to the other player religion (this will cause unhapppiness in all cities that werent converted and increase the happiness in those that were converted). The number of gold taken by the other civ drasticly decreases and the player with the new religion can sell indulgences to other civs and get the same amout as if it was converted by him.

I dont think it will be a problem to teach the AI how to use it.

Pedrunn is offline Pedrunn
King
of Natal, Brazil
Jul 2001
time: 02:21
  Old Post 06-08-2002 23:27
Edit/Delete Message Reply w/Quote
#12 Report this post to a moderator
Support Apolyton

Some thought were given to its mod but i think they went too far away from reality.
And nothing was said when or how he was going to make. This can be the kick to start all of what he wanted.

Pedrunn is offline Pedrunn
King
of Natal, Brazil
Jul 2001
time: 02:21
  Old Post 07-08-2002 09:49
Edit/Delete Message Reply w/Quote
#13 Report this post to a moderator
Support Apolyton buy from Amazon

Could you test this code Mapfi or anyone?

It follows the first idea of only changing the money from conversion and sell improvements.
It should add one gold per population of the converted cities to the player who convert these city.
It also re-calculates the sell indulgences. Giving one gold per civ in a city if the city is converted by the cleric owner. And 1 gold for every 5 pop if the city isnt converted. And 1 gold per 10 pop if the city isnt converted.

If it works we can move on to next stage: Giving identity to the religions.

Any comments?

code:
//////////////////////////////////////////////////////////////////////////// // 1) Religion Code //////////////////////////////////////////////////////////////////////////// city_t ConvertedCity[]; int_t ReligionOwner[]; int_t ReligiousCount; int_f GetCityConvertor(city_t tmpCity) { // if GetCityConvertor = 0, means city is not converted int_t tmpPlayer; int_t i; if(CityIsValid(tmpCity)) { for(i = 0; i <= ReligiousCount; i = i + 1) { if(tmpCity == ConvertedCity[i]) { tmpPlayer = ReligionOwner[i]; } } } return tmpPlayer; } HandleEvent(ConvertCity) 'StoreConvertedCity' pre { city_t tmpCity; int_t i; if(CityIsValid(city[0]) && IsPlayerAlive(player[0])) { for(i = 0; i <= ReligiousCount; i = i + 1) { if(city[0] == ConvertedCity[i]) { ReligionOwner[i] = 0; // Erase old owner } } ConvertedCity[ReligiousCount] = city[0]; ReligionOwner[ReligiousCount] = player[0]; ReligiousCount = ReligiousCount + 1; // Store city and player who converted } } HandleEvent(BeginTurn) 'ConvertorTakesTheMoneyPerTurn' post { int_t SinfulCiv; int_t PriestCiv; int_t theTenth; int_t i; SinfulCiv = player[0]; for(i=0; i < player[0].cities; i = i + 1) { GetCityByIndex(SinfulCiv, i, city[0]); PriestCiv = GetCityConvertor(city[0]); if(PriestCiv != 0) { theTenth = city[0].population; // How much it will be? 1 gold per pop per turn? AddGold(SinfulCiv, theTenth); AddGold(PriestCiv, - theTenth); } } } HandleEvent(SellIndulgencesOrder) 'ConvertorTakesTheMoneyFromIndulgences' pre { int_t SinfulCiv; int_t PriestCiv; int_t ConvertorCiv; int_t theTenth; army_t GodsArmy; location_t tmpLoc; GetCityByLocation(tmpLoc, city[0]); // PriestCiv = GodsArmy.owner; // ConvertorCiv = GetCityConvertor(city[0]); SinfulCiv = City[0].owner; if(ConvertorCiv == PriestCiv) { // If city is converted by the cleric owner theTenth = city[0].population; // How much gold he gets? 1 gold per pop AddGold(SinfulCiv, theTenth); AddGold(PriestCiv, - theTenth); } elseif(ConvertorCiv == 0) { // if City is not converted theTenth = 1 + city[0].population/5; // How much gold he gets? 1/10 gold per pop AddGold(SinfulCiv, theTenth); AddGold(PriestCiv, - theTenth); } elseif(ConvertorCiv != PriestCiv) { // if city is coverted by another civ religion theTenth = 1 + city[0].population/10; // How much gold he gets? 1/20 gold per pop AddGold(SinfulCiv, theTenth); AddGold(PriestCiv, - theTenth); } }


EDIT: A small mistake that would ruin everything was find. The code above is now correct.
Teh correct version

Last edited by Pedrunn on 07-08-2002 at 16:32

mapfi is offline mapfi
Prince
Zurich, Switzerland
Jul 2002
time: 06:21
  Old Post 07-08-2002 16:31
Edit/Delete Message Reply w/Quote
#14 Report this post to a moderator
Full PM-box? Change here!

well, you got me started there! I'll list the changes:


  • included new function for checking if city is already in the array
  • erased validity checks when debugging (i don't know if those are necessary - you tell me - but when I was looking for mistakes they came in my way
  • erased counters, because the .# gives the actual size of the array
  • took a while till I spotted that: ConvertedCity[ROwnerCounter] = player[0];, should be ReligionOwner of course
  • included Reformation of city by owner
  • erased the part of the converted cities giving gold, since that is already done by the regular game, we could, however, make adjustements here
  • took IndulgenceSaleMade as event
  • changed minus signs in sell indulgence, you subtracted gold from the seller
  • changed the values in sellindulgences, a tenth of pop is not going to make much difference


It worked in my testing, so far... Thanks a lot for getting me going!

note: we should of course set the values of the sell indulgence event in the const.txt to zero, to make it clearer what the total effect actually is and where it's defined, same if we want to change the converted cities paying gold -> 2nd note: in the game this is 0.2 times the gold production of the city - so not what you had in mind here, but we can easily access the cities gold production via slic if we want to make any changes there

code:
//////////////////////////////////////////////////////////////////////////// // v.1 Religion Code by Pedrunn // v.2 by mapfi //////////////////////////////////////////////////////////////////////////// city_t ConvertedCity[]; int_t ReligionOwner[]; int_f GetCityConvertor(city_t tmpCity) { // if GetCityConvertor = 0, means city is not converted int_t tmpPlayer; int_t i; if(CityIsValid(tmpCity)) { for(i = 0; i < ConvertedCity.#; i = i + 1) { if(tmpCity == ConvertedCity[i]) { tmpPlayer = ReligionOwner[i]; } } } return tmpPlayer; } int_f CheckforCity(city_t tmpCity) { //if City is already in array returns place, otherwise next free array place int_t i; int_t num; num = ConvertedCity.#; for(i = 0; i < ConvertedCity.#; i = i + 1) { if(tmpCity == ConvertedCity[i]) { i=num; } } return num; } HandleEvent(ConvertCity) 'StoreConvertedCity' post { int_t i; i = CheckforCity(city[0]); ConvertedCity[i] = city[0]; ReligionOwner[i] = player[0]; } HandleEvent(UnconvertCity) 'StoreUncovertedCity' post { //reformation by city owner int_t i; i = CheckforCity(city[0]); ConvertedCity[i] = city[0]; ReligionOwner[i] = 0; } HandleEvent(IndulgenceSaleMade) 'ConvertorTakesTheMoneyFromIndulgences' post { int_t SinfulCiv; int_t PriestCiv; int_t ConvertorCiv; int_t theTenth; PriestCiv = unit[0].owner; ConvertorCiv = GetCityConvertor(city[0]); SinfulCiv = city[0].owner; if(ConvertorCiv == PriestCiv) { // If city is converted by the cleric owner theTenth = city[0].population*5; // How much gold he gets? 1 gold per pop times 5 AddGold(SinfulCiv, - theTenth); AddGold(PriestCiv, theTenth); } elseif(ConvertorCiv == 0) { // if City is not converted theTenth = city[0].population*3; // How much gold he gets? 1 gold per pop times 3 AddGold(SinfulCiv, - theTenth); AddGold(PriestCiv, theTenth); } elseif(ConvertorCiv != PriestCiv) { // if city is coverted by another civ religion theTenth = city[0].population; // How much gold he gets? 1 gold per pop AddGold(SinfulCiv, - theTenth); AddGold(PriestCiv, theTenth); } }

Pedrunn is offline Pedrunn
King
of Natal, Brazil
Jul 2001
time: 02:21
  Old Post 07-08-2002 16:59
Edit/Delete Message Reply w/Quote
#15 Report this post to a moderator
Support Apolyton, buy Galactic Civilizations

quote:
Originally posted by mapfi

  • included new function for checking if city is already in the array
  • erased counters, because the .# gives the actual size of the array

I dont think this will give any advantage. But for sure you a much experienced programmer than i am (my very first code only has two/three months).

quote:
Originally posted by mapfi

  • took a while till I spotted that: ConvertedCity[ROwnerCounter] = player[0];, should be ReligionOwner of course

You got me few minutes before i had edited that post where i fixed this bug. I also changed the cod in a way that it only has one count (instead of for city and other for the player).

quote:
Originally posted by mapfi

  • included Reformation of city by owner

I did forgot that, dindnt i?

quote:
Originally posted by mapfi

  • erased the part of the converted cities giving gold, since that is already done by the regular game, we could, however, make adjustements here

Yet i have added that because i plan to pop messages box every turn (without show() function for sure) where it says how much gold was lost/gained by the civ. Yet we didnt made religious so important to have this messaging poping out. (I also plan to add other information in this message box about trade and others features)

quote:
Originally posted by mapfi

  • took IndulgenceSaleMade as event


I hadnt seen this event befor. It sure looks to be trustful to work than SellIndulgences orders. Other than i dont see much of a difference


  • changed minus signs in sell indulgence, you subtracted gold from the seller
[/quote]

Ooops

quote:
Originally posted by mapfi

  • changed the values in sellindulgences, a tenth of pop is not going to make much difference

I was going to start a discussion about that. This value was just temporary (thats why i create a whole new variable in the code so that was easier to edit.

quote:
Originally posted by mapfi
It worked in my testing, so far... Thanks a lot for getting me going!

Glad to hear this. This is enough for us to work with yor code and to move on to stage two. Although i may need to get used to the .# wich i had never seen it before. ( as i said i am not much of experienced programmer)

quote:
Originally posted by mapfi
note: we should of course set the values of the sell indulgence event in the const.txt to zero, to make it clearer what the total effect actually is and where it's defined, same if we want to change the converted cities paying gold

Thats what i had in mind
quote:
Originally posted by mapfi
-> 2nd note: in the game this is 0.2 times the gold production of the city - so not what you had in mind here, but we can easily access the cities gold production via slic if we want to make any changes there


Sure thing. This is also good if we will want to implement the message box idea.

Last edited by Pedrunn on 07-08-2002 at 17:07

mapfi is offline mapfi
Prince
Zurich, Switzerland
Jul 2002
time: 06:21
  Old Post 07-08-2002 17:46
Edit/Delete Message Reply w/Quote
#16 Report this post to a moderator
Support Apolyton

quote:

I dont think this will give any advantage. But for sure you a much experienced programmer than i am (my very first code only has two/three months).

well otherwise the array would get huge when cities are converted a lot and as for the experienced programmer "Errare humanum est" -> I'm not... had a semester of programming C++ two years ago, haven't done any since and just started reading into SLICing a week ago
quote:

Yet i have added that because i plan to pop messages box every turn (without show() function for sure) where it says how much gold was lost/gained by the civ. Yet we didnt made religious so important to have this messaging poping out. (I also plan to add other information in this message box about trade and others features)

well if we keep on working on this at the same pace it may soon be important
quote:

I hadnt seen this event befor. It sure looks to be trustful to work than SellIndulgences orders. Other than i dont see much of a difference

i'm not sure but maybe you can give the unti the order more than once even it will only execute once - anyhow, this is just to be on the safe side
quote:

This is enough for us to work with yor code and to move on to stage two. Although i may need to get used to the .# wich i had never seen it before.

The .# is usually something like .size in other languages, so most common just a strange way of writing it in slic
Stage 2:
quote:

Every time a city is converted the city owner gets a choice to join the convertor religion. If he dont accept he still keeps losing its money (note he can still reform the city). If he accepts all of his cities get converted to the other player religion (this will cause unhapppiness in all cities that werent converted and increase the happiness in those that were converted). The number of gold taken by the other civ drasticly decreases

so we'll do that in slic with part of the code I took out, additionally when more than half of the cities are converted there could also be a pop up that the people petitiones the leader to convert all cities.
quote:

and the player with the new religion can sell indulgences to other civs and get the same amout as if it was converted by him.

now it's getting complicated - can we unconnect religion and player? The problem is the data shown in the map which specifically connects those two. and i don't think it's possible to have a players city with his religion converted- i'll try that just now

mapfi is offline mapfi
Prince
Zurich, Switzerland
Jul 2002
time: 06:21
  Old Post 07-08-2002 18:23
Edit/Delete Message Reply w/Quote
#17 Report this post to a moderator
Support Apolyton, buy Call to Power 2

Yes, yes, yes

if I add/adjust the event handler for UnconvertCity(city_t) with a convertcity event
ConvertCity(city_t, int_t, int_t) //City actually converted
the game allows me to select any player we want, even the same as the owner of the city, and the blue sign appears beside the blue city!
which means, we can redefine the int_t for player in those events as religion - so at the beginning we're all atheist and after some research you can select a state religion which allows you to build the clerics instead of the conditions now - boah this is major work ahead but as far as I can see all doable!

mapfi is offline mapfi
Prince
Zurich, Switzerland
Jul 2002
time: 06:21
  Old Post 07-08-2002 19:37
Edit/Delete Message Reply w/Quote
#18 Report this post to a moderator
Support Apolyton buy from Amazon

well I tried something with what we had with religion and player unconnected, I zipped it, so have a look at it(it hasn't been tested...)

What we need now is the messagebox stuff and of course the new defining of the goldturnover from religious cities - do they all pay in a religion specific pot and whoever has that religion get's a share of it?
And we should beginn to add bonuses for the different religions, for production, gold or science...

edit: added eventhandler for capturing city

Attachment: religion.zip
This has been downloaded 2 time(s).

Last edited by mapfi on 07-08-2002 at 20:43

Immortal Wombat is offline Immortal Wombat
Prince
in perpetuity
Dec 2000
time: 05:21
  Old Post 07-08-2002 21:16 Visit Immortal Wombat's homepage!
Edit/Delete Message Reply w/Quote
#19 Report this post to a moderator
Support Apolyton, buy Alpha Centauri

looking good

Couple of things...
In CheckForCity, "i=num;" I think should be "num=i;" so you store the position into the number. Have I understood that right?

And in the IndulgenceSaleMade event, :

code:
elseif(ConvertorCiv != PriestCiv) {

that could just be an "else {", not that it really matters much.

mapfi is offline mapfi
Prince
Zurich, Switzerland
Jul 2002
time: 06:21
  Old Post 07-08-2002 23:26
Edit/Delete Message Reply w/Quote
#20 Report this post to a moderator
Support Apolyton, buy Galactic Civilizations

hey thanks!

num = i, yes, i didn't test it as i said
for the other one just bad style, you're right
i'll keep on thinking... and trying out

Last edited by mapfi on 08-08-2002 at 00:01

mapfi is offline mapfi
Prince
Zurich, Switzerland
Jul 2002
time: 06:21
  Old Post 08-08-2002 00:03
Edit/Delete Message Reply w/Quote
#21 Report this post to a moderator
Support Apolyton, buy Alpha Centauri

forgot the updated one, hope to have something more tomorrow night

Attachment: religion.zip
This has been downloaded 3 time(s).

Pedrunn is offline Pedrunn
King
of Natal, Brazil
Jul 2001
time: 02:21
  Old Post 08-08-2002 00:11
Edit/Delete Message Reply w/Quote
#22 Report this post to a moderator
Increase Your PM Length

You have been working on a code!?!
I have staterd one too.

And I am almost done with mine!

mapfi is offline mapfi
Prince
Zurich, Switzerland
Jul 2002
time: 06:21
  Old Post 08-08-2002 01:34
Edit/Delete Message Reply w/Quote
#23 Report this post to a moderator
Support Apolyton, buy Civilization III: Complete

nah, nah, nah

there's nothing as too much work - what i've got right now is the thing posted and I was planning on taking that further - but in that case I'll wait for your code and anyway, bedtime for me now...

Locutus is offline Locutus
ACS CTP1/2 Manager & Civ4 Co-Manager
Hengelo, The Netherlands
Nov 1999
time: 06:21
  Old Post 08-08-2002 06:04 Visit Locutus<br><img src=/forums/images/staff-icon.gif>'s homepage!
Edit/Delete Message Reply w/Quote
#24 Report this post to a moderator
Remove this text

Wow, guys, this is looking great

Exactly the sort of thing I was working on, but since I'm extremely busy, I'm glad to see you guys are doing my work for me I'll try to post some ideas on how to expand the religion idea even further later on. My vision is that religion should become CtP's equivilant of Civ3's culture. There should IMHO also be some sort of 'level' of religion: some cities are strongly religious, some only very weakly, ala culture. Perhaps cities could even have several religions, with one of them being the dominant one... but this requires careful thinking to work it out properly...

Immortal Wombat is offline Immortal Wombat
Prince
in perpetuity
Dec 2000
time: 05:21
  Old Post 08-08-2002 06:16 Visit Immortal Wombat's homepage!
Edit/Delete Message Reply w/Quote
#25 Report this post to a moderator
Increase Your PM Length

Can SLIC do arrays of more than two dimensions like C can?

int_t CITY_RELIGIONS[][][];

Locutus is offline Locutus
ACS CTP1/2 Manager & Civ4 Co-Manager
Hengelo, The Netherlands
Nov 1999
time: 06:21
  Old Post 08-08-2002 06:30 Visit Locutus<br><img src=/forums/images/staff-icon.gif>'s homepage!
Edit/Delete Message Reply w/Quote
#26 Report this post to a moderator
Increase Your PM Length

No, but you can fake it. Instead of array[10][10][10], you can have array[(10*10*10)].

Pedrunn is offline Pedrunn
King
of Natal, Brazil
Jul 2001
time: 02:21
  Old Post 08-08-2002 08:10
Edit/Delete Message Reply w/Quote
#27 Report this post to a moderator
Support Apolyton buy from Amazon

I have finished ny code.

I hope you dont mind. But tha .# scaries the hell out of me. So i kept the counter. You may change it if you want.

Iit is late here in Brasil and i will get some sleep.
Tomorrow i will start the debuging, improving and testing.

Good Night

Attachment: as_pedrunn.slc
This has been downloaded 5 time(s).

mapfi is offline mapfi
Prince
Zurich, Switzerland
Jul 2002
time: 06:21
  Old Post 08-08-2002 11:52
Edit/Delete Message Reply w/Quote
#28 Report this post to a moderator
Put an end to popups!

Just had a quick look, since I haven't got much time today. Looks very good.
Couldn't find the text for the messagebox 'ReligionInfo' though. And you've got that loop in ConvertCity - it calls itself over and over again.
I can see you're partly going into another direction than me. I was centering around the little colored cross that's displayed in the regular view to make it easy for the player to keep track of the city's religion. I like your message boxes though, I haven't read into that part of slic yet.

Now what we have to address is:
What's exactly the benefit of converting a enemy city? Just some money, or more? And what happens if the player changes his religion? In your code as I understand it - if player b converts to the religion of player a, b doesn't get any money if he himself converts cities of player c instead a will get the money.

Another problem so far is, that clerics require Theocracy - I think we can easily change that - but also that whenever you change your government to something else the crosses dissappear - we still got the information in our array then but no little crosses to show the player, and I like them so much

Where are the tactics for the ai considering conversion? I hope that's not hard coded...

Pedrunn is offline Pedrunn
King
of Natal, Brazil
Jul 2001
time: 02:21
  Old Post 08-08-2002 18:43
Edit/Delete Message Reply w/Quote
#29 Report this post to a moderator
Support Apolyton, buy GURPS/ Alpha Centauri

quote:
Originally posted by mapfi
Couldn't find the text for the messagebox 'ReligionInfo' though.


Actually the messages are totally wrong in the code. It looks like i had a misconcept with the alertbox. I have attached a txt with the correct lines

quote:
Originally posted by mapfi
And you've got that loop in ConvertCity - it calls itself over and over again.

The bug is in this line.

code:
Event: ConvertCity(city[0], PlayerReligion[tmpplayer], 0);

It seems i cant get the game to save the religion at the beggining of the game with the code.
code:
HandleEvent(BeginTurn) 'SaveReligionsArrays' post { // At the Begginning of the game int_t tmpPlayer; for(tmpPlayer = 0; tmpPlayer <= 32; tmpPlayer = tmpPlayer + 1) { // For all if(IsPlayerAlive(tmpPlayer)) { // alive player PlayerReligion[tmpPlayer] = tmpPlayer; // Given them a religion } } DisableTrigger('SaveReligionsArrays'); }

Since in the message RELIGIOUS_INFO it say the religion name of the player is 0 and not the name of the civiliztion as i expected.
I think this is causing the loop.
Any ideas to solve this
quote:
Originally posted by mapfi
I can see you're partly going into another direction than me. I was centering around the little colored cross that's displayed in the regular view to make it easy for the player to keep track of the city's religion. I like your message boxes though, I haven't read into that part of slic yet.

I want religion to be a very deep aspect of the game.
What i aim at is to create religons that do not depend on the civs. Yet the civ who created it was going to receive advantages because of her.
The religion would start being spread by its starting civ and once civs get totally converterd to it. The totally converted civ is going to convert others civ to the player who started the religion (I like to think that relion is a totally different/separated concept from civilization. it is like it has its own life).

Now what we have to address is:

quote:
Originally posted by mapfi
What's exactly the benefit of converting a enemy city? Just some money, or more? And what happens if the player changes his religion? In your code as I understand it - if player b converts to the religion of player a, b doesn't get any money if he himself converts cities of player c instead a will get the money.

Thats what i wrote (It gets the money from selling indulgences too and dont get) but we could fix that so that part of the money goes to the player b or we could come up with another advantage if the religion is well suceed (Locutus i think that is where you are aiming at, isnt?). This something to dicuss about it.
quote:
Originally posted by mapfi
Another problem so far is, that clerics require Theocracy - I think we can easily change that - but also that whenever you change your government to something else the crosses dissappear - we still got the information in our array then but no little crosses to show the player, and I like them so much

The crosses disapear when enacting new govs? Are you sure? I really really dont thing they do but i am not 100% sure about it.
A really small change in the unit.txt would make the cleric avaible to all govs. But i plan to create a new unit with less chance of succeding in the conversion avaible to all civs. Since i want new teocracy to have an advantage

quote:
Originally posted by mapfi
Where are the tactics for the ai considering conversion? I hope that's not hard coded...

The Goals.txt determines how should the AI use the tactic and strategy.txt determines how the likely they will use this order depending on the AIs strategy.

mapfi is offline mapfi
Prince
Zurich, Switzerland
Jul 2002
time: 06:21
  Old Post 08-08-2002 19:42
Edit/Delete Message Reply w/Quote
#30 Report this post to a moderator
Suffering from ads?

quote:

The bug is in this line.
code:
Event: ConvertCity(city[0], PlayerReligion[tmpplayer], 0);


Yep, if you look in that little piece of code I wrote you'll find I solved that by using a global variable to count the called events. There might be something better, though
quote:
What i aim at is to create religons that do not depend on the civs.

That's my aim too, and as I found out, the colored cross can appear at any players city. Just read a few post ahead.
quote:
The crosses disapear when enacting new govs? Are you sure?

Quite sure, tested it, but try it out in the game yourself.

 
Pages (5): [ 1   2   3   4     >> ]
< Last Thread     Next Thread > Post New Thread     Post A Reply
All times are GMT. The time now is 05:21.
Apolyton Time is 00:21.
    top of page
Rate This Thread:
archivepost
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.0678 seconds (92.90% PHP - 7.10% MySQL) with 31 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