John the Late

Knight

posted 09-22-17 04:02 PM CT (US)



Remembering some old discoveries I made while modding annex units, I found a fix. Annex units are spawned in their finished state immediately upon their head unit entering the map, regardless of the head unit's status. This is also the reason for TCs having a seperate "under construction" unit which then uses the actual TC as its stack unit (placed on top of the construction unit once it is finished) and deletes itself immediately after finishing construction. Would the main TC be buildable, its annex units would be constructed immediately as soon as the foundation is laid, obstructing it and making the construction impossible, since unlike units they wouldn't be able to move off the construction site. Using this knowledge, it is possible to add annex units to the diagonal gate foundation.



Here is how you proceed:



1. What we want to do first is to create two new units for our gates, one for each diagonal alignment.



Copy units 663 and 671 and paste them. I will call the pasted duplicates A and B.



2. Next we want to link these units to the diagonal gates under construction.

Go to unit 665 and set the first two annex units to A. Give them the offsets 1.5 1.5 and -1.5 -1.5.



Go to unit 667 and set the first two annex units to B. Give them the offsets 1.5 -1.5 and -1.5 1.5.



Head units of A and B should be set to 665 and 667 already, if you copied correctly.



3. Now we want to make the new annex units less noticeable.



Delete the damage, snow and construction graphics of A and B by setting them to -1. DO NOT set the main standing graphic to -1, the game hates units lacking one. Instead, set it to an empty graphics entry (no SLP). The farm graphic (255) is a good choice for this. (Farms have no graphic of their own, instead they change the terrain below them.)



Set LOS to -1.



-----



And that should be it!



There is a small side effect: The side pieces are now unwalkable at 0 HP already, before a villager starts constructing the gate. I think it won't be very exploitable due to gates blocking a 4x4 tile area for constructions and only the top/bottom or left/right corners would be blockable this way. Still, if someone finds a way to abuse this, please feel free to tell me about it.



I can only encourage people to try more annex unit modding, it allows for pretty cool features. Just make frequent backups, as they are pretty crash happy.



PS: I wrote this on my phone due to lacking proper landline internet at the moment, sorry for the lack of formatting and likely spelling/typing mistakes. The AoKH Continuous Screenshot Competition X | The CSC Archives VI | Unnamed RP Map project - 99% finished A topic I had seen popping up every now and then: Diagonal gates do not properly block unit pathing while under construction. This is because unlike finished gates, which are a composite unit of 4 pieces, the foundation gate (which is a completely seperate unit) only consists of a single unit. And a single unit can only ever have a rectangular size, so while finished diagonal gates have a size of 1x1 - 2x2 - 1x1, those under construction only block the central 2x2.Remembering some old discoveries I made while modding annex units, I found a fix. Annex units are spawned in their finished state immediately upon their head unit entering the map, regardless of the head unit's status. This is also the reason for TCs having a seperate "under construction" unit which then uses the actual TC as its stack unit (placed on top of the construction unit once it is finished) and deletes itself immediately after finishing construction. Would the main TC be buildable, its annex units would be constructed immediately as soon as the foundation is laid, obstructing it and making the construction impossible, since unlike units they wouldn't be able to move off the construction site. Using this knowledge, it is possible to add annex units to the diagonal gate foundation.Here is how you proceed: