Ask a simple question, get a simple answer
- zimberzimber
- Posts: 432
- Joined: Fri Feb 08, 2013 8:06 pm
Re: Ask a simple question, get a simple answer
Vanilla functions, done on the first screen after you select a dungeon toy play
Click "import party" and select a save file from another session.
Click "import party" and select a save file from another session.
My asset pack [v1.10]
Features a bit of everything!
Features a bit of everything!
Re: Ask a simple question, get a simple answer
...with the exception that no imported party has any equipment...
- Mysterious
- Posts: 226
- Joined: Wed Nov 06, 2013 8:31 am
Re: Ask a simple question, get a simple answer
Yes I know you can import a party that's not what I was looking for and as Thom said no equipment. I have played a Mod here or steam where the Author tells you to save a game with a certain name for the next part of his mod.
There has to be away surely?
There has to be away surely?
Re: Ask a simple question, get a simple answer
I'm not aware of any mod that does that, but I went over how to do it here.
minmay wrote:No.
However, you can abuse the party import feature to store arbitrary information. E.g. use Champion:setName() to encode all champions' inventories, game statistics, and whatever else you want to transfer, then have the player import the party into the next mod. I tested with a 1 MB name and it saved and loaded just fine, so there is plenty of space available. So if you want players to be able to go back and forth between two or more dungeons and have arbitrary persistence, it can be done. Whether this would actually be a good design is debatable, however.
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.
- Mysterious
- Posts: 226
- Joined: Wed Nov 06, 2013 8:31 am
Re: Ask a simple question, get a simple answer
Ty for the information on Loading a game into a new mod ahh well
Ok I can do: GameMode.setGameFlag("DisableMovement",true) no problem but, is there a way to Disable the Mouse Pointer? I have read the Bloggs etc... and have not found anything unless I missed it.
Ok I can do: GameMode.setGameFlag("DisableMovement",true) no problem but, is there a way to Disable the Mouse Pointer? I have read the Bloggs etc... and have not found anything unless I missed it.
Re: Ask a simple question, get a simple answer
Code: Select all
GameMode.getGameFlag(flag)
Code: Select all
GameMode.setEnableControls(boolean)
Have a look here.
Re: Ask a simple question, get a simple answer
Hello,
I am nearing completion of a mod and looking for some help on a few scripting questions.
Health / Energy Regeneration: What is the proper way to prevent regeneration completely? I have tried several methods, I can't look at my script right now but the closest I have come is by using a trait with a recomputeStat hook that modifies regeneration rate by -100. While this greatly slows regeneration, it does not stop it like it would with certain injury conditions.
Also on conditions: Does anyone have the definitions for the conditions? I know how to make new ones but I would like to see the existing ones and just slightly adjust them.
Reload Firearm Secondary Action: I would like for this action to use ammo from the inventory instead of the hand. I could probably figure out a way eventually, but I thought I'd throw it out there in case someone knew a simple way to do this or already has a script for it and is willing to share.
Thanks !
I am nearing completion of a mod and looking for some help on a few scripting questions.
Health / Energy Regeneration: What is the proper way to prevent regeneration completely? I have tried several methods, I can't look at my script right now but the closest I have come is by using a trait with a recomputeStat hook that modifies regeneration rate by -100. While this greatly slows regeneration, it does not stop it like it would with certain injury conditions.
Also on conditions: Does anyone have the definitions for the conditions? I know how to make new ones but I would like to see the existing ones and just slightly adjust them.
Reload Firearm Secondary Action: I would like for this action to use ammo from the inventory instead of the hand. I could probably figure out a way eventually, but I thought I'd throw it out there in case someone knew a simple way to do this or already has a script for it and is willing to share.
Thanks !
Re: Ask a simple question, get a simple answer
Can you post the code you are using in your trait's onRecomputeStatistics hook?lostsol wrote: Health / Energy Regeneration: What is the proper way to prevent regeneration completely? I have tried several methods, I can't look at my script right now but the closest I have come is by using a trait with a recomputeStat hook that modifies regeneration rate by -100. While this greatly slows regeneration, it does not stop it like it would with certain injury conditions.
If your regen rates do not completely stop it is likely you are not using the champ's actual regeneration rates...
For an example of what I mean - this hidden trait removes all the attribute based element resistance bonuses a champion recieves -after- party creation
SpoilerShow
Code: Select all
defineTrait{
name = "correct_resistance",
uiName = "Correct Resistance",
iconAtlas = "mod_assets/textures/gui/blank_borders/blank64x80.tga",
icon = 0,
hidden = true,
description = "",
onRecomputeStats = function(champion, level)
if level > 0 then
local statResTab = {strength = "fire", dexterity = "shock", vitality = "poison", willpower = "cold"}
for k,v in pairs(statResTab) do
local currStat = champion:getCurrentStat(k)
local diff = currStat - 10
if diff >= 1 then
champion:addStatModifier("resist_"..v, - (diff * 2))
end
end
end
end,
}
Not exactly at the moment - I am currently re-implementing the original conditions (AND their menu / attack panel Gui effects ) and am happy to repost these defs once finishedlostsol wrote: Also on conditions: Does anyone have the definitions for the conditions? I know how to make new ones but I would like to see the existing ones and just slightly adjust them.
You will likely need to re-implement the effects of the RelaodFirearmComponent .... Ive got nothing to help here unfortlostsol wrote: Reload Firearm Secondary Action: I would like for this action to use ammo from the inventory instead of the hand. I could probably figure out a way eventually, but I thought I'd throw it out there in case someone knew a simple way to do this or already has a script for it and is willing to share.
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
https://github.com/JKos/log2doc/wiki/As ... ditiondesclostsol wrote:Hello,
Also on conditions: Does anyone have the definitions for the conditions? I know how to make new ones but I would like to see the existing ones and just slightly adjust them.
Re: Ask a simple question, get a simple answer
akroma222 wrote:Can you post the code you are using in your trait's onRecomputeStatistics hook?lostsol wrote: Health / Energy Regeneration: What is the proper way to prevent regeneration completely? I have tried several methods, I can't look at my script right now but the closest I have come is by using a trait with a recomputeStat hook that modifies regeneration rate by -100. While this greatly slows regeneration, it does not stop it like it would with certain injury conditions.
If your regen rates do not completely stop it is likely you are not using the champ's actual regeneration rates...
For an example of what I mean - this hidden trait removes all the attribute based element resistance bonuses a champion recieves -after- party creation
SpoilerShow
Code: Select all
defineTrait{
name = "correct_resistance",
uiName = "Correct Resistance",
iconAtlas = "mod_assets/textures/gui/blank_borders/blank64x80.tga",
icon = 0,
hidden = true,
description = "",
onRecomputeStats = function(champion, level)
if level > 0 then
local statResTab = {strength = "fire", dexterity = "shock", vitality = "poison", willpower = "cold"}
for k,v in pairs(statResTab) do
local currStat = champion:getCurrentStat(k)
local diff = currStat - 10
if diff >= 1 then
champion:addStatModifier("resist_"..v, - (diff * 2))
end
end
end
end,
}
Here is what I'm working with:
SpoilerShow
Code: Select all
defineTrait{
name = "no_regen",
uiName = "",
icon = 0,
description = "",
hidden = true,
onRecomputeStats = function(champion, level)
if level > 0 then
champion:addStatModifier("energy_regeneration_rate", -100)
champion:addStatModifier("health_regeneration_rate", -100)
end
end,
}