Party modding ??: add skills and traits to party creation

Ask for help about creating mods and scripts for Grimrock 2 or share your tips, scripts, tools and assets with other modders here. Warning: forum contains spoilers!
Falkenwrath
Posts: 15
Joined: Tue Aug 04, 2015 6:32 am

Party modding ??: add skills and traits to party creation

Post by Falkenwrath »

I am just getting ready to finish the main campaign to the game and ready to make my own world after playing Eye of Atlantis a bit.

I was wondering if skills and traits can be added to the existing party creator?? Started Eye of Atlantis up
tried to make my own starting character cause I didn't care for the one given. I noticed that the pirate class and paladin where listed and all the added skills + the traits were reorganized. Disappointed I couldn't start and play a new character I created with the new class. As I was forced to use Captain Hook. Is there a way to add classes to your mod that the player can create and customize when they start the game?? Or a way to slip them into the game itself when starting a new game with the preexisting campaign?
User avatar
Isaac
Posts: 3185
Joined: Fri Mar 02, 2012 10:02 pm

Re: Party modding ??: add skills and traits to party creatio

Post by Isaac »

I don't believe so; that part is not part of the mod itself. You can make these changes as part of the initial load of the mod, and it's possible to script a UI for redoing the party, and have it include these new options.
minmay
Posts: 2780
Joined: Mon Sep 23, 2013 2:24 am

Re: Party modding ??: add skills and traits to party creatio

Post by minmay »

Yes. The scripting reference explains how to define custom races, classes, skills, and traits under "Asset definitions". You can also download the asset pack to look at the definitions for all the standard races, classes, skills, and traits. The new items will appear on the party creation screen by default. There is also no need to keep all the standard races/classes/skills/traits in your mod, although you'll get a lot of console spam in the editor if you exclude default skills.
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
Isaac
Posts: 3185
Joined: Fri Mar 02, 2012 10:02 pm

Re: Party modding ??: add skills and traits to party creatio

Post by Isaac »

minmay wrote:Yes. The scripting reference explains how to define custom races, classes, skills, and traits under "Asset definitions". You can also download the asset pack to look at the definitions for all the standard races, classes, skills, and traits. The new items will appear on the party creation screen by default. There is also no need to keep all the standard races/classes/skills/traits in your mod, although you'll get a lot of console spam in the editor if you exclude default skills.
That's pretty cool, and unexpected. I'm genuinely surprised at that change in design. I'll have to examine that then. 8-)

Just tried it out and it works marvelously. [New tricks :D ]
Image
Falkenwrath
Posts: 15
Joined: Tue Aug 04, 2015 6:32 am

Re: Party modding ??: add skills and traits to party creatio

Post by Falkenwrath »

Thank you for that info. I am getting ready to start making my own mod soon I just feel like theres a few dots I am missing before I get started. I have done a little coding in java a few years back so
writing a script won't be completely foreign. I am just not completely getting how I add all the components together. downloaded the asset 2 pack and put in my asset folder, but didn't see the ice lizard, new spells, ect...

Its been a few years since I did anything like this and for some reason I am getting a blank on where to start. So I thought figuring out how to mod the class system first would be a good place to start. and after that making others changes would snowball and get easier as I go.
minmay
Posts: 2780
Joined: Mon Sep 23, 2013 2:24 am

Re: Party modding ??: add skills and traits to party creatio

Post by minmay »

I think you are confused...the asset pack includes only the standard assets that are already in grimrock2.dat. It's provided so that you can look at them and edit them for your own use. It does not include any new content.
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
Isaac
Posts: 3185
Joined: Fri Mar 02, 2012 10:02 pm

Re: Party modding ??: add skills and traits to party creatio

Post by Isaac »

That could be my fault ~possibly. The image above is certainly not in the asset pack. I meant that I tried out the procedure of defining a new race, and it worked.
Falkenwrath
Posts: 15
Joined: Tue Aug 04, 2015 6:32 am

Re: Party modding ??: add skills and traits to party creatio

Post by Falkenwrath »

ok I opened the assst pack and looked at the definitions

"defineCharClass{
name = "fighter",
uiName = "Fighter",
traits = { "melee_specialist" },
optionalTraits = 2.,
}

defineCharClass{
name = "barbarian",
uiName = "Barbarian",
optionalTraits = 2,
}

what am not getting is that if I make changes to these how do I plug them into my mod. I get how to change stuff but how do I apply the change say to
"defineCharClass{
name = "fighter dude117",
uiName = "Fighter",
traits = { "melee_specialist" },
optionalTraits = 5.,
}

defineCharClass{
name = "barbarian",
uiName = "Barbarian",
optionalTraits = 7}""

as in where do I put these files and what to I tell to use them..
User avatar
Isaac
Posts: 3185
Joined: Fri Mar 02, 2012 10:02 pm

Re: Party modding ??: add skills and traits to party creatio

Post by Isaac »

Anything that's defined after the standard assets is added to the game; those assets that use previously defined names ~overwrite the definitions.

The easiest way to make the changes, is to open a script in the mod's script folder (any script ~except dungeon.lua), and copy/paste the relevant asset pack definitions to it ~then make your changes. It should work.

A more organized way is to create a new script for these changes, and include it [its name & path] in the init.lua, after the standard (and/or custom) assets.

Just for the test, in my case, I put the changes themselves in the init.lua

But you should probably just duplicate the last import line [import "mod_assets/scripts/sounds.lua"] and change it to
[import "mod_assets/scripts/new_classes.lua"], and create a 'new_classes.lua' script for your additions.

Code: Select all

-- This file has been generated by Dungeon Editor 2.2.4

-- import standard assets
import "assets/scripts/standard_assets.lua"

-- import custom assets
import "mod_assets/scripts/items.lua"
import "mod_assets/scripts/monsters.lua"
import "mod_assets/scripts/objects.lua"
import "mod_assets/scripts/tiles.lua"
import "mod_assets/scripts/recipes.lua"
import "mod_assets/scripts/spells.lua"
import "mod_assets/scripts/materials.lua"
import "mod_assets/scripts/sounds.lua"

defineRace{
	name = "lamian",
	uiName="Lamian",
	inventoryBackground = "mod_assets/textures/lamian_$sex.tga",
}
In the case of a race, you'll use an existing inventoryBackground image, or need to create one or two of your own for the definition.
Falkenwrath
Posts: 15
Joined: Tue Aug 04, 2015 6:32 am

Re: Party modding ??: add skills and traits to party creatio

Post by Falkenwrath »

Ok got my own class to show up and everything thank you. Now I have to try and figure out how to modify the amount of starting skill points and traits if possible. I want to give humans 3 skill points at first level instead of 2 / and to give farmers three traits instead of two.

EDIT::
is it possible to completely replace the premade classes with your own so they don't show up?
Post Reply