• We have updated our Community Code of Conduct. Please read through the new rules for the forum that are an integral part of Paradox Interactive’s User Agreement.
Yes, very interesting in case I (or anybody) would try use a similar system with another map base. Just three points:
  • You didn't answer one point, where's the loop for the invasion cycles? Or are special waves end at a point?
  • For the lairs testing I'm not sure to have understand. I understand the limit but not why how you test some den types replace a count. Your test is a "or" on 5 or more types of dens, if the 5 exists or only one it's the same result. But well I see how complicate it is with the apparent limits of the scripting language. I'll try dig a little around this myself that's an interesting problem.
  • For the early spawn of den that's a weird bug, I see you used sometime full health and if that doesn't work it's a bug.

  • Invasion are activated by "invasion activation", but there are generated by "invasion cycle #". There are three main steps of this trigger, first, delaying the wave, randomly. Secondly, Spawn a lair at a random location of border map. I would probably have used the null spawner, but this one seems to be unable to spawn via trigger. Third phase, you set the spawn prog of the wave, and destroy the den. Now you have a wave which follow its goals at defined in invasion_## from spawn progs.
  • For the big or, I perfectly know that I'm screwed if there are various building types. But as I said, you must specify the kind of building for your test. There is no variable which said player # possesses ## buildings. Another way to do it is to test the tag, but in the map as it was created, it the same case. But if I would create a new map, I would have search a way to tag all lair with the same tag.
  • Full health condition trigger doesn't work everytime. I don't know if it is my old version of the game, or something else I done wrong, but I am unable to spawn full health lair before the first 10 seconds of the game.
 
Have you found the individual code that dictates whether or not heroes attack certain lairs on their own? Heroes attack the portals from the Ancient Lich quest on their own and I'm trying to figure out why so I can possibly add the feature to other lairs. Ideally, I would like to make it so only certain characters would hunt lairs on their own, such as Paladins.
 
For what I see, heroes doesn't attack lair, but attack enemy constructed buildings. I.e. : you create a map with guard tower, peasant house, dark castle and dark portals, heroes would attack them on their own. But if you create wolfe's den, crypt and dragon lairs, do not except them to attack. This is not a modified behaviour, this is standard. Look at any other campaign map like the agrela/krypta or paladin/elves ones.

However there are trigger which allow you to give a behaviour to creature/heroes, like patrolling, attack or go to sleep.
 
@el_kloklo:
Thanks for the precisions. So no loop for the special waves and the cycles have an end.

About the count problem I made some attempt to set two tags on a same den but failed. I was looking first to find a way to count manually but that's not obvious. A possible way (to try) is to spawn something with a defined tag each time you want add 1 and use Tags count to test the result number. But then remove 1 is a problem! Anyway this limited counting to only be able to add 1, could allow have a count of the type of dens with a sample condition. From this base you could use a code that does the test for each den type and if positive add 1 or more. So you launch the trigger, use a while to wait it ends, test the global count result, launch a trigger to delete the global counter and do your action. I plan testing that with spawning something else than building or unit, if this is possible to spawn and with a tag.

@ItsEggrollTime: I was wondering too why this special behavior, I haven't tried yet search fully the reason but just gave a look at it. A first test could be to change the map and spawn some other den and see if they got attacked or not, if yes it's in the map or just the close spawning, if not it's in the game files defining the building (or hardcoded somewhere). If it's in building files, I looked quickly and could not find a clear difference, perhaps not having the guard_point definition? Other than that one thing that seems interesting to explore are the relations and loot_relations you can find in some unit ai.
 
For what I see, heroes doesn't attack lair, but attack enemy constructed buildings. I.e. : you create a map with guard tower, peasant house, dark castle and dark portals, heroes would attack them on their own. But if you create wolfe's den, crypt and dragon lairs, do not except them to attack. This is not a modified behaviour, this is standard. Look at any other campaign map like the agrela/krypta or paladin/elves ones.

However there are trigger which allow you to give a behaviour to creature/heroes, like patrolling, attack or go to sleep.

Then it's quite possible that it comes from the building files definition and the guard_point definition, buildings with none attacked and not building with one... If that's the reason, it's more a bug than a feature! :D
 
For some reason windmills can spawn a mile away from everything. A windmill spawned twice in this location the last time I played. It's tax collector suicide!
 

Attachments

  • Windmill.jpg
    Windmill.jpg
    606,7 KB · Views: 65
Okay I just understand what you where asking. The cycle of invasion are endless, because the three steps I described are set in a while(1) condition. Sorry for misunderstanding.
No problem, in fact the question was weird, now I see the loop in each trigger. Now I have look rather deeply to your code and understand almost everything I'm very impressed by the design polishing and how you make your way through the language limits and possibilities. I had a rather good laugh when I checked your random management for successive random tests, that's so simple but I bet I would hardly have found it.

For some reason windmills can spawn a mile away from everything. A windmill spawned twice in this location the last time I played. It's tax collector suicide!
Lol, that said the game is well done on this point, your so far windmill will get destroyed rather soon and the next random will hardly spawn it there again.
 
For some reason windmills can spawn a mile away from everything. A windmill spawned twice in this location the last time I played. It's tax collector suicide!

that's not mile away. That's just on the opposite side of the river, but in real distance, it is near. That's a bug proably done of the script of random spawn which work in range, but not take care if this range could have need to work. That's probably devs didn't make any map design with the castle near of the water.
 
So, any chance this will get updated for the new patch with editor? Currently I get an error if I modify the resource.pak file.

Nevermind. Discovered maps need to be extracted to the /documents/majesty2/user_maps folder into a folder of their own. Works fine for me now with the 1.3 patch. Thanks!
 
Last edited:
Anybody have a copy of this map?

Mediafire says invalid file or file deleted.