no more food!

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
nugar
Posts: 1
Joined: Sun Oct 26, 2014 8:50 am

no more food!

Post by nugar »

Is it possible to mod the food requirements out of the game, it's a micro management part of the game that I dislike and would like for it to be modded out of the game if possible.
DrKojak
Posts: 23
Joined: Fri Oct 24, 2014 11:19 am

Re: no more food!

Post by DrKojak »

It's possible i think, like setting the max health of a character i think there might be such an option to set the max hunger possibly,, it could also be possible to add a repeating timer that just refills the hunger meter too, i'm afraid i can't help with the code though.
Depili
Posts: 74
Joined: Mon Apr 16, 2012 3:47 pm

Re: no more food!

Post by Depili »

Well there is the necklace in the game that removes the need for food, so at least you should be able to make items that remove the need for eating.
User avatar
Asteroth
Posts: 471
Joined: Wed Oct 24, 2012 10:41 am
Location: Eastern U.S.

Re: no more food!

Post by Asteroth »

Well at the very least since an alchemist spawns herbs every few steps, you could whip up something that makes food instead of herbs I assume.

But you'd still have to bother keeping and eating the food so that really doesn't help.
I am the God of darkness and corruption.
viewtopic.php?f=14&t=4250
NutJob
Posts: 426
Joined: Sun Oct 19, 2014 6:35 pm

Re: no more food!

Post by NutJob »

Probably. May be as easy as setting a timer (@ 60 seconds).

Not actually code

Code: Select all

food = c:getFood()
if(food < 100) then
	c:setFood(100)
end
User avatar
cromcrom
Posts: 549
Joined: Tue Sep 11, 2012 7:16 am
Location: Chateauroux in a socialist s#!$*&% formerly known as "France"

Re: no more food!

Post by cromcrom »

Yes but we would need to be able to mod the native quest, which doesn't seem feasible now :-(
A trip of a thousand leagues starts with a step.
User avatar
Aisuu
Posts: 61
Joined: Fri Oct 31, 2014 2:07 pm

Re: no more food!

Post by Aisuu »

I manage to get it work just fine with timer hook up to this script. Thx to NutJob.

Code: Select all

function foodcheck()
	food1 = party.party:getChampion(1):getFood()
		if (food1 < 1000) then
			party.party:getChampion(1):setFood(1000)
		end
		
	food2 = party.party:getChampion(2):getFood()
		if (food2 < 1000) then
			party.party:getChampion(2):setFood(1000)
		end
		
	food3 = party.party:getChampion(3):getFood()
		if (food3 < 1000) then
			party.party:getChampion(3):setFood(1000)
		end
		
	food4 = party.party:getChampion(4):getFood()
		if (food4 < 1000) then
			party.party:getChampion(4):setFood(1000)
		end
end
It work just fine, even if there is no second, third or fourth champion enabled.

But Iam realy lua noob. I tryed to do this with for i = 1,4 do function, but I cant get it work.
Can anyone help me out here please? :|
Mayby I should just leave it like this, but I like to learn :)
cameronC
Posts: 80
Joined: Wed Apr 11, 2012 10:54 pm

Re: no more food!

Post by cameronC »

or an party:onMove hook that sets food to max for each champ every step.
Writer and sometimes artist of the very slightly acclaimed comic series Scrambled Circuits. A comic series about a robot written by a human.

Grimrock 2 socketSystem: viewtopic.php?f=22&t=8546 / Github
Post Reply