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 > Offer City Bug
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
Pedrunn is offline Pedrunn
King
of Natal, Brazil
Jul 2001
time: 02:22
  Old Post 28-08-2002 16:01
Edit/Delete Message Reply w/Quote
#1 Report this post to a moderator
Offer City Bug Full PM-box? Change here!

This weekend a brazilian player came to me asking a solution for a bug in the city offer. I tried to solve his problem but i did no find a good solution.
He told me that when you have too many cities in your empire the most recently created cities dont appear in the list of cities to give.
I went deep into this problem and i found out that really there is such bug and it is caused by the screen size. When you have 48 cities or more the list is so long that goes from the top to the bottom of the screen. Hiding the ones with index bigger than this number.
I think there may something in the UI to change this, create a scroll bar aside the list or invert the list to only hide the most antique ones and sho the more recent.
But my efforts didnt help nothing so i wanna know if anyone has a clue to fix this?

Here is a screenshot to ilustrate the bug:

Attachment: citybug.jpg
This has been downloaded 79 time(s).

HuangShang is offline HuangShang
King
USA, SoCal, L.A.
Jul 2002
time: 21:22
  Old Post 28-08-2002 21:21
Edit/Delete Message Reply w/Quote
#2 Report this post to a moderator
Got spare money?

wow thats some map.....

i never had trouble like that though

Locutus is offline Locutus
ACS CTP1/2 Manager & Civ4 Co-Manager
Hengelo, The Netherlands
Nov 1999
time: 06:22
  Old Post 28-08-2002 22:55 Visit Locutus<br><img src=/forums/images/staff-icon.gif>'s homepage!
Edit/Delete Message Reply w/Quote
#3 Report this post to a moderator
Support Apolyton, buy Galactic Civilizations: Deluxe Edition

It's been tried before, without succes...

Do what I did, buy a screen which supports a higher screen resolution

Pedrunn is offline Pedrunn
King
of Natal, Brazil
Jul 2001
time: 02:22
  Old Post 28-08-2002 23:26
Edit/Delete Message Reply w/Quote
#4 Report this post to a moderator
Lose 30 kilos (of popups)

actuall CTP2 only plays as 800 x 600 res.

But i am pretty sure there is a way using slic. I have PMed Peter Triggs to this mean since he is the best with diplomacy.

Yet you may figure this out:
Peter in his diplomod made messages pop up when selecting a treaty (if you tried the NewDiplomod you will remember) saying if you want a short, a long or a unlimited agreement (remembered?)
But i cant figure out in his amost 6000 lines code wich event is triggered when the diplomatic option is selected to make the message pop up.
Do you or anyone know wich event does that?

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

No it doesn't, I have it running on 1200x1600...
(if it really doesn't let you change it in the Screen Size menu, try changing userprofile.txt, or else the windows registry, if it's not in there - that's how I got Civ3 to run at 1200x1600...)

And if you can pop a message to pop up, then what? Scroll through 200 messages to find the right city? You can only fit 2 or 3 cityname buttons on a single message (on average, with clever coding)... I suppose it's possible but...

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

quote:
Originally posted by Locutus
No it doesn't, I have it running on 1200x1600...
(if it really doesn't let you change it in the Screen Size menu, try changing userprofile.txt, or else the windows registry, if it's not in there - that's how I got Civ3 to run at 1200x1600...)


Err... Civ3?

It is in the userprofile, too. But first I would use the in game resolution settings (that must be somewhere in the option box) and try a higher resolution, oh and of course disable try windows resolution.

-Martin

Locutus is offline Locutus
ACS CTP1/2 Manager & Civ4 Co-Manager
Hengelo, The Netherlands
Nov 1999
time: 06:22
  Old Post 29-08-2002 02:19 Visit Locutus<br><img src=/forums/images/staff-icon.gif>'s homepage!
Edit/Delete Message Reply w/Quote
#7 Report this post to a moderator
Support Apolyton buy from Amazon

Civ3 has a similar file (IIRC it even has the same name )...

Peter Triggs is offline Peter Triggs
Prince
Gone Fishin, Canada
Jan 2000
time: 05:22
  Old Post 29-08-2002 02:54
Edit/Delete Message Reply w/Quote
#8 Report this post to a moderator
Support Apolyton, buy Civilization 2

Pedrunn,

These are the triggers you were looking for:

code:
// these two set a treaty length when the human offers a treaty: trigger 'NewTreatyDataInitialProp' on "DipWizard.Stage1.Tabs.Treaty.TabPanel" when (1) {//initial proposal message(g.player,'TreatyLength'); } trigger 'NewTreatyDataFollowingProp' on "DipWizard.Stage2.Tabs.Treaty.TabPanel" when (1) {//secondary proposal message(g.player,'TreatyLength'); } alertbox 'TreatyLength' { Text (ID_TreatyTypeM); Button(ID_unlimited){ NDM_TREATY_LENGTH=999; kill(); } Button(ID_medium){ NDM_TREATY_LENGTH=60; kill(); } Button(ID_short){ NDM_TREATY_LENGTH=30; kill(); } }


They're (obviously) not normal event handlers but rather:

quote:
[from Joe's SLIC1 documentation]

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).


IIRC, most (all?) of the examples in the shipped game have as a UI Component Name, a path leading to a button of one sort or another. I got lucky and found the TabPanel that had the treaties on it. But even if you could find the component that has the city names on it, like Locutus says I can't see what you could do with it. (I couldn't trigger on individual names, only on the list.)

mapfi is offline mapfi
Prince
Zurich, Switzerland
Jul 2002
time: 06:22
  Old Post 29-08-2002 16:28
Edit/Delete Message Reply w/Quote
#9 Report this post to a moderator
Support Apolyton, buy Call to Power 2

go into the option dialog at the beginning of the game, one of the option boxes is labelled graphics - in there you can there's a button for game resolution, offers up to 2048x1536 - some screen that would be! I have it running at 1024x768...
You need to restart the game for the changes to take effect!

Something related I've been wondering about :
In the same option box there's a slider for speed set at the second notch from the left and it's got 10 notches! Anybody ever saw changes of that have any effect? -not me...

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

quote:
Originally posted by mapfi
in there you can there's a button for game resolution, offers up to 2048x1536 - some screen that would be! I have it running at 1024x768...
You need to restart the game for the changes to take effect!

Actually, what settings are available depends on what settings Windows supports. For me it's 1600x1200 (although I'm sure I could crank it up a few notches if I wanted to - but 1600x1200 is big enough for me ). I was assuming Pedrunn was aware of this screen and 80x600 was the highest setting available in this screen. If so, my suggestion of changing userprofile.txt might work since even if Windows doesn't support a resolution, it doesn't mean the monitor doesn't either. Whether or not you need to restart your PC also depends on your Windows settings - for me this is only the case for the higher resolutions.

quote:
In the same option box there's a slider for speed set at the second notch from the left and it's got 10 notches! Anybody ever saw changes of that have any effect? -not me...

You mean unit speed? Yes, try setting it at the highest setting...

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

unit speed?? is that it? What an idea to just label that speed (at least in the german version) with no clue to which side is actually faster (it's to the right)
ok, it's got an effect - I see it -

(maybe it didn't have one on my old pII200?)

Doesn't windows support those resolutions that your graphic card does - so after trying to change it in userprofile to a higher setting than that the game will not display because of the card?

Pedrunn is offline Pedrunn
King
of Natal, Brazil
Jul 2001
time: 02:22
  Old Post 29-08-2002 18:27
Edit/Delete Message Reply w/Quote
#12 Report this post to a moderator
Full PM-box? Change here!

I made it.
I made a variation of the offer city concept in order to fix this bug.
This may not be too good but still is what my brazilian friend is requiring.
To give a city the list dont appear anymore. So you must select the city you want to give before open the diplomatic screen.
Here is the code

code:
city_t OfferedCity; int_t CityIsSelected; int_t NewGiveCityOptionEnabled; HandleEvent(CitySelected) 'FixForGiveCityBug' post { if(CityIsValid(city[0])) { player[0] = g.player; CityIsSelected = 1; OfferedCity = city[0]; message(player[0], 'SelectedCityToOffer'); } } HandleEvent(CityDeselected) 'FixForGiveCityBug' post { if(CityIsValid(city[0])) { player[0] = g.player; CityIsSelected = 0; message(player[0], 'DeselectedCityToOffer'); } } trigger 'NewGiveCityOption' on "DipWizard.Stage1.Tabs.Offer.TabPanel" when (1) {//initial proposal if(CityIsSelected == 1) { message(g.player,'PedrunnsWayToGiveCitymsg'); } else{ message(g.player,'YouMustSelectACity'); } } alertbox 'PedrunnsWayToGiveCitymsg' { text(ID_PEDRUNN_GIVES_CITY); // "The city of {OfferedCity.name} is selected. Do you want to Give this City" show(); NewGiveCityOptionEnabled = 0; Button(ID_YES) { NewGiveCityOptionEnabled = 1; Kill(); } Button(ID_NO) { Kill(); } } messagebox 'YouMustSelectACity' { text(ID_PEDRUNN_YOU_MUST_SELECT_CITY); // "You dont have a city selected. In order to make this offer you have to select one" show(); } HandleEvent(NewNegotiationEvent) 'PedrunnsWayToGiveCity' pre { int_t ProposalType; int_t ResponseType; ProposalType = GetLastNewProposalType(player[0], player[1], 0); ResponseType = GetLastResponseType(player[1], player[0],0); if(NewGiveCityOptionEnabled == 1 // If new give city option enabled && ResponseType == 2 // And if proposal has been accepted && ProposalType == 1) { // And Proposal is give city proposal Event: GiveCity(OfferedCity, player[1]); // Give selected city } }


In order to make the list disappear and the proposal effect do not be depend on what is hard-coded you must replace the data of the offer city by this one:
code:
PROPOSAL_OFFER_GIVE_CITY { Type "OFFER_GIVE_CITY" Title DIP_OFFER_GIVE_CITY Category:Gift Class:Offer Excludes:Offer Reciprocal PROPOSAL_REQUEST_GIVE_CITY # Arg1:OwnCity Details0 { DetailsEven DIP_DETAILS_OFFER_GIVE_CITY_0 } Details1 { DetailsEven DIP_DETAILS_OFFER_GIVE_CITY_1 } Details2 { DetailsEven DIP_DETAILS_OFFER_GIVE_CITY_2 } Details3 { DetailsEven DIP_DETAILS_OFFER_GIVE_CITY_3 } Details4 { DetailsEven DIP_DETAILS_OFFER_GIVE_CITY_4 } DetailsEx0 { DetailsEven DIP_DETAILS_OFFER_GIVE_CITY_EX_0 } DetailsEx1 { DetailsEven DIP_DETAILS_OFFER_GIVE_CITY_EX_1 } DetailsEx2 { DetailsEven DIP_DETAILS_OFFER_GIVE_CITY_EX_2 } DetailsEx3 { DetailsEven DIP_DETAILS_OFFER_GIVE_CITY_EX_3 } DetailsEx4 { DetailsEven DIP_DETAILS_OFFER_GIVE_CITY_EX_4 } Image "updi01.tga" }


BUG: It still there is an annoying thing: every time you choose any diplomatic offer a message will pop up asking about wich city you want to give when it should only do that when the offer city option is selected not the others. So i ask does anyone, specially you Peter, has an idea on how to fix this problem.

Last edited by Pedrunn on 29-08-2002 at 18:35

Martin Gühmann is offline Martin Gühmann
Emperor
Berlin, Germany
Mar 2001
time: 06:22
Post  Old Post 29-08-2002 21:21 Visit Martin Gühmann's homepage!
Edit/Delete Message Reply w/Quote
#13 Report this post to a moderator
Increase the size of your Attachments

Why you don't make a new proposial: PROPOSAL_OFFER_GIVE_SELECTED_CITY

Replace the details and use your code for it.

-Martin

Pedrunn is offline Pedrunn
King
of Natal, Brazil
Jul 2001
time: 02:22
  Old Post 30-08-2002 02:50
Edit/Delete Message Reply w/Quote
#14 Report this post to a moderator
Support Apolyton, buy Call to Power 2



Whi didnt i think of the at before?

But has anyone ever tried to make a whole new peoposal before.

Not much to change here. I will try that martin.

TheArsenal is offline TheArsenal
Prince
Sunny Southern California
Mar 2002
time: 21:22
  Old Post 30-08-2002 03:37
Edit/Delete Message Reply w/Quote
#15 Report this post to a moderator
Inflate your Upload Space

Great to see people working on this. I've destroyed tons of cities because I didn't want to defend them, but knew I would be unable to give them away later. I've always thought it would be helpful to be able to give away a city the moment you take it as part of the "extend empire", "move citizens", etc. pop up screen option upon capture. I guess the problem would be without a one turn delay built in, you would give away the army that took the city along with it. But in any case, it will be good to see this worked out.

Dale is offline Dale
King
Sir! Why do you keep clicking on me?
Dec 2000
time: 15:22
  Old Post 30-08-2002 04:00
Edit/Delete Message Reply w/Quote
#16 Report this post to a moderator
Avatar Enlargement: We've got the solution

Pedrunn,

Yeah, I've created a proposal before. In one of the very first Diplomods there was a new proposal "Break Agreement". Yeah sure, 'some' of the coding was still there, but the rest I had to fill in. Unfortunately, there was a bug in it (can't remember the bug exactly) and I had to cancel it.

But if you forum search on "diplomod" you should come up with something. I think it was v1.6???

Peter Triggs is offline Peter Triggs
Prince
Gone Fishin, Canada
Jan 2000
time: 05:22
  Old Post 31-08-2002 01:44
Edit/Delete Message Reply w/Quote
#17 Report this post to a moderator
Help yourself to an AD-FREE life

Pedrunn,

quote:

BUG: It still there is an annoying thing: every time you choose any diplomatic offer a message will pop up asking about wich city you want to give when it should only do that when the offer city option is selected not the others.


That's what I meant when I said that I couldn't manage to trigger on individual names, only on the list. I never could get any further than that.

Re: Adding New Proposals

The offer/request break agreement proposals are disabled:

quote:

[MarkG] Ah! why was the break agreements diplomatic option disabled???

[RichardM] MarkG, time constraints mostly. Diplomacy had plenty of features and the rules for how the AI should respond to break agreement proposals [were] not clear cut.


and so are free to be used however we want. I used them for offer/request embassy proposals.

More generally, I don't know if it's possible to add a completely new New Proposal. Each new proposal contains a Type variable which is described as:

quote:

String name of a valid proposal type. These names are primarily used for debugging as well as SLIC scripting though they must be registered in the game to work correctly.


Originally I thought these were just ordinary strings and was confused by the fact that I couldn't find a text file where they could be 'registered'. As I recall, something Martin said gave me an idea and I got a bit over-excited when I tried this:

code:
HandleEvent(NewProposal) 'MY_NEW_PROPOSAL' post { message(1, 'Test_message'); } // with PROPOSAL_MY_NEW_PROPOSAL { Type "MY_NEW_PROPOSAL" Title DIP_NONE Details0 { DetailsEven DIP_DETAILS_NONE_0 } Details1 { DetailsEven DIP_DETAILS_NONE_1 } Details2 { DetailsEven DIP_DETAILS_NONE_2 } Details3 { DetailsEven DIP_DETAILS_NONE_3 } Details4 { DetailsEven DIP_DETAILS_NONE_4 } DetailsEx0 { DetailsEven DIP_DETAILS_NONE_EX_0 } DetailsEx1 { DetailsEven DIP_DETAILS_NONE_EX_1 } DetailsEx2 { DetailsEven DIP_DETAILS_NONE_EX_2 } DetailsEx3 { DetailsEven DIP_DETAILS_NONE_EX_3 } DetailsEx4 { DetailsEven DIP_DETAILS_NONE_EX_4 } Image "updi01.tga" }


It didn't crash (which it always did with previous experiments) and so I thought 'Aha! Proposal types are just the names of SLIC objects. We can add as many new ones as we want."

Alas, no. I haven't been able to get any other Details except the null ones above. Maybe there's something simple that I'm missing: it looks like it's set up so that we should be able to add new proposals, but I haven't been able to do it.

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

I have tried to create a new proposal.
It appeared in the diplomatic screen but the slic just didnt recognize it.

You may try to find some bugs in my coding. So here is the coding
NOTE: if you unzip in the main CTP2 directory it will replace originals files.

Attachment: newgivecity2.zip
This has been downloaded 8 time(s).

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

Can you use an existing "type" for new proposals? It wouldn't make sense, but if the types aren't really used, I can't see it mattering...

Pedrunn, you have cut out the lines:

code:
Arg1:OwnCity Reciprocal PROPOSAL_REQUEST_GIVE_CITY

The first one I don't know what it does, but it seems like it might be useful. The second I think is more important - it's the proposal that the AI recieves. You make a "give" offer, the ai gets a "receive" offer. I dunno. It might make a difference.

Pedrunn is offline Pedrunn
King
of Natal, Brazil
Jul 2001
time: 02:22
  Old Post 02-09-2002 22:17
Edit/Delete Message Reply w/Quote
#20 Report this post to a moderator
Support Apolyton, buy Civilization 2

The proposal does not give nothing just the variation of regard. What gives the city is the Slic. So those lines arent needed. Thus i have tested the same code with using proposal #1 (changed the same way as the proposal in this file). And it did work. Yet I may test it again to make sure.

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