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 > PW City Improvement wanted!
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
Grandpa Troll is offline Grandpa Troll

Immortal
I owe..I owe..it's off to work I go
Jul 2000
time: 00:21
  Old Post 20-08-2002 07:38
Edit/Delete Message Reply w/Quote
#1 Report this post to a moderator
PW City Improvement wanted! Support Apolyton, buy Civilization III: Complete

Would it be possible to make a city improvement that would give me "X" PW per turn per citizen?

City Clock gives 1 gold per..Television gives 5 gold per citizen, this is where I am headed, like say 1 improvement gives 20 PW per citizen and maybe a future one to give say 40 per citizen.

Just a thought, any/all feedback would be appreciated!

Troll

Grandpa Troll is offline Grandpa Troll

Immortal
I owe..I owe..it's off to work I go
Jul 2000
time: 00:21
  Old Post 13-09-2002 06:11
Edit/Delete Message Reply w/Quote
#2 Report this post to a moderator
Support Apolyton, buy Civilization 2

###BUMP###

Anyone have any suggestions?

Please..

Attachment: bullbeg begging.gif
This has been downloaded 63 time(s).

J Bytheway is offline J Bytheway
Emperor
England
Jul 2001
time: 05:21
  Old Post 13-09-2002 23:24 Visit J Bytheway's homepage!
Edit/Delete Message Reply w/Quote
#3 Report this post to a moderator
Support Apolyton, buy Civilization III: Complete

Yes... That requires SLIC, but should be possible.

Roughly, you should create a building with no other effects, and make a SLIC trigger to check through all the cities for a player and give PW for each with the building.

If you need any more specific SLIC help ask... I'm not sure about checking whether a city contains a given building but it must be doable.

Flandrien is offline Flandrien
King
Belgium
May 2000
time: 06:21
  Old Post 21-09-2002 00:24
Edit/Delete Message Reply w/Quote
#4 Report this post to a moderator
Support Apolyton

You may be out of luck.
SLIC has a SetPW function, but I did not find an AddPW function.

Grandpa Troll is offline Grandpa Troll

Immortal
I owe..I owe..it's off to work I go
Jul 2000
time: 00:21
  Old Post 21-09-2002 00:42
Edit/Delete Message Reply w/Quote
#5 Report this post to a moderator
Support Apolyton, buy Galactic Civilizations

quote:
Originally posted by J Bytheway
Yes... That requires SLIC, but should be possible.

Roughly, you should create a building with no other effects, and make a SLIC trigger to check through all the cities for a player and give PW for each with the building.

If you need any more specific SLIC help ask... I'm not sure about checking whether a city contains a given building but it must be doable.


Look, I am not an expert or even a Novice with SLIC but want to learn. From what I am reading, was wondering if this would be possible:
Take a building, say "University", could you make it so whenever that particular building was built, it would give say 1000 PW or could you make it so it would give say "?" PW per citizen or are there any other viable options available. What I am looking for is some setup similiar to Gold bonus's with PW bonus's instead.

Thanks

Troll

J Bytheway is offline J Bytheway
Emperor
England
Jul 2001
time: 05:21
  Old Post 21-09-2002 16:35 Visit J Bytheway's homepage!
Edit/Delete Message Reply w/Quote
#6 Report this post to a moderator
Browse Apolyton AD-FREE

quote:
Originally posted by Maestro
You may be out of luck.
SLIC has a SetPW function, but I did not find an AddPW function.


That's OK, you use something like:

code:
SetPW(player.publicworkslevel + AddThisPW)


Troll:

Basically you should be able to do this, the trigger would be something like the following (note that I've not tested this and it's a long time since I've SLICed, so it may well be totally wrong, and will almost certainly have bugs...):

code:
trigger 'AddUniPW' when(city.beginturn) { if (CityHasBuilding(city, "IMPROVE_UNIVERSITY") { SetPlayer(1, city.owner); SetPW(player.1.publicworkslevel + 10); } }


That should make universities give 10PW per turn each. By changing that line to:
code:
SetPW(player.1.publicworkslevel + 10 * city.population);

You should be able to get 10 PW per turn per population.

Grandpa Troll is offline Grandpa Troll

Immortal
I owe..I owe..it's off to work I go
Jul 2000
time: 00:21
  Old Post 21-09-2002 17:19
Edit/Delete Message Reply w/Quote
#7 Report this post to a moderator
Enter the AD-FREE zone

quote:
Originally posted by J Bytheway


That's OK, you use something like:
code:
SetPW(player.publicworkslevel + AddThisPW)


Troll:

Basically you should be able to do this, the trigger would be something like the following (note that I've not tested this and it's a long time since I've SLICed, so it may well be totally wrong, and will almost certainly have bugs...):

code:
trigger 'AddUniPW' when(city.beginturn) { if (CityHasBuilding(city, "IMPROVE_UNIVERSITY") { SetPlayer(1, city.owner); SetPW(player.1.publicworkslevel + 10); } }


That should make universities give 10PW per turn each. By changing that line to:
code:
SetPW(player.1.publicworkslevel + 10 * city.population);

You should be able to get 10 PW per turn per population.


MY addiction..I mean my WANT to play MP CTP1 today outweighs my desire to try this now, however,I shall soon!
Thanks much my friend!

I am taking it that you simply add to end of slic?

~Peace~
Troll

Attachment: downloading.gif
This has been downloaded 59 time(s).

J Bytheway is offline J Bytheway
Emperor
England
Jul 2001
time: 05:21
  Old Post 22-09-2002 15:50 Visit J Bytheway's homepage!
Edit/Delete Message Reply w/Quote
#8 Report this post to a moderator
Full PM-box? Change here!

quote:
Originally posted by Troll
I am taking it that you simply add to end of slic?


That's the easy way. You can also create your own SLIC file and #include it at the end of script.slc.

Grandpa Troll is offline Grandpa Troll

Immortal
I owe..I owe..it's off to work I go
Jul 2000
time: 00:21
  Old Post 20-10-2002 07:09
Edit/Delete Message Reply w/Quote
#9 Report this post to a moderator
Get a bigger avatar today!

I tried adding the one line where you get "pw" per citizen, but you get an error that states that you have a syntax error.."script.slc :1 : syntax error"

Any suggestions?

Thanks!

Troll


FYI, I tried creating my own scenario.slc but it crashed, then I added this line to the end of the script.slc..am I in wrong directory?

Thanks for any/all help!

Troll

J Bytheway is offline J Bytheway
Emperor
England
Jul 2001
time: 05:21
  Old Post 20-10-2002 07:13 Visit J Bytheway's homepage!
Edit/Delete Message Reply w/Quote
#10 Report this post to a moderator
Support Apolyton buy from Amazon

You'll need to add the whole trigger with the SetPW line replaced by the other one - the latter line alone will not work.

Grandpa Troll is offline Grandpa Troll

Immortal
I owe..I owe..it's off to work I go
Jul 2000
time: 00:21
  Old Post 20-10-2002 07:20
Edit/Delete Message Reply w/Quote
#11 Report this post to a moderator
Support Apolyton, buy Galactic Civilizations

Ok, I did that, now I get this error:

"city.beginturn is not a builtin variable and is using dot notation"

Ok, any advice my friend free oncall experts?

J Bytheway is offline J Bytheway
Emperor
England
Jul 2001
time: 05:21
  Old Post 20-10-2002 07:46 Visit J Bytheway's homepage!
Edit/Delete Message Reply w/Quote
#12 Report this post to a moderator
Support Apolyton, buy Civilization III: Complete

OK, I don't know where I picked up that from - it's not listed anywhere in the documentation. Try:

code:
trigger 'AddUniPW' when(g.player) { SetPlayer(1, g.player); i=0; while (i < player.1.cities) { SetCityByIndex(1, player.1, i); if (CityHasBuilding(city, "IMPROVE_UNIVERSITY") { SetPW(player.1.publicworkslevel + 10 * city.population); } i = i + 1; } }

Grandpa Troll is offline Grandpa Troll

Immortal
I owe..I owe..it's off to work I go
Jul 2000
time: 00:21
  Old Post 20-10-2002 08:15
Edit/Delete Message Reply w/Quote
#13 Report this post to a moderator
Put an end to popups!

Now I get this message, keeping in mind I copied and pasted your script into the script.slc file in default/gamedata/script.slc and recieved an error message as follows:

default/gamedata/script.slc:2 syntax error

Hmm, got me, thanks for all your help though

J Bytheway is offline J Bytheway
Emperor
England
Jul 2001
time: 05:21
  Old Post 20-10-2002 15:36 Visit J Bytheway's homepage!
Edit/Delete Message Reply w/Quote
#14 Report this post to a moderator
Support Apolyton, buy Civilization III: Complete

What is line 2 in script.slc?

J Bytheway is offline J Bytheway
Emperor
England
Jul 2001
time: 05:21
  Old Post 20-10-2002 15:59 Visit J Bytheway's homepage!
Edit/Delete Message Reply w/Quote
#15 Report this post to a moderator
Support Apolyton, buy Call to Power 2

Hmm... I've been experimenting, and I found a missing close bracket on that 'if' line, but even after fixing that I still got the strange error. However, after fiddling around I could make this work:

code:
trigger 'AddUniPW' when(g.player) { SetPlayer(1, g.player); i=0; while (i < player.1.cities) { SetCityByIndex(1, player.1, i); if (CityHasBuilding(city, "IMPROVE_UNIVERSITY")) { SetPW(player.1, player.1.publicworkslevel + 10 * city.population); } i = i + 1; } }


And I can't tell what else I changed, but never mind.

Grandpa Troll is offline Grandpa Troll

Immortal
I owe..I owe..it's off to work I go
Jul 2000
time: 00:21
  Old Post 20-10-2002 17:25
Edit/Delete Message Reply w/Quote
#16 Report this post to a moderator
Increase Your PM Length

YAHOO!

Thanks sooo much!!

Now, {clearing throat} I can now experiment having your code as a basis, I ma now ready to crash my game..er..um..I mean learn to properly write code

It works, U R Da Man and in honor of you, I shall name my 100th city, (Hey in Trolldom, it IS quite an HONOR!! ) after you!!

Now, I am headed to church and when I return, I am off and running!!
Oh and since Mail isnt running this date, your "IT Consultant Fee" SHOULD be in the mail maybe..tommorrow..perhaps..hmm..

WOW, I even feel writing this, because as Ren and Stimpy say to each other..I feel like such an

Thanks again my friend!!
I shall keep you posted!!

Later!!

Troll

Grandpa Troll is offline Grandpa Troll

Immortal
I owe..I owe..it's off to work I go
Jul 2000
time: 00:21
  Old Post 21-10-2002 08:33
Edit/Delete Message Reply w/Quote
#17 Report this post to a moderator
HOLD DA PRESSES!!!!!!!!!!! Suffering from ads?

Ugh!

This code works fine with one exception, it gives the pW ok, but only one time!

I would like it to do it each turn, is this possible?

I looked through all the scripts of slc and couldnt see what exactly to put to achieve such a task.

I was reading an article on Scripting from Joe Rumsey-June 18, 1998 (I think he went by the name of MR.Ogre-a CTP Programmer) and it had some interesting points, it stated that when both g.player AND unit.built are listed, the trigger will ONLY be checked when the unit is built.
I was thinking that this is probably the same for improvements, you only get the additional PW ONCE, that being when a University is built.

I also noticed some remarks about "LOOPING", which I am making a stab-in-the-dark, that this would mean the trigger would actually "LOOP" or re-occur?..My question is "HOW"?

Hmm, lots of learning to do, but am looking for any/all input!!

~Peace~

Troll

J Bytheway is offline J Bytheway
Emperor
England
Jul 2001
time: 05:21
  Old Post 21-10-2002 12:28 Visit J Bytheway's homepage!
Edit/Delete Message Reply w/Quote
#18 Report this post to a moderator
Support Apolyton, pre-order Civilization IV

eh? I'm sure it repeated correctly for me. I'll go check again. There's no reason I can see that it won't work again...

J Bytheway is offline J Bytheway
Emperor
England
Jul 2001
time: 05:21
  Old Post 21-10-2002 12:39 Visit J Bytheway's homepage!
Edit/Delete Message Reply w/Quote
#19 Report this post to a moderator
Lose 30 kilos (of popups)

It's certainly repeating correctly for me. Are you getting it just once ever, or just once for each city? What if two cities build their universities on the same turn?

Grandpa Troll is offline Grandpa Troll

Immortal
I owe..I owe..it's off to work I go
Jul 2000
time: 00:21
  Old Post 21-10-2002 17:49
Edit/Delete Message Reply w/Quote
#20 Report this post to a moderator
Got spare money?

quote:
Originally posted by J Bytheway
It's certainly repeating correctly for me. Are you getting it just once ever, or just once for each city? What if two cities build their universities on the same turn?


Wll, I have right now 39 cities built and was monitoring actual "PW" bank and noticed for 3 turns it stayed at 500 pw, but will go back and monitor closely, HEY, it was late, maybe I was seeing things..

Ill repost to verify and get back.....

Thanks!

Troll

J Bytheway is offline J Bytheway
Emperor
England
Jul 2001
time: 05:21
  Old Post 21-10-2002 18:06 Visit J Bytheway's homepage!
Edit/Delete Message Reply w/Quote
#21 Report this post to a moderator
Support Apolyton, buy Civilization III: Complete

Remember that if you have a saved game from before you made the change you must reload SLIC for the changes to take effect. Do this by opening the chat window (with the apostrophe) and typing /reloadslic

Grandpa Troll is offline Grandpa Troll

Immortal
I owe..I owe..it's off to work I go
Jul 2000
time: 00:21
  Old Post 21-10-2002 18:17
Edit/Delete Message Reply w/Quote
#22 Report this post to a moderator
Enter the AD-FREE zone

quote:
Originally posted by J Bytheway
Remember that if you have a saved game from before you made the change you must reload SLIC for the changes to take effect. Do this by opening the chat window (with the apostrophe) and typing /reloadslic


Ok Thanks!!

Now, (BIG SHEEPISH GRIN) It is working correctly now, and I guess what I must have done was sleep and for whatever reason when I woke up, forgot to open my eyes!!!

Thanks for all the help!!

On another issue, did you see my post on canals?




~Peace~

Troll

Grandpa Troll is offline Grandpa Troll

Immortal
I owe..I owe..it's off to work I go
Jul 2000
time: 00:21
  Old Post 21-10-2002 19:21
Edit/Delete Message Reply w/Quote
#23 Report this post to a moderator
Browse Apolyton AD-FREE

[QUOTE] Originally posted by J Bytheway


code:
trigger 'AddUniPW' when(g.player) { SetPlayer(1, g.player); i=0; while (i < player.1.cities) { SetCityByIndex(1, player.1, i); if (CityHasBuilding(city, "IMPROVE_UNIVERSITY")) { SetPW(player.1, player.1.publicworkslevel + 10 * city.population); } i = i + 1; } }




Ok, In the above trigger, if I wanted to also make an additional building do the same, I see where you need the exact city improvement name, but also saw where you had 'AddUniPW' ...is the "UNI" in that just an abbreviation and say if I had for instance marketplace could I put Baz..I believe Bazaar is the entry..

Just asking..

Thanks

Troll

J Bytheway is offline J Bytheway
Emperor
England
Jul 2001
time: 05:21
  Old Post 21-10-2002 19:27 Visit J Bytheway's homepage!
Edit/Delete Message Reply w/Quote
#24 Report this post to a moderator
Enter the AD-FREE zone

The name 'AddUniPW' could be anything at all - so long as it's different from the names of all the other triggers. You could use 'AddBuildingPW' If your trigger covers more than one building, or 'TrollsAmazingZoonyTrigger' if you wanted to be strange.

The only place where you'll ever use this name is when you cancel a trigger (so that it won't execute any more).

Grandpa Troll is offline Grandpa Troll

Immortal
I owe..I owe..it's off to work I go
Jul 2000
time: 00:21
  Old Post 22-10-2002 01:45
Edit/Delete Message Reply w/Quote
#25 Report this post to a moderator
Support Apolyton, buy GURPS/ Alpha Centauri

quote:
Originally posted by J Bytheway
The name 'AddUniPW' could be anything at all - so long as it's different from the names of all the other triggers. You could use 'AddBuildingPW' If your trigger covers more than one building, or 'TrollsAmazingZoonyTrigger' if you wanted to be strange.

The only place where you'll ever use this name is when you cancel a trigger (so that it won't execute any more).


Whats wrong with 'TrollsAmazingZoonyTrigger'



Ok, so I could put anything, understood, and now if I want to I can add an additional building!

Really Appreciate the help

Troll

Grandpa Troll is offline Grandpa Troll

Immortal
I owe..I owe..it's off to work I go
Jul 2000
time: 00:21
  Old Post 22-10-2002 06:58
Edit/Delete Message Reply w/Quote
#26 Report this post to a moderator
Increase the size of your Attachments

Wow!
Thanks for advice, I well..YOU showed me how and although it is a real baby step, did my first and it works fine!
I made granary "SILO" as an additional PW providing structure.
The way i figure is that even in real life (Which of Course TROLLDOM is) there are many ways of providing PW, some through taxes and some through bonds and well, even some from other civs..er..I mean municipalities assisiting ones growth.

Well, I shall ponder other possible triggers!!



Peace

Troll

  < 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:
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.0625 seconds (92.88% PHP - 7.12% 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