Combined Alchemy Pack [Assets]

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!
User avatar
akroma222
Posts: 1029
Joined: Thu Oct 04, 2012 10:08 am

Combined Alchemy Pack [Assets]

Post by akroma222 »

Hey All,

Changed the name of the thread - as we have finally posted up a combined asset pack for LoG2 Alchemy

Firstly, CREDITS:
1) (ArdTru) Created the LiquidPotion models with animated liquid insides, used for all potions in the pack

2) (AndakRainor) Scripting for the custom Alchemy system, Water flask functions & new Recipe format

3) (minmay
& Germanny) Germanny's Dungeon Master Resource - mushroom & dm flask textures modified & included

4) (minmay) MinAssets - essence & third eye textures modified & included

5) (akroma222) Extended, modified and combined the above creative works + most Icons & item definitions

The Pack Includes:

The Readme has directions for implementation into mods
Files include a small Test Area to easily check out (the following)
Test Area can be accessed through the editor OR as a custom dungeon ( .dat file included)

Herbs - 20
Mushrooms - 10
Water flask functionality
3 sets of Empty/Water Flasks (Standard+, Large & LargeRum)
custom Grimrock1 Alchemy system
25 Liquid Flask examples (standard+ style)
25 LargeLiquid Rope Flask examples (Rum style)
New Recipe Format - customizing Upgrades with Traits
Healing & Energy (Basic, Large, Improved) definitions redone
AlchemyAtlas for (all above) icons

Nexus link:
http://www.nexusmods.com/grimrock/mods/ ... D422&pUp=1

There are more Ingredients, Potions, Bombs & Powders, animated Liquids and Recipes I wanted to add
I will likely update the definitions and icons with these things as I go, over time

Post here or PM me if you have any queries or trouble :)

Akroma

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
So, Alchemy!

Q1. Has anyone put together a custom mortar & pestle using John's grimtk?
(For the purposes of replicated Grimrock1 mortar or otherwise)
Im keen to include some custom Herbs, but of course this then makes the new system (as great as it is), a little inconvenient
I like the idea that the old system required a bit more inventory/mouse work - as mixing up potions should req some undivided attention
As a work around
SpoilerShow
Ive considered giving the new Herbs a usableItem component that checks for:
mouse item (which would be a potion) and a recipe table... so you can use custom herbs to augment or alter potions you have used the current system to create
Q2. Curious? - how do people feel about empty flasks being removed from the process of mixing.
I really kinda liked that constraint on the amount of potions you can mix
I am unsure how including them meaningfully would be would be possible without a custom Mortar/pestle system

Q3. Improved Alchemy upgrades Healing/Energy potions to their bigger brothers ( hard coded :( )
Has anyone thought of a work around so we can mimic this cool ability with other potions
Again- I am unsure how this would be possible without a custom Mortar/pestle

I am also considering moving the whole Alchemy thing over to (ArdTru's) grimForge
Recipes can be kept in a Recipe book and there would be more room for Customisation obviously
SpoilerShow
Image
maybe adding a "Mix" button somewhere
.....which would checkfor the req Herbs in a (sack) container (in hand) disguised as a Mortar??
... which is what effectively is going on anyway

Anyway, I would be very interested to hear peoples thoughts on this :D
Akroma


EDIT! Is the Alchemists hard coded ability to multiply Herbs (based on steps taken) able to multiple custom Herbs?
I guess its a question of whether the ability checks for Herb names VS item trait "herb"
(sorry to ask - kinda lazy)
Last edited by akroma222 on Sun Sep 25, 2016 12:39 am, edited 9 times in total.
minmay
Posts: 2790
Joined: Mon Sep 23, 2013 2:24 am

Re: Alchemy questions + discussion

Post by minmay »

Q1. no but it should be very easy to do without involving GrimTK since you have PartyComponent.onDrawAttackPanel() now, provided you are okay with drawing the new art assets that would be required
i have no idea why you would want to make the interface more cumbersome on purpose...

Q2. it's an excellent change, empty flasks were silly; you got them back after drinking the potion so there was no constraint on the number of potions you could make. besides, ingredients are already limited to prevent you from making unlimited potions...unless you have an alchemist in which case you get infinite herbs because alchemist is a really stupid design

Q3. not possible without a custom mortar and pestle system, but since custom recipes aren't even meaningfully possible without a custom mortar and pestle system (they crash if the item created uses a custom gfxAtlas, and there is very little use in custom recipes that can't make custom items) that isn't really something to care about

EDIT!. it is hardcoded for the 6 standard herb names (blackmoss, blooddrop_cap, crystal_flower, etherweed, falconskyre, mudwort), but it is trivial to re-create this behaviour for other items by checking GameMode.getStatistic("tiles_moved") from PartyComponent.onMove()
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
akroma222
Posts: 1029
Joined: Thu Oct 04, 2012 10:08 am

Re: Alchemy questions + discussion

Post by akroma222 »

minmay wrote:Q1. no but it should be very easy to do without involving GrimTK since you have PartyComponent.onDrawAttackPanel() now, provided you are okay with drawing the new art assets that would be required
i have no idea why you would want to make the interface more cumbersome on purpose...
Ah of course yes, PartyComponent.onDrawAttackPanel()
Coming up with the old style mortar gui (with a lick of LoG2 style) wouldnt be too much trouble
More cumbersome on purpose - personally, I think Alchemy should be more of a "Prepare beforehand with precise measurements" kind of thing
The new system lets you brew things (including explosives) while on the run - its a personal flavour issue I guess
minmay wrote:Q2. it's an excellent change, empty flasks were silly; you got them back after drinking the potion so there was no constraint on the number of potions you could make. besides, ingredients are already limited to prevent you from making unlimited potions...unless you have an alchemist in which case you get infinite herbs because alchemist is a really stupid design
Yeah agreed, infinite herbs, somehow multiplying in your back pack is a bit silly
Slight misunderstanding - The constraint Im referring to is the number of potions you can have prepared at the one time
(more relevant with the older cumbersome system, I know. I like this dynamic, it lends well to Grimrock's scarcity / scavenging feel)
minmay wrote:Q3. not possible without a custom mortar and pestle system, but since custom recipes aren't even meaningfully possible without a custom mortar and pestle system (they crash if the item created uses a custom gfxAtlas, and there is very little use in custom recipes that can't make custom items) that isn't really something to care about
Wow (just tested). I did not realise.... :roll: :(
minmay wrote:EDIT!. it is hardcoded for the 6 standard herb names (blackmoss, blooddrop_cap, crystal_flower, etherweed, falconskyre, mudwort), but it is trivial to re-create this behaviour for other items by checking GameMode.getStatistic("tiles_moved") from PartyComponent.onMove()
Ahh, of course! (Silly me) - thanks for confirming the hard coded check!
still not fond of the Alchemist ability though
The same effect of getting more herbs could be dealt with in a better fashion

Cheers for your informative reply minmay
Im kinda sold a custom system now tbh - given that I plan on including a few new Herbs and defintely a bunch of new potions (and ya know, crashes are frowned upon)...
New system doesnt have room to accomodate it seems?

Q- may I ask what changes you have made (if any) to Alchemy for your Mod??
User avatar
Isaac
Posts: 3192
Joined: Fri Mar 02, 2012 10:02 pm

Re: Alchemy questions + discussion

Post by Isaac »

I just feels odd to not have the empty flask after emptying the flask.

*I too, prefer an alchemy that has a more hands on approach. My favorite alchemy system is the one seen in the first Witcher game. In that one the Witcher had to brew at camp, and also had more than one way to brew specific potions; some with subtle differences due to the ingredients that were used.
User avatar
akroma222
Posts: 1029
Joined: Thu Oct 04, 2012 10:08 am

Re: Alchemy questions + discussion

Post by akroma222 »

Isaac wrote:I just feels odd to not have the empty flask after emptying the flask.

*I too, prefer an alchemy that has a more hands on approach. My favorite alchemy system is the one seen in the first Witcher game. In that one the Witcher had to brew at camp, and also had more than one way to brew specific potions; some with subtle differences due to the ingredients that were used.
Ive heard some good things about that series!
In my LoG1 mod I included multiple recipes for the same Potion
- and hopefully maintained a decent degree of consistency regarding what herbs did what and which herbs, when combined, equalled better herbs etc
Slight diff in potions effect is next level though! (still... doable ;) )
Isaac wrote:I just feels odd to not have the empty flask after emptying the flask.
Yup it does... and I got too many other plans and uses for empty flasks not to include them.
And if I include them then really, it would be extra odd not to involve them in the Alchemy process

Which kinda brings me back to the need for a custom Alchemy system .... :roll: :lol:
minmay
Posts: 2790
Joined: Mon Sep 23, 2013 2:24 am

Re: Alchemy questions + discussion

Post by minmay »

akroma222 wrote:Q- may I ask what changes you have made (if any) to Alchemy for your Mod??
Alchemy does not, and will not exist in either Requiem for Kraken's Arm or its sequel. One of the design decisions I made is to have no consumables or other attrition mechanics, in order to keep combat focused on tactics.
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
akroma222
Posts: 1029
Joined: Thu Oct 04, 2012 10:08 am

Re: Alchemy questions + discussion

Post by akroma222 »

minmay wrote:
akroma222 wrote:Q- may I ask what changes you have made (if any) to Alchemy for your Mod??
Alchemy does not, and will not exist in either Requiem for Kraken's Arm or its sequel. One of the design decisions I made is to have no consumables or other attrition mechanics, in order to keep combat focused on tactics.
That would mean No Food or Food Counter either? (amongst other things)
Very interesting indeed, combat strategy and tactics are so critical for Grimrock!
User avatar
AndakRainor
Posts: 674
Joined: Thu Nov 20, 2014 5:18 pm

Re: Alchemy questions + discussion

Post by AndakRainor »

I did that, a custom mortar and pestle gui, without grimTK.

But that's not all... Also potions require water flasks, not only empty flasks :)

But that's not all... Also champions need to drink to refill their water bars and avoid dying from dehydration! :)

But that's not all... Also empty flasks can be filled on or in front of water tiles ;)

When I discovered the rage potion effect was cumulative (long after finishing the game), I thought that was a little abusive! With limited flasks, the situation is a little improved. But with the shop system, one could massively invest into flasks, so... I should nerf rage potions someday because it makes all fights design useless if allowed to stack!!!
User avatar
AndakRainor
Posts: 674
Joined: Thu Nov 20, 2014 5:18 pm

Re: Alchemy questions + discussion

Post by AndakRainor »

Too lazy to extract only the alchemy code from my files because it is very integrated in other systems, so for now here are the files dealing with alchemy I have (among other functions). If you have difficulties picking the relevant things, tell me :P

misc.lua
SpoilerShow

Code: Select all

defineObject{
  name = "mortar",
  baseObject = "base_item",
  components = {
    {
      class = "Model",
      model = "assets/models/items/mortar_pestle.fbx",
    },
    {
      class = "Item",
      uiName = "Mortar and Pestle",
      gfxIndex = 117,
      weight = 1.0,
      description = "An alchemist tool used to craft potions from herbs.",
      traits = { "usable" },
    },
    {
      class = "UsableItem",
      onUseItem = function(self, champion)
        champions.script.craftPotion(self.go, champion)
        return false
      end,
    },
    {
      class = "Script",
      name = "craftpotioncustom",
      source = [[
        data = {}
        function get(self,name) return self.data[name] end
        function set(self,name,value) self.data[name] = value end
      ]],      
    },
  },
}
User avatar
AndakRainor
Posts: 674
Joined: Thu Nov 20, 2014 5:18 pm

Re: Alchemy questions + discussion

Post by AndakRainor »

recipes.lua
SpoilerShow

Code: Select all

-- This file has been generated by Dungeon Editor 2.1.17

-- TODO: place your custom recipe definitions here

defOrdered = {

-- Level 1

{
	potion = "potion_healing",
	level = 1,
	ingredients = 10,
},

{
	potion = "potion_energy",
	level = 1,
	ingredients = 20,
},

{
	potion = "potion_oblivion",
	level = 1,
	ingredients = 33344455550,
},

-- Level 2

{
	potion = "potion_cure_poison",
	level = 2,
	ingredients = 130,
},

{
	potion = "potion_cure_disease",
	level = 2,
	ingredients = 240,
},

{
	potion = "potion_shield",
	level = 2,
	ingredients = 230,
},

-- Level 3

{
	potion = "potion_poison",
	level = 3,
	ingredients = 30,
},

{
	potion = "potion_rage",
	level = 3,
	ingredients = 140,
},

{
	potion = "potion_speed",
	level = 3,
	ingredients = 2440,
},

-- Level 4

{
	potion = "potion_bear_form",
	level = 4,
	ingredients = 340,
},

{
	potion = "fire_bomb",
	level = 4,
	ingredients = 15,
},

{
	potion = "frost_bomb",
	level = 4,
	ingredients = 25,
},

{
	potion = "poison_bomb",
	level = 4,
	ingredients = 35,
},

{
	potion = "shock_bomb",
	level = 4,
	ingredients = 45,
},

-- Level 5

{
	potion = "potion_resurrection",
	level = 5,
	ingredients = 550,
},

{
	potion = "potion_strength",
	level = 5,
	ingredients = 160,
},

{
	potion = "potion_dexterity",
	level = 5,
	ingredients = 460,
},

{
	potion = "potion_willpower",
	level = 5,
	ingredients = 260,
},

{
	potion = "potion_vitality",
	level = 5,
	ingredients = 360,
},

}

defByName = {}
for _,v in ipairs(defOrdered) do defByName[v.potion] = v end
Post Reply