Yesterday I fixed a bug I had introduced in Dzong where Trebuchets...

@TravisWestura
Travis Westura@TravisWestura
10 views Feb 01, 2025 ~2 min read
Advertisement
1
Yesterday I fixed a bug I had introduced in Dzong where Trebuchets with Chemistry stopped working---their shots exploded immediately.

Here's a thread on how that bug happened.
Media image
2
First, a clip of the bug from @Dave_AoE twitch.tv/dave_aoe/clip/…
3
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.
Media image
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.
Media image
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.
Media image
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.
Media image
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.
Media image
Media image
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.
Media image
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).
Media image
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).
Media image
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.
Media image
Media image
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.
Actions
What You Can Do
  • Export as PDF or Markdown
  • Batch Export to Notion
  • Bookmark & Highlight
  • Screenshot Tweet
Create Free Account

Includes 7-day Premium trial

Advertisement