Skip to content

Posts from Scripts Auto-translated

4.8 (8 ratings)
#1993
Auto-translated
Here's a question: how do you add already created maps to a campaign?
In reply to Аскет2
User Avatar
#1994
Auto-translated
That is, in the editor, your map is missing from the list...
Then I would advise you not to rush into creating a campaign, but rather pay more attention to the maps. You will have to stitch the campaign together using a text editor and archivers.

I looked at the script for your map and saw this:

function GetTown(heroname)
if heroname == "Hero9"
then while IsHeroGetTown("Bahia") do
sleep(5)
end;
Win()
--or--
Win(1)
end;
end;


function new_day()
local day, wday, week, month = GetDate(DAY), GetDate(DAY_OF_WEEK), GetDate(WEEK), GetDate(MONTH)
if month == 7 then
Loose(1)
end
if month == 5 and week == 1 and wday == 1 then
DeployReserveHero('', 5, 135, 1)
Trigger(NEW_DAY_TRIGGER, "new_day", "Army")
end;
end;

Trigger(NEW_DAY_TRIGGER, 'new_day')

You said that you are a complete novice in writing scripts, but here there is already some kind of improvisation, and with a 99.9% probability, it will not work.
Карты для Героев Меча и Магии 5
Одиночные: Завеса срывается, Посол, Последний рывок, Эхо Пустоты
Кампания: Империя Единорога

Существа NCF
Орден Порядка: 1
Нейтралы: 1 2 3 4
#1995
Auto-translated
What’s wrong with them? And I’m really a beginner.
In reply to Аскет2
User Avatar
#1996
Auto-translated
The first one clearly doesn't work, even though I provided a working version.
Карты для Героев Меча и Магии 5
Одиночные: Завеса срывается, Посол, Последний рывок, Эхо Пустоты
Кампания: Империя Единорога

Существа NCF
Орден Порядка: 1
Нейтралы: 1 2 3 4
#1997
Auto-translated
Sometimes, for some reason, the scripts revert to the state they were in before I modified them. I don't know what's happening to them.

Added 31 seconds later
Up to that point*.
User Avatar
#1998
Auto-translated
Most likely, this is due to editing the scripts while the map is open in the editor. In this case, the script should be edited in /Editor/H5MMods/map_name/, otherwise, after closing the editor, the changes will be reset.
Карты для Героев Меча и Магии 5
Одиночные: Завеса срывается, Посол, Последний рывок, Эхо Пустоты
Кампания: Империя Единорога

Существа NCF
Орден Порядка: 1
Нейтралы: 1 2 3 4
#1999
Auto-translated
How do I lock the game so that other players are controlled by the computer?

Added 41 seconds later
So that only the first player is controlled by a human, and the rest are controlled by the computer?
In reply to Аскет2
User Avatar
#2000
Auto-translated
In Players Properties:
Human Playable - a human player can control the faction
Computer Playable - a computer player can control the faction
Карты для Героев Меча и Магии 5
Одиночные: Завеса срывается, Посол, Последний рывок, Эхо Пустоты
Кампания: Империя Единорога

Существа NCF
Орден Порядка: 1
Нейтралы: 1 2 3 4
#2001
Auto-translated
It's really interesting how to make an Orc hero use magic.

Added 1 hour 15 minutes ago
Please tell me how to add maps to a campaign!

Added 10 minutes ago
And also: how do I make one-way teleporters send you to a specific exit, and not a random one?
User Avatar
#2002
Auto-translated
The last step is easy. In the editor, select the teleport, press the spacebar. Enter a number in the menu that appears. The number must be the same for linked teleports.
 

К А
Стикеры GBF в Telegram
#2003
Auto-translated
And what about the second one?

Added 3 minutes later
Thanks for the hint.
User Avatar
#2004
Auto-translated
I've never created a campaign before...
You can try to figure it out yourself, using the campaigns by Ser9K or others as an example; we have many of them on the forum. You'll need WinRAR and Notepad. There's a special file in xdb format that stitches all the maps together and sets the initial conditions; create your own based on that.
 

К А
Стикеры GBF в Telegram
#2005
Auto-translated
Yeah, thanks. And regarding the first question, is it better not to even try, or are there tools available?

Added 5 minutes later
Unfortunately, the links no longer work (sniff-sniff).

Added 18 minutes later
I'm digging through the files of the original campaigns, but I don't understand how they're put together.

Added 4 minutes later
Oh dear, I'm stuck with this for a long time. Need help:smile05:
User Avatar
#2006
Auto-translated
Yeah, thanks. And regarding the first question, is it even worth trying, or are there any solutions?
Well, give it a try.
If you need this to work for a human player, do as recommended. Take a hero and change their class from "Barbarian" to something else in Shared. Then remove the class skill and replace it with Blood Fury. It might actually work. But I don't think so.
As for AI… I believe that simply giving a Barbarian spells will make them use them. I’m not sure, but it seems like someone did some research on this topic with such results.
Unfortunately, the links no longer work (sniffle-sniffle).
Here, this should work...
/topic/11060/
/topic/10943/
 

К А
Стикеры GBF в Telegram
#2007
Auto-translated
The player definitely needs it.

Added 4 minutes later
I didn't understand anything, to be honest.