Skip to content

Posts from Manipulating creatures in the editor.

No ratings yet — be the first to rate!
User Avatar
#1
Auto-translated
Hello everyone! If anyone knows the answers to my questions, please help!

1. How do I remove the "circles" around creatures (indicating their race)?
2. How do I make creatures "inactive" so that they cannot be interacted with (needed for creating a passive army on the map)?
3. How do I rename creatures to get an original unit (I hope I wrote it clearly).

I hope there are kind people who will answer my questions...
User Avatar
#2
Auto-translated
Regarding point 2, it seems like a script is needed, as Jack of Shadows did something similar on his map "Path of the Hero".
Кампания в разработке:
Название не придумал
Выполнено 5%
User Avatar
#3
Auto-translated
SetObjectEnabled("object name", nil)
1 I think it can be done with a mod, but I'm not sure.
3 I don't understand.
 

К А
Стикеры GBF в Telegram
User Avatar
#4
Auto-translated
1. How do I remove the "circles" around creatures (indicating their race)?
2. How do I make creatures "inactive" so that they cannot be interacted with?
SetObjectEnabled("object name", nil);
SetDisabledObjectMode("object name", DISABLED_INTERACT);
sleep(1)
SetMonsterSelectionType("object name", 0);
3. How do I rename creatures to get the original unit?
SetMonsterNames("object name", MONSTER_NAME_SINGLE, "file name with the new name");

The complete code of my function, which performs all three operations:
-- setting up NPC creatures on the map
function SetNpcFunc(npc, func, name)

-- disable selection and set a peaceful icon on hover
SetObjectEnabled(npc, nil);
SetDisabledObjectMode(npc, DISABLED_INTERACT);
sleep(1)
SetMonsterSelectionType(npc, 0);

-- handler function for clicking - optional parameter
if(func ~= nil) then
Trigger(OBJECT_TOUCH_TRIGGER, npc, func);
end

-- NPC name - optional parameter
if(name ~= nil) then
SetMonsterNames(npc, MONSTER_NAME_SINGLE, name);
end

end
The second parameter is optional; if not passed, nothing will happen when clicking on the creature.
The third parameter is optional; if not passed, the name will remain the default.
Example of use:
SetNpcFunc('foo', 'bar', GetMapDataPath()..'name.txt');

-- handler function for touching creature foo
function bar(hero, obj)
-- ...
end
User Avatar
#5
Auto-translated
Question for the experts: I changed one creature in the game, but now the game crashes when I launch it. How can I fix this?
...И справедливость я несу
На острие меча.


Кампания "Искупление" - 15%



О кампании

"Искупление" - это мой амбициозный проект. Давняя мечта. С детства играя в героев, я восхищался персонажами и ландшафтами, сюжетом и стилем оригинальной трилогии, я мечтал привнести что-то свое в эту игру,  и наконец, более-менее освоив нелегкий труд картостроителя, взялся за воплощение мечты. Кампания расскажет о будущем выживших рыцарей Кровавой Стали, о пути, который они избрали, и о том, куда этот путь их приведет. К слову, мне нужен тестер-оценщик. Если хочешь принять участие в создании и есть определенный опыт, то - добро пожаловать!



User Avatar
#6
Auto-translated
What did they do?
 

К А
Стикеры GBF в Telegram
In reply to Ment
User Avatar
#7
Auto-translated
Ment
What did you do?
I changed the Zealot's attack, defense, initiative, and weekly growth. I also changed the name and did everything according to the guides from Igromania. I guess it was all for nothing.
...И справедливость я несу
На острие меча.


Кампания "Искупление" - 15%



О кампании

"Искупление" - это мой амбициозный проект. Давняя мечта. С детства играя в героев, я восхищался персонажами и ландшафтами, сюжетом и стилем оригинальной трилогии, я мечтал привнести что-то свое в эту игру,  и наконец, более-менее освоив нелегкий труд картостроителя, взялся за воплощение мечты. Кампания расскажет о будущем выживших рыцарей Кровавой Стали, о пути, который они избрали, и о том, куда этот путь их приведет. К слову, мне нужен тестер-оценщик. Если хочешь принять участие в создании и есть определенный опыт, то - добро пожаловать!



In reply to inQizitOr
User Avatar
#8
Auto-translated
The problem lies in the creature growth rate. It seems you only changed the growth rate for the Zealots, but you also need to change it for the Swordsmen and Armored Knights. The growth rate for a unit and its upgrades should be the same.

Added 8 minutes later
I don't know anything about IG guides. But I do know how to change creature stats. In the data archive, you need the Vindicator.xdb file. The path is: data/GameMechanics/Creature/Creatures/Haven/Renegates/Vindicator.xdb. Open it with Notepad, find the line WeeklyGrowth 10 /WeeklyGrowth, and change 10 to the number of creatures you want. You also need to do this for the Swordsmen and Armored Knights.

Added 4 minutes later
And it's better not to change the date at all. Instead, you should create an archive with the path mentioned above and put it in the UserMODs folder.
In reply to ThomasKiller
User Avatar
#9
Auto-translated
ThomasKiller
The problem seems to be with the creature growth rate. It looks like you only changed the growth rate for the Zealots, but you also need to change it for the Swordsmen and Armored Archers. The growth rate for a unit and its upgrades should be the same.

Added 8 minutes ago
I don't know anything about IG guides. But I know how to change creature stats. In the data archive, you need the Vindicator.xdb file. Path: data/GameMechanics/Creature/Creatures/Haven/Renegates/Vindicator.xdb.
Open it with Notepad, find the line WeeklyGrowth 10 /WeeklyGrowth and change 10 to the number of creatures you need. You also need to do this for the Swordsmen and Armored Archers.

Added 4 minutes ago
And it's better not to change the date at all. Instead, create an archive with the path mentioned above and put it in the UserMODs folder.
Thank you, I'll try. And here's another thing: I redrew the texture, but in the game, instead of the unit, there is now nothing. The texture has completely disappeared as a result of my modifications. How can I redraw the texture so that nothing disappears?

Added 18 minutes ago
ThomasKiller
The problem seems to be with the creature growth rate. It looks like you only changed the growth rate for the Zealots, but you also need to change it for the Swordsmen and Armored Archers. The growth rate for a unit and its upgrades should be the same.

Added 8 minutes ago
I don't know anything about IG guides. But I know how to change creature stats. In the data archive, you need the Vindicator.xdb file. Path: data/GameMechanics/Creature/Creatures/Haven/Renegates/Vindicator.xdb.
Open it with Notepad, find the line WeeklyGrowth 10 /WeeklyGrowth and change 10 to the number of creatures you need. You also need to do this for the Swordsmen and Armored Archers.

Added 4 minutes ago
And it's better not to change the date at all. Instead, create an archive with the path mentioned above and put it in the UserMODs folder.
I didn't change the growth rate this time - it still doesn't work
...И справедливость я несу
На острие меча.


Кампания "Искупление" - 15%



О кампании

"Искупление" - это мой амбициозный проект. Давняя мечта. С детства играя в героев, я восхищался персонажами и ландшафтами, сюжетом и стилем оригинальной трилогии, я мечтал привнести что-то свое в эту игру,  и наконец, более-менее освоив нелегкий труд картостроителя, взялся за воплощение мечты. Кампания расскажет о будущем выживших рыцарей Кровавой Стали, о пути, который они избрали, и о том, куда этот путь их приведет. К слову, мне нужен тестер-оценщик. Если хочешь принять участие в создании и есть определенный опыт, то - добро пожаловать!



Statistics

Welcome our newest member: Emil

Users Online 3 users 1325 guests