Skip to content

Posts from Current questions and answers regarding the map editor. Auto-translated

5.0 (12 ratings)
User Avatar
#928
Auto-translated
Nah, that's unlikely. Although, I had an idea: we could create new arenas and run battles using a script, so they wouldn't take place on the standard arenas, but on arenas with different lighting. But that would be quite a headache...
 

К А
Стикеры GBF в Telegram
User Avatar
#929
Auto-translated
Dyrman, thank you for such a detailed explanation.
In reply to Ment
User Avatar
#930
Auto-translated
Ment
1024x1024, but some pixels at the bottom won't be visible (apparently starting from 801).
------
If anything, the format is dds.
dds? But everywhere it says tga... Okay, thanks, maybe it will help. And how do I make it so that, for example, in the Seer's Hut, the player gets 1000 gold for 20 silver?

Added 6 minutes later
Ment
1024x1024, but some pixels at the bottom won't be visible (apparently starting from 801).
------
If anything, the format is dds.
No, dds doesn't work. There isn't even a format like that. It's either tga or psd. Neither of those worked. Maybe I'm doing something wrong?
In reply to Олегарх
User Avatar
#931
Auto-translated
Olegarh

No, DDS doesn't read that format. There isn't one at all. It's either TGA or PSD. Neither worked. Maybe I'm doing something wrong?
DDS, that's correct, as Ment said.
By default, Photoshop doesn't know how to save in that format.
Therefore, for DDS, if you are using Photoshop, you need a special plugin (Google can help you find the plugin, because I don't remember the link).

Added after 8 minutes
Olegarh
And how do I make it so that, for example, in the Seer's Hut, the player gets 1000 gold for 20 sulfur?
With scripts.
We attach a trigger to the building. (An event happens when entering it)
In the trigger execution function, we write the code to receive gold for sulfur.
(if GetPlayerRe.... == 20 then SetPlayerR....(GetPlayerRes...(Player_id,(gold)+1000))
If it's not clear, then study the script alphabet ;)
You can learn it in the Manuals, on this and many other forums, using the internal search, and if you need specific details, then you just have to wait for our forum's "Archivist" ;)
Моды для HeroesV:
NHF 0.90 : NHF - группа в VK

Карты для HeroesV:
Путешествие , Условие крови , Рука судьбы.Часть 1: В поход , Рука судьбы.Часть 2: Отчаянье , Рука судьбы.Часть 3: Восхождение , Стойкость
Абсолютная власть , Иду на Вы! , Корона Ургаша , На задворках
Мир надо уничтожить... Чтобы создать свой...
In reply to Dyrman
User Avatar
#932
Auto-translated
Dyrman
DDS, you are right, as Ment said.
By default, Photoshop cannot save in this format.
Therefore, for DDS, if you are using Photoshop, you need a special plugin (Google will help you find the plugin, because I don't remember the link).

Added 8 minutes later
Using scripts.
We attach a trigger to the building. (An event occurs when entering it)
In the trigger execution function, we write the code to receive gold for sulfur.
(if GetPlayerRe.... == 20 then SetPlayerR....(GetPlayerRes...(Player_id,(gold)+1000))
If it's not clear, then study the script alphabet ;)
You can learn it in the manuals, on this and many forums, using the internal search, and if you need specific details, then you just have to wait for our forum's "Archivist" ;)
Could you write the entire trigger without the ellipses?

Yes, and regarding DDS, it is even written in the editor that it does not see TGA or PSD.DDS, or am I still doing something wrong?
User Avatar
#933
Auto-translated
The editor really doesn't recognize it. But no one uses the editor for this; instead, they create an integrated mod. You can explore the developers' maps and see how it works; it's quite simple. Clarified: the format isn't just dds; the subtype is tf_dxt1. Personally, I don't use Photoshop for editing dds files (I don't use it at all :P); there's a free editor called paint.net that does all this without any plugins.
 

К А
Стикеры GBF в Telegram
In reply to Ment
User Avatar
#934
Auto-translated
Ment
The editor really doesn't see it. But no one uses the editor; instead, they create an integrated mod. You can explore the developers' maps and see its principle; it's quite simple.
Clarified: the format isn't just dds; its subtype is tf_dxt1.
Personally, I don't use Photoshop for editing dds files (I don't use it at all :P); there's a free editor called paint.net that does all this without any plugins.
Thank you. But still, could you write the entire script for the hut?
User Avatar
#935
Auto-translated
function Sera_Gold(hero)
if GetObjectOwner(hero)==1 then
if GetPlayerResource(1,SULFUR) > 19 then
SetPlayerResource(1,GOLD,GetPlayerResource(1,GOLD)+1000);
SetPlayerResource(1,SULFUR,GetPlayerResource(1,SULFUR)-20);
Trigger(OBJECT_TOUCH_TRIGGER,hut_name, nil);
end;
end;
end;
SetObjectEnabled(hut_name, nil);
Trigger(OBJECT_TOUCH_TRIGGER,hut_name, "Sera_Gold");
However, in this case, I would use the built-in functions of the hut: it has an assignment editor in the ObjectPropertiesTree, and you can create an assignment to collect resources in exchange for another resource. This method is good because the entire script is already written, and when you enter the hut, a beautiful window with pictures appears.
 

К А
Стикеры GBF в Telegram
In reply to Ment
User Avatar
#936
Auto-translated
Ment
used the built-in features of the hut: it has a task editor in its ObjectPropertiesTree, and you can create a task to collect resources in exchange for another resource. This method is good because the entire script is already written, and when you enter the hut, a beautiful window with pictures appears.
Thank you, but how do I set the objective there? I understand how to set the reward and the description, but how do I set the objective?
User Avatar
#937
Auto-translated
In the Kind property, set it to COLLECT_RESOURCES. In Parameters, first specify the resource type, and then the quantity.
Also, a script will be needed, albeit a simple one, to later remove these resources. Here's an example:
function Sera_Gold()
if GetObjectiveState(quest name)==OBJECTIVE_COMPLETED then
SetPlayerResource(1,SULFUR,GetPlayerResource(1,SULFUR)-20);
Trigger(OBJECTIVE_STATE_CHANGE_TRIGGER,hut quest name, nil);
end;
end;
Trigger(OBJECTIVE_STATE_CHANGE_TRIGGER,hut quest name, "Sera_Gold");
 

К А
Стикеры GBF в Telegram
In reply to Ment
User Avatar
#938
Auto-translated
Ment
In the Kind property, set it to COLLECT_RESOURCES. In Parameters, first specify the resource type, and then the quantity.
Also, a script will be needed, to later remove these resources, but it will be simpler, specifically:
function Sera_Gold()
if GetObjectiveState(objective name)==OBJECTIVE_COMPLETED then
SetPlayerResource(1,SULFUR,GetPlayerResource(1,SULFUR)-20);
Trigger(OBJECTIVE_STATE_CHANGE_TRIGGER,hut objective name, nil);
end;
end;
Trigger(OBJECTIVE_STATE_CHANGE_TRIGGER,hut objective name, "Sera_Gold");
Thank you. I may have many questions, but still: how do I change the map objective, for example, to bring an artifact to a specific location?
User Avatar
#939
Auto-translated
You can also do it through a hut. You can also do it through scripts. There is also a way to change the map objectives (there is a similar mechanism, but in MapPropertiesTree -> objectives), but this method is not very suitable for specifically delivering an artifact somewhere.
 

К А
Стикеры GBF в Telegram
#940
Auto-translated
Hello everyone! Could you please tell me how to add different kings from the scenarios into the "Tribes of the East" map editor?
User Avatar
#941
Auto-translated
Select any hero, highlight them, in the left panel find the "Shared" line, click it, the button "..." on the right will open a tree where all in-game heroes are listed; you just need to browse and find the one you need.
 

К А
Стикеры GBF в Telegram
User Avatar
#942
Auto-translated
Thanks for the info about DDS, it helped.