Remove civ-specific hardcoding in rmgen wall-placement script.
Original Patch By: FeXoR
Reviewed By: FeXoR
Commented On By: elexis
Refs #2944
Differential Revision: https://code.wildfiregames.com/D900
Remove civ-specific hardcoding in rmgen wall-placement script.
Description
Details
Event Timeline
Comment Actions Also it is contradictory that placeCustomFortress places the templates of the civ of the passed playerID despite having a civ argument. Comment Actions How about this, I'll fix the map and you update the template viewer patch for a23 instead? Comment Actions Thanks for the fix. Guess one could have used BUILDING_ORIENTATION and pass it for the placeStartingEntities call too. Also it would be most failsafe and add some variability to the map to use an arbitrary angle per player, but that would be some work (but on the other hand civic centers are supposed to be 45° rotated everyhwere). But we have bigger fish to fry. :-) Comment Actions While changing the wall_builder code to use vectors for positions, I noticed something off. I suspect it was one of the D900 commits: a22: rP21017 (i.e. before the vector commit): See the carthaginian palisade gate and the briton walls being a degenerated triangle. Comment Actions The "degenerated triangles" is a bug with that particular wall placement function, that is made more apparent as we now demonstrate it on the wall demo map. (FWIW, the wall_demo map is the only map that uses that particular wall placement function.) The small cart wallset was using palisade gates long before D900 came into existence. And the houses overlapping are because of the small radius passed to the wall placement functions. Possible solutions:
None of this was introduced by a D900-related commit, just made more obvious. Comment Actions I think this is about the second line from below ind it's placeGenericFortress()?
Likely all of the above (or similar) should be done in the end I don't get the thing with the houses or, if any, other issues. Comment Actions About the unintended wallsets: The purpose of the demo maps is to show mappers and other curious folks what is possible with the library, i.e. the more realistic or re-usable the use-case, the better. Comment Actions (The obelisks are just meant to show the center e.g. to show where it is on fortress (the "center of mass") compared to e.g. regular polygons/circular where it's just the center of symmetry) Not in every case sine mod's wall sets can contain walls of any length so no fixed value can solve this for mods. For the public mod, yes, e.g. two times the length of a long wall segment at least should do fine. Comment Actions The obelisk in the center is good, just saying walls should not be replaced with placeholders to work around.
It depends on the wall placement type that is called, right? For the regular walls we can predict the needed area for a given civ, for irregular walls one can estimate (presumably more than 2 long wallpieces I suppose). |