Skip to content

Posts from Current questions and answers regarding the map editor.

5.0 (12 ratings)
In reply to Победитель
User Avatar
#670
Auto-translated
I made all the cities neutral and assigned them to player 2. I didn't leave a single city for myself! But now, the map editor is giving me an error. Here it is:
PLAYER_1 has no town!
In Russian, it sounds like this: Player 1 has no city!!!!
What should I do? Please advise!
Thank you for your answers.
User Avatar
#671
Auto-translated
Do nothing. Everything is fine. The editor simply believes it's unfair to leave a poor player without a town :).
Карты для Heroes of Might and Magic V
Цикл "Закадычные враги": "Особенное гостеприимство, "Супероружие", "Меж молотом и наковальней"
"Падение Шантири"

Кампания для "Кодекса Войны"
"Выбор Сагиттеля"
In reply to Победитель
User Avatar
#672
Auto-translated
Winner, I managed to do it. Great! But now I have another request: could you show screenshots of how you set tasks for heroes, for example, to capture a certain town within 2 weeks or to kill someone? Please advise. Thank you in advance for your answers!
User Avatar
#673
Auto-translated
I haven't quite figured out the quests yet. It seems to me that it's easier to work with quests using scripts. And to make a quest appear in the in-game quest window, select the 'objectives' tab in the Map Properties. Then, open the subsequent tabs until you see the very first quest, 'Killem all'. You can edit the name and description in the same way as in the AdvMap videos for roles and huts.

Capturing a town in one week is a built-in quest, 'Die in week without town' (it's just a true/false selection; you can't change the name or description). If you don't need this quest, set everywhere to false for player 0, both in 'primary' and 'secondary'. But I'll warn you right away: it's especially difficult to understand quests. Without scripts, I don't even know how to do it.
Attachments 1
1 file attached • Total size: 83.1 KB
Карты для Heroes of Might and Magic V
Цикл "Закадычные враги": "Особенное гостеприимство, "Супероружие", "Меж молотом и наковальней"
"Падение Шантири"

Кампания для "Кодекса Войны"
"Выбор Сагиттеля"
In reply to Победитель
User Avatar
#674
Auto-translated
Okay, is it possible to do it using scripts, and if so, could you provide examples with images and make it easier to understand? I don't really understand these scripts, but maybe we can find a way to communicate!
User Avatar
#675
Auto-translated
Tell me what the task is. I won't be able to explain it in general terms. However, I can tell you about the function that affects the task: SetObjectiveState(); - i.e., to assign a state to the task. In parentheses, you write the name of the task (assigned in the map's property tree) and the state. Possible states: OBJECTIVE_ACTIVE - activate the task; OBJECTIVE_COMPLETED - complete the task successfully; OBJECTIVE_FAILED - complete the task negatively. P.S.: If you want something to happen when the task is completed, write that too. Be sure to write the completion condition for the task.
Карты для Heroes of Might and Magic V
Цикл "Закадычные враги": "Особенное гостеприимство, "Супероружие", "Меж молотом и наковальней"
"Падение Шантири"

Кампания для "Кодекса Войны"
"Выбор Сагиттеля"
In reply to Победитель
User Avatar
#676
Auto-translated
I failed again... Oh well, I guess I'll have to try and manage without scripts somehow... I have a question: how can I reset all resources and gold so that when the game starts, the hero has none of either?
User Avatar
#677
Auto-translated
SetPlayerResource(PLAYER_1, GOLD, 0); -- set gold to 0 for player 1. Next, do the same. The resources are called ORE, WOOD, GEM, SULFUR, CRYSTAL, MERCURY. Regarding the quests, you probably did something wrong. Write what you want to do or your script for it.
Карты для Heroes of Might and Magic V
Цикл "Закадычные враги": "Особенное гостеприимство, "Супероружие", "Меж молотом и наковальней"
"Падение Шантири"

Кампания для "Кодекса Войны"
"Выбор Сагиттеля"
In reply to Победитель
User Avatar
#678
Auto-translated
Thanks, because sometimes it will be necessary to reset resources, and I didn't know how! Now I know and won't forget!:smile03:
And regarding the scripts, you said that to give a quest to a hero, you need to go to Map Properties Three and open the 'objectives' tab. Then I opened more tabs until I saw the very first quest, 'Killem all'. I haven't figured out how to edit it. I wrote it in Russian, or should I have written it in English??? When I opened the map, it didn't load! I was kicked out of the game!
And also, regarding what you said:
Possible states:
OBJECTIVE_ACTIVE -- activate the task;
OBJECTIVE_COMPLETED -- complete the task successfully;
OBJECTIVE_FAILED -- complete the task negatively.
I didn't understand, if I write this in the script, for example, OBJECTIVE_ACTIVE, will the task be activated or immediately completed????
And another question, if I write OBJECTIVE_ACTIVE in the script and it works, will I be able to add resetting resources and gold???
Please help!:smile45:
Thank you for the answers!
User Avatar
#679
Auto-translated
I didn't quite understand what you meant, but I'll try to answer. In the properties tree: the quest name (the Name string) must be written in English. And in the CaptureFileRef and DescriptionFileRef strings, you need to click on 'new' or 'edit'. If you click 'new', then write the name of the new text document in Russian. The window that appears after clicking 'edit', as well as after entering the name of the new file, can be filled in with any language. ACTIVE - this only activates the task. To fail it - use FAILED, and to complete it - use COMPLETED.
SetObjectiveState('obj1', OBJECTIVE_COMPLETED);
Do you want to completely reset resources and gold???
What do you mean by that? Let's say that at the beginning of the game, player 1 should have no resources at all. Then, you should write the following lines without any functions:
SetPlayerResource( PLAYER_1, GOLD, 0 );
SetPlayerResource( PLAYER_1, ORE, 0 );
SetPlayerResource( PLAYER_1, WOOD, 0 );
SetPlayerResource( PLAYER_1, CRYSTAL, 0 );
SetPlayerResource( PLAYER_1, GEM, 0 );
SetPlayerResource( PLAYER_1, SULFUR, 0 );
SetPlayerResource( PLAYER_1, MERCURY, 0 );
If I misunderstood you, write what you would like to see in your map in terms of scripting functions.
Карты для Heroes of Might and Magic V
Цикл "Закадычные враги": "Особенное гостеприимство, "Супероружие", "Меж молотом и наковальней"
"Падение Шантири"

Кампания для "Кодекса Войны"
"Выбор Сагиттеля"
In reply to Победитель
User Avatar
#680
Auto-translated
Good morning to all forum visitors! I managed to enable the first task – capturing a town within 1 week! But I couldn’t change the very first task, ‘Kill them all.’ I don’t understand how to do it. If you can, please show me on a screenshot how you enable it and what you write in Russian. Here are screenshots of how I did it: and also: Please answer, Winner!
User Avatar
#681
Auto-translated
Once again: open Objectives/Primary/Common/Objectives/0, in the 'Name' line, enter the script name for the quest, and in the 'CaptureFileRef' and 'DescriptionFileRef' lines, enter the Russian name and description, respectively. To create a new quest, right-click on the second Objectives and select 'Add'. To create a new Russian quest, in the 'Capture...' line, select New. Do the same for the description.

If you want to change the description or name of an existing quest, click Edit in the corresponding lines. In general, see the screenshots.
Attachments 2
2 files attached • Total size: 217.0 KB
Карты для Heroes of Might and Magic V
Цикл "Закадычные враги": "Особенное гостеприимство, "Супероружие", "Меж молотом и наковальней"
"Падение Шантири"

Кампания для "Кодекса Войны"
"Выбор Сагиттеля"
In reply to Победитель
User Avatar
#682
Auto-translated
Well, here's what I came up with, take a look:

But now the question is, will this top task work?
Thank you for your answer, Pobeditel!
----------------------------------------------
Я начинающий картостроитель.Скоро буду
выкладывать карты, когда научусь всё делать.:smile01: :smile01:
In reply to Дункан
User Avatar
#683
Auto-translated
Duncan
Well, here's what I came up with:
But now the question is, will this top task work?
Thank you for your answer, Winner!
If this task isn't supported by a script, then, of course, it won't work. And it looks very strange (including because of the three errors). It's better to break it down into parts:
- Build a ship
- Gather resources
Just writing text won't make anything work.

P.S.: I would advise you to start with the design of the future map. Then, when you come up with a plot, you can start working on the scripts. You won't be able to figure out everything you need in advance.
Карты для Heroes of Might and Magic V
Цикл "Закадычные враги": "Особенное гостеприимство, "Супероружие", "Меж молотом и наковальней"
"Падение Шантири"

Кампания для "Кодекса Войны"
"Выбор Сагиттеля"
In reply to Победитель
User Avatar
#684
Auto-translated
If this task isn't supported by a script, then, of course, it won't work.

Possible states:
OBJECTIVE_ACTIVE -- activate the task;
OBJECTIVE_COMPLETED -- complete the task successfully;
OBJECTIVE_FAILED -- complete the task negatively.But now, another question arises: how do I support it with a script????
It's not just about writing OBJECTIVE_ACTIVE, right???
P.S.: I would advise you to start with the design of the future map. Then, when you come up with a plot, you can start working on the scripts. You won't be able to figure out everything you need in advance.
The problem is that I've already figured everything out, but I don't know how to do most of it!!! So, if you allow, I'll ask you questions so that I can then explain and help others, just like you're doing now!
----------------------------------------------
Я начинающий картостроитель.Скоро буду
выкладывать карты, когда научусь всё делать.:smile01: :smile01: