Page 362 of 400
Re: Ask a simple question, get a simple answer
Posted: Sat Nov 14, 2020 9:29 pm
by minmay
Isaac wrote: ↑Sat Nov 14, 2020 5:07 amExample; start a new project/map, and place a dungeon_floor_01 object on elevation level 1 so that you can look upwards at it. Type the following into the console.
Code: Select all
dungeon_floor_01_1.model:setRotationAngles(0,0,180)
If you are only using a few of these, then it makes sense to just script the change in a script _entity.
This will break as soon as the player saves and reloads the game, since dungeon_floor_01 has minimalSaveState.
Re: Ask a simple question, get a simple answer
Posted: Sun Nov 15, 2020 12:45 am
by ratman
How would I make it so the skills have more than 5 levels? (Or is this even possible?)
Re: Ask a simple question, get a simple answer
Posted: Sun Nov 15, 2020 1:51 am
by minmay
Only possible with EquipmentItemComponent, and only in a very limited way; see
http://www.grimrock.net/forum/viewtopic ... 22&t=14529
Re: Ask a simple question, get a simple answer
Posted: Sun Nov 15, 2020 3:11 am
by Isaac
minmay wrote: ↑Sat Nov 14, 2020 9:29 pm
This will break as soon as the player saves and reloads the game, since dungeon_floor_01 has minimalSaveState.
Yeah, and it would have to be done again.
It needs to be put in a script function and called with each load... or use the defined asset.
Re: Ask a simple question, get a simple answer
Posted: Sun Nov 15, 2020 3:57 am
by ratman
The only reasons this could ever be useful are the builtin light_weapons, heavy_weapons, missile_weapons, throwing, firearms, and magic skills since you can't cleanly recreate their effects using the scripting interface. Other than that it would be better to use your own skill system.
How would I create my own skill system?
Re: Ask a simple question, get a simple answer
Posted: Sun Nov 15, 2020 4:17 am
by 7Soul
ratman wrote: ↑Sun Nov 15, 2020 3:57 am
The only reasons this could ever be useful are the builtin light_weapons, heavy_weapons, missile_weapons, throwing, firearms, and magic skills since you can't cleanly recreate their effects using the scripting interface. Other than that it would be better to use your own skill system.
How would I create my own skill system?
You could use my mod as reference, unless someone has a cleaner example
Re: Ask a simple question, get a simple answer
Posted: Sun Nov 15, 2020 4:34 pm
by ratman
How would I make it so it costs 1 skill point for the first level, 2 for the second, and so on? (I don't want to completely steal your script
edit: Also how do I make my own skills? I can define them and make it so at a certain level they get a trait, but how do I make it so they get something every level?
Code: Select all
defineSkill{
name = "water_magic",
uiName = "Water Magic",
priority = 160,
icon = 32,
description = "Increases damage of water spells by 20% for each skill point. At 5th skill level you gain Resist Cold +50.",
traits = { [5] = "water_mastery" },
}
In water magic, in the description it says they get water spell damage increase by 20% but where does it actually do this in the code?
Re: Ask a simple question, get a simple answer
Posted: Sun Nov 15, 2020 5:49 pm
by 7Soul
ratman wrote: ↑Sun Nov 15, 2020 4:34 pm
How would I make it so it costs 1 skill point for the first level, 2 for the second, and so on? (I don't want to completely steal your script
edit: Also how do I make my own skills? I can define them and make it so at a certain level they get a trait, but how do I make it so they get something every level?
Code: Select all
defineSkill{
name = "water_magic",
uiName = "Water Magic",
priority = 160,
icon = 32,
description = "Increases damage of water spells by 20% for each skill point. At 5th skill level you gain Resist Cold +50.",
traits = { [5] = "water_mastery" },
}
In water magic, in the description it says they get water spell damage increase by 20% but where does it actually do this in the code?
A lot of the skill effects are hard-coded, like the % damage bonuses and % armor bonus. The Magic of Grimrock script recreates the spells so you could change how the bonus works on them
Re: Ask a simple question, get a simple answer
Posted: Sun Nov 15, 2020 5:52 pm
by ratman
Thanks, I guess I'll just make it so it gives a trait every time.
*what about how to make it so the skills cost more points the higher the level?
Re: Ask a simple question, get a simple answer
Posted: Sun Nov 15, 2020 7:21 pm
by 7Soul
ratman wrote: ↑Sun Nov 15, 2020 5:52 pm
Thanks, I guess I'll just make it so it gives a trait every time.
*what about how to make it so the skills cost more points the higher the level?
In the functions.lua of my mod, look for addSkillTemp, removeSkillTemp and clearSkillTemp. The line champion:setSkillPoints(champion:getSkillPoints() - 1) takes away one point. You can add a check for how many skill points the champion has and compare with the skill level, then make it subtract the skill level from it instead of 1