Ask a simple question, get a simple answer
Re: Ask a simple question, get a simple answer
I have placed some tents around my mod. I believe they're from zim's assets. when you click on them your party starts resting.
Is there a way to disable resting everywhere else?
I found that
return false from PartyComponent.onRest hook
will do the trick, but I have no idea in which file i have to change this line.
and will this also disable resting from the tents?
Is there a way to disable resting everywhere else?
I found that
return false from PartyComponent.onRest hook
will do the trick, but I have no idea in which file i have to change this line.
and will this also disable resting from the tents?
Re: Ask a simple question, get a simple answer
It depends on which file you keep your party definition and hooks in....
Have you written any code for any of the hooks yet?
Party Hooks :
SpoilerShow
Code: Select all
PartyComponent.onCastSpell(self, champion, spell)
PartyComponent.onDamage(self, champion, damage, damageType)
PartyComponent.onDie(self, champion)
PartyComponent.onAttack(self, champion, action, slot)
PartyComponent.onLevelUp(self, champion)
PartyComponent.onReceiveCondition(self, champion, condition)
PartyComponent.onDrawGui(self, context)
PartyComponent.onDrawInventory(self, context, champion)
PartyComponent.onDrawStats(self, context, champion)
PartyComponent.onDrawSkills(self, context, champion)
PartyComponent.onDrawTraits(self, context, champion)
PartyComponent.onPickUpItem(self, item)
PartyComponent.onProjectileHit(self, champion, item, damage, damageType)
PartyComponent.onRest(self)
PartyComponent.onWakeUp(self)
PartyComponent.onTurn(self, direction)
PartyComponent.onMove(self, direction)
(Zimber's mod files, for example, have the party def + hooks kept in a lua file called zim_party.lua - and he just imports zim_party.lua from his init.lua file)
Would you like to look over such a def / hook file??
To manipulate the outcome when the onRest hook fires.... check to see if the tent is in front of the party, if it is then return false
This example includes the hook as part of a (very brief) party definition
Party hooks are just listed one after the other like this :
SpoilerShow
Code: Select all
defineObject{
name = "party",
baseObject = "party",
components = {
class = "Party",
onRest = function(self)
local dx,dy = getForward(self.go.facing)
if party.x + dx == tent_1.x
and party.y + dy == tent_1.y
and party.level == tent_1.level
and party.elevation == tent_1.elevation then
print("stop tent sleep")
return false
end
end,
onReceiveCondition(self, champion, condition)
-- do condition stuff here
end,
onProjectileHit(self, champion, item, damage, damageType)
-- do projectile stuff here
end,
},
}
Here is 2 ways of doing that through the onRest hook :
SpoilerShow
Code: Select all
onRest = function(self)
local dx,dy = getForward(self.go.facing)
if not party.x + dx == tent_1.x
or not party.y + dy == tent_1.y
or not party.level == tent_1.level
or not party.elevation == tent_1.elevation then
print("only tent sleep")
return false
end
end,
onRest = function(self)
local dx,dy = getForward(self.go.facing)
if party.x + dx == tent_1.x
and party.y + dy == tent_1.y
and party.level == tent_1.level
and party.elevation == tent_1.elevation then
print("only tent sleep")
--do party resting stuff here
else
return false
end
end,
Akroma
EDIT: elevation & level checks added
Last edited by akroma222 on Sun Jul 29, 2018 4:19 am, edited 1 time in total.
Labyrinth of Lies (viewtopic.php?f=14&t=4400)
Legacy of Lies (viewtopic.php?f=22&t=12983&hilit=+legacy)
Legacy of Lies (viewtopic.php?f=22&t=12983&hilit=+legacy)
Re: Ask a simple question, get a simple answer
So basically something I should just ignore until the very end.
Which is basically I do with everything I don't understand or unable to accomplish without holding hands help.
On the bright side I have started to make a boat, which allows me to create an "inside the boat" map
Which is basically I do with everything I don't understand or unable to accomplish without holding hands help.
On the bright side I have started to make a boat, which allows me to create an "inside the boat" map
Re: Ask a simple question, get a simple answer
Akroma, those hooks need to check whether the party is on the same level as the tent as well. You probably want to check elevation too.
Grimrock 1 dungeon
Grimrock 2 resources
I no longer answer scripting questions in private messages. Please ask in a forum topic or this Discord server.
Grimrock 2 resources
I no longer answer scripting questions in private messages. Please ask in a forum topic or this Discord server.
Re: Ask a simple question, get a simple answer
You're right, I do! Haha Thankyou!
Labyrinth of Lies (viewtopic.php?f=14&t=4400)
Legacy of Lies (viewtopic.php?f=22&t=12983&hilit=+legacy)
Legacy of Lies (viewtopic.php?f=22&t=12983&hilit=+legacy)
Re: Ask a simple question, get a simple answer
I started making a new map where I want the player to walk through a waterfall into a cave exit that leads to an underground cave map.
The map is brand new and thus still empty and only a very rough sketch/try at it.
Also the screenshots are taken in lowest settings in low res.
https://ibb.co/c2n65p
https://ibb.co/n0fJkp
What are my options to make sure the cave stairs don't light up like a christmas tree because of the daylight that goes through everything?
Are there any day_sky blocker tiles/walls/ceilings or something like that?
The map is brand new and thus still empty and only a very rough sketch/try at it.
Also the screenshots are taken in lowest settings in low res.
https://ibb.co/c2n65p
https://ibb.co/n0fJkp
What are my options to make sure the cave stairs don't light up like a christmas tree because of the daylight that goes through everything?
Are there any day_sky blocker tiles/walls/ceilings or something like that?
Re: Ask a simple question, get a simple answer
Question:
Does anyone know how to make a texture / surface look wet ingame?
I remember that someone made something like this a while back (ground surface) , but can't find the post anymore
Any tips are welcome
Looking for a wet stone surface
Does anyone know how to make a texture / surface look wet ingame?
I remember that someone made something like this a while back (ground surface) , but can't find the post anymore
Any tips are welcome
Looking for a wet stone surface
Re: Ask a simple question, get a simple answer
I made it and you can find it in my Journey To Justice - Resource Pack.
Have a look here:
https://www.nexusmods.com/legendofgrimr ... ?tab=files
It's just a question of glossiness. You can set this value in the material definition for example to glossiness = 100,
Have a look here:
https://www.nexusmods.com/legendofgrimr ... ?tab=files
It's just a question of glossiness. You can set this value in the material definition for example to glossiness = 100,
Re: Ask a simple question, get a simple answer
Sorry I cant help with any of your specific questions, but here is a video of Skuggs' waterfall
https://www.youtube.com/watch?v=96v6ZV2R14I
Im not sure if Skuggs is still around, further; whether the waterfall is a shared asset.....
Also - Zimber created waterfall assets - I would download and take a look at his work too (your answers may lay there?)
Hope this helps
Akroma
Labyrinth of Lies (viewtopic.php?f=14&t=4400)
Legacy of Lies (viewtopic.php?f=22&t=12983&hilit=+legacy)
Legacy of Lies (viewtopic.php?f=22&t=12983&hilit=+legacy)
Re: Ask a simple question, get a simple answer
The waterfall of Skuggs will come with ORRR3.