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 > Triggering on UI componants
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
Peter Triggs is offline Peter Triggs
Prince
Gone Fishin, Canada
Jan 2000
time: 05:16
  Old Post 26-11-2001 03:55
Edit/Delete Message Reply w/Quote
#1 Report this post to a moderator
Triggering on UI componants Browse Apolyton AD-FREE

There's a special trigger construct:

#
There is also a special format for triggering by UI components:

Trigger 'name' on "UI Component Name" when (expression) {

commands

}

It behaves in the same way as the normal format, except that it is only evaluated when the UI component is used. The name follows the same rules as for message boxes.
The body of the trigger is executed only when the expression is true (not equal to 0).
#


For example:

code:
trigger 'NewTreatyData' on "DipWizard.Stage1.Tabs.Treaty.TabButton" when (1) { message(g.player,'TreatyLength'); }


will send a message to the game player when he clicks on the 'Treaty' tab in the process of forming a new proposal. (It will ask him to set a length for the treaty.) But this is a bit awkward, it would be better to trigger the message when the game player clicks on the name of the actual treaty (which is some kind of list element). Does anyone know how to do this, or if it's possible? (I suppose these list elements might not count as UI componants.)

Immortal Wombat is offline Immortal Wombat
Prince
in perpetuity
Dec 2000
time: 05:16
  Old Post 26-11-2001 04:30 Visit Immortal Wombat's homepage!
Edit/Delete Message Reply w/Quote
#2 Report this post to a moderator
Support Apolyton, buy Galactic Civilizations

You're asking if anyone else knows more about the ingame mechanics with relation to SLIC than you do? Good luck.

I would suspect they do not count as UI components How do you find out this stuff anyway?

Peter Triggs is offline Peter Triggs
Prince
Gone Fishin, Canada
Jan 2000
time: 05:16
  Old Post 26-11-2001 05:34
Edit/Delete Message Reply w/Quote
#3 Report this post to a moderator
Got spare money?

In this case (and actually in lots of others) from Winnie's tut2_*** files. She had to deal with so many events that you can find tons of simple working examples there. I just came across this the other day, there's probably still lots of stuff to be excavated from those files.

Peter Triggs is offline Peter Triggs
Prince
Gone Fishin, Canada
Jan 2000
time: 05:16
  Old Post 26-11-2001 06:52
Edit/Delete Message Reply w/Quote
#4 Report this post to a moderator
Get a bigger avatar today!

Got it. (Slaps head!) You know about the 'programming CTP2 experience': "Just one more try and before you know it ...".


It should have triggered when the game player clicked on "DipWizard.Stage1.Tabs.Treaty.TabPanel". This should open up a whole bunch of new possibilities, maybe like ditching some of lesser user proposals (e.g., request end embargo) in favour of something like "request strategic resource".

Immortal Wombat is offline Immortal Wombat
Prince
in perpetuity
Dec 2000
time: 05:16
  Old Post 26-11-2001 23:26 Visit Immortal Wombat's homepage!
Edit/Delete Message Reply w/Quote
#5 Report this post to a moderator
Full PM-box? Change here!

quote:
Originally posted by Peter Triggs
Got it. (Slaps head!) You know about the 'programming CTP2 experience': "Just one more try and before you know it ...".

Amazing how inspiration strikes at 2am

quote:

It should have triggered when the game player clicked on "DipWizard.Stage1.Tabs.Treaty.TabPanel". This should open up a whole bunch of new possibilities...

Aha, I found the triggers in tut2_main.slc finally. I had searched the PC for *.slc files with DipWizard in them, evidently Winnie doesn't use that one...

quote:

...maybe like ditching some of lesser user proposals (e.g., request end embargo) in favour of something like "request strategic resource".

Time to make some new goods sprites?

Peter Triggs is offline Peter Triggs
Prince
Gone Fishin, Canada
Jan 2000
time: 05:16
  Old Post 27-11-2001 05:43
Edit/Delete Message Reply w/Quote
#6 Report this post to a moderator
Increase the size of your Attachments

Soon I guess, but I've got to finish off this NewDiplomod first. It's becoming a bit gargantuan.

And I may be away for a few days. I seem to have picked up some debilitating flu bug that makes it very difficult to stay awake.

The Big Mc is offline The Big Mc
King
Of the universe / England
Oct 2001
time: 05:16
  Old Post 27-11-2001 17:44 Visit The Big Mc's homepage!
Edit/Delete Message Reply w/Quote
#7 Report this post to a moderator
Support Apolyton, buy Alpha Centauri

right just strike me down if I got the wrong end of the stick but what your taking about is altering the things in the diplomacy window like request city and that stuff.

if so how about a slave free idea were you ask the AI or the AI ask you for some of its enslaved people back.

Immortal Wombat is offline Immortal Wombat
Prince
in perpetuity
Dec 2000
time: 05:16
  Old Post 27-11-2001 19:36 Visit Immortal Wombat's homepage!
Edit/Delete Message Reply w/Quote
#8 Report this post to a moderator
Help yourself to an AD-FREE life

Get well soon Peter We need your SLIC

quote:
Originally posted by The Big Mc
if so how about a slave free idea were you ask the AI or the AI ask you for some of its enslaved people back.

LET MY PEOPLE GO!!



Depends on what Peter has in mind I think perhaps he is intending for something else, but that would certainly be viable if you can find a way to SLIC it. (using abolitionist-type SLIC perhaps)

The Big Mc is offline The Big Mc
King
Of the universe / England
Oct 2001
time: 05:16
  Old Post 27-11-2001 20:27 Visit The Big Mc's homepage!
Edit/Delete Message Reply w/Quote
#9 Report this post to a moderator
Remove this text

well I did get the right end of the stick. I will see if I can do it my self and then post the slic here if peter wants it

ang get well soon

Immortal Wombat is offline Immortal Wombat
Prince
in perpetuity
Dec 2000
time: 05:16
  Old Post 29-11-2001 03:25 Visit Immortal Wombat's homepage!
Edit/Delete Message Reply w/Quote
#10 Report this post to a moderator
Browse Apolyton AD-FREE

quote:
Originally posted by Peter Triggs
Soon I guess, but I've got to finish off this NewDiplomod first. It's becoming a bit gargantuan.

Would it lighten the load if I went over the good placement SLIC from before and sorted that all out? I can't handle the AI just yet, but I think I've got the rest of it complete, and working. I basically just need to figure out how to identify trade routed.

The Big Mc is offline The Big Mc
King
Of the universe / England
Oct 2001
time: 05:16
Talking  Old Post 29-11-2001 15:46 Visit The Big Mc's homepage!
Edit/Delete Message Reply w/Quote
#11 Report this post to a moderator
Full PM-box? Change here!

you two have been round a bit have you seen an of the layouts with the tile improvement layout on them.

I still have a few new good ideas about what to ask the AI like give me some public works and give me that fort of yours.

Immortal Wombat is offline Immortal Wombat
Prince
in perpetuity
Dec 2000
time: 05:16
  Old Post 30-11-2001 04:19 Visit Immortal Wombat's homepage!
Edit/Delete Message Reply w/Quote
#12 Report this post to a moderator
Full PM-box? Change here!

No access to GoodsDB in SLIC

Tile improvements methinks.

The Big Mc is offline The Big Mc
King
Of the universe / England
Oct 2001
time: 05:16
  Old Post 30-11-2001 14:15 Visit The Big Mc's homepage!
Edit/Delete Message Reply w/Quote
#13 Report this post to a moderator
Support Apolyton, buy Galactic Civilizations

I was looking for the layout of the toolbar were the farms and every thing on but could not find them I was hoping you could help.

Martin Gühmann is offline Martin Gühmann
Emperor
Berlin, Germany
Mar 2001
time: 06:16
Post  Old Post 30-11-2001 21:20 Visit Martin Gühmann's homepage!
Edit/Delete Message Reply w/Quote
#14 Report this post to a moderator
Support Apolyton, buy Call to Power 2

quote:
Originally posted by Immortal Wombat
No access to GoodsDB in SLIC


Yes there is no DB that is called GoodsDB it is called or from the slic documentation it should be called ResourceDB. I found in the slic documentaion an example that mentioned the GoodDB instead of ResourceDB or GoodsDB. But I think ResourceDB is the entry that works, as I found it in the ctp2.exe.

quote:
Originally posted by The Big Mc
I was looking for the layout of the toolbar were the farms and every thing on but could not find them I was hoping you could help.


I guess you like to add some Tile Improvements, take a look into the tileimp.txt. You will find some entries like:

Class
Level
Column

Possible entries for Class are:

Land Tile Improvements (Classes defines the column)

Farm ATM Mine Road
Level 1
Level 2
Level 3

Ocean Tile Improvements

OceanFarm OceanATM OceanMine OceanRoad
Level 1
Level 2
Level 3

Other Tile Improvements

Structure1 Structure2 LandDetector OceanDetector
Level 1
Level 2
Level 3

Terraforming

Class is Terraform

Column 1 Column 2 Column3 Column 4
Level 1
Level 2
Level 3

So you can fill the gaps in the TIs button bank.

Note you can you can use Levels higher than three but these buttons wouldn't be shown in the user interface only the AI would have access to these TIs.

Another way to add more TIs would be to make less advanced TIs obsolate. Usually I don't build farms instead of hydroponic farms in the late game. And I know the AI builds the most advanced TIs anyway.

-Martin

Immortal Wombat is offline Immortal Wombat
Prince
in perpetuity
Dec 2000
time: 05:16
  Old Post 30-11-2001 22:40 Visit Immortal Wombat's homepage!
Edit/Delete Message Reply w/Quote
#15 Report this post to a moderator
Support Apolyton, buy Civilization 2

quote:
Originally posted by Martin Gühmann

Yes there is no DB that is called GoodsDB it is called or from the slic documentation it should be called ResourceDB. I found in the slic documentaion an example that mentioned the GoodDB instead of ResourceDB or GoodsDB. But I think ResourceDB is the entry that works, as I found it in the ctp2.exe.

Ah, thanks Martin, I was sure I'd see it used, but I couldn't find it anywhere. I'll try that again, it will save a lot of time if I can get it to work.

Big mc, sorry, I had no idea before, I think the UI file you are looking for is controlpanel.ldl. Search through it for FARM, or MINE or something, and try to make some sense of it.

The Big Mc is offline The Big Mc
King
Of the universe / England
Oct 2001
time: 05:16
  Old Post 03-12-2001 17:46 Visit The Big Mc's homepage!
Edit/Delete Message Reply w/Quote
#16 Report this post to a moderator
Support Apolyton buy from Amazon

thanks I will have a look at that I will get back to you on what I find if any thing

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