November 25, 2001, 18:55
|
#1
|
King
Local Time: 17:29
Local Date: October 31, 2010
Join Date: Jan 2000
Location: Gone Fishin, Canada
Posts: 1,059
|
Triggering on UI componants
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.)
|
|
|
|
November 25, 2001, 19:30
|
#2
|
Prince
Local Time: 18:29
Local Date: October 31, 2010
Join Date: Dec 2000
Location: in perpetuity
Posts: 4,962
|
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?
|
|
|
|
November 25, 2001, 20:34
|
#3
|
King
Local Time: 17:29
Local Date: October 31, 2010
Join Date: Jan 2000
Location: Gone Fishin, Canada
Posts: 1,059
|
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.
|
|
|
|
November 25, 2001, 21:52
|
#4
|
King
Local Time: 17:29
Local Date: October 31, 2010
Join Date: Jan 2000
Location: Gone Fishin, Canada
Posts: 1,059
|
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".
|
|
|
|
November 26, 2001, 14:26
|
#5
|
Prince
Local Time: 18:29
Local Date: October 31, 2010
Join Date: Dec 2000
Location: in perpetuity
Posts: 4,962
|
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?
|
|
|
|
November 26, 2001, 20:43
|
#6
|
King
Local Time: 17:29
Local Date: October 31, 2010
Join Date: Jan 2000
Location: Gone Fishin, Canada
Posts: 1,059
|
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.
|
|
|
|
November 27, 2001, 08:44
|
#7
|
King
Local Time: 17:29
Local Date: October 31, 2010
Join Date: Oct 2001
Location: Of the universe / England
Posts: 2,061
|
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.
__________________
"Every time I learn something new it pushes some old stuff out of my brain" Homer Jay Simpson
The BIG MC making ctp2 a much unsafer place.
Visit the big mc’s website
|
|
|
|
November 27, 2001, 10:36
|
#8
|
Prince
Local Time: 18:29
Local Date: October 31, 2010
Join Date: Dec 2000
Location: in perpetuity
Posts: 4,962
|
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)
|
|
|
|
November 27, 2001, 11:27
|
#9
|
King
Local Time: 17:29
Local Date: October 31, 2010
Join Date: Oct 2001
Location: Of the universe / England
Posts: 2,061
|
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
__________________
"Every time I learn something new it pushes some old stuff out of my brain" Homer Jay Simpson
The BIG MC making ctp2 a much unsafer place.
Visit the big mc’s website
|
|
|
|
November 28, 2001, 18:25
|
#10
|
Prince
Local Time: 18:29
Local Date: October 31, 2010
Join Date: Dec 2000
Location: in perpetuity
Posts: 4,962
|
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.
|
|
|
|
November 29, 2001, 06:46
|
#11
|
King
Local Time: 17:29
Local Date: October 31, 2010
Join Date: Oct 2001
Location: Of the universe / England
Posts: 2,061
|
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.
__________________
"Every time I learn something new it pushes some old stuff out of my brain" Homer Jay Simpson
The BIG MC making ctp2 a much unsafer place.
Visit the big mc’s website
|
|
|
|
November 29, 2001, 19:19
|
#12
|
Prince
Local Time: 18:29
Local Date: October 31, 2010
Join Date: Dec 2000
Location: in perpetuity
Posts: 4,962
|
No access to GoodsDB in SLIC
Tile improvements methinks.
|
|
|
|
November 30, 2001, 05:15
|
#13
|
King
Local Time: 17:29
Local Date: October 31, 2010
Join Date: Oct 2001
Location: Of the universe / England
Posts: 2,061
|
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.
__________________
"Every time I learn something new it pushes some old stuff out of my brain" Homer Jay Simpson
The BIG MC making ctp2 a much unsafer place.
Visit the big mc’s website
|
|
|
|
November 30, 2001, 12:20
|
#14
|
Super Moderator
Local Time: 19:29
Local Date: October 31, 2010
Join Date: Mar 2001
Location: Tübingen, Germany
Posts: 6,206
|
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
__________________
Civ2 military advisor: "No complaints, Sir!"
|
|
|
|
November 30, 2001, 13:40
|
#15
|
Prince
Local Time: 18:29
Local Date: October 31, 2010
Join Date: Dec 2000
Location: in perpetuity
Posts: 4,962
|
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.
|
|
|
|
December 3, 2001, 08:46
|
#16
|
King
Local Time: 17:29
Local Date: October 31, 2010
Join Date: Oct 2001
Location: Of the universe / England
Posts: 2,061
|
thanks I will have a look at that I will get back to you on what I find if any thing
__________________
"Every time I learn something new it pushes some old stuff out of my brain" Homer Jay Simpson
The BIG MC making ctp2 a much unsafer place.
Visit the big mc’s website
|
|
|
|
Posting 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
|
|
|
All times are GMT -4. The time now is 13:29.
|
|