Skill Leveling Limitations and/or Requirements

Have trouble running Legend of Grimrock 2 or do you have questions about the purchasing options? Look for help here.
User avatar
David Ward
Posts: 103
Joined: Wed Jan 07, 2015 11:44 pm
Location: Vancouver, BC, Canada

Skill Leveling Limitations and/or Requirements

Post by David Ward »

Is there a way to put a cap on increasing skills, or rather....is there a way to make it so that a skill can only be increased if the character reaches a certain level?

One thing I found with Grimrock 2 was that it was too easy to skill-up. Having 5 skill points for a character that was at level 5 was deadly. Is there a way to limit this?

For example...is there a way to make it so a character has to be at level 4 in order to be able to raise ANY skill to 2. They need to be level 7 to be able to raise any skill to 3...etc.
Grimfan
Posts: 369
Joined: Wed Jan 02, 2013 7:48 am

Re: Skill Leveling Limitations and/or Requirements

Post by Grimfan »

Hi David, I haven't looked in to what you are asking but many of your questions are better placed in the mod creation section of the forums. That is where most of the modders (and thus people who know about scripting and the game engine) hang out and your questions will be more readily answered.
User avatar
David Ward
Posts: 103
Joined: Wed Jan 07, 2015 11:44 pm
Location: Vancouver, BC, Canada

Re: Skill Leveling Limitations and/or Requirements

Post by David Ward »

D'oh. Okay thanks.
minmay
Posts: 2790
Joined: Mon Sep 23, 2013 2:24 am

Re: Skill Leveling Limitations and/or Requirements

Post by minmay »

You would have to implement your own skill system to do this correctly (easy to do in this game). If you are lazy and want a fast but bad solution, you can check the champions' skill levels whenever they have the potential to change and cancel any skill training where the requirements aren't met, but of course this still allows players to put the skill points there and click "accept", so it's much less elegant.
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.
User avatar
Frenchie
Posts: 219
Joined: Wed Oct 16, 2013 2:50 am

Re: Skill Leveling Limitations and/or Requirements

Post by Frenchie »

I don't think that is possible. What you want is something like this :

Code: Select all

local ch = party.party:getChampion(1)
if ch:getLevel() < 3 then ch:setMaxSkillLevel(2)
Except setMaxSkillLevel doesn't exist. (The above comment was made while I was typing this reply)

What you could do for every champion and all their skill levels :

Code: Select all

local ch = party.party:getChampion(1)
if ch:getSkillLevel("alchemy") == 3 and ch:getLevel() < 3 then ch:setSkillLevel("alchemy",2) ch:setSkillPoints(0)
hudprint("Your max skill level = 2 please distribute them another way")
But you have to do it for each time a player increases a skill beyond your limitation and you have to keep track of which skill was increased and put it back to its limit.

Edit : I didn't write the full script for every champion and skill
Last edited by Frenchie on Sun Feb 01, 2015 5:16 am, edited 1 time in total.
User avatar
David Ward
Posts: 103
Joined: Wed Jan 07, 2015 11:44 pm
Location: Vancouver, BC, Canada

Re: Skill Leveling Limitations and/or Requirements

Post by David Ward »

"You would have to implement your own skill system to do this correctly (easy to do in this game)."

Is it? How so? It seems like there are quite a few *hard-coded* bits that can't just be done away with. Is it a matter of making an entirely new list of skills? Am not sure how to go about that. It seems like there are some limitations on the character creation screen all around. I posted more about this here: viewtopic.php?f=22&t=9409
User avatar
David Ward
Posts: 103
Joined: Wed Jan 07, 2015 11:44 pm
Location: Vancouver, BC, Canada

Re: Skill Leveling Limitations and/or Requirements

Post by David Ward »

Thanks Frenchie. It seems like the thing to do would be to adjust the skills themselves, so if a player wants to increase a skill for a character to 5 as fast as possible (1 point per level on the same skill), that the skill wouldn't be so overpowered by the time they do that. Remaking skills seems to be a challenging feat, however.
User avatar
Frenchie
Posts: 219
Joined: Wed Oct 16, 2013 2:50 am

Re: Skill Leveling Limitations and/or Requirements

Post by Frenchie »

It would be great if that setMaxSkillLevel() could be made.

Have you thought about a skill tree? For example you need at least 2 levels in light weapons and be level 3 before you can invest in heavy weapons. The same for athletics vs dodge, throwing vs missile weapons, concentration vs accuracy vs critical, etc. You could also restrict alchemy to a magic user and you won't see a wizard with heavy weapons.
minmay
Posts: 2790
Joined: Mon Sep 23, 2013 2:24 am

Re: Skill Leveling Limitations and/or Requirements

Post by minmay »

David Ward wrote:"You would have to implement your own skill system to do this correctly (easy to do in this game)."

Is it? How so? It seems like there are quite a few *hard-coded* bits that can't just be done away with. Is it a matter of making an entirely new list of skills? Am not sure how to go about that. It seems like there are some limitations on the character creation screen all around. I posted more about this here: viewtopic.php?f=22&t=9409
Just don't load the standard skills, write your own arbitrary skill system in Lua just like you would anywhere else, and use PartyComponent.onDrawSkills to know when its interface should be displayed.
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.
User avatar
David Ward
Posts: 103
Joined: Wed Jan 07, 2015 11:44 pm
Location: Vancouver, BC, Canada

Re: Skill Leveling Limitations and/or Requirements

Post by David Ward »

Just don't load the standard skills, write your own arbitrary skill system in Lua just like you would anywhere else, and use PartyComponent.onDrawSkills to know when its interface should be displayed.
That sounds awesome. I wouldn't even know where to begin. I didn't know you could "not load" the standard skills.

Would the same go for races, classes, and traits? You could just not load the standard ones already built in, make new ones, and implement accordingly?
Post Reply