View Full Version : Automatic Defeat When you start


Hypnotoad
Oct 26, 2006, 09:51 PM
Hi,

I'm trying to modify an existing map (for The Ancient Mediterranean Mod). Everything works right -- a get a glimpse of a correct looking map -- and then it says that I am automatically defeated. Any idea what I need to do to make this problem go away?

In case it somehow helps, here is a link to the game file. It should only run if you have TAM 1.97.

http://download.yousendit.com/2137C3D77D4671B0

SiLL
Oct 27, 2006, 06:44 AM
Well, the question is: What did u do to get that problem.
As far as I now your issue could have several causes. So what did u change in the game, before it did occur the first time?

Paasky
Oct 27, 2006, 06:47 AM
I've had this problem several times, and the only solution I can find is save every 2mins in a different save, and after 10mins test the latest one if it still works.
I've lost countless of hours for this seemingly random problem.

If anyone knows any possible reasons for this, please share!

strategyonly
Oct 27, 2006, 07:19 AM
Did you remake the map with BMP?? What did you do before the crash that changed the map?? need more info.

Déja
Oct 27, 2006, 08:45 AM
did you remove any units or change the terrain such that where the player's starting units would be is now under water? If the game tries to spawn land units over water areas, they will automatically die and without any units, you lose.

Hypnotoad
Oct 27, 2006, 10:32 AM
Here is how I created the map (all done in a text editor, not using BMP):

I took the Huge map of the Mediterranean (which works fine) and cut it down to a size I wanted as follows. I deleted the first X=0 --> x=54 plots. Then I renumbered all of the X=55 --> x=134 plots to x=0 --> x = 79 (using search and replace). I deleted the rest of the plots (x = 135 --> 179). I then removed all of the civs that no longer had a place from the beginning of the file. I renumbered the civs and put in "none" for the empty spaces.

The map is mostly land and I've also tried a number of starts. But I also was able to see my start location and it was correct -- on land. It just seemed like I didn't have a settler or a warrior so I had no units so I lost. You don't normally need to include these units in the map file, right? I didn't notice any mention of this in the other maps I looked at.

I did not remove any units, to be clear.

Dale
Oct 27, 2006, 03:05 PM
Just add a settler somewhere on land. Doesn't matter where, the point is to ensure you get a unit so you don't die.

Once you're in, then you can start to look around for what causes the stated problem.

I've had it before, and it's usually something stupid like a civ's start loc on water or mountains.

Dale

Déja
Oct 27, 2006, 07:24 PM
It sounds like there may have been a python script in the mod that set the starting locations of the civs, but if the map is suddenly too small, then the start locations get all messed up. Also, generally WorldBuilder saves include any units, unless they're added programmatically as above.

Hypnotoad
Oct 27, 2006, 07:29 PM
I've looked at the starting locations at the beginning of the worldbuilder file. They are all legitimate places on the map. I've even cross referenced some of them with what comes later -- it says that that tile is a plains (or whatever).

Deja: when you say "WorldBuilder saves include any units," that means even for the beginning of the game? So perhaps I need to put in a settler and a warrior?

Déja
Oct 27, 2006, 07:38 PM
Looking at the Earth.Civ4WorldBuilderSave, the important bit is:


BeginPlayer
LeaderType=LEADER_HATSHEPSUT
CivType=CIVILIZATION_EGYPT
Team=0
PlayableCiv=1
StartingX=69, StartingY=37
Handicap=HANDICAP_NOBLE
EndPlayer


If the StartingX and StartingY are over water or off the map, then you'll have problems. Did you change the coordinates?

Hypnotoad
Oct 27, 2006, 07:42 PM
Okay, thanks a lot. It is strange that none of the other TAM maps have this in them. I guess they are doing something with Python or SDK.

Déja
Oct 27, 2006, 07:42 PM
I was hoping to correct it before you read it, but I was mistaken... see above corrected post

Hypnotoad
Oct 27, 2006, 08:06 PM
I did change the coordinates and then I double checked them by looking up the appropriate plot and making sure it said "plane" or whatever.

Thanks.

Déja
Oct 27, 2006, 08:38 PM
hm... weird... I'd manually place a settler for your civ, start a custom scenario and disable all the VCs and then go into WB to examine the map after starting the game

Jet
Oct 28, 2006, 02:42 AM
I have to admit I'm not sure I believe the claim that this problem can be caused by settlers over water. I have had this problem without settlers over water, and I'm fairly certain I have had settlers over water without this (or any similar) problem.

Déja
Oct 28, 2006, 03:00 AM
Well, I know that when I was testing a feature for my mod where the map is redrawn by certain conditions, I had used large patches of terrain in the code and one patch of terrain happened to use the TerrainType for ocean and it also happened to be the section drawn beneath my only units and the game instantly ended in defeat (I had to review my logs to figure out what happened)

Paasky
Oct 29, 2006, 12:38 PM
I've had this problem without any settlers available ingame. I've got a map, with cities, units, everything. I edit a few plots, save & BAM! it doesn't work anymore & every player has a huge amount of points, but all of the cities are no more...

Morholt
Oct 30, 2006, 05:22 PM
I'm having the same problem. Copying the tile information to a clean WBS and running it (thus getting random starts), it turns out that the units and cities are never placed. Sample code:
BeginPlot
x=3,y=49
TerrainType=TERRAIN_TUNDRA
PlotType=1
BeginUnit
UnitType=UNIT_WARRIOR, UnitOwner=4
Damage=0
Level=1, Experience=0
PromotionType=PROMOTION_COMBAT1
UnitAIType=UNITAI_ATTACK
EndUnit
BeginUnit
UnitType=UNIT_SETTLER, UnitOwner=4
Damage=0
Level=1, Experience=0
UnitAIType=UNITAI_SETTLE
EndUnit
TeamReveal=4,
EndPlot
I'm dumbfounded. This code was generated by the worldbuilder. How could it not work?

By the way, having the editor built into the game is a horrible idea. Civ3Edit was horribly clunky and inefficient, but it was leaps and bounds better then worldbuilder.

primordial stew
Oct 31, 2006, 04:01 PM
Maybe there is something wrong with civ #4?

If the civ you are playing has no units, and no cities it will give that message. There are probably other causes as well, but this is what it was for me.

When I was having this problem I couldn't find a list of what the causes were that people had gotten though. So when you do find out what the problem is be sure to document it via a post for future reference.

Working on the initial map with worldbuilder does indeed suck. But being able to see what the state of the world is at any moment *is* very helpful!