Thread Tools
Old September 10, 2002, 12:25   #61
Pedrunn
Call to Power II Democracy Game
King
 
Pedrunn's Avatar
 
Local Time: 06:27
Local Date: October 31, 2010
Join Date: Jul 2001
Location: of Natal, Brazil
Posts: 2,555
Quote:
Originally posted by Dale
Locutus:

Just on triggers, it reminded me of something. When you choose a new government, what's the trigger for the implement gov button? And what args?
Not hard to find. Just have to look for the correct button.
arguments? We wish.

I cant get counter proposals to work but i do beileve it is possible. And i am pretty much sure that we cant make threats. I did get the send proposal to work amazingly well.
Despite of Locutus try it doe work amazingly in my games.

leftover_crack, Maquiladora you guy said you wanted to help?
or anyoneelse?
Can you copy the file i attached and move to the ctp2 main directory\ctp2_data\default\gamedata\
and copy in the script.slc the line
Code:
#include "PBEMFix.slc"
and test it through hot seat?
__________________
"Kill a man and you are a murder.
Kill thousands and you are a conquer.
Kill all and you are a God!"
-Jean Rostand
Pedrunn is offline  
Old September 11, 2002, 02:18   #62
Pedrunn
Call to Power II Democracy Game
King
 
Pedrunn's Avatar
 
Local Time: 06:27
Local Date: October 31, 2010
Join Date: Jul 2001
Location: of Natal, Brazil
Posts: 2,555
I gave up of last code. I couldnt get further from sending proposals

I started a code using messageboxes.

Locutus, I have seen you code and i got tell you that i got at most really confused with the level of you work. As you know the first time i sit in front of a PC to write any code was a couple of months ago. And when i looked the way you deal with arrays i got really scared. Although the biggest barrier is the understand of a code based on messagebox which your never know the paths a simple next button can send you unless you are the creator. But i understood the overall of you mod wich made me start my new code.
Now that i have finished my code i can understand much more of what was in yours (except those arrays ).
One of the things i am proud of how i used the CTP2 diplomatic screen to send proposals wich really is a big step from you click unit/city and button trigger.
but i have got to admit your code in gameplay has a really neat appearence while mine looks like some frankstein and has some dificulties to interact with the player. So i will probably use some of your interface in my coding.
I want to know your thoughts on giving/requesting advances too.
Not to mention the multiple proposals diplomacy.

I have finished the most difficult part. Wich is the sending-receiving-counter-threaten-accept-reject forth and back game with the messagebox.

It is more than 3:00 AM here and i have spend way too much time working on this. So i will post here what i have.

-How does it work?
The diplomacy starts with the regular diplomacy screen. As usual you send the emissary, then choose your tone, and get to the choosing proposal part. This is where the turn over starts! The regular diplomatic proposals are still there. But when you click on them a message pop up asking wich proposal do you want to send. If you are in the request tab the spinner for the request will appear, If you are in the offer tab the spinner for offers will be there and if you are in the treaties tab the spinner for the treaties will appear. then You select the proposal you want you want and send athe proposal as you would send in a normal game: In the proposal button. The diplomatic screen closes and a message is sent telling that your meesage was successfully sent.
The other player will receive a alertbox with the proposal you sent in the beggining of his turn. The alertbox will contain the accept, reject and counter button.
--->Counter: If he counters a message pop up telling him wich type of proposal he can choose to counter: buttons treaty, offer, request. Plus the buutton to accept and reject (he may change his mind ). If he chooses one of the proposals the list of proposals will appear show up. There is an unfinished part here, he cant send the proposal. if he chooses one the message gets killed and nothing happens I will get back here later.
--->Reject: If the player rejects in the turn of the player that started the diplomatic a message will pop up in the beginning of the turn. Telling him that his proposal was reject and asking him if he wants to threaten or not. There are two types of threats declare war and embargo. Destroy city is not here because there is no way a player can choose a city to do so. But the i will kill you threat will be added later. Unfortunetly theres is something wrong here and i am really to tired to look for bugs today. The message is not send to the player that should be threatened. I will look this later.
--> Accept: It does nothing since i havent implemented the make proposal effect. The function to do this is the but it is totally blank.

Comments:
- Dont send proposal to AI players. This will probably cause game freeze (The AI will get the message but cant respond). I know how to fix this dont worry.
-The AI dont send proposals too. I will implement in such a way that there will be no difference between human-human AI-Human, Human-AI diplomacy!!!
- There are 7 request and 7 offers. for both: give city, withdraw, give gold, give army, give map, declare war, end war. And the same 7 treaties of the regular game. One good part is that we can add as many proposal as we want to.
- Again! The prposal effects are not implemented!!! But i know how to implement them all.
- There is a cool gold spinner in the request/offer gold proposal
-Dont send more than one proposal to an human player. Otherwise they may get mixed up. I already have an idea on how to fix this.
- I also have some ideas to make many changes in the UI so that my code works the best it can.
- do not replace any of your files with the ones in this zip. The content is to be added in the files with its names
-Dont mind the content of the messagebox. unworkin string variables, lack of good info, bad content. As i said it is just to show you guys what i have done

Here is the code

Attached Files:
File Type: zip pbemfix2.zip (5.7 KB, 15 views)
__________________
"Kill a man and you are a murder.
Kill thousands and you are a conquer.
Kill all and you are a God!"
-Jean Rostand

Last edited by Pedrunn; September 11, 2002 at 12:40.
Pedrunn is offline  
Old September 12, 2002, 13:45   #63
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: 11:27
Local Date: October 31, 2010
Join Date: Nov 1999
Location: De Hel van Enschede
Posts: 11,702
Quote:
Originally posted by Dale
Locutus:

Just on triggers, it reminded me of something. When you choose a new government, what's the trigger for the implement gov button? And what args?
Good point It needs testing but I'm fairly certain it's 'DomesticDialog.TabGroup.Tab2.TabPanel.EnactGovern ment'. Arguments? What Pedrunn said...

I haven't had a chance to try your code out yet, but it sounds very impressive I'll try ASAP and let you know what I think of it...
__________________
Administrator of WePlayCiv -- Civ5 Info Centre | Forum | Gallery
Locutus is offline  
Old September 12, 2002, 22:38   #64
Pedrunn
Call to Power II Democracy Game
King
 
Pedrunn's Avatar
 
Local Time: 06:27
Local Date: October 31, 2010
Join Date: Jul 2001
Location: of Natal, Brazil
Posts: 2,555
When someone starts coding he really want to see his code work.

I had some bad moments coding this one. So i will give up of this code

Sorry for all the MP community. But i said before that i dont even play MP i just accepted to do this code for the challenge and to help CTP2 in a big issue. I lost this challenge.

But i went half way through making specially two things:

1) The sending-receiving-reponding-countering-threatening connection of messages.
2) The use of the Send Proposal (NewProposal(int_t, int_t) event) in the diplomatic screen to start diplomacy rather than Locutus menu wich among other things quite annoying. Sorry Locutus but it is.

I hope the next adventurer for this fix really should look at and understand this code first before heading to work and if possible contact me. is that i am lonely in this code. I do want to make this code but i just cant. The more errors i get more i think it is my coding lack of ability that is on the way. I know how to implement stuff but thing dont work for a while

The problem I have come to is:

Proposals seems to have a thought on their own. They only show up from time to time. eg. I send a proposal in one turn it works real nice. In the next it wont. I said in the other post that there was problem with the sending threaten message but i do believe there isnt. The proble was this one i just told you happeninig with that proposal.
I think the problem is in the sending of saved proposals (BeginTurn event handler) that are in arrays and the use of its saved variable. But there is a smaller chance that it could be in the saving of proposal in global arrays but i just cant find this error.

Until the end of the month i plan to make the make proposal effects. I know all the ones i have in my code are possible even the treaties. Until them i am back to SP modding.

Here is the same code but much better organized and with some more comments.
Attached Files:
File Type: zip pbemfix2.zip (6.1 KB, 15 views)
__________________
"Kill a man and you are a murder.
Kill thousands and you are a conquer.
Kill all and you are a God!"
-Jean Rostand

Last edited by Pedrunn; September 12, 2002 at 22:51.
Pedrunn is offline  
Old October 15, 2002, 15:47   #65
Egg Robo X
Civilization II Democracy GameCall to Power II Democracy Game
Settler
 
Local Time: 09:27
Local Date: October 31, 2010
Join Date: Oct 2002
Posts: 3
Come on people! Work those code-typing fingers! Please! I want to play hotseat effectively but cannot do all this codey nonsense. So I am at your feet praying for you great gods of Civ to bless me with an oracle of multiplayness.
Egg Robo X is offline  
Old October 15, 2002, 16:06   #66
Maquiladora
Call to Power II MultiplayerCTP2 Source Code ProjectCall to Power PBEMCall to Power Multiplayer
Emperor
 
Local Time: 10:27
Local Date: October 31, 2010
Join Date: Jun 2001
Posts: 7,665
From my experience with multiplayer games if your only playing with one other human you wont do much exchanging of maps/techs/gold with another human anyway. Of course thats not good, but its better than nothing, if you dont want to play online that is.

You should be thankful hotseat even works at all, pbem doesnt even end turn
__________________
Call to Power 2: Apolyton Edition - download the latest version (7th June 2010)
CtP2 AE Wiki & Modding Reference
One way to compile the CtP2 Source Code.
Maquiladora is offline  
Old October 15, 2002, 16:10   #67
Immortal Wombat
Apolytoners Hall of Fame
Prince
 
Immortal Wombat's Avatar
 
Local Time: 10:27
Local Date: October 31, 2010
Join Date: Dec 2000
Location: in perpetuity
Posts: 4,962
Can you not just save the hotseat game after every turn and email it manually?
__________________
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 October 15, 2002, 16:13   #68
Maquiladora
Call to Power II MultiplayerCTP2 Source Code ProjectCall to Power PBEMCall to Power Multiplayer
Emperor
 
Local Time: 10:27
Local Date: October 31, 2010
Join Date: Jun 2001
Posts: 7,665
No, you cant do anything while the pop-up is on the screen, and of course clicking to get rid of the pop-up will show the next players map. BUT if each player had a dummy civ and allowed the other player to see it, but NEVER build a city with a dummy civs settler, that would work, would it not?
__________________
Call to Power 2: Apolyton Edition - download the latest version (7th June 2010)
CtP2 AE Wiki & Modding Reference
One way to compile the CtP2 Source Code.
Maquiladora is offline  
Old October 15, 2002, 16:17   #69
Maquiladora
Call to Power II MultiplayerCTP2 Source Code ProjectCall to Power PBEMCall to Power Multiplayer
Emperor
 
Local Time: 10:27
Local Date: October 31, 2010
Join Date: Jun 2001
Posts: 7,665
So player A controls civ 1 and 2(dummy civ), and player B controls civ 3 and 4(dummy civ).

Player A plays his turn with civ 1, ends turn, saves with civ 2, emails save to player B, player B plays turn with civ 3 ends turn, saves with civ 4, emails save to player A.

Am i missing something or would that not work?
__________________
Call to Power 2: Apolyton Edition - download the latest version (7th June 2010)
CtP2 AE Wiki & Modding Reference
One way to compile the CtP2 Source Code.

Last edited by Maquiladora; October 15, 2002 at 16:23.
Maquiladora is offline  
Old October 15, 2002, 16:26   #70
Immortal Wombat
Apolytoners Hall of Fame
Prince
 
Immortal Wombat's Avatar
 
Local Time: 10:27
Local Date: October 31, 2010
Join Date: Dec 2000
Location: in perpetuity
Posts: 4,962
That'd work fine I think.
__________________
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 October 15, 2002, 16:28   #71
J Bytheway
Call to Power PBEMCall to Power II Democracy GameCTP2 Source Code Project
Emperor
 
J Bytheway's Avatar
 
Local Time: 10:27
Local Date: October 31, 2010
Join Date: Jul 2001
Location: England
Posts: 3,826
Can you go up to >8 players in Hotseat?
J Bytheway is offline  
Old October 15, 2002, 16:33   #72
Immortal Wombat
Apolytoners Hall of Fame
Prince
 
Immortal Wombat's Avatar
 
Local Time: 10:27
Local Date: October 31, 2010
Join Date: Dec 2000
Location: in perpetuity
Posts: 4,962
The only problem is when one of the humans 'meets' his dummy settler. Then they might be able to see something 'classified'. I expect some SLIC could render the settler blind somehow, but it wont be pretty.
__________________
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 October 15, 2002, 16:38   #73
Maquiladora
Call to Power II MultiplayerCTP2 Source Code ProjectCall to Power PBEMCall to Power Multiplayer
Emperor
 
Local Time: 10:27
Local Date: October 31, 2010
Join Date: Jun 2001
Posts: 7,665
eep
__________________
Call to Power 2: Apolyton Edition - download the latest version (7th June 2010)
CtP2 AE Wiki & Modding Reference
One way to compile the CtP2 Source Code.
Maquiladora is offline  
Old October 15, 2002, 16:38   #74
Maquiladora
Call to Power II MultiplayerCTP2 Source Code ProjectCall to Power PBEMCall to Power Multiplayer
Emperor
 
Local Time: 10:27
Local Date: October 31, 2010
Join Date: Jun 2001
Posts: 7,665
A barb might kill the dummy settler too throughout the game time. With only a vision range of 1 and no chance of exchanging maps though, it would be that classified until really late in the game.

I just tested it too, and it works perfectly with saving and restoring with a maximum of 8 players(4 dummies).
__________________
Call to Power 2: Apolyton Edition - download the latest version (7th June 2010)
CtP2 AE Wiki & Modding Reference
One way to compile the CtP2 Source Code.
Maquiladora is offline  
Old October 15, 2002, 16:39   #75
J Bytheway
Call to Power PBEMCall to Power II Democracy GameCTP2 Source Code Project
Emperor
 
J Bytheway's Avatar
 
Local Time: 10:27
Local Date: October 31, 2010
Join Date: Jul 2001
Location: England
Posts: 3,826
On an Earth map, you could probably just move the dummy settler to the arctic and I doubt it would ever see anything important.

OTOH, You can get at the screen blanking functions in SLIC, so all you have to do is blank the screen at the start of every dummy players turn, and then unblank it at the end.
J Bytheway is offline  
Old October 15, 2002, 16:42   #76
J Bytheway
Call to Power PBEMCall to Power II Democracy GameCTP2 Source Code Project
Emperor
 
J Bytheway's Avatar
 
Local Time: 10:27
Local Date: October 31, 2010
Join Date: Jul 2001
Location: England
Posts: 3,826
So you need to make the dummy settlers invincible too...
J Bytheway is offline  
Old October 15, 2002, 16:46   #77
centrifuge
Call to Power PBEMCall to Power II MultiplayerCTP2 Source Code Project
Prince
 
centrifuge's Avatar
 
Local Time: 02:27
Local Date: October 31, 2010
Join Date: Apr 2002
Location: USA
Posts: 916
On a custom map, where the "settlers" are on a worthless one tile arctic island...would work the best Of course these islands would have to be as far away from the main continent(s) as is possible and perhaps behind some sort of impassable terrain or invisible barrier. Sounds like a lot of work
centrifuge is offline  
Old October 15, 2002, 16:47   #78
centrifuge
Call to Power PBEMCall to Power II MultiplayerCTP2 Source Code Project
Prince
 
centrifuge's Avatar
 
Local Time: 02:27
Local Date: October 31, 2010
Join Date: Apr 2002
Location: USA
Posts: 916
oops, Jbytheway you beat me to it
centrifuge is offline  
Old October 15, 2002, 16:48   #79
Immortal Wombat
Apolytoners Hall of Fame
Prince
 
Immortal Wombat's Avatar
 
Local Time: 10:27
Local Date: October 31, 2010
Join Date: Dec 2000
Location: in perpetuity
Posts: 4,962
Yeah, I was wondering how easy it would be to find a one-tile continent, or other empty area.

Invinsible is easy: CantAttackUnit(unit[0], 1);
__________________
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 October 15, 2002, 16:48   #80
J Bytheway
Call to Power PBEMCall to Power II Democracy GameCTP2 Source Code Project
Emperor
 
J Bytheway's Avatar
 
Local Time: 10:27
Local Date: October 31, 2010
Join Date: Jul 2001
Location: England
Posts: 3,826
If only we still had the space layer we could make them space engineers and then they'd be totally out of the way. I suppose that a sea engineer might still work... But I think that's complicating thing unnecessarily.
J Bytheway is offline  
Old October 15, 2002, 16:50   #81
Maquiladora
Call to Power II MultiplayerCTP2 Source Code ProjectCall to Power PBEMCall to Power Multiplayer
Emperor
 
Local Time: 10:27
Local Date: October 31, 2010
Join Date: Jun 2001
Posts: 7,665
Thats not so hard, just give every player one of these "super settlers" at game start, the normal players will likely build cities with them and the dummies can be protected by themselves. This would be inside some kind of Mod Lite of course.

I wouldnt know how to blank the screen though.
__________________
Call to Power 2: Apolyton Edition - download the latest version (7th June 2010)
CtP2 AE Wiki & Modding Reference
One way to compile the CtP2 Source Code.
Maquiladora is offline  
Old October 15, 2002, 16:50   #82
Immortal Wombat
Apolytoners Hall of Fame
Prince
 
Immortal Wombat's Avatar
 
Local Time: 10:27
Local Date: October 31, 2010
Join Date: Dec 2000
Location: in perpetuity
Posts: 4,962
Or do as they do in AoK, stick it in a boat, and float the boat right out the way, or stick in behind some mountains.
__________________
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 October 15, 2002, 21:08   #83
Maquiladora
Call to Power II MultiplayerCTP2 Source Code ProjectCall to Power PBEMCall to Power Multiplayer
Emperor
 
Local Time: 10:27
Local Date: October 31, 2010
Join Date: Jun 2001
Posts: 7,665
So whos gonna test this with me eh?

Ill move this over to the pbem thread.
__________________
Call to Power 2: Apolyton Edition - download the latest version (7th June 2010)
CtP2 AE Wiki & Modding Reference
One way to compile the CtP2 Source Code.
Maquiladora is offline  
Old July 24, 2003, 11:43   #84
Jambo
Settler
 
Local Time: 09:27
Local Date: October 31, 2010
Join Date: Feb 2003
Posts: 2
Has anyone been looking into getting this to work for Hotseat games?
Jambo is offline  
Old July 25, 2003, 08:41   #85
Maquiladora
Call to Power II MultiplayerCTP2 Source Code ProjectCall to Power PBEMCall to Power Multiplayer
Emperor
 
Local Time: 10:27
Local Date: October 31, 2010
Join Date: Jun 2001
Posts: 7,665
Quote:
Has anyone been looking into getting this to work for Hotseat games?
Do you mean the human-human diplomacy or the Hotseat fix for PBEM games?

I think the human diplomacy thing is on the backburner with the SLIC coder's, althoguh if we get the ctp2 source it looks good.
__________________
Call to Power 2: Apolyton Edition - download the latest version (7th June 2010)
CtP2 AE Wiki & Modding Reference
One way to compile the CtP2 Source Code.
Maquiladora is offline  
Old July 25, 2003, 10:37   #86
Jambo
Settler
 
Local Time: 09:27
Local Date: October 31, 2010
Join Date: Feb 2003
Posts: 2
Yeah,human-human diplomacy IN a hotseat game. I love playing CTP in hotseat mode, diplomacy would be excellent

Is there a good chance of the source code being released? I much prefer CTP2 with the apolyton patch then Civ 3, the mods for it with source code would be endless (just look at Freespace II community for example!)

Thanks for the reply
Jambo is offline  
Old July 25, 2003, 10:54   #87
Maquiladora
Call to Power II MultiplayerCTP2 Source Code ProjectCall to Power PBEMCall to Power Multiplayer
Emperor
 
Local Time: 10:27
Local Date: October 31, 2010
Join Date: Jun 2001
Posts: 7,665
At the moment theres a good chance of the source code being released, without getting too excited anyway. Check out this thread
http://apolyton.net/forums/showthrea...threadid=82253

Best now to wait and see how that unfolds before trying to fix diplomacy through modding (which is very tricky reading some posts above).
__________________
Call to Power 2: Apolyton Edition - download the latest version (7th June 2010)
CtP2 AE Wiki & Modding Reference
One way to compile the CtP2 Source Code.
Maquiladora 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 05:27.


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