Page MenuHomeWildfire Games

Structures demo map
AbandonedPublic

Authored by temple on Jul 5 2017, 10:44 PM.

Details

Reviewers
None
Summary

This map should help people who want to make adjustments to buildings, like changing the sizes of footprints and obstructions or changing the foundation or rubble art -- or figuring out if new art is needed.

It displays all buildings from the structure directory, along with foundations and halfway-completed foundations. You can delete a building to look at its rubble. You can open the developer overlay (alt-d) to enable the obstruction and bounding box overlays.

The code was largely copied from "Units demo". Elexis added the selection highlight.

Test Plan

There are a lot of buildings, so if performance is an issue (it is on my old computer), there are a couple of lines that you can uncomment in order to only display Mauryan buildings, for example.
You can also change the spacing if you're annoyed by some overlapping buildings (like wonders).

Diff Detail

Lint
Lint Skipped
Unit
Unit Tests Skipped

Event Timeline

temple created this revision.Jul 5 2017, 10:44 PM

Also I suggest to not delete a building, but add an actor with its rubble. And do not use entities except main building, only actors, if it's possible.

binaries/data/mods/public/maps/scenarios/Structures_demo.js
133

I don't think, that selecting all by default is good. Because it costs performance, and usually it's not needed. It's easy to select or only needed.

binaries/data/mods/public/maps/scenarios/Structures_demo.xml
50

We haven't these triggers, it presents only in a one map. And it should be removed: D642.

elexis added a subscriber: elexis.Jul 6 2017, 3:52 PM

Not sure if we need that thing committed.
If so, duplication should be nuked. F.e. only have one trigger script file, include it from both XML files and just set a custom boolean in the XML file that the script checks for (but that probably won't work without changing the simulation code, because we only have access to these XML settings in LoadMapSettings of Setup.js and then it's gone).
Another option would be just adding a boolean variable at the top of the file for developers (which are the target audience anyway).
Maps should be able to specificy custom gamesetup dropdowns and checkboxes sometime. That would be the best solution for this proposal too.

binaries/data/mods/public/maps/scenarios/Structures_demo.js
133

Could make a const bool at the top of the file with a comment stating that this can be useful (the only way?) to check the footprint of an entity (units have footprints too that might want to be checked, refs duplication).

binaries/data/mods/public/maps/scenarios/Structures_demo.xml
50

nice find

temple abandoned this revision.Sep 12 2017, 7:54 PM

Map doesn't need to be added. People who want to use it can download it separately.

In D710#35240, @temple wrote:

Map doesn't need to be added

Agree. It does have a greater than zero use case though (equal to the use case of the units demo map).
(So we could merge it with the other map if some coder and someone with commit access find the time to.)

People who want to use it can download it separately.

Just that noone knows about it's existence.