Topic: Editor Extensions
Gilb![]() Topic Opener |
Posted at: 2020-12-27, 20:28
So i ran into some problems here. One i could fix myself, the other one unfortunately not.
players = 2 I tried hard to figure that out myself with the documentation here, but i didnt find many examples to help me in this case :( i found the scripting names for the tribe stuff, but none of the map stuff. Would the the place_immovable line also copy animals and trees and such (i'd like that)? I would really appreciate it if someone could lend me a hand. ![]() ![]() |
Nordfriese![]() |
Posted at: 2020-12-27, 21:01
Did you try Edit: Trees are also immovables. Animals can be accessed via Edited: 2020-12-27, 21:02
![]() ![]() |
Gilb![]() Topic Opener |
Posted at: 2020-12-28, 11:47
Nice, immovable.descr.name is what i was looking for. That works for the first immobable it encounters. It makes a copy and then produces an error because that "node is no longer free". I dont understand why it is trying to copy the immovable more than once to the same field. IF statements are no loops or am i wrong? I put that into the IF statement btw because otherwise it is trying to index a nil value when it tries to copy an immovable that is not there. Thanks for the bobs help, but unfortunately i didnt find any function in the wl.map index that allows me to place bobs. It is read only. ![]() ![]() |
Nordfriese![]() |
Posted at: 2020-12-28, 13:21
You are pasting over the same field multiple times:
should probably be something like
Further, if a field already contains an immovable it needs to be removed with
as each field can hold at most 1 immovable. Placing bobs via Lua is unfortunately not supported yet Edit: Btw, resources are called Edited: 2020-12-28, 13:23
![]() ![]() |
Gilb![]() Topic Opener |
Posted at: 2020-12-28, 13:31
(x + (64 * a)
![]() ![]() |
Gilb![]() Topic Opener |
Posted at: 2021-01-07, 16:38
Terrain "ashes1" exists in map, not in world! :<
![]() ![]() |
Nordfriese![]() |
Posted at: 2021-01-07, 17:10
Dieser Geländetyp wurde vor einiger Zeit umbenannt. In build21 heißt er "ashes", in der aktuellen Entwicklungsversion "ashes1". Aus Effizienzgründen werden die Name aller Geländetypen in der Datei abgelegt – auch die, die gar nicht verwendet wurden. Modernere Karten sind daher nicht mit build21 kompatibel. Was du machen könntest, wäre die Datei Edited: 2021-01-07, 17:11
![]() ![]() |
teppo |
Posted at: 2021-01-09, 13:37
I have a version which makes symmetric maps ("an empire strikes back" and "fellowships" are made with it). The code is unpolished (=type symmetry is currently hard coded, a bit of code morphing and recompilation needed to use). If that would be of larger interest, I could attempt polish it and push to repo. That is done using C++ level, not in lua. ![]() ![]() |
Gilb![]() Topic Opener |
Posted at: 2021-01-11, 21:20
Yeah man, i would greatly appreciate it if the editor would get a function similar to what i am doing with lua ![]() ![]() |