Scripting Traits

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!
Post Reply
SoloFreed
Posts: 6
Joined: Mon Mar 30, 2015 9:54 pm

Scripting Traits

Post by SoloFreed »

I wanted to know if it was possible to create a trait similar to Armor Expert and Shield Expert. I wanna create classes that are for specific types of weapons and will start with a slight bonus for those times. Like a Light Weapon Expert or Heavy Weapon Expert type script that will provide 20% - 30% boost for characters that start as that class.
User avatar
Drakkan
Posts: 1318
Joined: Mon Dec 31, 2012 12:25 am

Re: Scripting Traits

Post by Drakkan »

generally yes. Depends if somebody will be able to write a script for it. Maybe specify precisely what trait you want to make and hopefully somebody will help.
Breath from the unpromising waters.
Eye of the Atlantis
SoloFreed
Posts: 6
Joined: Mon Mar 30, 2015 9:54 pm

Re: Scripting Traits

Post by SoloFreed »

If I knew anything about scripting, I could try it myself. LoG2 is the first game I've tried modding to add classes and traits so I'm not really sure about what I'm doing. I just wanted to know if someone could script in a "lower_weapon_expert" trait and a "heavy_weapon_expert" trait that would do something similar to the "armor_expert" and "shield_expert" traits. I'm not looking for anything game breaking but something that would help focus my characters a little more.
SoloFreed
Posts: 6
Joined: Mon Mar 30, 2015 9:54 pm

Re: Scripting Traits

Post by SoloFreed »

In the traits.lua file I created this as an example. Just to show what I was looking for. I'm not sure if putting it in the .lua file is all I'd have to do or if I'll have to make changes to something else as well.

Example:
defineTrait{
name = "heavy_weapon_expert",
uiName = "Heavy Weapon Expert",
icon = 6,
description = "Increases damage of equipped heavy weapons by 15%.",
}

The icon I chose is the one for "two_handed_mastery"
Eburt
Posts: 69
Joined: Thu Feb 05, 2015 5:44 am

Re: Scripting Traits

Post by Eburt »

Something similar was accomplished in this thread. However, it's not a simple solution as it requires an external script and modifying the definition of every weapon you want to be impacted by your trait. I do not know of a better way to do this though.
Post Reply