Modern map scripts use invisible placeholder objects for positioning objects. Here's an example from DE's official Golden Stream map, where the flags are used to help determine the locations of the map's fish.
4
In order for these flags and other placeholders not to affect gameplay, they need several items of their unit data cleared. In particular, they are given 0 HP so they "die" immediately.
5
The problem was, I meant to use the object with ID number 649 as the placeholder, which is an unused object for a dead campaign hero. However, I had a typo when I entered this ID number.
6
ID 469 just happens to correspond to Trebuchet projectiles with fire graphics (projectiles before and after Chemistry use different objects). Hence the projectiles got 0 HP and exploded immediately.
This didn't affect the map generation, only the gameplay case of Treb+Chemistry.
7
But why make these changes in the first place? There were enough changes we wanted for TTL that it made more sense to do a full rewrite rather than just tweak the existing script. In particular, T90 wanted to make trenches shorter so hills stretched from player bases to the edge.
8
But to do this... I had to rotate the map 90 degrees. I don't have an explanation, other than DE sometimes fails to generate hills if the map is facing the other direction. See the missing hill on the top-left of this minimap.
9
I could make the hill more likely to spawn by increasing the number of times I repeat the command to generate hills. But doing so enough times drastically increases the time it takes for the map to generate (and hence to launch the game when starting a match).
10
Rotating the map makes the hill spawn, and imo is the better solution (even though we had wanted to let the map randomly spawn in either orientation originally).
11
This isn't the first time I've encountered the hill bug either. The Outcrop map script currently for The Garrison has a similar bug: the "ridge" doesn't spawn on one side. I had the same issue when using Outcrop for Cartographers and needed fixed TC locations to resolve it.
12
So in all, a weird Aoe2 bug with hills resulted in my doing a somewhat extensive rewrite of the map script, during which I made a typo that just happened to result in fire Treb projectiles getting 0 HP.
Save this thread — create a free accountSave this thread