Auto-translated
Is there a way to forget spells?
Is there a way to keep a spell if you forget a leveled magic school? (for example, keep the "Subjugation" spell even after forgetting the "Dark Magic" skill).
New here? I'm Roha — want a quick tour?
Is it possible to create a hero using scripts? And if not, will the game lag if I place a lot of heroes on the map, but they are all disabled?
I just need a random hero to appear in a specific location.
Question 2: Is it possible to determine the level of a monster using a script? I don't have the manuals handy right now, and I don't know/remember if there's a function for that...
nn = GetDate(ABSOLUTE_DAY) / 7
---
n = random (179) + 1
AddHeroCreatures(hh[gen] , n , nn * ?)Yeah, I actually need it for heroes. Well, okay, I guess I'll have to manually enter it by ID... Thanks anyway.
Added 20 hours and 17 minutes agonn = GetDate(ABSOLUTE_DAY) / 7
---
n = random (179) + 1
AddHeroCreatures(hh[gen] , n , nn * ?)
I have this question: I need a random creature to appear for the hero, but its quantity should depend on the current week * a special coefficient, unique for each monster in the game; I've already defined it. The problem is that I can't fit all of this into one line. Maybe it's possible to create an array of 179 values, for example, c[0] = 1, c[1] = 10, c[179] = 2, etc., and then, instead of ?, substitute into the above function: c[n] ? But, unfortunately, it doesn't work. What should I do? I hope for help.
The problem is that I have no idea how to create arrays in general. I tried using GetAllNames (or something like that), but it doesn't work. And I couldn't find anything in the manual about creating long arrays or artificially increasing their maximum number. :(
table = {5,12,4,4,9,0}
table = {["кристаллы"]=4, x=1, y=55; 5, 6, 11, nil, "string", function()end, {"Brem", "Berein"}}
empty = {}and so on. The first element is index 1. This is a rough example; a better explanation of how to create them can be found on the Lua 4.0 developers' website, as well as here, section 4.4.5.7.
Where can I find a manual for the map editor?
1) How do I raise a number to a power? n ^ 2 doesn't seem to work...
2) How do I select a hero? In the sense that, for example, a player has 8 heroes, and I need one of them to be "clicked" as if with the left mouse button. Simply deleting 7 of them afterwards, and it's impossible to select the last one by default at the start of the game (or make it the first one).
3) Does GetDate(ABSOLUTE_DAY) return any current day of the game? (1, 2,...101, 192)?
4) What does GetDate(WEEK) return? It seemed to me that it goes in a circle, increasing to a larger number, and then starts again from 1 (or am I wrong?)
5) What will happen if I try to force a hero to learn a spell that he cannot learn due to a low skill level? (Will he be able to cast it?)
6) Will there be a map error due to point 5, or if I try to force a human to learn an orcish spell/vice versa?