Not sure if I’d need to create new topic or bumping this one is fine, but anyway. Currently I’m look via adventure map objects handling code and see there is few things that incomplete: cartographers need don’t work as non-unique objects, “visited” and “owned” not displayed for all objects where it’s needed. Though it’s possible to just fix those in code, but it’s result in code duplication that looks bad. So I decide to ask few things.
First of all is it important to stick to behaviour of vanilla H3? E.g cartographers for don’t have “visited” hover text in vanilla and some objects that can be owned don’t have “owned” hower text. Personally I think that what I see it’s would be useful to add “owned by” in status for all objects that can be owned.
…
Also at moment there is few separate handlers “onceVisitable”, “oncePerHero”, “oncePerWeek” used by rewardable objects. Still those handlers can’t be used by special objects like cartographers and keymasters and objects that use “onceVisitable” still shouldn’t share this information for other players.
Based on this I think what if each object in JSON would have few more properties like:
- (bool) “isUnique”. Set to “false” for keymasters, cartographers and any other objects that once visited/paid you can no longer use any other objects of same type/subtype.
- (bool) “canBeOwned”. Set to “true” for mines, dwellings, lighthouse, shipyards, border gates, etc (?). Possible this should also enable "Owned by " hower text for all such buildings.
- (string) “visitLimit”: onceVisitable, oncePerPlayer, oncePerHero, oncePerWeek, etc. Those might be moved to option and in same time rewardable objects might get different “handler”.
- (bool) “visitVisibility”. At moment all rewardable objects like Warrior’s Tomb are marked as visible for every player while they shouldn’t (there is note in code). So VCMI might not only fix this, but also implement an option that make certain object marked as visited on adventure map for every player. Shouldn’t be needed for vanilla objects, but might be useful for mods.
- Also thinking there might be some property that allow to set guards to certain object…
Of course it’s just my thoughts and properties, names and options might be different, but I think something like that would help to finish implementation of current objects and also add a bit more modability.