adding a custom item

Talk about creating Grimrock 1 levels and mods here. Warning: forum contains spoilers!
Post Reply
RChevalier
Posts: 1
Joined: Thu Nov 07, 2013 10:55 am

adding a custom item

Post by RChevalier »

Hello, firstly I have no experience whatsoever in modding period, but wanted to start somewhere so... hence the reason why I post it here... any help would be greatly appreciated.

I'm currently playing the Master Quest mod solo, and I wanted to modify the spirit_mirror_pendant to give 50% instead of the default 25%. Is there a easy way to make this happen? I'm ok with a hard way as well so long as there are clear instructions. I would imagine cloning the original and editing the value would be a start but have no idea to actually implement it, what file to edit, where to put it, etc... thanks in advance.
User avatar
Komag
Posts: 3659
Joined: Sat Jul 28, 2012 4:55 pm
Location: Boston, USA

Re: adding a custom item

Post by Komag »

Unfortunately the properties of that item don't have anything to edit about the percentage of XP, that seems to be hardcoded in the game elsewhere that we don't have access to.

There are some potential tricks that might be possible, such as setting up on every monster death to check if anyone in the party has the pendant and adding extra XP manually to them, but that would be a lot of work
Finished Dungeons - complete mods to play
User avatar
msyblade
Posts: 792
Joined: Fri Oct 12, 2012 4:40 am
Location: New Mexico, USA
Contact:

Re: adding a custom item

Post by msyblade »

When you create a new dungeon in the editor, it will create a folder with the dungeon name in "documents/Almost Human/Legend of Grimrock/dungeons". In that folder you will find all of the files that make up your dungeon (minus everything default built into the game). Since all of the regular assets are not visible, it is recommended to download the "asset pack" from here, which has the definitions for all of the stock items/spells/monsters or objects. (The pendant is stock, in the asset pack). So, in the folder for your dungeon, there will be subfolders. One of those is called "scripts"; go in there and you want the "items.lua". You can then define your own object, or clone an existing one and change it slightly for your use (After checking out examples from the asset pack or existing mods with their source available). Many mods (including Komags Master Quest) have the source files available near the .dat file download, so I suggest you start there. Although, if you are completely inexperienced, Komags scripting and workarounds are sure to make your head spin, so you may try to find a simpler project to dissect. Hope this helps!
Currently conspiring with many modders on the "Legends of the Northern Realms"project.

"You have been captured by a psychopathic diety who needs a new plaything to torture."
Hotel Hades
User avatar
petri
Posts: 1917
Joined: Thu Mar 01, 2012 4:58 pm
Location: Finland

Re: adding a custom item

Post by petri »

For what it's worth, the exp bonus of Spirit Mirror Pendant and many other hardcoded features of items can be modified from item definitions in LoG2. You can also define many sets of bonuses and enable/disable them at will :)
User avatar
Komag
Posts: 3659
Joined: Sat Jul 28, 2012 4:55 pm
Location: Boston, USA

Re: adding a custom item

Post by Komag »

Nice to hear, thanks! :D
Finished Dungeons - complete mods to play
User avatar
DesperateGames
Posts: 90
Joined: Sun Oct 06, 2013 1:54 pm

Re: adding a custom item

Post by DesperateGames »

Rchevalier, as Komag said it might be possible but a lot of work as you would have to clone every monster in your dungeon to add a function exectuion to the onDie scripting Hooks. But if you are interested I'm sure we will be able to help you with this. A semi-hard approach would be to add an item that gives XP over time very slowly....if I think about it the effect should be similiar gameplay-wise as you exchange one free equipment slot against quicker leveling for this character. Maybe you need to add something to prevent someone leaving his computer on over night, but it should be less work to implement this I think.
User avatar
Komag
Posts: 3659
Joined: Sat Jul 28, 2012 4:55 pm
Location: Boston, USA

Re: adding a custom item

Post by Komag »

I can't remember if we can check a character's XP? If so then we could very often check whether it has gone up and by how much, and add extra percentage. But now that I think about it, IIRC we can't check XP
Finished Dungeons - complete mods to play
Post Reply