Page 1 of 2

Skill Leveling Limitations and/or Requirements

Posted: Thu Jan 29, 2015 6:58 am
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.

Re: Skill Leveling Limitations and/or Requirements

Posted: Sun Feb 01, 2015 2:47 am
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.

Re: Skill Leveling Limitations and/or Requirements

Posted: Sun Feb 01, 2015 4:50 am
by David Ward
D'oh. Okay thanks.

Re: Skill Leveling Limitations and/or Requirements

Posted: Sun Feb 01, 2015 4:54 am
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.

Re: Skill Leveling Limitations and/or Requirements

Posted: Sun Feb 01, 2015 5:13 am
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

Re: Skill Leveling Limitations and/or Requirements

Posted: Sun Feb 01, 2015 5:14 am
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

Re: Skill Leveling Limitations and/or Requirements

Posted: Sun Feb 01, 2015 5:16 am
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.

Re: Skill Leveling Limitations and/or Requirements

Posted: Sun Feb 01, 2015 5:27 am
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.

Re: Skill Leveling Limitations and/or Requirements

Posted: Sun Feb 01, 2015 5:31 am
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.

Re: Skill Leveling Limitations and/or Requirements

Posted: Sun Feb 01, 2015 6:45 am
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?