OpenXcom Forum

OpenXcom => Open Feedback => Topic started by: pmprog on June 08, 2014, 09:07:55 pm

Title: Fuel Percentage
Post by: pmprog on June 08, 2014, 09:07:55 pm
Just watching MetalCanyon's LP
https://youtu.be/fNEh7dGAkBw?t=4m57s

and at 4m57s, he picks AceTheBrave and it says "Low Fuel", but it says below "Fuel : 97%". This doesn't make sense. Should the number be inverted? (100 less % shown)
Title: Re: Fuel Percentage
Post by: Qpoter on June 08, 2014, 11:25:06 pm
Happens a lot with the Skyranger for me, where it returns to base due to low fuel even though it's at 90-something %.
Title: Re: Fuel Percentage
Post by: SupSuper on June 09, 2014, 06:20:16 pm
Transporters are hardcoded to Low Fuel when returning from a mission (this is basically a game-logic-way of forcing them to have to go back to base, so the post-mission-procedures still make sense).
Title: Re: Fuel Percentage
Post by: yrizoud on June 09, 2014, 08:26:35 pm
Several players have been surprised by the "low fuel" status. It may be better to use the standard STR_RETURNING_TO_BASE rather than STR_LOW_FUEL_RETURNING_TO_BASE on mission completed.
Title: Re: Fuel Percentage
Post by: Falko on June 09, 2014, 08:34:04 pm
STR_RETURNING_TO_BASE allows to redirect the craft to the next ufo
if the devs want the crafts to return for briefing one has to create a new STR_BRIEFING_RETURNING_TO_BASE  state and include that in the code
Title: Re: Fuel Percentage
Post by: yrizoud on June 09, 2014, 09:08:07 pm
I'm only referring to the message that the player sees : When there's a forced "return to base" which is not motivated by damage or low fuel, I think the generic message "RETURN TO BASE" would be less confusing than "LOW FUEL - RETURNING TO BASE".
Title: Re: Fuel Percentage
Post by: Falko on June 09, 2014, 09:32:42 pm
you would need to add some new variable to determine the correct status of a craft
Code: [Select]
if (_waypoint != 0)
{
status = tr("STR_INTERCEPTING_UFO").arg(_waypoint->getId());
}
else if (_craft->getLowFuel())
{
status = tr("STR_LOW_FUEL_RETURNING_TO_BASE");
}
else if (_craft->getDestination() == 0)
{
status = tr("STR_PATROLLING");
}
else if (_craft->getDestination() == (Target*)_craft->getBase())
{
status = tr("STR_RETURNING_TO_BASE");
}
like that
Code: [Select]
if (_waypoint != 0)
{
status = tr("STR_INTERCEPTING_UFO").arg(_waypoint->getId());
}
else if (_craft->NEW_WAS_ALREADY_ON_A_MISSION())
{
status = tr("STR_BRIEFING_RETURNING_TO_BASE");
}
else if (_craft->getLowFuel())
{
status = tr("STR_LOW_FUEL_RETURNING_TO_BASE");
}
else if (_craft->getDestination() == 0)
{
status = tr("STR_PATROLLING");
}
else if (_craft->getDestination() == (Target*)_craft->getBase())
{
status = tr("STR_RETURNING_TO_BASE");
}

Edit: trying the new spoiler tag :)thanks @SupSuper
Title: Re: Fuel Percentage
Post by: Qpoter on June 10, 2014, 02:52:55 am
This makes a whole lot more sense now. Falko's code should be implemented to avoid any more confusion.
Title: Re: Fuel Percentage
Post by: Falko on June 10, 2014, 10:55:47 am
there is a bit more to it than just using the code above
you have to define the variable/method NEW_WAS_ALREADY_ON_A_MISSION
what happens with that value while starting,landing,crashing,intercepting,ending,beginning a mission...
then of course you want to have a option similar to the "always start" options that allows the skyranger to make multiple missions in one flight,...
Title: Re: Fuel Percentage
Post by: SupSuper on June 10, 2014, 02:25:54 pm
...and that's how a suggestion quickly becomes a hassle. :P
Title: Re: Fuel Percentage
Post by: pmprog on June 10, 2014, 03:19:48 pm
I don't see why you'd need anything more than STR_RETURNING_TO_BASE - as this is already in for when you've been patrolling.

This keeps vanilla behaviour of it flying home after the mission, but giving you a clear message that it's fine to carry on.

What "post mission procedures" are there? Regarding the immediate transport of recovered items to the base, I never assumed they went in the craft anyway (instead some local government clean-up crew shipped it across to your base)
Title: Re: Fuel Percentage
Post by: yrizoud on June 10, 2014, 05:12:12 pm
The string exists (and is translated! It's a big plus), but the game code doesn't keep track of "why" the ship is going home. At the moment, it uses the same boolean (_lowFuel or something), in both cases :
- mandatory back to base because of lack of fuel
- mandatory back to base because mission completed.

Post-mission includes some tasks which are instantaneous, they don't wait for the ship to go back home :
- transport of live aliens to detention
- wounded soldiers start "healing"
- loot items (including large "tile" items like UFO power source) into home base stores
- reload spent items, drawing from base stores (clips, but also anything destroyed in explosions) Inform player of missing items.

It's a simplification which is consistent with the fact that the game doesn't expect the ship to do a second mission before coming home.
Having a ship "chain" missions would require a big rethinking, to get the behavior a player could "expect". For example, you don't expect human-made ammo to be magically transferred from base stores to the ship. But at the same time you'll want expended plasma to be replaceable with what you find on the aliens. And also, even if you do multiple missions with less and less ammo, on final return you probably expect the game to re-equip the ship back to its original loadout: What the ship contained when it left the base, not what it had when the last mission started. Even the individual soldiers equipment may need to be restored back to its "ideal" load, rather than the last mission's.
Title: Re: Fuel Percentage
Post by: pmprog on June 10, 2014, 05:51:25 pm
Post-mission includes some tasks which are instantaneous, they don't wait for the ship to go back home :
- transport of live aliens to detention
- loot items (including large "tile" items like UFO power source) into home base stores
These I, personally, don't think matters - you don't see the freighters that transport your goods from base to base, but it still happens, could just make it lore that you have freighter picking up the mess and delivering it to your base

- wounded soldiers start "healing"
This is the only one that I wouldn't be too sure about - Do the battlescape stats remain in the game data even in geo? If so, you could apply a clock that every 30 mins your soliders with injuries get worse. Alternatively, you could say the craft have non-portable medikits that will prevent further injury but does not restore any health.

- reload spent items, drawing from base stores (clips, but also anything destroyed in explosions) Inform player of missing items.
Yeah, but I don't see why you shouldn't be able to go from one mission to another with whatever you have left.

I guess most of this depends on how much data is persisted in the geoscape
Title: Re: Fuel Percentage
Post by: yrizoud on June 10, 2014, 07:07:18 pm
I don't see why you shouldn't be able to go from one mission to another with whatever you have left.
I can imagine many in-universe reasons some times, but not every time (plane damaged, getting help for the wounded, having 6 live chryssalids prisoners, towing an intact UFO that's 4x larger than the transport).
But even if you some times feel the constraint is unrealistic, note that it is simple and player-friendly on every single mission! Immediate post-mission procedures allow you to sell loot, buy missing ammo and start research new things immediately.

I think the only reason this topic comes up is that people think there's a bug when they see "Low fuel" contradicted by a high fuel %. It's completely different from "feeling a need for ships to do multiple land missions in a row".
Title: Re: Fuel Percentage
Post by: SupSuper on June 10, 2014, 08:19:29 pm
What happens in the Battlescape, stays in the Battlescape. :P You cannot have crafts go on multiple missions unless you really like breaking the game abstraction that post-mission procedures are instantaneous, nothing ever leaves bases and crafts are purely an abstract point on the globe. Plus then it becomes XCOM 2012 and there's no point in having multiple crafts.

We can look into adding a new flag for "craft returning from mission" if the "low fuel" string really drives you nuts.
Title: Re: Fuel Percentage
Post by: Aldorn on June 11, 2014, 03:57:34 am
We can look into adding a new flag for "craft returning from mission" if the "low fuel" string really drives you nuts.
A nice and efficient proposition  :)
Title: Re: Fuel Percentage
Post by: kkmic on June 11, 2014, 09:55:00 am
While the "Low fuel" notification is vanilla, I remember it puzzled me the first time I have encountered it too. I got the meaning pretty quick - if returning from a mission, the transport is not available for another one until repaired/rearmed/refueled - but it always struck me as a last minute patch applied to the game.

My take: if it's trivial to implement, by all means, please do. But I'd rather see 1.0 out first, as I've learned to live with this "inconvenience" a long time ago.
Title: Re: Fuel Percentage
Post by: darkestaxe on June 15, 2014, 09:14:59 am
I'm quite certain that a Skyranger that can't fit one more soldier isn't going to have a harder time bringing back 50 aliens and 2 supply ships then it will have bringing back 25 aliens and 1 supply ship. There is no lore reason I can see for not going to the next mission site.

As for healing - if you are able to survive the 18 hour flight back to base at all, then you're not going to bleed out. As for the skyranger having non-portable medkits: All military transports have full medical kits, and all soldiers in combat have first aid kits. This has been true for at least a hundred years. However, in X-COM portable bandages are a groundbreaking technology prototyped in 1999 by an international crack team of scientists in a secret underground laboratory that specialized in ray-guns, psionics, cold fusion and non terrestrial alloys.

Any decisions about whether you should be able to go from site to site should be about game mechanics, not medikit lore. At least until you start with medikits and can purchase more, and they fit in one tile instead of two.

Title: Re: Fuel Percentage
Post by: BlackLibrary on July 01, 2014, 12:19:53 am
Sure...redirect the Transport, start a brand new mission with 9 dead soldiers and one live trooper trying to keep 3 Mutons soldiers subdued.  Not gonna happen.