Thread Tools
Old July 30, 2002, 19:16   #1
Immortal Wombat
Apolytoners Hall of Fame
Prince
 
Immortal Wombat's Avatar
 
Local Time: 06:13
Local Date: November 1, 2010
Join Date: Dec 2000
Location: in perpetuity
Posts: 4,962
City Expansion mod
Let the wonder possibilities drop, eh?
This discussion wasn't meant to be there in the first place.

It strikes me that there hasn't been a picture posted of all the suburbs together to compare.

Here it is. Any comments, suggestions, still welcome.

The ones with red dots are not set to be included by default, but the graphics are in the tile file nonetheless.
Attached Thumbnails:
Click image for larger version

Name:	cityx.jpg
Views:	183
Size:	74.1 KB
ID:	21000  
__________________
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 July 30, 2002, 21:15   #2
HuangShang
Call to Power II Democracy GameCTP2 Source Code Project
King
 
HuangShang's Avatar
 
Local Time: 22:13
Local Date: October 31, 2010
Join Date: Jul 2002
Location: Berkeley
Posts: 1,375
i never heard of the City Expansion Mod... what is it...

like the designs... do you mean the city change a little when it grows?
HuangShang is offline  
Old July 30, 2002, 21:24   #3
Pedrunn
Call to Power II Democracy Game
King
 
Pedrunn's Avatar
 
Local Time: 02:13
Local Date: November 1, 2010
Join Date: Jul 2001
Location: of Natal, Brazil
Posts: 2,555
As you know i have been using a variation of the BlueO city expansion and for that i have modified a bit of one civ3 city graphic. It is more red compared to civ3 graphic (Since they were getting confused with the plains color in the way they were) and the edge houses are changed to give an idea of continuation (they fit like a puzzle) while the city is growning.
For the dead city of it BlueO's ancient dead one works perfecly.
__________________
"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 July 30, 2002, 21:26   #4
Pedrunn
Call to Power II Democracy Game
King
 
Pedrunn's Avatar
 
Local Time: 02:13
Local Date: November 1, 2010
Join Date: Jul 2001
Location: of Natal, Brazil
Posts: 2,555
For some reason the picture did not appeared in my last post.
No problem, though. Here it is:
Attached Thumbnails:
Click image for larger version

Name:	citycópia.png
Views:	169
Size:	7.2 KB
ID:	21018  
__________________
"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; July 30, 2002 at 21:39.
Pedrunn is offline  
Old July 31, 2002, 10:58   #5
Immortal Wombat
Apolytoners Hall of Fame
Prince
 
Immortal Wombat's Avatar
 
Local Time: 06:13
Local Date: November 1, 2010
Join Date: Dec 2000
Location: in perpetuity
Posts: 4,962
Quote:
Originally posted by HuangShang
i never heard of the City Expansion Mod... what is it...
The City Expansion mod was originally part of BlueO's Alto-SciFi mod.
What it did was to make suburbs of cities appear in the surrounding terrain as the city grew. So for every 3 population points (starting at 6), an "expansion" was placed as a good, just outside the city.
The way BlueO did it was to create new terrains, each of which had these city expansion graphics as goods on that terrain.

The idea was great, but the way BlueO did it had some drawbacks, namely that the goods could be traded, and so you got little cities flying across the map.

Pedrunn and myself have been working to convert this mod into a more up-to-date one, using Martin the Dane's TileEdit program, we can add tile improvements, and use them as the suburb graphics.

There are merits to both approaches, but I think tile improvements are slightly better, and more adaptable to the circumstances.

The tile improvements can give a slight commerce bonus, have the movement cost of a road (or railroad, or maglev, depending on era), and be pillagable etc. etc.

Pedrunn: that is nice! Do you mind if I use it to replace your previous ancient age suburb?
__________________
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 July 31, 2002, 11:40   #6
Pedrunn
Call to Power II Democracy Game
King
 
Pedrunn's Avatar
 
Local Time: 02:13
Local Date: November 1, 2010
Join Date: Jul 2001
Location: of Natal, Brazil
Posts: 2,555
It is yours, now!

Note: I am secure when i say that it is impossible to play with the good version because of a bug in the price of the good when traded
__________________
"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 July 31, 2002, 11:48   #7
Immortal Wombat
Apolytoners Hall of Fame
Prince
 
Immortal Wombat's Avatar
 
Local Time: 06:13
Local Date: November 1, 2010
Join Date: Dec 2000
Location: in perpetuity
Posts: 4,962
What bug is that?
__________________
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 July 31, 2002, 11:58   #8
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: 07:13
Local Date: November 1, 2010
Join Date: Mar 2001
Location: Tübingen, Germany
Posts: 6,206
Quote:
Originally posted by Pedrunn
Note: I am secure when i say that it is impossible to play with the good version because of a bug in the price of the good when traded.
I wouldn't be shure if you couldn't prevent the AI and the human from trading those "goods".

The SendGood event:

SendGood(int_t, city_t, city_t)
It does has in int_t as parameter, don't shure what it does represent, actual I am not shure I to access an int_t, if it is possible to use value[0] then it is ok but the question what does it represent in the end, if it is a good database index then it shouldn't be a problem to prevent everyone from trading certain goods.

But anyway as Ben already pointed out the tileimprovement version has huge advances.

-Martin
__________________
Civ2 military advisor: "No complaints, Sir!"
Martin Gühmann is offline  
Old July 31, 2002, 13:24   #9
Pedrunn
Call to Power II Democracy Game
King
 
Pedrunn's Avatar
 
Local Time: 02:13
Local Date: November 1, 2010
Join Date: Jul 2001
Location: of Natal, Brazil
Posts: 2,555
I wrot this in the wonder possibilities thread. you must have missed.

Quote:
As for the BlueO expansion, we can just forget it.

It has a major bug! Since the city goods arent in the beggining of the game their gold value isnt calculated.

This causes the good to have a astronomic value of thousands of gold (I guess the maximum) probably because of their rarity.
The only solution is to save and load the game.
Because the games re-calculates the goods during loading. Yet having to load the game several times during the play is a game ruiner
I hope my english is clear.

Martin, the city good would still appear in the trade screen. Using them was going to cause caravan losts. We would have to control the AI not to use the goods. I thnk it will just lead us to new bugs. So, the best is to work on the TI expansion.
__________________
"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; July 31, 2002 at 13:35.
Pedrunn is offline  
Old August 1, 2002, 20:50   #10
Pedrunn
Call to Power II Democracy Game
King
 
Pedrunn's Avatar
 
Local Time: 02:13
Local Date: November 1, 2010
Join Date: Jul 2001
Location: of Natal, Brazil
Posts: 2,555
I will also leave the Wonder Possibilities thread drops, too.

This may make you made mad .
But i changed code of the city expansion to create wonders and it worked

Quote:
Originally posted by Immortal Wombat
Also, I have allowed the pillaging of suburbs - it turns them into razed ones. I figured if you can raze cities, you should be able to raze suburbs. You cannot raze your own, or neutral ones.
Anyway it seems to be impossible to prevent the cities/wonders to be pillaged .
The other problem is when we create a imp over the city/wonder. I cant stop it either.

Quote:
Originally posted by Immortal Wombat
That's really wierd. It seems to work ok... but the reducing city thing doesn't work, and sometimes the medieval age suburbs downgrade to ancient ones.
It is wierder than you think. It follows a pattern. It places in the first expansion the correct TI. And for the next two expansions it places the ancient age one. Then it restarts the cycle by place one correct and then two incorrect. And so on.

It does not depend on the age but the number of graphics in the set. It happens with a set of more than two city graphics. In my case it was during modern age (3 graphics set).

I have know idea what causes it and there is nothing to relate it to in the code

I will try a shot in the dark by re- arranging the code since i think the problem lies in the ExpandCity function.

I will keep you informed!
__________________
"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; August 1, 2002 at 20:59.
Pedrunn is offline  
Old August 2, 2002, 11:14   #11
Immortal Wombat
Apolytoners Hall of Fame
Prince
 
Immortal Wombat's Avatar
 
Local Time: 06:13
Local Date: November 1, 2010
Join Date: Dec 2000
Location: in perpetuity
Posts: 4,962
Quote:
But i changed code of the city expansion to create wonders and it worked
Only a little mad, because my wonder code works too. Its everyone else's PCs that don't

Quote:
Anyway it seems to be impossible to prevent the cities/wonders to be pillaged
I've done it for the wonders. The cities don't work, because it has to create the razed ones over the top.

Quote:
I will try a shot in the dark by re- arranging the code since i think the problem lies in the ExpandCity function.
I think you are right. The Replace**tiles function is returning sucess=0, and it so it goes to the next age back, but I don't know why.
__________________
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 August 2, 2002, 13:40   #12
Pedrunn
Call to Power II Democracy Game
King
 
Pedrunn's Avatar
 
Local Time: 02:13
Local Date: November 1, 2010
Join Date: Jul 2001
Location: of Natal, Brazil
Posts: 2,555
DP
__________________
"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; August 2, 2002 at 14:01.
Pedrunn is offline  
Old August 2, 2002, 13:52   #13
Pedrunn
Call to Power II Democracy Game
King
 
Pedrunn's Avatar
 
Local Time: 02:13
Local Date: November 1, 2010
Join Date: Jul 2001
Location: of Natal, Brazil
Posts: 2,555
Quote:
Originally posted by Immortal Wombat
I've done it for the wonders. The cities don't work, because it has to create the razed ones over the top.
What!?! I had tried the way you did it in your mod and it didnt worked! I alway get wonders being pillaged

Quote:
Originally posted by Immortal Wombat
I think you are right. The Replace**tiles function is returning sucess=0, and it so it goes to the next age back, but I don't know why.
I have got a fix.
I re-arranged the code in a way that it only has one ReplaceTile Fuction now. But it wanst it that was causing the problem. Yet i liked the way it looked. And i think i will keep it like that.

Anyway, The problem is in the FAI_PlayerAge[] variable. I dont know why but to solve this bug i just changed it for the HasAdvance fuction.

Now i am aiming in fixing the reduce city. You also had this problem, didnt you? Any lucky?

PS: I have added the Medieval age city in the function.
PS2: I did some important changes in the tileimp.txt. once i finish with it i will attach here.
PS3: You will note that i made wonders possible to be created in any land tile (you will need to change your tileimp.txt.

Here is the new code:
Attached Files:
File Type: slc as_blueo.slc (47.5 KB, 8 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; August 2, 2002 at 14:53.
Pedrunn is offline  
Old August 2, 2002, 16:32   #14
Immortal Wombat
Apolytoners Hall of Fame
Prince
 
Immortal Wombat's Avatar
 
Local Time: 06:13
Local Date: November 1, 2010
Join Date: Dec 2000
Location: in perpetuity
Posts: 4,962
I "re-translated" the code from BlueO's, and I think it works pretty well now. I have to test out some more things, there are still some bugs, and I haven't dealt with the pillaging yet, but it works.

One wierd thing though, it works sporadically, on every 3rd population point, then every one, then every six.
Attached Files:
File Type: slc iwx_expand_city.slc (42.7 KB, 10 views)
__________________
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 August 2, 2002, 17:33   #15
Pedrunn
Call to Power II Democracy Game
King
 
Pedrunn's Avatar
 
Local Time: 02:13
Local Date: November 1, 2010
Join Date: Jul 2001
Location: of Natal, Brazil
Posts: 2,555
DP.
What a F***. It is the third time in two days
__________________
"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; August 2, 2002 at 17:45.
Pedrunn is offline  
Old August 2, 2002, 17:37   #16
Pedrunn
Call to Power II Democracy Game
King
 
Pedrunn's Avatar
 
Local Time: 02:13
Local Date: November 1, 2010
Join Date: Jul 2001
Location: of Natal, Brazil
Posts: 2,555
I am pretty sure you are having the same old crazy bug. Try this ExpandCity function:
Code:
int_f ExpandCity(int_t owner, location_t cityLoc, int_t cityRadius, int_t tileType, int_t addDelete) {
location_t	tmpLoc;
location_t	tmp2Loc;
int_t		i;
int_t		j;
int_t		k;
int_t		sucess;
int_t		newType;
int_t		searchRadius;
int_t		addDeleteYN;
int_t		ownerNum;

	if (FAI_INIT == 1000)
	{
		searchRadius = 1;
		sucess = 0;
		newType = tileType;
		addDeleteYN = addDelete;
		ownerNum = owner;
		j = random(6);
		if (j == 0 || j == 5 || j == 2 || j == 7) {
			j = 6;
		}
		while (searchRadius <= cityRadius && sucess == 0) {
			tmpLoc = cityLoc;
			for (k = 0; k < searchRadius; k = k + 1) {		
				GetNeighbor(tmpLoc, j, tmp2Loc);
				tmpLoc = tmp2Loc;
			}
			if (HasAdvance(owner, ID_ADVANCE_TOOLMAKING)
			 && !HasAdvance(owner, ID_ADVANCE_CONCRETE)
			 && !HasAdvance(owner, ID_ADVANCE_GLOBAL_ECONOMICS)
			 && !HasAdvance(owner, ID_ADVANCE_EUGENICS)
			 && !HasAdvance(owner, ID_ADVANCE_ARCOLOGIES)) {
				sucess = ReplacePCTile(ownerNum, tmpLoc, searchRadius, j, newType, addDeleteYN);
			} 
			elseif (HasAdvance(owner, ID_ADVANCE_TOOLMAKING)
			 && HasAdvance(owner, ID_ADVANCE_CONCRETE)
			 && !HasAdvance(owner, ID_ADVANCE_GLOBAL_ECONOMICS)
			 && !HasAdvance(owner, ID_ADVANCE_EUGENICS)
			 && !HasAdvance(owner, ID_ADVANCE_ARCOLOGIES)) {
				sucess = ReplaceACTile(ownerNum, tmpLoc, searchRadius, j, newType, addDeleteYN);
			} 
			elseif (HasAdvance(owner, ID_ADVANCE_TOOLMAKING)
			 && HasAdvance(owner, ID_ADVANCE_CONCRETE)
			 && HasAdvance(owner, ID_ADVANCE_GLOBAL_ECONOMICS)
			 && !HasAdvance(owner, ID_ADVANCE_EUGENICS)
			 && !HasAdvance(owner, ID_ADVANCE_ARCOLOGIES)) {
				sucess = ReplaceMCTile(ownerNum, tmpLoc, searchRadius, j, newType, addDeleteYN);
			} 			
			elseif (HasAdvance(owner, ID_ADVANCE_TOOLMAKING)
			 && HasAdvance(owner, ID_ADVANCE_CONCRETE)
			 && !HasAdvance(owner, ID_ADVANCE_GLOBAL_ECONOMICS)
			 && !HasAdvance(owner, ID_ADVANCE_EUGENICS)
			 && !HasAdvance(owner, ID_ADVANCE_ARCOLOGIES)) {
				sucess = ReplaceACTile(ownerNum, tmpLoc, searchRadius, j, newType, addDeleteYN);
			} 
			elseif (HasAdvance(owner, ID_ADVANCE_TOOLMAKING)
			 && HasAdvance(owner, ID_ADVANCE_CONCRETE)
			 && HasAdvance(owner, ID_ADVANCE_GLOBAL_ECONOMICS)
			 && HasAdvance(owner, ID_ADVANCE_EUGENICS)
			 && !HasAdvance(owner, ID_ADVANCE_ARCOLOGIES)) {
				sucess = ReplaceGCTile(ownerNum, tmpLoc, searchRadius, j, newType, addDeleteYN);
			} 			
			elseif (HasAdvance(owner, ID_ADVANCE_TOOLMAKING)
			 && HasAdvance(owner, ID_ADVANCE_CONCRETE)
			 && HasAdvance(owner, ID_ADVANCE_GLOBAL_ECONOMICS)
			 && HasAdvance(owner, ID_ADVANCE_EUGENICS)
			 && HasAdvance(owner, ID_ADVANCE_ARCOLOGIES)) {
				sucess = ReplaceALTile(ownerNum, tmpLoc, searchRadius, j, newType, addDeleteYN);
			}
			i = j + 1;
			while (i != j && sucess == 0) {
				tmpLoc = cityLoc;
				for (k = 0; k < searchRadius; k = k + 1) {		
					GetNeighbor(tmpLoc, i, tmp2Loc);
					tmpLoc = tmp2Loc;
				}
							if (HasAdvance(owner, ID_ADVANCE_TOOLMAKING)
			 && !HasAdvance(owner, ID_ADVANCE_CONCRETE)
			 && !HasAdvance(owner, ID_ADVANCE_GLOBAL_ECONOMICS)
			 && !HasAdvance(owner, ID_ADVANCE_EUGENICS)
			 && !HasAdvance(owner, ID_ADVANCE_ARCOLOGIES)) {
				sucess = ReplacePCTile(ownerNum, tmpLoc, searchRadius, j, newType, addDeleteYN);
			} 
			elseif (HasAdvance(owner, ID_ADVANCE_TOOLMAKING)
			 && HasAdvance(owner, ID_ADVANCE_CONCRETE)
			 && !HasAdvance(owner, ID_ADVANCE_GLOBAL_ECONOMICS)
			 && !HasAdvance(owner, ID_ADVANCE_EUGENICS)
			 && !HasAdvance(owner, ID_ADVANCE_ARCOLOGIES)) {
				sucess = ReplaceACTile(ownerNum, tmpLoc, searchRadius, j, newType, addDeleteYN);
			} 
			elseif (HasAdvance(owner, ID_ADVANCE_TOOLMAKING)
			 && HasAdvance(owner, ID_ADVANCE_CONCRETE)
			 && HasAdvance(owner, ID_ADVANCE_GLOBAL_ECONOMICS)
			 && !HasAdvance(owner, ID_ADVANCE_EUGENICS)
			 && !HasAdvance(owner, ID_ADVANCE_ARCOLOGIES)) {
				sucess = ReplaceMCTile(ownerNum, tmpLoc, searchRadius, j, newType, addDeleteYN);
			} 			
			elseif (HasAdvance(owner, ID_ADVANCE_TOOLMAKING)
			 && HasAdvance(owner, ID_ADVANCE_CONCRETE)
			 && !HasAdvance(owner, ID_ADVANCE_GLOBAL_ECONOMICS)
			 && !HasAdvance(owner, ID_ADVANCE_EUGENICS)
			 && !HasAdvance(owner, ID_ADVANCE_ARCOLOGIES)) {
				sucess = ReplaceACTile(ownerNum, tmpLoc, searchRadius, j, newType, addDeleteYN);
			} 
			elseif (HasAdvance(owner, ID_ADVANCE_TOOLMAKING)
			 && HasAdvance(owner, ID_ADVANCE_CONCRETE)
			 && HasAdvance(owner, ID_ADVANCE_GLOBAL_ECONOMICS)
			 && HasAdvance(owner, ID_ADVANCE_EUGENICS)
			 && !HasAdvance(owner, ID_ADVANCE_ARCOLOGIES)) {
				sucess = ReplaceGCTile(ownerNum, tmpLoc, searchRadius, j, newType, addDeleteYN);
			} 			
			elseif (HasAdvance(owner, ID_ADVANCE_TOOLMAKING)
			 && HasAdvance(owner, ID_ADVANCE_CONCRETE)
			 && HasAdvance(owner, ID_ADVANCE_GLOBAL_ECONOMICS)
			 && HasAdvance(owner, ID_ADVANCE_EUGENICS)
			 && HasAdvance(owner, ID_ADVANCE_ARCOLOGIES)) {
				sucess = ReplaceALTile(ownerNum, tmpLoc, searchRadius, j, newType, addDeleteYN);
			}
					sucess = ReplaceALTile(ownerNum, tmpLoc, searchRadius, j, newType, addDeleteYN);
				}
				i = i + 1;
				if (i == 8) {
					i = 0; 
				}
			}
			searchRadius = searchRadius + 1;
		}	
		return sucess;		
	} else {
		return 0;
	}
}
Note: I got game crashs when when i added the medieval age function.
__________________
"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; August 2, 2002 at 17:50.
Pedrunn is offline  
Old August 5, 2002, 23:45   #17
Pedrunn
Call to Power II Democracy Game
King
 
Pedrunn's Avatar
 
Local Time: 02:13
Local Date: November 1, 2010
Join Date: Jul 2001
Location: of Natal, Brazil
Posts: 2,555
IW, my code is working fine.
The only problem is the CreateUnit event that doesnt work (damn activision) and the pillaging.
The first isnt a big deal since for all mods only the settlers units kill pops when built.
Yet, have you tried the pillaging? Any lucky?

Please, say you have good news!
__________________
"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 August 6, 2002, 06:30   #18
Immortal Wombat
Apolytoners Hall of Fame
Prince
 
Immortal Wombat's Avatar
 
Local Time: 06:13
Local Date: November 1, 2010
Join Date: Dec 2000
Location: in perpetuity
Posts: 4,962
ok.
Does the ReduceCity1/4 function work when called by other events, such as plague or conquest? If it does, and it is just the CreateUnit event that is buggy, then could you repost your complete code and tileimp.txt - without the wonders in, I want to keep that separate.

I'll have a look at the pillaging some more.
__________________
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 August 6, 2002, 12:22   #19
Pedrunn
Call to Power II Democracy Game
King
 
Pedrunn's Avatar
 
Local Time: 02:13
Local Date: November 1, 2010
Join Date: Jul 2001
Location: of Natal, Brazil
Posts: 2,555
Here it is.

I took the create wonders fuction off the code but i kept the fuction to prevent the creation of cities over them (The very first one: "TileHasWonder").
If you want it out too just tell me.

EDIT: One funny thing, the CaptureCity Event is known to work nicely. As we can see in the partisan code, the new capture option code and many others. But it does not seems to work with the ReduceCity function . What you think?
Attached Files:
File Type: slc as_blueo.slc (32.4 KB, 5 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; August 6, 2002 at 13:12.
Pedrunn is offline  
Old August 9, 2002, 09:57   #20
Pedrunn
Call to Power II Democracy Game
King
 
Pedrunn's Avatar
 
Local Time: 02:13
Local Date: November 1, 2010
Join Date: Jul 2001
Location: of Natal, Brazil
Posts: 2,555
IW, Did you get a solution for pillaging?
__________________
"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 August 11, 2002, 22:24   #21
Pedrunn
Call to Power II Democracy Game
King
 
Pedrunn's Avatar
 
Local Time: 02:13
Local Date: November 1, 2010
Join Date: Jul 2001
Location: of Natal, Brazil
Posts: 2,555
I feel so stupid. Indeead i cant get the PillageOrder and PillageUnit to work. But the CutImprovements do work. my trouble was that i used a local variable to call the location variable of the event. when i used the built in variable location[0] all worked nicely.
__________________
"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; August 11, 2002 at 22:33.
Pedrunn is offline  
Old August 12, 2002, 08:56   #22
Immortal Wombat
Apolytoners Hall of Fame
Prince
 
Immortal Wombat's Avatar
 
Local Time: 06:13
Local Date: November 1, 2010
Join Date: Dec 2000
Location: in perpetuity
Posts: 4,962
Excellent. I just came by to find that picture you posted, again. I lost it last time. So I take it the pillaging does now work?

Oh, about that bug in the CaptureCity event, I think it is because the city owner is changing across the course of that handler. Set the handler to post, rather than pre, and the owner will be the conqueror, and when the expand city code fires, the tile improvement will be able to be built by the new owner, in the new owner's territory.

I think.

I figured out the bug in the wonder code, so I'll get this lot wrapped up, and release it again.

Pedrunn, unless you want me to continue administering to the tile files, and the overall conception of this, its your mod: most of the graphics are yours, its your code.
I'm happy to write the readme and collect it all together, but its your decision.
__________________
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 August 12, 2002, 12:09   #23
Pedrunn
Call to Power II Democracy Game
King
 
Pedrunn's Avatar
 
Local Time: 02:13
Local Date: November 1, 2010
Join Date: Jul 2001
Location: of Natal, Brazil
Posts: 2,555
Quote:
Originally posted by Immortal Wombat
Excellent. I just came by to find that picture you posted, again. I lost it last time. So I take it the pillaging does now work?.
Yep it work fine except for a small bug. The CutImprovents event only prevents the TI to be cutted. yet pillage still happen (the effect and the unit looses movements). This makes the AI try to pillage over and over and over every turn although Imps remains untouched. So i am making a function to make the units move out of this TI.

Quote:
Originally posted by Immortal Wombat
Oh, about that bug in the CaptureCity event, I think it is because the city owner is changing across the course of that handler. Set the handler to post, rather than pre, and the owner will be the conqueror, and when the expand city code fires, the tile improvement will be able to be built by the new owner, in the new owner's territory.
I will try this. But i am feeling this will work out. since the city owner has to be also the owner of the terrain where the city imp is going to be added. And that is where the problem lies.
Quote:
Originally posted by Immortal Wombat
I figured out the bug in the wonder code, so I'll get this lot wrapped up, and release it again.
I did not got what you meant by this. Are you going to give up of your code and use mine? Or will you fix it?
Quote:
Originally posted by Immortal Wombat
Pedrunn, unless you want me to continue administering to the tile files, and the overall conception of this, its your mod: most of the graphics are yours, its your code.
I'm happy to write the readme and collect it all together, but its your decision.
To tell you the truth i have already made some changes in the til file so i do want to take care of the til nad control whoever wants to add new things to it.
I can do the read me but i prefer that you make it. you have a better english and i am starting to get busy here with real life, the religion code, City expansion and the GL of my mod that never finishs). So do you want to take the read me work?

PS: There seems to be a imcompatibility with the Martin's new capture options code. No matter what i change in both codes I cant get the surrouding suburbs to reduce if the city is bloodbath, enslaved or evacueted. I will attach the new code soon so that you can give it a shot too.
__________________
"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 August 12, 2002, 12:40   #24
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: 07:13
Local Date: November 1, 2010
Join Date: Mar 2001
Location: Tübingen, Germany
Posts: 6,206
Quote:
Originally posted by Pedrunn
Yep it work fine except for a small bug. The CutImprovents event only prevents the TI to be cutted. yet pillage still happen (the effect and the unit looses movements). This makes the AI try to pillage over and over and over every turn although Imps remains untouched. So i am making a function to make the units move out of this TI.
Maybe you have to check PillageUnit and PillageOrder event. As I wrote this little slic code I was happy that it avoided the crash, so far I never saw an AI of pillaging again and again. Maybe this was caused by the fog of war.

Quote:
Originally posted by Pedrunn
PS: There seems to be a imcompatibility with the Martin's new capture options code. No matter what i change in both codes I cant get the surrouding suburbs to reduce if the city is bloodbath, enslaved or evacueted. I will attach the new code soon so that you can give it a shot too.
It looks that your code has to trigger on the KillCity and on the KillPop events. And note that I did some changes for mapfi recently. You find the newest version in the accoring thread in the CTP2 general forum.

-Martin
__________________
Civ2 military advisor: "No complaints, Sir!"
Martin Gühmann is offline  
Old August 12, 2002, 17:07   #25
Pedrunn
Call to Power II Democracy Game
King
 
Pedrunn's Avatar
 
Local Time: 02:13
Local Date: November 1, 2010
Join Date: Jul 2001
Location: of Natal, Brazil
Posts: 2,555
You got it right IW . the CaptureCity works now

Martin, I got the new code but it still does not work .
Quote:
It looks that your code has to trigger on the KillCity and on the KillPop events
Those event are included in the code. They should have been triggered.

Quote:
Maybe you have to check PillageUnit and PillageOrder event. As I wrote this little slic code I was happy that it avoided the crash, so far I never saw an AI of pillaging again and again. Maybe this was caused by the fog of war.
What slic code you wrote?
I've tried not succefully those two functions. And cant be fog of war. I just placed a barb unit close to deads cities TI in the firsts turns. He went to the TI location and started to try pillaging the TI every turn.
__________________
"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 August 16, 2002, 16:11   #26
Pedrunn
Call to Power II Democracy Game
King
 
Pedrunn's Avatar
 
Local Time: 02:13
Local Date: November 1, 2010
Join Date: Jul 2001
Location: of Natal, Brazil
Posts: 2,555
Quote:
Originally posted by Martin Gühmann
so far I never saw an AI of pillaging again and again. Maybe this was caused by the fog of war.
You were right. The AI doenst keeping pillage endless.
Its unit keeps trying pillaging for several turns (about five) and them give up. So this is not a problem.
__________________
"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 August 16, 2002, 16:36   #27
Immortal Wombat
Apolytoners Hall of Fame
Prince
 
Immortal Wombat's Avatar
 
Local Time: 06:13
Local Date: November 1, 2010
Join Date: Dec 2000
Location: in perpetuity
Posts: 4,962
It could be removed entirely by adding an extra strategy that kicked in when it started pillaging suburbs. It only needs one component - the pillage goal with a priority, maxeval and maxexec of 0.

But I still think you should be able to pillage them.
__________________
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 August 16, 2002, 16:54   #28
Pedrunn
Call to Power II Democracy Game
King
 
Pedrunn's Avatar
 
Local Time: 02:13
Local Date: November 1, 2010
Join Date: Jul 2001
Location: of Natal, Brazil
Posts: 2,555
Actually when you pillage them they turn to ruins. But the AI keeps pillaging them when they are ruins. And i dont want ruins to be pillaged.
__________________
"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 August 16, 2002, 17:56   #29
Immortal Wombat
Apolytoners Hall of Fame
Prince
 
Immortal Wombat's Avatar
 
Local Time: 06:13
Local Date: November 1, 2010
Join Date: Dec 2000
Location: in perpetuity
Posts: 4,962
Ah. Yes, good point. Kill them, and blame bandits.
__________________
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 August 16, 2002, 21:55   #30
Pedrunn
Call to Power II Democracy Game
King
 
Pedrunn's Avatar
 
Local Time: 02:13
Local Date: November 1, 2010
Join Date: Jul 2001
Location: of Natal, Brazil
Posts: 2,555
__________________
"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  
 

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 01:13.


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