Home » MODDING HQ 1.13 » Flugente's Magika Workshop » New feature: Mercs need food and water to survive
Re: New feature: Mercs need food and water to survive[message #309289] Sun, 19 August 2012 11:50 Go to previous messageGo to next message
lockie

 
Messages:3928
Registered:February 2006
Location: Scotland
Some of you guys really need to get out more ... *sigh* ... Surprised


Re: New feature: Mercs need food and water to survive[message #309353] Mon, 20 August 2012 22:58 Go to previous messageGo to next message
Flugente

 
Messages:3387
Registered:April 2009
Location: Germany
Update: As of r5485, the command to fill the canteens is changed. It is still 'Ctrl# + '.', but now it opens up a small dialogue box. #1 is the command to fill canteens.

This will save a few keys in the future.

http://i49.tinypic.com/2612l1z.jpg

Also, due to very high public demand, I changed the point from where the food auto-consumption begins to -10% instead of -25%.

The Exe is in my sig.


Re: New feature: Mercs need food and water to survive[message #309357] Tue, 21 August 2012 00:58 Go to previous messageGo to next message
Thor

 
Messages:430
Registered:February 2007
Location: Belgium
Nice! What I meant was having a similar facility in all (or most) city sectors that have civilians... That maybe the player can even create such a facility like that when he creates some Headquarters to stay for a while. The real micro foodmanaging would be restricted to moments when travelling... which is already quite a lot in my opinion...

Don't get me wrong, I really like the feature. Wink
Re: New feature: Mercs need food and water to survive[message #309366] Tue, 21 August 2012 05:48 Go to previous messageGo to next message
Sam Hotte

 
Messages:2020
Registered:March 2009
Location: Middle of Germany
Just put the according facility type in any sectors you like in facilities.xml. Easy copy&paste job. Smile
Re: New feature: Mercs need food and water to survive[message #309369] Tue, 21 August 2012 08:58 Go to previous messageGo to next message
Randok

 
Messages:310
Registered:March 2004
3 all mercenaries drink to the maximum
4 all mercenaries clean
Smile

[Updated on: Tue, 21 August 2012 08:59] by Moderator

Re: New feature: Mercs need food and water to survive[message #309442] Thu, 23 August 2012 11:42 Go to previous messageGo to next message
madwolf

 
Messages:11
Registered:May 2006
I tried it, it works great!
not too much micromanagement, but before moving the troops to a mission, having to plan how much food to carry is really funny.
my mercs are always at about 95% max weight when starting for a mission, lol.

Still there is a bug with canned vegetables, it makes some soldier eat all canned food in inventory in automatic. I usually find myself with some soldier at 100% food and no more canned vegetables in inventory.

Now we need another feature like "camping", that allow the mercs to sleep confortably outside of cities and bases.
What about making a facility in each sector called "camp" usable only if the mecs has the camping kit that increase resting in the sector if "staffed"?, and if not staffed, the mercs sleep very bad?
It would simulate the building of tents etc...
It will have to be decided if making the "campmaster" a single merc that enhances the resting quality in sector, or having every merc carrying his own small tent and use the "camp" facility to sleep confortably.

Thanks for making this game so enjoyable, and as always,
thanks for your time.

EDIT:
I like the new refill menu, but seems odd that when I click "Refill canteen" all canteens in sector get refilled, and when I click clean weapon, only the selected merc weapon gets cleaned.

it should be:
1)refill all canteens 2)clean weapon (as now, but correct the sentence)
or
1)refill canteen 2)clean weapon (leave the sentence as is, but make only the selected merc canteen get refilled)
or
1)refill all canteens 2) clean all weapons (change the sentences and make all weapons in sector get cleaned) <- I love this Razz

[Updated on: Thu, 23 August 2012 12:30] by Moderator

Re: New feature: Mercs need food and water to survive[message #309443] Thu, 23 August 2012 15:06 Go to previous messageGo to next message
Sam Hotte

 
Messages:2020
Registered:March 2009
Location: Middle of Germany
Would make more sense (to me), if we'd use 3 options there:
1. refill (all) canteens
2. clean equipped weapon of currently selected char
3. clean every gun of squad (that is above x% dirt)

Because sometimes you may want to not waste a cleaning kit on a seldom used side arm or something.
Re: New feature: Mercs need food and water to survive[message #309465] Thu, 23 August 2012 21:48 Go to previous messageGo to next message
Max_for_Hire

 
Messages:33
Registered:March 2009
Awesome stuff.
True, i adds a bit more micro-management, but JA is about mm too!

Will definitely try!
Re: New feature: Mercs need food and water to survive[message #309478] Fri, 24 August 2012 22:02 Go to previous messageGo to next message
Burzmali

 
Messages:241
Registered:March 2007
Location: Estonia
guys, you have forgotten something important. after a healthy meal - as you sure have heard mr Gordon to complain - it's impossible to get bacon from between your teeth. without proper instruments, we should add. so, there must be toothpicks! and it opens a whole new world of micromanagement. what kind of pocket should there be for toothpicks? and sure it is wrong to manage with just grey, one-size-fits-all toothpicks. just like with ammo, you should need some red ones and some blue ones after different meals. and for some special toothpicking there should be green and white and pink ones. and it would be wrong to keep toothpicks of different colour in the same pocket. and what about king-size toothpick-packs that will last you the whole way to the queens underground shelter?





doh...






just finished a game of vanilla JA2. it really was like a breath of fresh air. did i miss 100AP? no. new inventory? no. traits? no. roaming militia? no. new chance to hit? hell no. only things i did miss were vehicle inventory and j-shortcut for climbing.
Re: New feature: Mercs need food and water to survive[message #309479] Fri, 24 August 2012 22:10 Go to previous messageGo to next message
DepressivesBrot

 
Messages:3801
Registered:July 2009
Your point?


Re: New feature: Mercs need food and water to survive[message #309481] Fri, 24 August 2012 22:42 Go to previous messageGo to next message
Burzmali

 
Messages:241
Registered:March 2007
Location: Estonia
happen to hate unnecessary micromanagement.

just my short experience as a platoon commander from real life.
Re: New feature: Mercs need food and water to survive[message #309482] Fri, 24 August 2012 23:11 Go to previous messageGo to next message
Flugente

 
Messages:3387
Registered:April 2009
Location: Germany
This feature, like all my features, is optional. You can select to use it or not on the start of a new game. If you don't like it, don't use it Smile


Re: New feature: Mercs need food and water to survive[message #309494] Sat, 25 August 2012 11:27 Go to previous messageGo to next message
madwolf

 
Messages:11
Registered:May 2006
I don't like unnecessary micromanagement, but who decides what's necessary and what's not?
I feel carrying food and water as important as ammo.
I feel having to manually feed each merc unnecessary.(in fact they do it by themselves)
I feel camping material necessary.
It is just a matter of opinions I guess.

Ah, and in your army experience, the soldiers decided what food and where to get the food they carried around?

I can see myself in that army:
"today I will carry some chinese food, yay!"
Re: New feature: Mercs need food and water to survive[message #309505] Sat, 25 August 2012 18:09 Go to previous messageGo to next message
Flugente

 
Messages:3387
Registered:April 2009
Location: Germany
@madwolf: I am unable to produce the bug you reported with canned vegetables, for em the auto-eating works fine. However, I fixed a bug concerning the removal of items from stacks in r5467. If your exe is older than that, that could be the reason... other chance would be if you have a very high number of food points for the vegetables in food.xml, or a weird value (no in 1-100) in .


Re: New feature: Mercs need food and water to survive[message #309510] Sat, 25 August 2012 19:04 Go to previous messageGo to next message
threewings

 
Messages:16
Registered:September 2006
Location: Hong Kong
Suggestion:

How about food and drinks will be consumed automatically by individual merc like those in Mount & Blade? We only put items into their packs and let them do the consumption.

In real combat missions soldiers will bring their own combat rations. The amount of food depends on the length of mission. Sometimes they will even hunt in the forests for food.

The principal is, whenever the mercs are outside, they will automatically consume their food items they bring alone as time passed. Get rid of unnecessary micromanagement, a normal healthy person should dine in about every 8 hours in which making sense that we usually eat 3 meals a day.

When the mercs are garrisoned, there is no need for the player to manually manage the food for each individual merc since it is assumed there are kitchens and mess halls for them to eat. When inside a town or a city, the huger and thirst bar can be automatically refilled.

Attributes of food and drink can be treated as ammo crates actually: purchased in bulk in reasonable prices, can be dispensed into smaller items for carrying ease, and can be consumed primarily in an automatic manner.

Below are some thoughts regarding the relation between gameplay and food items:

Higher quality and varied food choices = morale booster/Mercs are slower to get tired/Faster speed of recovery from wounds/Health status increase exp.

Poor food quality and combination = morale gets lower more easily/Mercs are faster to get tired/Hard to make long range missions on foot.

Constant Hydration = morale booster/bonus fighting or traveling in desert regions.




Re: New feature: Mercs need food and water to survive[message #309511] Sat, 25 August 2012 19:14 Go to previous messageGo to next message
Flugente

 
Messages:3387
Registered:April 2009
Location: Germany
Ehem....

They already consume food automatically when they are hungry.
There are already facilities that can be staffed where emrcs can eat (see Alma barracks for the cantina). However, they do not get food on their own.
It is the basic way with this feature to buy food and put it into mercs inventories, yes.

Some food increases morale, other food lowers it, see the -tag in Food.xml.
If low on food (or way too high), you get penalties to sleep, energy reduction, assignment effectivity, maximum possible morale and, in severe cases, a chance to lose health and strength.

The Food level is lowered depending on your actions, travelling uses much more food.
In the desert, your water consumption is even higher.

So I can happily report that your suggestions are already implemented Smile


Re: New feature: Mercs need food and water to survive[message #309513] Sat, 25 August 2012 19:51 Go to previous messageGo to next message
threewings

 
Messages:16
Registered:September 2006
Location: Hong Kong
I'm sorry, did not read through the tread before posting. Thank you for your work and patience answering me.

BTW, can a food item be made to replenish the hunger and the thirst bar simultaneously? (Of course in different ratio)
It is because many solid food contain fluid or liquid, especially within those fresher dishes. Canned vegetables contain much water too. Could it be possible so that you don't need to drink water in order to rehydrate.
Re: New feature: Mercs need food and water to survive[message #309514] Sat, 25 August 2012 20:05 Go to previous messageGo to next message
DepressivesBrot

 
Messages:3801
Registered:July 2009
Did you even read the opening post at all?


Re: New feature: Mercs need food and water to survive[message #309516] Sat, 25 August 2012 21:04 Go to previous messageGo to next message
Flugente

 
Messages:3387
Registered:April 2009
Location: Germany
Yes, you can. Look at Food.xml. Food can restore both food and water points, soem items, like vegetable juice, already do that.


Re: New feature: Mercs need food and water to survive[message #309534] Sun, 26 August 2012 10:04 Go to previous messageGo to next message
madwolf

 
Messages:11
Registered:May 2006
The values are correct (i just doubled the food value)
I actually don't remember the exe number, so i'll just let you know if it happens again.
Thanks for your time
Re: New feature: Mercs need food and water to survive[message #309537] Sun, 26 August 2012 15:00 Go to previous messageGo to next message
Burzmali

 
Messages:241
Registered:March 2007
Location: Estonia
did not meant to offend anybody - it sure is fun to try and make a great game even better. still i do not think this eating thing (and some other modifications) fits the spirit of JA as i see it. why?

IF it was a regular army then catering is not a platoon commander's problem. even not company commander's. ok, in JA there is an individual group without official rear service. so, if some of my men complains the second time (as the first time could be some misunderstanding) about missing food, i'd have a serious talk with Miguel and probably shoot his kneecap to avoid this happening again - just like with Pablo when things disappear in airport.

BUT those guys are not conscripts, they are mercenaries. who by default do not need being hand feed. they should be able to take care of themselves and for that they get good money in hard currency. (ok, not so good money for Dynamo and Shank if you decide to keep them, but they are locals and have their own means.) sure, there are desert and swamp sectors with no food around - but there are marching orders: we will leave at 8 pm, we'll be in a desert for 3 days, be prepared. and i seriously think it should be sufficient.

[Updated on: Sun, 26 August 2012 15:01] by Moderator

Re: New feature: Mercs need food and water to survive[message #309541] Sun, 26 August 2012 15:36 Go to previous messageGo to next message
DepressivesBrot

 
Messages:3801
Registered:July 2009
If you don't like it, don't use it. But don't come to one of the threads about a completely optional feature and try to be sarcastic and paint it as totally superfluous either - we don't like that.


Re: New feature: Mercs need food and water to survive[message #309775] Mon, 03 September 2012 17:29 Go to previous messageGo to next message
vota dc

 
Messages:53
Registered:August 2006
Great idea. I always asked myself when mercenaries eat....Biff sleep a lot so the sleep phase could include relaxing and eating, but Razor? 3 hours!
Cannibalism should be included too.
Re: New feature: Mercs need food and water to survive[message #310051] Wed, 12 September 2012 21:47 Go to previous messageGo to next message
Kirill_OverK

 
Messages:263
Registered:September 2010
vota dc
Great idea.


Very great !
Re: New feature: Mercs need food and water to survive[message #310566] Mon, 24 September 2012 13:04 Go to previous messageGo to next message
usrbid

 
Messages:1558
Registered:December 2008
Flugente
... The auto-feed starts at -25%. I will not externalise that value, because I WANT it to be negative. This results in auto-feeding being suboptimal. This results in the player paying attention to his mercs and giving them lunch breaks being more effective. Micromanagement should have benefits after all.


While I agree that micromanagement should have benefits, we cannot forsee how modders may use the food feature in the future. (I am just making stuff up now as an example) For example someone may mod an addiction to a substance like Spice from Dune as a food and may need to change the -25% value.

Flugente
I will not externalise all te penalties, because externalising this

typedef struct
{
	INT32	bThreshold;
	INT8	bMoraleModifier;		// absolute modifier to max morale
	INT8	bSleepModifier;			// absolute modifier
	INT8	bBreathRegenModifier;		// percentage modifier
	INT8	bAssignmentEfficiencyModifier;	// percentage modifier
	UINT8	ubStatDamageChance;		// percentual chance to receive damage to life and strength
} FoodMoraleMod;

FoodMoraleMod FoodMoraleMods[NUM_FOOD_MORALE_TYPES] =
{
	{ 100000,	-10,	-3,	-75,	-75,	2},	//	FOOD_STUFFED
	{ 5000,		-5,	-2,	-5,	-5,	0},	//	FOOD_EXTREMELY_FULL
	{ 2500,		2,	-1,	-1,	0,	0},	//	FOOD_FULL
	{ 1000,		5,	0,	0,	0,	0},	//	FOOD_SLIGHTLY_FULL

	{ 0,		0,	0,	0,	0,	0},	//	FOOD_NORMAL

	{ -1000,	0,	0,	0,	0,	0},	//	FOOD_LOW
	{ -2500,	-2,	0,	0,	0,	0},	//	FOOD_EVEN_LOWER
	{ -5000,	-10,	-1,	-10,	-10,	5},	//	FOOD_VERY_LOW
	{ -7500,	-20,	-2,	-25,	-25,	25},	//	FOOD_DANGER
	{ -8750,	-30,	-2,	-50,	-50,	75},	//	FOOD_DESPERATE
	{ -10000,	-50,	-3,	-80,	-75,	100},	//	FOOD_STARVING
};


would result in a lot of variables...



While I agree that this is a lot of variables and fairly complicated, we externalized comparable things in the past, like movement cost between sectors or garrison patrols, you can use these examples to externalize the food values.

I am not trying to disrespect you for your food code, I like it and I think it is a good feature. I am trying to help you support your feature by making it more accessible to modders, meaning other people can use what you did in other ways in the future.

For example the new attachment system was really not envisioned as a molle extension for LBE gear, however Smeagol saw the opportunity and implemented (or he wanted to) a new system for allowing the player to highly customize LBE gear.

The original intention can be re-used by others in the future for things we didn't predict at the time the original feature was implemented - the code transcends mere existence / survival by allowing customization.


Re: New feature: Mercs need food and water to survive[message #310609] Tue, 25 September 2012 00:39 Go to previous messageGo to next message
Maalstroom

 
Messages:343
Registered:December 2008
Location: en route to San Hermanos
it would be even better if every merc would have different food needs. for example grunty should eat quite a lot, steroid and grizzly too.
Re: New feature: Mercs need food and water to survive[message #310614] Tue, 25 September 2012 07:14 Go to previous messageGo to next message
usrbid

 
Messages:1558
Registered:December 2008
Yo Maalstroom, good point actually, the need for sleep is different for each merc, meaning the merc profile allows to customize how much sleep the merc needs, maybe a "need for food" tag could be added to the merc profiles?

But back to my post, while I respect Flugente's work, and I am working with him on some STIs over PM, and I agree that externalizing this feature will be a lot of work, I want to emphasize the long term benefits of externalization - you just can't beat the benefits you get by allowing modders to change the parameters of how your code works.


Re: New feature: Mercs need food and water to survive[message #310619] Tue, 25 September 2012 13:47 Go to previous messageGo to next message
Logisteric

 
Messages:3396
Registered:December 2008
Location: B
Dieter
Yo Maalstroom, good point actually, the need for sleep is different for each merc, meaning the merc profile allows to customize how much sleep the merc needs, maybe a "need for food" tag could be added to the merc profiles?


that is handled by need for sleep - send razor and gumpy together as mules from drassen to san mona - gumpy will arrive well fed while razor wille arrive starved and thirsty for taking in all his food and beverage while he was awake and waiting for gumpey to wake up

i sorroly tested that - for a mulesquad 'overload*need-for-sleep' should be roughly equal for all mercs or those who sleep less will burn through their supplies, while those who sleep all day won't.

and that means in this squad being a lazy loser pays of
Re: New feature: Mercs need food and water to survive[message #311642] Tue, 30 October 2012 17:54 Go to previous messageGo to next message
BigBadWolf

 
Messages:10
Registered:October 2010
Wanted to report that the food spawning rotten bug is not totally fixed. I'm running the current SVN with the 5618 exe (have also tried with the 5520 exe with same results).

I had created some new items, one of which was an MRE box (classed as MISC), which could be split apart into 4 MREs with a transform. The food xml was changed to zero decay rate for MREs. Yet, when I break apart the box, 1 out of every four spawns rotten. The other three are "perfect". The bug produces the same problem even after a game restart.

BTW, Flugente, thanks for all the great work.
Re: New feature: Mercs need food and water to survive[message #311692] Thu, 01 November 2012 16:15 Go to previous messageGo to next message
Flugente

 
Messages:3387
Registered:April 2009
Location: Germany
I'm intrigued. Could you post the particular xml entries for that transformation?


Re: New feature: Mercs need food and water to survive[message #311694] Thu, 01 November 2012 17:39 Go to previous messageGo to next message
BigBadWolf

 
Messages:10
Registered:October 2010
Here are the xml entries:


Items.xml


1656
MRE Box
MRE Box
A case of individual food ration in use with the US military. Contains 4-MREs and a Canteen-2qt.
MRE Box
A case of individual food ration in use with the US military. Contains 4-MREs and a Canteen-2qt.
268435456
1
2
118
20
1
22
65
5
1
1
100







Item_Transformations.xml


1656
1545
1545
1545
1545
0
0
0
0
0
0
20
20
Split case
Split case




Food.xml


6
MRE
1200
0
50
1
0



The MRE Box is based on the original MRE entry, with the ItemClass and other entries changed. I also modified the Food.xml by changing the portion size and decay rate.

I would also like to note that since reporting the bug, I have tried substituting other food items (ones I had not modified) into the transform and all of them produced one rotten item per transform, including canteens. In making a multi-item transform (MREs and canteens) only the first item of the transform spawns rotten.

Let me know if you need any other item or xml info.


EDIT: I realized the description for the item also mentions a canteen, but one is not listed in the transform. I deleted it for the transform info I provided, but it does not seem to have any influence on the reported problem.

[Updated on: Wed, 19 December 2012 03:55] by Moderator

Re: New feature: Mercs need food and water to survive[message #311864] Wed, 07 November 2012 16:32 Go to previous messageGo to next message
Czert

 
Messages:104
Registered:August 2007
Now all we need is to add sexual needs and we will have if fully relistic. This way san mona brothel of fox will be overused Smile.
Re: New feature: Mercs need food and water to survive[message #312792] Wed, 05 December 2012 03:34 Go to previous messageGo to next message
Bombrik

 
Messages:17
Registered:October 2011
Location: Tantallon, Axius
Is it possible to make the Che Guevera Canteen from UB to act the same as the canteen does in your mod?
Re: New feature: Mercs need food and water to survive[message #312813] Wed, 05 December 2012 21:08 Go to previous messageGo to next message
Flugente

 
Messages:3387
Registered:April 2009
Location: Germany
Very easily. Just add 1 to it in Items.xml, and it will be the normal canteen (food-wise). Or add a new item to Food.xml and link to that, if you want a different size etc.


Re: New feature: Mercs need food and water to survive[message #312893] Sat, 08 December 2012 19:51 Go to previous messageGo to next message
Flugente

 
Messages:3387
Registered:April 2009
Location: Germany
@BigBadWolf: fixed in r5719.


Re: New feature: Mercs need food and water to survive[message #312996] Thu, 13 December 2012 04:18 Go to previous messageGo to next message
BigBadWolf

 
Messages:10
Registered:October 2010
Thanks very much.
Re: New feature: Mercs need food and water to survive[message #313045] Fri, 14 December 2012 16:05 Go to previous messageGo to next message
Sam Hotte

 
Messages:2020
Registered:March 2009
Location: Middle of Germany
We should have another LBE item to support the food thingie:
http://i259.photobucket.com/albums/hh299/meilynor/Here%20Is%20To%20Beer/araa-Heres-to-good-beer-beer-beer.jpg
Wink
Re: New feature: Mercs need food and water to survive[message #313241] Mon, 17 December 2012 22:30 Go to previous messageGo to next message
Flugente

 
Messages:3387
Registered:April 2009
Location: Germany
As it seems pretty reasonable, you can now refill canteens according to the rules (correct sector xml entry etc.) even if the food system is off. This is in r5740.


Re: New feature: Mercs need food and water to survive[message #313372] Thu, 20 December 2012 07:20 Go to previous messageGo to next message
Vadim Dolvich

 
Messages:26
Registered:February 2009
Location: None
In the latest build, I have 5718, is there a way to disable this if you start a game with the option enabled?

I wanted to try this but as I'm testing out Arulco Revisited and that mod is not officially compatible with the latest release. Essentially the maps are different and they don't have the water availability entries so you can't refill canteens, forcing me to buy water like crazy from bars.

Essentially I would like to turn off the food system in this game without restarting again.
Re: New feature: Mercs need food and water to survive[message #313393] Thu, 20 December 2012 20:33 Go to previous messageGo to previous message
Flugente

 
Messages:3387
Registered:April 2009
Location: Germany
It was decided a few months ago that certain features can only be turned on/off when starting a new game. This feature is one of them.

The only option to switch ingame is via debugger (simply set gGameOptions.fFoodSystem to FALSE, it is no problem codewise to switch it).
An alternative solution, if the water problem is your only concern, is to add the corresponding values to TableData/Map/SectorNames.xml: the -tag is the relevant here. Either copy those from the trunk, or fill in according to your own wishes:

Flugente

Maps/SectorNames.xml now has the new entry 2 (UINT8). This determines the water quality:
0 - no water here at all
1 - drinkable water (rivers, water supply from houses)
2 - salt water, can't drink that (until something gets implemented...)
3 - there is water here, but it is poisoned (swamps and polluted sectors)


Previous Topic: New (mini)-Feature: Scuba Gear
Next Topic: New feature: Arulco Special Division
Goto Forum:
  


Current Time: Fri Aug 17 22:34:54 EEST 2018

Total time taken to generate the page: 0.02112 seconds