|
Thread: Campaign Editor - Building conditions | |
|
TheUnknown
Known Hero
|
posted May 13, 2016 05:53 AM |
|
|
Campaign Editor - Building conditions
Hi all,
I was going trough the campaign editor and I was trying to disable the player to build the Order of Paladins, but I want him to be able to build Knight's Chapter. The problem is there is no condition to check if the Monastery or Barracks have been build. I can check if his army has Monks or Crusaders but that is not how I want to solve it.
So is there a way to achieve this? Can I check if a building has been built?
P.S. I also found out there is a way to solve this if I manage creature buildings from level 1 trough the script, but I still wonder if it's possible to avoid the hassle of scripting the first three levels.
|
|
Karmakeld
Responsible
Supreme Hero
|
posted June 09, 2016 11:09 PM |
|
|
Well you can build (give) buildings via scripts, but it's true that there's no real way to check if a building has been constructed. If you limit players access to e.g Monks, by not having any monk dwellings on the adventure map, and also knows that the player can't get access to e.g. Monks via skills like Charm or Diplomacy, checking for Monks presence could be a solution.
A final option is to check and set the players amount of resources at the start of each day and do a continuous check (in case of resources being spend or resource piles being collected), then if you know the exact cost of the building you wish to check for, you subtract the building costs (gold, wood, ore etc) from the players treasury (set by variables). If the subtraction matches the costs you've set up, you can conclude the building have been build. But this assumes that it doesn't matches the cost of other buildings. Somewhat complicated, but there's no easy way to to do such check, sadly.
Hope this was helpful.
|
|
EnergyZ
Legendary Hero
President of MM Wiki
|
posted June 09, 2016 11:21 PM |
|
|
|
TheUnknown
Known Hero
|
posted June 12, 2016 11:47 PM |
|
|
Well I guess I should script the buildings from zero because it's very hard to determine if a building has been build. This way the map would end up asking too much questions (at least one for each building) and it might me too boring to develop a town in such a way for a player. Luckily on this map it's only one town so it shouldn't be too bad.
On the other hand it will be a new experience and some players might be willing to try and enjoy it.
I plan on banning the potion building, caravan, shipyard, the grail building and from the specific ones, the magic dampener, necromancy amplifier, battle academy, rainbow, seminary and university.
I plan on leaving the other buildings but I am not sure about the costs as some of them like the citadel and castle may be too expensive. I will most likely follow equilibris on that one.
If anyone has an advice on the buildings choice let me know
Thanks
|
|
|
|