Skip to content

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

5.0 (12 ratings)
In reply to Ment
User Avatar
#4245
Auto-translated
Ment
I don't remember about the rain.
Actually, I've also forgotten a bit about the first one, I'm afraid I might get confused. Most likely, you need to either adjust the animations (AnimSet) or the model (Model), or both.
If you adjust the Model, then you need to take not the ones that are presented for all these walls and gates in the editor by default, but from the Arenas->CombatArena->city name folder. Moreover, these models are incorrectly centered; their real and formal coordinates differ greatly (so don't be surprised when they "move" far beyond the edge of the map).
Or you just need to set the correct animations; that's also possible.
In general, you need to experiment here ;)
thank you, I'll try :)
In reply to Ment
User Avatar
#4246
Auto-translated
Ment
I don't remember about the rain.
Actually, I've also forgotten a bit about the first one, I'm afraid I might get confused. Most likely, you need to either adjust the animations (AnimSet) or the model (Model), or both.
If you adjust the Model, then you need to take not the ones that are presented for all these walls and gates in the editor by default, but from the Arenas->CombatArena->city name folder. Moreover, these models are incorrectly centered; their actual and formal coordinates differ greatly (so don't be surprised when they "move" far beyond the edge of the map).
Or you just need to set the correct animations; that's also possible.
In general, you need to experiment here ;)

I feel bad for bothering you, but is there any way to move an object or change the coordinates in the xdb file?
Attachments 1
1 file attached • Total size: 108.3 KB
In reply to Ment
User Avatar
#4248
Auto-translated
Ment
Heh, yeah. There are x, y, and z properties for the object.
Problematic objects, I change their x and y positions, but they don't change:(
Attachments 1
1 file attached • Total size: 126.9 KB
User Avatar
#4249
Auto-translated
They seem to have some kind of trick. You need to change them, press Enter, then highlight them again, something like that. You can also manually drag them, I think. Or, a hardcore method: if the new coordinate is entered correctly, you can simply reopen the map, and the changed coordinates should be saved (it just won't be displayed visually right away).
 

К А
Стикеры GBF в Telegram
In reply to John_Lock
User Avatar
#4250
Auto-translated
User01322342
Is it possible to add rain to a map somehow? I've seen something similar somewhere.
If you go through all the lighting options available in the map properties list, it seems that one or more of them had rain (you need to reload the map using the Reload Map button after changing the lighting). Once you find it, you can explore the lighting parameters in the properties tree (the GroundAmbientLights section) and see how the rain was implemented. In particular, lighting has a Rain parameter that requires a reference to an effect.
User Avatar
#4251
Auto-translated
I have another question. How can I change the names and descriptions of objects in the game, such as the Archer Tower, etc.?
In reply to John_Lock
User Avatar
#4252
Auto-translated
User01322342
How to change the name and description of objects in the game.
Either modify the game's resources or use the scripting function OverrideObjectTooltipNameAndDescription().
In reply to Jack_of_shadows
User Avatar
#4253
Auto-translated
Jack_of_shadows
Either modify the game's resource files or use the scripting function OverrideObjectTooltipNameAndDescription().
Thank you :)

Added 4 minutes later
Another question :) Let's say I want to create a quest to kill wolves. But they will be scattered across the map. Let's say 5 wolves, in groups. The same applies to cities, for example. I don't know if you understand me :o :D

Added 5 hours later
How do I change the map's lighting? Specifically, through scripts.
User Avatar
#4254
Auto-translated
User01322342, regarding lighting, including what you asked about in a private message, it's done approximately like this: 1) You create your own set of lighting files. I don't remember exactly how I did it, but probably in the editor, in the map settings tree, in the GroundAmbientLights section, add it using "add" and create a new one using "new." 2) In the same place, go to the lighting properties and configure it as you want (you can set the sun's angle of inclination, color, and saturation for different surfaces, the presence of fog, and so on). 3) Change the lighting using the following functions: SetAmbientLight() - lighting on the map. SetCombatLight() - lighting in combat. Pass a string with the name of the lighting that you gave it in the first step to the function. If you want the lighting to change smoothly, set the third parameter to true and the fourth parameter to the transition duration in SetAmbientLight(). You can find examples of lighting files in my map in Lights/_(AmbientLight)/Sword_and_Sorcery_3/, and examples of how to use the functions in ambient.lua.
Another question. Let's say I want to create a quest to kill wolves. But they will be scattered across the map. Let's say 5 wolves, grouped. The same applies to cities. I don't know if you understood me.
Did you happen to forget to write the question itself? ;)
User Avatar
#4255
Auto-translated
Thanks! How do I enable interaction with a hero? How do I make it work like with regular objects? `SetObjectEnabled` doesn't work. When we approach the hero, he should display a message, for example. I tried using `SetObjectEnabled`, but it just makes him attack:smile52:
User Avatar
#4256
Auto-translated
Try this: `
EnableHeroAI(hero, nil); -- disable the hero's AI
sleep(1);
SetObjectEnabled(hero, nil); -- remove the standard touch handler (combat)
sleep(1);
Trigger(HERO_TOUCH_TRIGGER, hero, func); -- set your own handler
`. It must be done in this sequence and with pauses. As far as I remember, you can't assign your own functions to a hero until you disable their AI.
User Avatar
#4257
Auto-translated
Thank you, it worked :з. Here's another question. I'm going to create an RPG map with two classes: Warrior and Mage. How can I control the distribution of skills and abilities? Unfortunately, I couldn't find a function for that. There's only a function that can grant them. How can I, for example, prevent certain skills and abilities from being granted? Unfortunately, I couldn't find it in the map properties :с. There are only spells there, but I understand them more or less. And also, please give me some advice on how to highlight quest locations. I will have many units that will give quests. And how can I highlight them so that the player knows that this is a place to receive a task?
User Avatar
#4258
Auto-translated
How can I control the distribution of skills and abilities?
It seems there's no direct way to do that. There's a workaround to completely prevent something undesirable – monitor when a hero gains a specific skill, use a cheat to remove it, and then the player will be automatically prompted to choose a skill again. It looks terrible and works poorly, so it's best not to bother with it.
And how can I highlight them so the player knows this is where the quest is given?
In my opinion, it's more interesting when a quest appears unexpectedly, but if you want, there are a few ways:
You can remove the "skirt" from the unit so that it stands out from ordinary monsters:
SetDisabledObjectMode(npc, DISABLED_INTERACT);
sleep(1)
SetMonsterSelectionType(npc, 0);
You can add some kind of effect above it, for example, a light from artifacts, like in the "Mercenaries" map:
PlayVisualEffect("/Effects/_(Effect)/Artefacts/General/Blue.xdb#xpointer(/Effect)", ...)
You can simply change the names of the units so that you can learn about the quest by right-clicking.
In reply to Jack_of_shadows
User Avatar
#4259
Auto-translated
Jack_of_shadows
It doesn't seem possible. There is a workaround to prevent something completely undesirable – monitor when a hero gains a specific skill, use a cheat to remove it, and then the player will be automatically prompted to choose a skill again. It looks terrible and works poorly, so it's best not to mess with it.

In my opinion, it's more interesting when a quest appears unexpectedly, but if you want, there are a few ways:
You can remove the "skirt" from the unit so that it differs from ordinary monsters:

You can add some effect to it, for example, light from artifacts, as in the "Mercenaries" map:

You can simply change the names of the units so that you can find out about the quest by right-clicking.

thank you :smile12:. Oh, it's a pity that it's not possible to implement it regarding skills and abilities; it would diversify the gameplay:(

Added after 8 minutes
Jack_of_shadows
It doesn't seem possible. There is a workaround to prevent something completely undesirable – monitor when a hero gains a specific skill, use a cheat to remove it, and then the player will be automatically prompted to choose a skill again. It looks terrible and works poorly, so it's best not to mess with it.

In my opinion, it's more interesting when a quest appears unexpectedly, but if you want, there are a few ways:
You can remove the "skirt" from the unit so that it differs from ordinary monsters:

You can add some effect to it, for example, light from artifacts, as in the "Mercenaries" map:

You can simply change the names of the units so that you can find out about the quest by right-clicking.

SetDisabledObjectMode(npc, DISABLED_INTERACT);
sleep(1)
SetMonsterSelectionType(npc, 0);
should this be written in the unit's function?