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 #335825]
|
Tue, 16 September 2014 21:53
|
|
Flugente |
|
Messages:3509
Registered:April 2009 Location: Germany |
|
|
First, what Grim said. Secondly, some few items (and I expect there to be more instances of that in the future) are food, but also have other fucntions, like the canteen or alcohol. Filtering out the 'pure' food items gets annoying the more combined items are added.
Third, this would require altering Bobby Ray, Map Item creation, AI inventory creation, shopkeeper and mercenary inventory code. As soon as this would be added, people would then demand other items to be directly tied to specific features. And I don't see why the code should filter out items (which has to be constantly maintained for every new capability) when modders can just alter the xmls and have items they do not want not appear. That's why we have xmls in the first place
Report message to a moderator
|
|
|
|
Re: New feature: Mercs need food and water to survive[message #335847]
|
Wed, 17 September 2014 05:08
|
|
veedotja2 |
|
Messages:86
Registered:April 2012 Location: New York |
|
|
FlugenteFirst, what Grim said. Secondly, some few items (and I expect there to be more instances of that in the future) are food, but also have other fucntions, like the canteen or alcohol. Filtering out the 'pure' food items gets annoying the more combined items are added.
Third, this would require altering Bobby Ray, Map Item creation, AI inventory creation, shopkeeper and mercenary inventory code. As soon as this would be added, people would then demand other items to be directly tied to specific features. And I don't see why the code should filter out items (which has to be constantly maintained for every new capability) when modders can just alter the xmls and have items they do not want not appear. That's why we have xmls in the first place
I suppose that the implementation is a bit more complex than I had initially assumed. I didn't realize so many areas were necessarily involved. Certainly, if food appearance can be handled in XML it's better for modding. Avoiding messing around in the code is to be preferred. But adding the food system required an initial code change and I wasn't getting why it was done the way it was. Now I see better. A clean sheet project (this is old code base I know) might employ a different coding method where food would not appear if the INI setting is OFF. Nevertheless, don't stress it please. It isn't a real issue. Thanks for helping me to understand.
Report message to a moderator
|
Corporal 1st Class
|
|
|
|
Re: New feature: Mercs need food and water to survive[message #337617]
|
Fri, 07 November 2014 18:02
|
|
stangsman |
Messages:2
Registered:November 2014 Location: United States |
|
|
I tried to read through the forums here to see if anyone is having the same problem as me and I didn't find anything. It appears that one of my mercs has food poisoning at 0/0/77 and no matter how many doctors/paramedics i put on it it won't decrease. I have edited the .ini to the lowest trade off between healing points (.1) and it didn't seem to have an effect. Maybe I just don't understand how stats/well being is to be restored due to starvation/food poisoning? Along these lines, while my troops were gaining a foothold in Arulco, they all suffered from starvation, yet they don't have the option to be doctored up by the paramedics/doctors in the unit. The only way to regain their stats is to train them up through practice. In the description I had thought that doctors could heal stat loss due to starvation. Not sure where I am going wrong. Any help is appreciated.
[Updated on: Fri, 07 November 2014 18:04] by Moderator Report message to a moderator
|
Civilian
|
|
|
|
Re: New feature: Mercs need food and water to survive[message #337628]
|
Sat, 08 November 2014 04:47
|
|
stangsman |
Messages:2
Registered:November 2014 Location: United States |
|
|
Spot on. I completely read that wrong and assumed they only needed to be FED to full. They also need to be drunk on water. Thanks for the help.
Report message to a moderator
|
Civilian
|
|
|
Re: New feature: Mercs need food and water to survive[message #337825]
|
Tue, 18 November 2014 22:35
|
|
llib |
|
Messages:9
Registered:January 2012 |
|
|
Hi.
I have run into my mercs being poisoned.
Highest medical skill is Ira, at this point 59. Problem is she depleted all the (7-9) medical kits I got from Bobby Ray's, and there aren't that many around. As my mercs status was getting worse, I decided to conquer Cambria to get treatment for them. Cambria is now mine, but there is no loyalty to get them treated. They now start to die on every complete hour, and even if Ira now has the desirable skill which she did not had originally (50+ and at least paramedic), she should be able to treat them:
"As Soto said, by healing via the Doctor Assignment. In order to heal poison, the doctor needs to have at least 50 in medical skill (that can be changed in the ini). Also, if you use the new tait system, the doctor has to have at least the paramedic skill.
You can also set how much poison a doctor can heal via the ini.
"
The one incomplete medkit I found (without touching supplies at hospital)will run in just one hour and seems at least one of my merc will start dying anyway.
I can try to bandage them for couple more hours, maybe take Hicks or even rescue Joey to get the loyalty from doctors, but will they be able to treat them (and even if so, won't they just die before they can be healed)?
And, if I would get the medkits for Ira, would she be able to heal my troops at this point (is 50+ paramedic still correct information, please)? Any estimate how many (medkits) I'll need to cure them?
Alternatively I can get some merc with Doctor trait...
EDIT:
For that matter, what is the threshold to be able to use Hospital as Doctor? I assume Doctor trait is not necessary but rather some level of medical skill... ?
[Updated on: Tue, 18 November 2014 22:36] by Moderator Report message to a moderator
|
Private
|
|
|
|
|
|
|
|
Re: New feature: Mercs need food and water to survive[message #340902 is a reply to message #340897]
|
Wed, 06 May 2015 13:48
|
|
Flugente |
|
Messages:3509
Registered:April 2009 Location: Germany |
|
|
1. Yes it does. I am sure I described that somewhere in this thrwad, but nope, not going to search now
Perhaps it might be useful, though, to display the current lack-of-food effects for a merc in the tooltip, like for disease...
2. A website? That would require you to ope the laptop, go to the site and read stuff, remember who needs food, close laptop and give people food. Sounds more complicated than simply looking if a merc's portrait has those icons, doesn't it?
and you could simply give them food and have them eat it whenever they want.
I know now that it could never work between us, as much as we wanted to, it could never be! Not because you're a rabbit, but because you're black.
If you want, you can donate to me. This will not affect how and what I code, and I will not code specific features in return. I will be thankful though.Report message to a moderator
|
|
|
|
Re: New feature: Mercs need food and water to survive[message #340967 is a reply to message #340902]
|
Tue, 12 May 2015 21:25
|
|
Flugente |
|
Messages:3509
Registered:April 2009 Location: Germany |
|
|
As it seems the exact results of lack of food are not widely known, this was added in r7858:
This is only displayed in strategic view though, but should be enough, I think.
[Updated on: Tue, 12 May 2015 21:30]
I know now that it could never work between us, as much as we wanted to, it could never be! Not because you're a rabbit, but because you're black.
If you want, you can donate to me. This will not affect how and what I code, and I will not code specific features in return. I will be thankful though.Report message to a moderator
|
|
|
|
|
|
|
Re: New feature: Mercs need food and water to survive[message #341973 is a reply to message #341963]
|
Wed, 05 August 2015 08:27
|
|
givemeabuzz |
|
Messages:42
Registered:March 2003 Location: California |
|
|
Hey thanks for the response. I was just filling hunger thirst enough to do away with the icons, but once I got them up over 100%, it was working .Thanks again!
[Updated on: Wed, 05 August 2015 08:31] Report message to a moderator
|
Corporal
|
|
|
|
|
Re: New feature: Mercs need food and water to survive[message #343727 is a reply to message #343726]
|
Sun, 10 January 2016 19:13
|
|
Flugente |
|
Messages:3509
Registered:April 2009 Location: Germany |
|
|
An internal variable on objects (like a guns of food) stores their 'temperature'. On guns, this is used for the overheating mechanic (and with a second variable for dirt). On Food items this stores the 'freshness'.
On creation (by, say, buying a new food item from a store), a food objects' freshness is set to default value (60000.0 to be precise). Every turn/5 seconds realtime, temperature/dirt/food freshness decays by its decay rate (factoring in any modifiers, like attachments, ini modifiers etc.).
So if you have, say, a rice bag with a decay rate of 1.5. it will be 100 * 60000.0/ 60000.0 = 100 % fresh. A day later, it is now 100 * (60000.0 - 1.5 * 24 * 60 * 60 / 5 ) / 60000.0 = 56.8 % fresh. The less fresher an item, the less nutritious (and potentially more unhealthy) it will be.
I know now that it could never work between us, as much as we wanted to, it could never be! Not because you're a rabbit, but because you're black.
If you want, you can donate to me. This will not affect how and what I code, and I will not code specific features in return. I will be thankful though.Report message to a moderator
|
|
|
|
|
|
Re: New feature: Mercs need food and water to survive[message #349473 is a reply to message #347959]
|
Mon, 10 April 2017 18:27
|
|
smeagol |
|
Messages:2705
Registered:June 2008 Location: Bremen, Germany |
|
|
A couple questions, after I have played a couple hours with food:
-> Would it be possible to get food/water % of a merc be displayed in a more convenient way than in the tool tip? Also the tooltips always seem to mess up when toggling through the mercs with arrow keys, due to slow redrawing, especially if there is explanatory text for lower / higher levels than 100% food/water.
I really like the food system, but I dislike the way it is displayed currently, as it makes feeding the mercs a tedious task (and no, auto feeding is no solution, as my second remark will show).
-> auto feeding always yields very high values of food (sometimes even up to 120%, at which point mercs basically become stuffed). Would it be possible to have something like a stop on eating if it would bring food levels above 105% ? You certainly should be able to make mercs munch more, but not on auto feeding...
-> Drinking from 10 l canisters of water results in the merc drinking the whole canister at once, even though the portion size is set to 1/10th (which results in mercs reaching water levels of almost 130% from 95%).
<FOOD>
<uiIndex>64</uiIndex>
<szName>Water Canister</szName>
<bFoodPoints>0</bFoodPoints>
<bDrinkPoints>10000</bDrinkPoints>
<ubPortionSize>10</ubPortionSize>
<bMoraleMod>0</bMoraleMod>
<usDecayRate>0</usDecayRate>
</FOOD>
Any idea what's causing that?
Report message to a moderator
|
|
|
|
|
|
Re: New feature: Mercs need food and water to survive[message #349555 is a reply to message #349488]
|
Sat, 15 April 2017 05:10
|
|
Flugente |
|
Messages:3509
Registered:April 2009 Location: Germany |
|
|
Well, I know of no better position to display the food data, so...
Food consumption stops eventually, I assume you didn't fill in the portion size at the correct location.
Showing whether a sector has water could be added to the sector display I guess.
Having it loyalty-based only works in cities, and is kinda odd. I mean, if I've got a friggin' death squad that just wasted a battalion, I don't see a bunch of mousy civilians refusing me water.
I know now that it could never work between us, as much as we wanted to, it could never be! Not because you're a rabbit, but because you're black.
If you want, you can donate to me. This will not affect how and what I code, and I will not code specific features in return. I will be thankful though.Report message to a moderator
|
|
|
|
|
Re: New feature: Mercs need food and water to survive[message #358106 is a reply to message #357849]
|
Wed, 25 September 2019 10:33
|
|
ZedJA2 |
|
Messages:202
Registered:January 2018 |
|
|
@ Greyfoot
I have never used this system. But Flugente has posted what SHOULD matter here. First, you must continue to keep these individuals well-fed. A Doctor can restore lost stats, but this can be hard for a couple of reasons, I'll explain.
First, you may be poisoned, and poison tends to reassert itself periodically. In the past, I tried this with diseases, and it was a real pain. Also, now the Doctoring will first try and fix any lost health, etc. Then it will try to repair your stats. So, if you are not perfectly healthy, you won't get to restore Stats. So if you are poisoned and that ticks you down even 1 point of health before you can max out and restore a Stat ... well you will never restore the stat. Now, I'm presuming that isn't supposed to happen and also that a hospital will boost significantly the healing. But, understand. If you are poisoned, it is a race between healing a character with full health then next round Stats, versus poisoning to reduce the one health. Plus you have to remain well-fed.
Other than that I don't know the mechanics well enough since I never used it and am behind the times in how it may have changed since I last looked at it. But those are my suggestions.
As food gets old, it can go bad, which can poison. I am not sure how you check for that, or if it is shown anywhere. Good luck.
Also keep in mind there may be special facilities in each strategic grid area which may allow for different effects. Best to check their options out and see if you can then achieve a success that way.
Report message to a moderator
|
Sergeant 1st Class
|
|
|
|
Re: New feature: Mercs need food and water to survive[message #363314 is a reply to message #361938]
|
Wed, 02 June 2021 12:37
|
|
Tue |
|
Messages:48
Registered:April 2008 Location: Copenhagen, Denmark |
|
|
Love this feature. It makes the game really interesting that you can't just camp out in the countryside and hunt patrols indefinitely without getting returning to town for food and water or have some delivered to you.
Quick question though: Can it be that there are no food/drink vendors in Cambria apart from Keith who runs out rather quickly? I had a spy in Cambria and haven't yet found any way to have him supply himself from town.
Report message to a moderator
|
Corporal
|
|
|
Goto Forum:
Current Time: Fri Mar 29 07:06:55 GMT+2 2024
Total time taken to generate the page: 0.03351 seconds
|