Search found 212 matches

by 7Soul
Thu Dec 26, 2024 6:22 pm
Forum: Mod Creation
Topic: Ask a simple question, get a simple answer
Replies: 3990
Views: 3480561

Re: Ask a simple question, get a simple answer

But this causes an exception saying addItem requires an ItemComponent: Try this local gem = "blue_gem" for e in self.go.map:entitiesAt(self.go.x, self.go.y + dy) do if e and e.surface then local o = spawn(gem).item e.go.surface:addItem(o) break end end That's the same code I posted, just ...
by 7Soul
Tue Dec 24, 2024 11:25 pm
Forum: Mod Creation
Topic: Ask a simple question, get a simple answer
Replies: 3990
Views: 3480561

Re: Ask a simple question, get a simple answer

But this causes an exception saying addItem requires an ItemComponent: e.surface:addItem(spawn(item).item) What's the value of the "item" variable? If the "item" variable has the wrong value, then the spawned entity will not have an item component. Maybe add a "print(item)&...
by 7Soul
Tue Dec 24, 2024 7:37 pm
Forum: Mod Creation
Topic: Ask a simple question, get a simple answer
Replies: 3990
Views: 3480561

Re: Ask a simple question, get a simple answer

For some reason, this works: local altar = spawn("altar", self.go.level, self.go.x, self.go.y + dy, self.go.facing, self.go.elevation, "s_" .. "altar" .. "_" .. s) altar.surface:addItem(spawn(item).item) But this causes an exception saying addItem requires an ...
by 7Soul
Sat Jun 29, 2024 2:24 am
Forum: Mod Creation
Topic: Ask a simple question, get a simple answer
Replies: 3990
Views: 3480561

Re: Ask a simple question, get a simple answer

My bad it should be

Code: Select all

for _,item in altar_1.surface:contents() do
     --etc
end
Where _ is the index, and 'item' is the Item component
by 7Soul
Fri Jun 28, 2024 6:15 pm
Forum: Mod Creation
Topic: Ask a simple question, get a simple answer
Replies: 3990
Views: 3480561

Re: Ask a simple question, get a simple answer

Altars and other such objects use the Surface Component to store items

I think something like this works:

Code: Select all

for item in altar_1.surface:contents() do
	if item.go.name == "fire_bomb" then
		item.go:setSubtileOffset(x,y)
	end
end
by 7Soul
Fri Jun 28, 2024 6:10 pm
Forum: Modding
Topic: Global functions?
Replies: 1
Views: 2352

Re: Global functions?

Global functions?
That's your question? You want to make global functions? You want to know what are the global functions that the scripting system has? Can you be more specific?
by 7Soul
Tue Jun 25, 2024 3:28 pm
Forum: Info
Topic: What is going on with the forum??
Replies: 4
Views: 4559

Re: What is going on with the forum??

I can login no problem on Firefox, maybe it's an extension?

And yes the CSS is broken...
by 7Soul
Sun Jun 09, 2024 11:28 pm
Forum: Info
Topic: New forum theme! Report issues.
Replies: 10
Views: 16747

Re: New forum theme! Report issues.

The CSS is gone!
by 7Soul
Sun Jun 09, 2024 4:41 pm
Forum: Mod Creation
Topic: [UMod] Editor+ (minor editor improvements)
Replies: 12
Views: 17128

Re: [UMod] Editor+ (minor editor improvements)

New version https://www.nexusmods.com/legendofgrimrock2/mods/178?tab=files - Added Tile Selection tool: allows copy/pasting sections of tiles, with rotation and flipping (read info at the bottom of editor screen) (the shadows look buggy when you flip the selection, since the engine doesn't support f...
by 7Soul
Tue Jun 04, 2024 1:04 am
Forum: Mod Creation
Topic: [UMod] Editor+ (minor editor improvements)
Replies: 12
Views: 17128

Re: [UMod] Editor+ (minor editor improvements)

Great job on this... wished I could sue it! HA! So, using the Steam version here and set the BETA and the key. Still haven't seen the Mods folder nor the mods.cfg file. Version still shows v2.2.4. By chance can this just be created? Mind sharing the mods.cfg file so I can make it myself? Make sure ...