Skip to content

Posts from Current questions and answers regarding the map editor.

5.0 (12 ratings)
User Avatar
Auto-translated
Also, in the Map Properties Tree => players => player number => TavernFilter, you can ban races and heroes. This option seems simpler to me.
С уважением, }{0TT@6bI4
_________________
Группа картостроителей
Там ответы на вопросы, руководства, гайды и прочее
Discord-сервер "Герои 5: S.T.A.L.K.E.R"
Сервер по модификации "Герои 5: S.T.A.L.K.E.R"
_________________
User Avatar
Auto-translated
Here's another question: I'm using a script to cast the "Hellfire" spell, but I'm getting an error (screenshot below). Could it be that I need to add the spell to the map.xdb file for this map, or is there something else I need to do?
Attachments 1
1 file attached • Total size: 44.6 KB
Сценарий: "Наследие прошлого"
Кампании:
"
Новый порядок", "Серый Альянс""Поиски Истины"

Трейлер №2 кампании "Дыхание Пустоты": https://www.youtube.com/watch?v=XkHKXk5BctA&ab_channel=%D0%90ndrei_21

Auto-translated
a hero won't get the spell at the start in Heroes of Might and Magic, or how to assign it in the editor if he doesn't have it at the start – he'll never get it.
You also need to add it to the list of allowed spells in the map.hdb file.
User Avatar
Auto-translated
Not long ago, I wrote about a bug where a Necromancer town couldn't be destroyed. I didn't take the following into account: when I played, in addition to the campaign, I also had the same missions in the Maps folder, but separately. As soon as I removed these maps, the bug appeared for me as well. The console says that this town is indestructible. But the Razed flag is filled. I think the problem is with the map being unarchived into the campaign. If anyone knows how to fix this, I would be very grateful.
Сценарий: "Наследие прошлого"
Кампании:
"
Новый порядок", "Серый Альянс""Поиски Истины"

Трейлер №2 кампании "Дыхание Пустоты": https://www.youtube.com/watch?v=XkHKXk5BctA&ab_channel=%D0%90ndrei_21

User Avatar
Auto-translated
Most likely, there’s a version of the town file somewhere that doesn’t have “Razed” defined, and it’s overriding yours.
С уважением, }{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
Most likely, there's a version of the city file somewhere that doesn't have the "Razed" property defined, and it's overriding yours.
I understand now. That's the issue. The city file with the "Razed" property is unpacked into the campaign archive. And in the map.xdb, there's the same city, but without the "Razed" property, and the map references that one. We just need to rewrite the path to the xdb file with the "Razed" property. Thank you very much, }{0TT@6bI4.
Сценарий: "Наследие прошлого"
Кампании:
"
Новый порядок", "Серый Альянс""Поиски Истины"

Трейлер №2 кампании "Дыхание Пустоты": https://www.youtube.com/watch?v=XkHKXk5BctA&ab_channel=%D0%90ndrei_21

User Avatar
Auto-translated

Good heroic morning! I'd like to inquire about creating a map (I've read no more than 10 out of the 355 pages in the topic, so sorry if this is a repeat ).

Overall, I'm quite satisfied with the standard generator and default templates (especially the "hide mini-map" option in the GHB generation). However, I still have to add campaign heroes and set up teams using the standard map editor (by reducing the window size before opening the map, so as not to spoil the location and dispel the fog of war before the battle begins).

But... there's one problem: the Tavern, which is present in every city by default, allows each participant to reliably find out which characters from which Factions their opponents have already in the first week (and immediately choose counter-strategies), and also allows them to create too many units (which sometimes leads to a prolonged process).

I found the Map properties tree - player№ - TavernFilter - Banned - *nothing happens when I click*. smile50 Probably, an extended editor is needed, although for just editing the tavern, it might not be necessary... So, if possible, how can I implement the following in this situation:

Format 1. Ban the tavern for the Necropolis player; let each player have only one character, and no Thieves' Guild provides information to anyone (except for what is on the map).

Format 2. Allow the tavern to be built, but remove the Thieves' Guild from the establishment (and Orcs will always choose Silence against Darkness, and Railag-Agrail will surrender without a fight when he encounters Queen Isabelle in the castle )

Format 3. Allow the tavern to be built, keep the Thieves' Guild, but limit the total number of heroes for a specific player to four, for example (so they don't abuse mentoring).

Format 4. Leave the tavern as it is, but pre-populate it with two random heroes of the player's castle Faction for the first week (ideally, including campaign heroes).

P.S. And one more thing: how can I fix the "Mission Failed" window for one of the allies when the game ends (i.e., player 2 easily defeats the last opponent - the game is over, and instead of a message about the triumph, the game notifies that you lost, friend, while the joint victory goes to player 1).

In reply to Eiinar
User Avatar
Auto-translated

Eiinar,

1. Regarding the tavern: You can always open any original map in the game files and copy the list of available heroes in the tavern from there, and then paste this list into your map file .

2. I'm not sure if it's possible to remove the Thieves' Guild from the town tavern. At least, I haven't encountered anything like that.

3. You can, AllowPlayerTavernRace (for bots and the player) and AllowHeroHiringByRaceForAI (only for bots) will help you).

4. You can, but again, you will probably have to manipulate the race ban for the tavern, because by default the tavern generates heroes randomly. I have a mod that allows all heroes to be available for all maps, and sometimes it's very surprising to start as, say, Knights and have Godric and Biara in the tavern.

5. Hmm... Well, the first thing that comes to mind: take away the cities and heroes from player 2, remove the heroes from the reserve (if any), and then the player, having neither heroes nor cities, will automatically lose. To make a specific player win, you can "dispossess" all the "non-winning" players of their cities and heroes at once.

User Avatar
Auto-translated
I think opening the city properties (Select + Space) and disabling the tavern (BUILDING_TAVERN + Demolish button) will solve your problem?
С уважением, }{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

Thank you very much to everyone who responded 🤗

I managed to test the Gameplay with just one hero. The result showed that it's still too hardcore and tedious... based on the updated data, for our specific case and requirements, I came up with the following method for creating a location:

1) In the client, a map is generated with the desired parameters and a pre-known template, in a closed mode (the "Hide minimap" checkbox is checked), and a name is assigned (something like "Show no fear").

2) The regular editor is opened, and on the toolbar, the ObjectFilter button is used to remove everything except "Structures" - accordingly, only buildings remain visible - towns, dwellings, treasures, etc.

3) Following the advice of more experienced comrades, in each of the existing towns, the taverns are removed. This is not difficult: the round town is selected manually with the mouse, opened with the spacebar, and in the Buildings section, click on "Tavern" and uncheck "Enable") - no more drunkenness, all heroes get horses!

4) In order not to condemn the brave wandering knights (who will later appear in the castles) to lonely and dreary exploits, you need to select Prison on the Tool Panel and place one prison near each town - or move the existing prisons closer. And the Den of Thieves (the thieves' guild on the map) should be moved further away/protected by phoenixes/removed.

Thus:

- The map is "one-time" - as it should be

- I will have to spoil for myself the types of terrain on the map while editing the towns (I tried to enable the Show Grid and Wireframe grids, but the colors immediately show where the snow, lava, and forest are), but the rest will remain a mystery and shrouded in the fog of war

- Each player will have two random heroes at their disposal: one from the castle, and the second from the prison, and the heroes' identities will also remain a secret until the first meeting of the rivals

P.S. And it also turns out to avoid interfering with the system and replacing scripts and scenarios.

Auto-translated
Help, kind people, if there's anyone alive here! Please help me write a simple script. I don't know why, but none of the options work. Please don't tell me to "read the manual," I've read it many times, and one of the options is actually from there. It's a simple action: when the main character touches an object (or, even better, enters a specific zone, but for now, even the object doesn't work), they should be teleported to a specific point. The following scripts don't work: ``` function PobegF (heroname) SetObjectPosition((heroname), 88, 102, floor -1); end; Trigger(OBJECT_TOUCH_TRIGGER, "Proba", "PobegF"); ``` It says: attempt to perform arithmetic on a function value. ``` function PobegF (heroname) SetObjectPosition(heroname, 88, 102, floor -1); end; Trigger(4, "Proba", "PobegF"); ``` It says the same thing. ``` function PobegF () SetObjectPosition("Raelag", 88, 102, floor -1); end; Trigger(OBJECT_TOUCH_TRIGGER, "Proba", "PobegF"); ``` Same problem. ``` function PobegF () SetObjectPosition("Raelag", 88, 102, floor); end; Trigger(OBJECT_TOUCH_TRIGGER, "Proba", "PobegF"); ``` It says: Wrong type of argument 4, when calling function SetObjectPosition. ``` function PobegF () SetObjectPosition("Raelag", destination_151, 138, floor -1); end; Trigger(OBJECT_TOUCH_TRIGGER, "Proba", "PobegF"); ``` It says: attempt to perform arithmetic on a function value. ``` function PobegF () SetObjectPosition("Raelag", destination_151, 138, floor); end; Trigger(OBJECT_TOUCH_TRIGGER, "Proba", "PobegF"); ``` It says: Wrong type of argument 4, when calling function SetObjectPosition. What's going on?
User Avatar
Auto-translated
Eiinar, I'm glad that everything worked out for you; with scripts, you could have made everything much more elegant, of course. Special thanks for the detailed explanation of how you did it; it might be useful to someone!)
С уважением, }{0TT@6bI4
_________________
Группа картостроителей
Там ответы на вопросы, руководства, гайды и прочее
Discord-сервер "Герои 5: S.T.A.L.K.E.R"
Сервер по модификации "Герои 5: S.T.A.L.K.E.R"
_________________
In reply to Марта
User Avatar
Auto-translated
Martha
Help, kind people, if there's anyone alive here!
Please help me write a simple script. I don't know why, but none of the options work.
But please don't tell me to "read the manual," I've read it many times, and one of the options is actually from there.
It's a simple action: when the hero touches an object (or, even better, enters a specific zone, but for now, even the object doesn't work), he should teleport to a specific point.

The following scripts don't work:

    function PobegF (heroname)
    SetObjectPosition((heroname), 88, 102, floor -1);
    end;
    
    Trigger(OBJECT_TOUCH_TRIGGER, "Proba", "PobegF");
It says, "attempt to perform arithmetic on a function value."

------
    function PobegF (heroname)
    SetObjectPosition(heroname, 88, 102, floor -1);
    end;
    
    Trigger(4, "Proba", "PobegF");
It says the same thing.

------
    function PobegF ()
    SetObjectPosition("Raelag", 88, 102, floor -1);
    end;
    
    Trigger(OBJECT_TOUCH_TRIGGER, "Proba", "PobegF");
The same thing happens.

------
    function PobegF ()
    SetObjectPosition("Raelag", 88, 102, floor);
    end;
    
    Trigger(OBJECT_TOUCH_TRIGGER, "Proba", "PobegF");
It says, "Wrong type of argument 4, when calling function SetObjectPosition."

------
    function PobegF ()
    SetObjectPosition("Raelag", destination_151, 138, floor -1);
    end;

    Trigger(OBJECT_TOUCH_TRIGGER, "Proba", "PobegF");
It says, "attempt to perform arithmetic on a function value."
------

    function PobegF ()
    SetObjectPosition("Raelag", destination_151, 138, floor);
    end;

    Trigger(OBJECT_TOUCH_TRIGGER, "Proba", "PobegF");
It says, "Wrong type of argument 4, when calling function SetObjectPosition."

What's going on?

I don't think you declared the 'floor' variable anywhere, so the question is: why are you using it when calling the SetObjectPos functions? Instead, you should write 0 (surface) or 1 (underground), for example, SetObjectPosition("Raelag", 182, 71, 0). Let me explain where the error comes from. 'floor' is a built-in function for rounding up. There is no comma before "-1," so the game tries to subtract 1 from 'floor.' But 'floor' is a function! And you can't subtract numbers from functions yet. That's why the error appeared smile

Also, the line 'destination_151' is strange; again, did you declare a variable with that name? Unlikely. If you wanted to specify a coordinate, just leave it as 151.
The final version of the script:
function PobegF (heroname)
SetObjectPosition(heroname, 88, 102, 0, -1);
end;

Trigger(OBJECT_TOUCH_TRIGGER, "Proba", "PobegF")
С уважением, }{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