Skip to content

Posts from Current questions and answers regarding the map editor.

5.0 (12 ratings)
User Avatar
Auto-translated
Well, there's a method described in Jack of Shadows' FAQ. The only thing I'll add is that each Lua script should have a corresponding XDB file. In the Map Properties Tree/Map Script, create a new XDB and, in its properties window, specify your Lua file (in the top line of the properties). I think you also need to put test.lua in the game's folder.
Yes, you need to call it like this: @DoFile(MYFILE);

Added 9 minutes later
It's simple: use SetAIHeroAttractor(nHero, nTown, 2); at the appropriate moment.
Then, create a handler for when the town is touched, checking who touched it:
function example(heroname)
if heroname=="MYAIHERONAME" then
SiegeTown(...)
...
end;
end;
In theory, the AI hero will enter the town on its own. But you can use a workaround, like hiring a hero in that town. In general, too many workarounds are not ideal, but Lua's functionality is limited, so we have to improvise. I'll think more thoroughly about your problem and look at it on my computer tomorrow; right now, I can barely remember anything on my smartphone.
P.S. I can still answer simpler questions.
С уважением, }{0TT@6bI4
_________________
Группа картостроителей
Там ответы на вопросы, руководства, гайды и прочее
Discord-сервер "Герои 5: S.T.A.L.K.E.R"
Сервер по модификации "Герои 5: S.T.A.L.K.E.R"
_________________
In reply to }{0TT@6bI4
User Avatar
Auto-translated
}{0TT@6bI4
Well, Jack of Shadows has a method in his FAQ. The only thing I'll add is that each Lua script should have a corresponding XDB file. In the Map Properties Tree/Map Script, create a new XDB and, in the properties window that appears, specify your Lua file (the top line of the properties). I think you also need to put test.lua in the game's folder.
Yes, you need to call it like this: @DoFile(MYFILE)

1) I read the method again and will try it. But a question arises: where exactly? In the data folder? (Jack of Shadows specified this folder)

2) Another quick question about mega AI. It says version 3.0... and after reading the comments, a couple of users said that there are no problems with version 3.1 either. Have you installed this mod?
In reply to Fallenru
User Avatar
Auto-translated
Fallenru
1) I reread the instructions again and will try. But a question arises. Where exactly? In the data folder? (Jack of Shadows specified this folder)

2) Another quick question about mega AI. It says version 3.0... and after reading comments, a couple of users said that there are no problems with version 3.1 either. Have you tried this mod?

Put it where Jack said, that's where it should go!) P.S. Yes, it seems that's where it should be... ))

I used Mega AI, the computer cheats less, uses spells better, and employs some tactical tricks. It's less of a pushover.
С уважением, }{0TT@6bI4
_________________
Группа картостроителей
Там ответы на вопросы, руководства, гайды и прочее
Discord-сервер "Герои 5: S.T.A.L.K.E.R"
Сервер по модификации "Герои 5: S.T.A.L.K.E.R"
_________________
In reply to }{0TT@6bI4
User Avatar
Auto-translated
Good afternoon. Can anyone tell me where I can find information about all the properties of objects (in this case, I'm interested in cities, but I'd also like to know about the others)? Yes, I understand that I can translate each line and the meaning will be clear, but I'm still looking for the most detailed description, if one exists. Also, I'd like a detailed description of the properties in the MAP properties tree.
Attachments 2
2 files attached • Total size: 192.9 KB
User Avatar
Auto-translated
I haven't seen a manual like this anywhere.
Firstly, most objects are easily customized not through their properties, but by selecting them and pressing the spacebar; this is also how towns are customized. In the second screenshot, are you interested in TOWN_SPECIAL?
If you want, I can describe all the properties that interest you, and also from the properties tree.
С уважением, }{0TT@6bI4
_________________
Группа картостроителей
Там ответы на вопросы, руководства, гайды и прочее
Discord-сервер "Герои 5: S.T.A.L.K.E.R"
Сервер по модификации "Герои 5: S.T.A.L.K.E.R"
_________________
In reply to }{0TT@6bI4
User Avatar
Auto-translated
Yes, I want to understand what TOWN_SPECIAL is used for (or can be used for). Asking you to explain everything would be lengthy and more like a chore. I'll compile a list, and if it's not too much trouble, please describe what you know.
User Avatar
Auto-translated
Town special – literally “special town,” meaning it’s needed if you’re creating your own town rather than using an existing one, and setting your own parameters. I don’t know of any other direct uses for it besides what’s mentioned above.
С уважением, }{0TT@6bI4
_________________
Группа картостроителей
Там ответы на вопросы, руководства, гайды и прочее
Discord-сервер "Герои 5: S.T.A.L.K.E.R"
Сервер по модификации "Герои 5: S.T.A.L.K.E.R"
_________________
In reply to }{0TT@6bI4
User Avatar
Auto-translated
}{0TT@6bI4
Town special — literally "special town," meaning it's needed if you're creating your own town rather than using an existing one, allowing you to customize its parameters. I don't know of any other direct uses besides what's mentioned above.
I don't quite understand what is meant by "your own town" (besides changing the visual model and modifying properties, nothing else comes to mind)?
User Avatar
Auto-translated
Nothing prevents you from creating your own city (except for a small amount of experience). In it, for example, half of the buildings could be human, and half could be orcish, and you wouldn't need to build anything for the capitol or castle.

Added 3 minutes later
But specifically, creating your own city is already modding, and questions about it should be asked in another thread, and to other people, such as psaktha or zahar0z.
С уважением, }{0TT@6bI4
_________________
Группа картостроителей
Там ответы на вопросы, руководства, гайды и прочее
Discord-сервер "Герои 5: S.T.A.L.K.E.R"
Сервер по модификации "Герои 5: S.T.A.L.K.E.R"
_________________
In reply to Fallenru
User Avatar
Auto-translated
I am interested in the following property parameters: - Combat script (battle script) - could you provide a small example? - Player ID (why is there a "players count" parameter at the end?) - Capture trigger and hero (how do I use this? What values or things can I enter?) - Specialization - what interesting changes can I make here? - Script (what can I write here, and how does it work?) - RndSouce (there are 4 values here, how and for what are they used?) - Link to player (player selection, as I understand it. There is also a "players count" parameter at the end, what is it for?) - Link to town (it seems to be a "reference" to the 1st player and his Castle in my case, something like that...). As I described yesterday, there is a 1st player and his Castle, and on the opposite side of the map, there is a Castle built for the same player, but with a garrison and a hero defending it. We cannot solve the problem of this town's affiliation without using workarounds. Perhaps something can be figured out through this property? And some more questions not related to the editor: - Phoenix Lake... is it impossible to increase the growth rate? (Except by creating some kind of trigger and resetting the growth rate... I saw something similar on the forum). Simply, a growth rate of +1/+1 is very small. I had to add more buildings. Also, why doesn't the number of phoenixes increase, as in other dwellings? (For example, peasants increase each week, I haven't figured out how this works). - When playing on Multiplayer maps, you make a plan in your head, think about upgrades, and so on. Let's say you decide that you want to play against an opponent using summoning magic (and you even start upgrading it) and simultaneously build the entire guild of mages, but there is no summoning magic there. As I understand it, the computer doesn't care what you get. That is, all spells are completely random?
Attachments 1
1 file attached • Total size: 47.1 KB
User Avatar
Auto-translated
Combat script — a link to an xdb script that will run during a city siege. Players count — determines which player the castle belongs to, based on their number. For example, with 3 players, the castle would be given to the 3rd player, and with 6 players, to the 6th player. Capture trigger — an automatic trigger for capturing the castle. In the Action parameters, you enter the name of the function that should run after the capture, and this function must be in the main script. HeroDeployTrigger — the same as above, but this is a trigger for a hero leaving the castle. Note: It's easier to place triggers in the script rather than in the object properties (!). Specialization — the city's specialization. You can manually choose from the specialization tree by clicking ..., or you can select the desired castle and, by pressing the spacebar, go to the convenient castle properties, where you can easily see what a specific specialization gives and choose the one you need. Script — this is... obviously, a script! (Which will run while we are inside the castle, i.e., for example, when hiring creatures or building a capitol.) RndSource — I haven't encountered its use. What parameters, besides RND_TOWN, does it offer to choose from? Link to player — obviously, a link to the player. Link to town — you won't need it, and you shouldn't change anything in it. It can lead to crashes or lags. In the editor, attempts to change links to objects often end badly. And here are some answers that don't relate to the editor (you might think they do, but I don't): -Phoenix growth — the base value is 1. You can increase it in the advanced map editor (you can see how to do this) by changing the phoenix's growth rate (WeeklyGrowth) in the Creature resource. If you want, I can send you my manual where we add firebirds to the game, including changing the fire lake. But I can only send it when I get to my computer; I'm writing from my smartphone right now.
+ why, for some reason, the number of phoenixes doesn't increase like in other dwellings.
Do you mean they don't accumulate? I'll tell you how to fix it when I get to my computer; I won't mislead you right now. -In general, each castle, depending on the race, has its own native schools of magic. They are configured through AdvMapTownShared => ... => Look for lines in the properties in the window that appears, something like Native Magic; it should be somewhere at the bottom of the properties. You'll find it easily. And change it, for example, to Summoning and Darkness, and, most often, the guild will generate spells from these schools. Besides these conditions, it's random.
С уважением, }{0TT@6bI4
_________________
Группа картостроителей
Там ответы на вопросы, руководства, гайды и прочее
Discord-сервер "Герои 5: S.T.A.L.K.E.R"
Сервер по модификации "Герои 5: S.T.A.L.K.E.R"
_________________
In reply to }{0TT@6bI4
User Avatar
Auto-translated
}{0TT@6bI4
RND_TOWN, does it offer a choice?
RndSource – here are the options
Attachments 1
1 file attached • Total size: 22.8 KB
User Avatar
Auto-translated
Okay. This parameter determines what will be random: whether the player's affiliation or the city itself will be random, or whether it will be owned by someone or not.

Added 1 hour 13 minutes ago
planetixsixs
How do I create an animation for the destruction of a city or object on the map? (For example, in the Tribes of the East campaign, when a barbarian approaches or captures a hut or castle, and it collapses). And how do I create a script so that a siege of an enemy castle begins with a hero, so that the player can siege it themselves (so that there is no auto-battle)?
Look at the RazeTown and RazeBuilding functions. Inside them, you need to specify the name of the city/object, separated by a comma, and the path to the file of the object that should remain after the burning. The following address is recommended:
AdvMapStaticShared/_(AdvMapStaticShared)/Razed/NEEDED.xdb#xpointer(/AdvMapStaticShared).
You can start a manual siege in a similar way to the StartCombat function, using the SiegeTown function. You can study this function in detail here => https://yadi.sk/d/W6cz5UBu3SGAvb, in the Theory/Script Functions.pdf folder
С уважением, }{0TT@6bI4
_________________
Группа картостроителей
Там ответы на вопросы, руководства, гайды и прочее
Discord-сервер "Герои 5: S.T.A.L.K.E.R"
Сервер по модификации "Герои 5: S.T.A.L.K.E.R"
_________________
In reply to }{0TT@6bI4
User Avatar
Auto-translated
Good evening. I have some new questions.
1) I have this code snippet. I don't understand the underlined elements. Also, how do I properly reset the trigger for capturing an object? Initially, the Castle should be captured by the AI, and then by one of the players.
function message(n1, n2, s1, s2)
if (n2 == 1)
then MessageBoxForPlayers(2,"/Maps/RMG/.../message.27.txt");
--as I understand it, 2 is the player to whom this message is displayed
Trigger(OBJECT_CAPTURE_TRIGGER,"Castle1",nil);
end;
Trigger(OBJECT_CAPTURE_TRIGGER,"Castle1","message");
2) Signpost (a sign where you can write a message for travelers). The messages disappear almost instantly; how can I fix this?
3) I created a teleport using a trigger... and noticed that if 2 players enter it at the same time, it causes problems. Can this be fixed using IsTilePassable? If the value is -1, then change the teleport destination.
4) Where do all these undocumented functions come from... and so on?
-IsTilePassable - there is no description of it anywhere (well, I found it on the forum, but still)
-MessageBoxForPlayers is also not in the manuals...
What else did I miss? Does anyone have a list?
5) How do I remove or reduce the experience gained from fighting monsters or heroes?
6) How can I organize the Mapscript better? (How can I distribute everything into different scripts so that it's not a mess?)
User Avatar
Auto-translated
1. n1 is the player number of the former owner, n2 is the player number of the new owner, s1 is the name of the hero who captured the object, and s2 is the name of the object. 2. 2 is indeed the player number. 3. Attach a touch trigger to the marker, set the object's inactive state, and after the object is touched, display ShowFlyingSign, where you can configure the message's flight time. 4. It is absolutely impossible for two players to enter simultaneously, so you can add a game lock to the teleport, the teleport itself, and move the player one cell up (y+1), then unlock the game. Also, add a check to see if the coordinates of the first object that moved (we find out the name in the trigger attached to the pseudo-teleport) are equal to the coordinates of the second object, but with y being one less, and depending on this, either move the hero one cell up or don't move him. But this is a workaround; your solution is correct; I just offered an alternative. 5. These undocumented functions are simply not included in the developers' manuals. There are many such functions; if needed, you can ask those who know them. 6. There is a function called SetHeroesExpCoeff. 7. Maintaining order is a good thing. I recommend simply separating the different parts of the script with a lot of hyphens and a description of what each part does.
С уважением, }{0TT@6bI4
_________________
Группа картостроителей
Там ответы на вопросы, руководства, гайды и прочее
Discord-сервер "Герои 5: S.T.A.L.K.E.R"
Сервер по модификации "Герои 5: S.T.A.L.K.E.R"
_________________

Statistics

Welcome our newest member: Emil