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 > Civilization: Call To Power > CtP-Creation > Fli questions for Daniel (or anyone else).
Show a Printable Version | Email This Page to Someone! | Receive updates to this thread | Report this to Apolyton news!
12.Sep: `CTP CHALLENGE LADDER` - SEPTEMBER UPDATE
09.Sep: EARLY BUILD SPRITE EDITOR
02.Aug: `SUPERLEAGUE` SIGN-UP

bottom of page
  - CIVILIZATION: CALL TO POWER @ GAMESTOP $9.99 - CIVILIZATION: CALL TO POWER @ AMAZON $9.99
Author
Thread    < Last Thread     Next Thread > Post New Thread     Post A Reply
WesW is offline WesW
CTP1/2 Modification Site Admin
Florence, Al., USA
Jan 1970
time: 23:13
Post  Old Post 14-10-1999 02:46 Visit WesW's homepage!
Edit/Delete Message Reply w/Quote
#1 Report this post to a moderator
Fli questions for Daniel (or anyone else). Support Apolyton

This is the segment from the outputs fli dealing with road construction. I want to set to so that the AI sets aside 5% of PW for road construction. How would I do that?

// pick roads or no roads
output inst_road_coef[0.0, 100.0] = 0.0
tri zero_roads(inst_road_coef, 0.0, 0.001)
tri no_roads(inst_road_coef, 0.05, 0.001) // WW from .01
tri yes_roads(inst_road_coef, 1.0, 0.001)

I think most of the stuff I want to tinker with is in the outputs fli, so if you could pick a section, and give a detailed explanation of what each term and number means, I think I could make some more improvements to the game.
[This message has been edited by WesW (edited October 13, 1999).]

Daniel Frappier is offline Daniel Frappier
Prince
Montreal, Quebec, Canada
Jan 1970
time: 05:13
Post  Old Post 14-10-1999 19:21
Edit/Delete Message Reply w/Quote
#2 Report this post to a moderator
Increase the size of your Attachments

Hi,

I will tell you what I think based on my understanding of CTP but I haven't made a test and one would be in order.

I would change outputs.fli to be:

// pick roads or no roads
output inst_road_coef[0.0, 100.0] = 0.0
tri zero_roads(inst_road_coef, 0.0, 0.001)
tri no_roads(inst_road_coef, 0.01, 0.001)
tri some_roads(inst_road_coef, 0.05, 0.001)
tri yes_roads(inst_road_coef, 1.0, 0.001)

and I would change set_inst_priority.fli to be:

if (yes_opening_game_strategy)
{
zero_roads
} else {
some_roads
}

or something like that depending on what exactly you want to do. A test is in order and I suggest that if you do one, set some_roads to 50% instead of 5%, it will be easier to see if it works. Also the % might be calculated of the total PW (and the AI set the PW most of the time to 30%)so if you want to achieve 5% of overall production you will need to set some_roads to 16.7% (16.7% x 30% = 5.01%). I might do a test this weekend if I have time. If you do one please let me know.

WesW is offline WesW
CTP1/2 Modification Site Admin
Florence, Al., USA
Jan 1970
time: 23:13
Post  Old Post 15-10-1999 13:13 Visit WesW's homepage!
Edit/Delete Message Reply w/Quote
#3 Report this post to a moderator
Put an end to popups!

Actually, that is the way things are already set up, except that no_roads acts like your some_roads.

// pick roads or no roads
output inst_road_coef[0.0, 100.0] = 0.0

The segment 0.0, 100.0- this defines the range of accepted values, right? Shouldn't the highest value be 1.0, since were talking about percentages? Also, why is it set equal to zero? Is this just a place holder figure?

tri zero_roads(inst_road_coef, 0.0, 0.001)
tri no_roads(inst_road_coef, 0.01, 0.001)
tri some_roads(inst_road_coef, 0.05, 0.001)
tri yes_roads(inst_road_coef, 1.0, 0.001)

Finally, what does the .001 figure represent?

I quess what I really need is a booklet about this programming language. I've had a few basic courses, about 10 yrs. ago, in Apple Basic, Dos, and Fortran, but I don't think any of them used this language's format.

Also, most of the other blocks in the outputs fli seem to set up differently than this one. If you could detail one of them, it would be very helpful.

Daniel Frappier is offline Daniel Frappier
Prince
Montreal, Quebec, Canada
Jan 1970
time: 05:13
Post  Old Post 15-10-1999 19:44
Edit/Delete Message Reply w/Quote
#4 Report this post to a moderator
Increase the size of your Attachments

You say: it's already the way things are set up ?

I have added 1 line to the output statement, the one that define some_roads and changed inst_priority that used to be no_roads to some_roads and that should do what you want.

Unless when you say it's already set-up like this you mean that it's what you did in you're mod. In this case I am sorry I was not able to keep current with what mod makers have been doing for a couple of months.

Now for explanations; I realize re-reading my last post that I was short on them. I humbly submit my toughts to you.

In:

output inst_road_coef[0.0, 100.0] = 0.0
tri zero_roads(inst_road_coef, 0.0, 0.001)
tri no_roads(inst_road_coef, 0.01, 0.001)
tri some_roads(inst_road_coef, 0.05, 0.001)
tri yes_roads(inst_road_coef, 1.0, 0.001)


The 0.0 and 100.0 in brackets are indeed ranges that define the min. and max. values.

Why is it 100.0 instead of 1.0 ? The reason is simple, those values are not representing anything concrete with reality or something you see inside the game. They might use [0, 2] to represent how often an AI will keep it's word, 1.9 might means that it will keep it 90% of the time. The reason behind this is that the engine of CTP is a fuzzy logic engine, it digest all kinds of values, do complex calculations to achieve a results. So the numbers you see are the one the programmers liked best sometimes for reasons or sometines for no reasons.

In any case it is not a problem for you because you almost always know what they represent. True or false is always 1/0.

Why in the above example is it initialize to 0 ?

I am pretty sure that it is because that block of code is only there to "define" no_roads, zero_roads and yes_roads. Whatever value it is initialize to is overwritten in inst_priority.

What do represent 0.001 ? In this particular case nothing. That part is very inportant in a input statement where it is use to define a range. I would need to check back some code to tell you for output statements, now i am at the office and i have none in front of me.

I've got to run, bye for now.

WesW is offline WesW
CTP1/2 Modification Site Admin
Florence, Al., USA
Jan 1970
time: 23:13
Post  Old Post 16-10-1999 02:36 Visit WesW's homepage!
Edit/Delete Message Reply w/Quote
#5 Report this post to a moderator
Tired of ads?

This is a section of inst_priority that I referred to about the roads.

if (yes_opening_game_strategy)
{
zero_roads
} else {
no_roads
}
As you can see in my earlier post, I changed the setting from .01 to .05. CD had earlier set it to .01 from, I believe, 0. Thus, I had it set to devote 5% of PW to roads, and was checking with you to verify this, as I had become confused.

What I specifically want to change in the game now is the amount of food that the AI aims for when placing workers. I pieced some things together from CD's comments, and I think that the AI's target value comes out to a growth every 10 or 11 turns for a city with a granery and an aqueduct. This seems too fast to me. I would like to set it so that cities grow about every 13 or 14 turns. (I know that the AI always places the worker on the best food tile whenever one of my cities grows.)
I believe the code for this is in the first half of the outputs fli. CD made several changes in this section to try and achieve this same thing, I believe, but I can't make sense of them.

Daniel Frappier is offline Daniel Frappier
Prince
Montreal, Quebec, Canada
Jan 1970
time: 05:13
Post  Old Post 16-10-1999 05:01
Edit/Delete Message Reply w/Quote
#6 Report this post to a moderator
Increase the size of your Attachments

My appologies, WestW. I have read you're question to fast and I never noticed that you had modified the piece of code. Of course changing the value of no_roads is very good and will acomplish the same thing.

To get back to the output statement I made verifications and the range (the third argument) is widely use. It is very logical to assume that CTP try to shoot to be within that range when it can but I can't tell you what would happened if you make the values overlap. I guest it could depends on what values.

I have took a quick look about the food and saw that as the game advance and the number of city increase the rations are increased as well. It makes calculations about the %of surplus of food but I didn't see where it aims at a 10 or 11 turns growth target. I will take a look at it and get back to you. I will also download CD's modifications to take a look at. Are they part of is main mod or is it a different one ?

WesW is offline WesW
CTP1/2 Modification Site Admin
Florence, Al., USA
Jan 1970
time: 23:13
Post  Old Post 17-10-1999 06:12 Visit WesW's homepage!
Edit/Delete Message Reply w/Quote
#7 Report this post to a moderator
Support Apolyton, buy Galactic Civilizations: Deluxe Edition

About CD's modifications; I think they are in two places- in his mod in the aidata and aip folders, and here at this site in the modification section.
About my calculations on the food; I have checked out what the computer is doing in my current game, and I may be wrong. I think maybe the computer shifts workers around a lot depending on the situation. I think this is what CD found out, too, and why he didn't spend a lot of time trying to change it.
I think I'm going to go ahead and submit the files as they are now. If someone discovers a significant improvement in the future, we can always submit a new version.
Thanks for your help.

  < Last Thread     Next Thread > Post New Thread     Post A Reply
All times are GMT. The time now is 05:13.
Apolyton Time is 00:13.
    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.0450 seconds (90.98% PHP - 9.02% 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