Thread Tools
Old February 28, 2002, 18:23   #31
Locutus
Apolytoners Hall of FameCiv4 SP Democracy GameCiv4 InterSite DG: Apolyton TeamBtS Tri-LeagueC4BtSDG TemplarsC4WDG Team ApolytonCivilization IV CreatorsCTP2 Source Code ProjectPolyCast Team
Deity
 
Locutus's Avatar
 
Local Time: 22:50
Local Date: October 31, 2010
Join Date: Nov 1999
Location: De Hel van Enschede
Posts: 11,702
Quote:
Originally posted by child of Thor

Hi Locutus! Sorry for 'that' thread, hmmmm....i think i wasn't thinking too clearly!
Don't worry, no hard feelings (not on my behalf anyway). I actually liked it, gives the mods the impression that this forum need an official moderator I've been trying to become mod of these forums for ages but Markos still refuses to make me one (No, that doesn't mean you should break the rules more often )

Quote:
Load origional CTP2 only(official patch Y/N?) - i guess yes.
try to replicate 'rush buy' bug.
add/edit above SLIC to relevent place.
try to replicate bug/ as host as not host - watch for other strange things.

Sound ok?
Cool, it would be great if you could test this Yeah, you should have the patch installed but nothing else. The list of things to be done sounds about right.
__________________
Administrator of WePlayCiv -- Civ5 Info Centre | Forum | Gallery
Locutus is offline  
Old March 2, 2002, 19:01   #32
child of Thor
Call to Power II Democracy GameCTP2 Source Code Project
Emperor
 
child of Thor's Avatar
 
Local Time: 20:50
Local Date: October 31, 2010
Join Date: Jan 2002
Location: UK
Posts: 3,272
O.k Locutus I've replicated the rush-buy bug and am know about to try the code on the Host computer first.
2 things, where 'exactly' are the scenario.slc and scen_str.txt files located?
I've found 'Ctp2_data\default\gamedata\scenario.slc' is that the one cause i found another scenario.slc somewhere else(!).
And i've got 'Ctp2_data\english\gamedata\scen_str.txt' is that ok?
I'm using Notepad to view the files and when opening the scenario.slc it has a message in it saying it should be empty blah blah - its just a few lines with // in it ,shall i delete it? Oh and are the 'spaces' between brackets important in that they need to be exact(wow i AM new to this ) oh if any one else can answer then feel free to do so.......its getting late and it's Saturday night and my girlfriend is NOT happy!
child of Thor is offline  
Old March 2, 2002, 19:41   #33
Locutus
Apolytoners Hall of FameCiv4 SP Democracy GameCiv4 InterSite DG: Apolyton TeamBtS Tri-LeagueC4BtSDG TemplarsC4WDG Team ApolytonCivilization IV CreatorsCTP2 Source Code ProjectPolyCast Team
Deity
 
Locutus's Avatar
 
Local Time: 22:50
Local Date: October 31, 2010
Join Date: Nov 1999
Location: De Hel van Enschede
Posts: 11,702
The locations you mentioned are the right ones. If you find other files with the same name, those are of the scenarios.

Forget about the content of scenario.slc, it doesn't matter. You can leave them as they are or remove them, whatever you want. The '//' indicate that they are comments (lines of code that will be ignored by the game). The use of spaces is irrelevent, they are jsut for making the code easier to read for humans.
__________________
Administrator of WePlayCiv -- Civ5 Info Centre | Forum | Gallery
Locutus is offline  
Old March 2, 2002, 19:51   #34
child of Thor
Call to Power II Democracy GameCTP2 Source Code Project
Emperor
 
child of Thor's Avatar
 
Local Time: 20:50
Local Date: October 31, 2010
Join Date: Jan 2002
Location: UK
Posts: 3,272
Quote:
Originally posted by Locutus
....... making the code easier to read for humans.
This bit has me worried.....so where are you from?

Give me an hour or so, that should be enough to see what happens, and thanks for the confirmation.
child of Thor is offline  
Old March 2, 2002, 20:09   #35
Locutus
Apolytoners Hall of FameCiv4 SP Democracy GameCiv4 InterSite DG: Apolyton TeamBtS Tri-LeagueC4BtSDG TemplarsC4WDG Team ApolytonCivilization IV CreatorsCTP2 Source Code ProjectPolyCast Team
Deity
 
Locutus's Avatar
 
Local Time: 22:50
Local Date: October 31, 2010
Join Date: Nov 1999
Location: De Hel van Enschede
Posts: 11,702
Quote:
Originally posted by child of Thor
so where are you from?
Unimatrix 01

Quote:
Give me an hour or so, that should be enough to see what happens, and thanks for the confirmation.
I'm probably fast asleep by then (I'm tired as a dog right now), but I'm looking forward to reading your results tomorrow...
__________________
Administrator of WePlayCiv -- Civ5 Info Centre | Forum | Gallery
Locutus is offline  
Old March 2, 2002, 21:24   #36
child of Thor
Call to Power II Democracy GameCTP2 Source Code Project
Emperor
 
child of Thor's Avatar
 
Local Time: 20:50
Local Date: October 31, 2010
Join Date: Jan 2002
Location: UK
Posts: 3,272
O.K that was over a lot quicker than i was expecting and this is what i got.

Setup: 2 computers(Host+guest) over TCP/IP Local Network.
CTP2+1.1patch installed from scratch on both.

Stage1: Got both Host and Guest players to implement 'rush-buy' bug - no problem for either.

Stage2: Copy/Pasted data into empty files 'scenario.slc' + 'scen_str.txt' on HOST pc only.On Launching game on Host pc got these SLIC errors:

'......\ctp2.data\default\gamedata\scenario.slc:5: Symbol tmpPlayer is undefined'

click OK

'.......\(AS ABOVE).....\scenario.slc:5: Variable 'tmpPlayer' used in assignment has unknown type.'

click OK game loads as normal.Both players in game ok.

Host can still 'rush-buy' no warnings on either computer.
Guest can still 'rush-buy' no warnings on either computer.

Stage3: Copy/Pasted data into relevant place on Guest pc.

As above on Launch of CTP2 with same SLIC errors on both pc's.
Get to Lobby for multiplayer game joined and Launch.
Now on Launching Guest pc has same 2 SLIC errors but with '.....scenario.slc:6: Symbol....etc' ;the number 5 is replaced by number 6.
Click OK twice and game Launch's ok.Both players in game.

Both Host and Guest can still 'rush-buy'. Only strange message was of 'rival has ended quest for glory.(Guest) stopped work on Pyramids.' Even though the Pyramids were still in the Guest players build queue and hadn't even been started yet. This message came up each turn untill they had been built by 'Guest'?

one other thing on exiting the game(New game) when you returned to the Lobby screen the graphics were corrupted. This only happend after the Slic files had been put in the game.
Hope this is useful!!!!!!

EDIT: oh yeah i ran each stage of rush-buying for 10 items each player, so that should have been enough to trigger any message's of cheating?
child of Thor is offline  
Old March 4, 2002, 05:03   #37
Immortal Wombat
Apolytoners Hall of Fame
Prince
 
Immortal Wombat's Avatar
 
Local Time: 21:50
Local Date: October 31, 2010
Join Date: Dec 2000
Location: in perpetuity
Posts: 4,962
Looks like there's a coding error...

Try this one:
Code:
int_t     idiotPlayer;
trigger 'TestMultiplayerPatch1' on "BuildEditorWindow.RushBuyButton" when (1) {
idiotPlayer=city[0].owner;
if (g.player!=idiotPlayer) {
    return STOP;
   }
}

trigger 'TestMultiplayerPatch12' on 
   "ControlPanelWindow.ControlPanel.ControlTabPanel.CityTab.TabPanel.RushBuyButton"
   when (1) {
idiotPlayer=city[0].owner;
if (g.player!=idiotPlayer) {
    return STOP;
   }
}


trigger 'TestMultiplayerPatch13' on 
   "CityWindow.Globals.Tabs.QueueTab.TabPanel.RushBuyButton" when (1) {
idiotPlayer=city[0].owner;
if (g.player!=idiotPlayer) {
    return STOP;
   }
}

trigger 'TestMultiplayerPatch14' on 
   "CityStatusWin.TabGroup.Tab2.TabPanel.RushBuyButton" when (1) {
idiot=city[0].owner;
if (g.player!=idiotPlayer) {
    return STOP;
   }
}

HandleEvent(BuyFront) 'LOQ_KillRushBuyBug' post {
   if (g.player != city[0].owner) {
      player[0] = city[0].owner;
      MessageAll('LOQ_KillRushBuyBug_M');
   }
}

Alertbox 'LOQ_KillRushBuyBug_M' {
   Text(ID_LOQ_KILL_RUSHBUY_BUG);
}
That way the player (idiotPlayer) is defined globally, and should work in all the triggers fine. I had to use a different name to tmpPlayer to avoid defining it twice elsewhere. AFAIK, no one else uses idiotPlayer as a variable.
__________________
Concrete, Abstract, or Squoingy?
"I don't believe in giving scripting languages because the only additional power they give users is the power to create bugs." - Mike Breitkreutz, Firaxis
Immortal Wombat is offline  
Old March 4, 2002, 06:43   #38
Peter Triggs
CTP2 Source Code ProjectCivilization IV Creators
King
 
Local Time: 20:50
Local Date: October 31, 2010
Join Date: Jan 2000
Location: Gone Fishin, Canada
Posts: 1,059
After thinking about it, "city[0].owner" is a worry too. Those buttons must be pressed BEFORE the BuyFront event can occur, so who's city[0].owner? Maybe it'll work (if at all) when the idiot player tries to rushbuy the second, third, etc. item. But that's assuming that city[0].owner is legitimate in these UI trigger contexts in the first place.
Peter Triggs is offline  
Old March 4, 2002, 10:34   #39
child of Thor
Call to Power II Democracy GameCTP2 Source Code Project
Emperor
 
child of Thor's Avatar
 
Local Time: 20:50
Local Date: October 31, 2010
Join Date: Jan 2002
Location: UK
Posts: 3,272
O.k Immortal Wombat i'll give it a try when i got some time down the week, Although Peter's comments worry me(without having a clue as to what thet mean ). I got the two Pc's setup so i just got find time to copy/paste the code - gee my programming limits are ....very limited!(but i can do a mean copy/paste )
child of Thor is offline  
Old March 4, 2002, 11:49   #40
Martin Gühmann
staff
Call to Power II Democracy GameCall to Power Democracy GameCTP2 Source Code Project
Super Moderator
 
Martin Gühmann's Avatar
 
Local Time: 22:50
Local Date: October 31, 2010
Join Date: Mar 2001
Location: Tübingen, Germany
Posts: 6,206
And I worry about this code:

PHP Code:
HandleEvent(BuyFront'LOQ_KillRushBuyBug' post {
   if (
g.player != city[0].owner) {
      
player[0] = city[0].owner;
      
MessageAll('LOQ_KillRushBuyBug_M');
   }

That looks very similar to this one:

PHP Code:
HandleEvent(BuyFront)'MG_RuchBuyStop' pre {
    if (
city[0].owner != g.player) {
        return 
STOP;
    }

The result of this code was that no one wasn't able to rush buy anything. I was able to spend the money for the item that I wished to rush buy but I gotn't my item and the money was gone, the AI had the same problem after disabling the code I noticed that the AI got a lot of new units at once. Therefore I supose the rush buy event happens not in the turn of the turn of the cityowner. The consequence of the message is that everytime an item is rush bought this message will go to everyone, although the player paied for the item.

-Martin
__________________
Civ2 military advisor: "No complaints, Sir!"
Martin Gühmann is offline  
Old March 4, 2002, 14:48   #41
GxNapoleon
Settler
 
Local Time: 20:50
Local Date: October 31, 2010
Join Date: Jan 2002
Posts: 21
RUSH-BUY-BUG
Hey Folks !

Thanx for your replies. I think its time to thank all those who coded a usefull advice to correct this bug.

Are there any out there who tested some of the sollutions ?
Did they work ?

PLEASE GIVE ME YOUR FEEDBACK concerning the sollutions.
If there are some who work, i will post them on our webpage !

DONT forget to visit the ultimate MULTIPLAY PORTAL for Call to Power II !
Its open now and totally free, just register!

http://www.the-battlefield.com

Greetings !

Napoleon, webmaster
GxNapoleon is offline  
Old March 7, 2002, 14:36   #42
child of Thor
Call to Power II Democracy GameCTP2 Source Code Project
Emperor
 
child of Thor's Avatar
 
Local Time: 20:50
Local Date: October 31, 2010
Join Date: Jan 2002
Location: UK
Posts: 3,272
Hmmm.....nope IW it doesn't work i get '......\scenario.slc:29: Symbol idiot is undefined' and '....\scenario.slc:29: Variable 'idiot' used in assignment has unknown type' (I hope this isn't a joke to make me look foolish )on loading CTP2 and upon launching the multiplayer game (the number '29' is replaced by '30' on the other pc). Still the same ability to rush buy as above. Oh i left Locutus's text in the scen_str.txt as he outlined.
I never knew of this bug untill recently and i can see why multiplayer in CTP2 has died compared to CTP - luckily as i only play over a local network if some slimy player tried this one in our games i'd have the satisfaction of exacting actual revenge
child of Thor is offline  
Old March 8, 2002, 10:49   #43
Martin Gühmann
staff
Call to Power II Democracy GameCall to Power Democracy GameCTP2 Source Code Project
Super Moderator
 
Martin Gühmann's Avatar
 
Local Time: 22:50
Local Date: October 31, 2010
Join Date: Mar 2001
Location: Tübingen, Germany
Posts: 6,206
What about idiotPlayer instead of idiot in line 29. That should help.

-Martin
__________________
Civ2 military advisor: "No complaints, Sir!"
Martin Gühmann is offline  
Old March 8, 2002, 11:59   #44
Immortal Wombat
Apolytoners Hall of Fame
Prince
 
Immortal Wombat's Avatar
 
Local Time: 21:50
Local Date: October 31, 2010
Join Date: Dec 2000
Location: in perpetuity
Posts: 4,962
Yeah, that's the one Martin. Sorry about the variable names, I try to use some apt and unique ones to avoid clashes.
__________________
Concrete, Abstract, or Squoingy?
"I don't believe in giving scripting languages because the only additional power they give users is the power to create bugs." - Mike Breitkreutz, Firaxis
Immortal Wombat is offline  
Old March 8, 2002, 14:24   #45
Martin Gühmann
staff
Call to Power II Democracy GameCall to Power Democracy GameCTP2 Source Code Project
Super Moderator
 
Martin Gühmann's Avatar
 
Local Time: 22:50
Local Date: October 31, 2010
Join Date: Mar 2001
Location: Tübingen, Germany
Posts: 6,206
Quote:
Originally posted by Immortal Wombat
I try to use some apt and unique ones to avoid clashes.
Why don't you use a prefix like I do?

For the bug I was now able to recreate it in SP, by don't allowing the AI to end its turn on its own. So far I can still rush buy an item per turn and city. I put in the UI triggers a message box from the tutorial, but it does not appear. I also noticed that I can put in the UI component string of the trigger anything that I want without an error message, therefore I wonder if we got the right names of the UI components. Another question is how the DisableScreensButton() function works if it works. To get the rush buy bug to work you have at first rush buy an item with money loss and than at your opponents turn you have to rush buy the item again and if it is your turn again you the next item in the build queue needs just one turn and so on.

-Martin
__________________
Civ2 military advisor: "No complaints, Sir!"
Martin Gühmann is offline  
Old March 8, 2002, 19:28   #46
child of Thor
Call to Power II Democracy GameCTP2 Source Code Project
Emperor
 
child of Thor's Avatar
 
Local Time: 20:50
Local Date: October 31, 2010
Join Date: Jan 2002
Location: UK
Posts: 3,272
IW - it's just disconcerting getting messages from your computer seemingly calling you 'Idiotplayer' when it doesn't work
Still i got Martin's correction above and will give it a go in about an hour and report back. So far it seems that if i get a Slic error on startup then the rushbuy bug is still in effect(even if you can click on the error msg's and continue with the game), is this a fair comment?Or is it possible that the code will still trigger even after the error msg's? If i know this it might save me some time in the future, all i need to do then is report back with the error msg and you guy's will know what to try next? I've got both pc's permantly setup on this problem, and when time allows i can test the next batch of code fairly quickly.
child of Thor is offline  
Old March 8, 2002, 19:38   #47
Immortal Wombat
Apolytoners Hall of Fame
Prince
 
Immortal Wombat's Avatar
 
Local Time: 21:50
Local Date: October 31, 2010
Join Date: Dec 2000
Location: in perpetuity
Posts: 4,962
Quote:
Originally posted by Martin Gühmann
Why don't you use a prefix like I do?
Because frequently I end up using very similar bits of code at the same time, and I end up with repeated definitions.

CoT: Most of the code will still work. It will only affect the one way of rushbuying, via the City Status window. Everything else should be prevented.

Martin's fix should do it, and yes, an error message is (usually) all we need to find the cause of the bug. The error messages give file, line number and type of error. Another rare thing Activision did right
__________________
Concrete, Abstract, or Squoingy?
"I don't believe in giving scripting languages because the only additional power they give users is the power to create bugs." - Mike Breitkreutz, Firaxis
Immortal Wombat is offline  
Old March 8, 2002, 19:51   #48
child of Thor
Call to Power II Democracy GameCTP2 Source Code Project
Emperor
 
child of Thor's Avatar
 
Local Time: 20:50
Local Date: October 31, 2010
Join Date: Jan 2002
Location: UK
Posts: 3,272
So has anyone else got this code to work yet? I've not even seen the Msg in the screen_str.txt yet and has anyone had the strange text msg in the game reporting that the 'other' civ has stopped working on 'wonder' even though it's still in that civ's build queue but not been started yet? This has been the only difference i've noticed while running this code so far(i've yet to try the bit martin suggested). any idea's on this?

EDIT: I am just testing this on plain CTP2+1.1patch - no mods or extra files added.

EDIT2: Just tried Martin's suggestion and now the game loads fine and multiplayer launches with NO Slic error's. But it's still possible for both players to rushbuy(from city manager) - i don't get Locutus's screen_str.txt msg but if there is a wonder in the build queue then i do get that msg as outlined above.It comes up every turn untill the wonder is built.Crazy?

Last edited by child of Thor; March 8, 2002 at 21:25.
child of Thor is offline  
Old March 13, 2002, 03:52   #49
Oerdin
Deity
 
Oerdin's Avatar
 
Local Time: 13:50
Local Date: October 31, 2010
Join Date: Sep 2001
Location: In a bamboo forest hiding from Dale.
Posts: 17,436
Since you folks are talking about Gameleague and/or fixing the infinite builds bug then I know you must be interested in MP play so why don't you go and fill out the form for the official Apolyton multiplayer registary? It has been toped by Lucutus so it should be easy for you to find...
Oerdin is offline  
Old March 13, 2002, 06:54   #50
MarkyMark
Settler
 
Local Time: 20:50
Local Date: October 31, 2010
Join Date: Feb 2002
Posts: 16
Battlefield Register
Visit the Page http://CTP2.the-battlefield.com/ranking.php
you find some CTP2-Player contacts and you can there register:
http://ctp2.the-battlefield.com/joinb.php

Free for all. We start now a Tournay........everybody is welcome, when he accepted our rules for the Tourney

Thanks for your Attention.
Mark
Webmaster Battlefield CTP2 / CIV3 and coming soon Moo3
MarkyMark is offline  
Old March 23, 2002, 20:04   #51
Locutus
Apolytoners Hall of FameCiv4 SP Democracy GameCiv4 InterSite DG: Apolyton TeamBtS Tri-LeagueC4BtSDG TemplarsC4WDG Team ApolytonCivilization IV CreatorsCTP2 Source Code ProjectPolyCast Team
Deity
 
Locutus's Avatar
 
Local Time: 22:50
Local Date: October 31, 2010
Join Date: Nov 1999
Location: De Hel van Enschede
Posts: 11,702
*bump*

Does anyone have time to do some testing tomorrow or Monday (at a relatively decent time for someone living in CET)?
__________________
Administrator of WePlayCiv -- Civ5 Info Centre | Forum | Gallery
Locutus is offline  
Old March 24, 2002, 06:44   #52
child of Thor
Call to Power II Democracy GameCTP2 Source Code Project
Emperor
 
child of Thor's Avatar
 
Local Time: 20:50
Local Date: October 31, 2010
Join Date: Jan 2002
Location: UK
Posts: 3,272
I can test any new code monday morning(for about an hour) and maybe later that evening after 7pm(GMT) - any good?
__________________
'The very basis of the liberal idea – the belief of individual freedom is what causes the chaos' - William Kristol, son of the founder of neo-conservitivism, talking about neo-con ideology and its agenda for you.info here. prove me wrong.

Bush's Republican=Neo-con for all intent and purpose. be afraid.
child of Thor is offline  
Old March 24, 2002, 08:30   #53
Locutus
Apolytoners Hall of FameCiv4 SP Democracy GameCiv4 InterSite DG: Apolyton TeamBtS Tri-LeagueC4BtSDG TemplarsC4WDG Team ApolytonCivilization IV CreatorsCTP2 Source Code ProjectPolyCast Team
Deity
 
Locutus's Avatar
 
Local Time: 22:50
Local Date: October 31, 2010
Join Date: Nov 1999
Location: De Hel van Enschede
Posts: 11,702
I just heard that some of the guys at my uni wanna have a meeting sometime tomorrow but they don't know yet at what time. In any case, at what time exactly are you available tomorrow morning? Tomorrow evening could be tricky, I forgot that I have a meeting at 19:30h CET but I have no idea how long it'll take (judging from previous meetings it could be anywhere between 21:00h and 23:00h CET - the drinks will be free of charge so it could get late ), so although I can't give you an exact time, I should be have time later on the evening. Do you have ICQ or something?
__________________
Administrator of WePlayCiv -- Civ5 Info Centre | Forum | Gallery
Locutus is offline  
Old March 24, 2002, 15:26   #54
MarkyMark
Settler
 
Local Time: 20:50
Local Date: October 31, 2010
Join Date: Feb 2002
Posts: 16
Testing
For testing i have time at 7 pm German time on Monday, when you seek still one.
Greetings.
MarkyMark is offline  
Old March 25, 2002, 08:55   #55
Locutus
Apolytoners Hall of FameCiv4 SP Democracy GameCiv4 InterSite DG: Apolyton TeamBtS Tri-LeagueC4BtSDG TemplarsC4WDG Team ApolytonCivilization IV CreatorsCTP2 Source Code ProjectPolyCast Team
Deity
 
Locutus's Avatar
 
Local Time: 22:50
Local Date: October 31, 2010
Join Date: Nov 1999
Location: De Hel van Enschede
Posts: 11,702
Nevermind, something came up...again. Won't have time to test in the next 2-3 days at least.
__________________
Administrator of WePlayCiv -- Civ5 Info Centre | Forum | Gallery
Locutus is offline  
Old March 27, 2002, 06:49   #56
child of Thor
Call to Power II Democracy GameCTP2 Source Code Project
Emperor
 
child of Thor's Avatar
 
Local Time: 20:50
Local Date: October 31, 2010
Join Date: Jan 2002
Location: UK
Posts: 3,272
Locutus,
won't be able to do any testing this week i'm afraid
Still if anyone wants to post new slic fixes for this prob i'll be able to test them(soon) and report back here.
__________________
'The very basis of the liberal idea – the belief of individual freedom is what causes the chaos' - William Kristol, son of the founder of neo-conservitivism, talking about neo-con ideology and its agenda for you.info here. prove me wrong.

Bush's Republican=Neo-con for all intent and purpose. be afraid.
child of Thor is offline  
 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT -4. The time now is 16:50.


Design by Vjacheslav Trushkin, color scheme by ColorizeIt!.
Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Apolyton Civilization Site | Copyright © The Apolyton Team