View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0002946 | FSSCP | SEXPs | public | 2013-11-01 17:16 | 2013-11-24 07:33 |
Reporter | FelixJim | Assigned To | niffiwan | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
OS Version | Win 7 | ||||
Product Version | 3.7.1 | ||||
Fixed in Version | 3.7.1 | ||||
Summary | 0002946: shields-on and shields-off can cause total ETS energy to increase/decrease | ||||
Description | Firing the shields-on and shields-off SEXPs can cause odd behaviour with the ETS gauges. For example, putting all energy into shields, and then using shields-off will leave the player with no ETS energy at all. Attempting to increase weapons or engines at this point will crash debug builds, but apparently work as if drawing from shields as normal on release builds. Let's say you put all energy into weapons. Now, if you shields-on, the shields will return, but will still be at full energy, and so the total ETS energy has doubled. It's probably easier for you to play around with the sample mission I've provided than my trying to explain any more. | ||||
Steps To Reproduce | Download and run attached mod, play ETSbug.fs2. Instructions in-game. | ||||
Tags | No tags attached. | ||||
|
|
|
Well, shields-on / shields-off don't rebalance the ETS indexes when called, they just modify the ship flag leaving the ETS in a "broken" state. i.e. the code assumes that the ETS will always sum to 12, and if it doesn't, it'll hit an int3() when it tries to increase an index past 8, but has 0 left to subtract from the one remaining index (with the shields index marked as unavailable) Need to add some extra processing of indexes to this: void sexp_shields_off(int n, bool shields_off ) |
|
Fix committed to trunk@10014. |
|
Can you please grab the next nightly and confirm that this issue is fixed? http://www.hard-light.net/forums/index.php?topic=86003 |
|
The issue does seem to be fixed, but as side effect using shields-on will result in ETS settings with nothing in shields, whereas before you'd have whatever was in before using shields-off. This would be a headache for the player to rebalance, especially after every in-mission jump, and those have become pretty popular over the last few years. Normally I'd call this an issue for FREDers to deal with, except many mods have already been released assuming old behaviour, and this could cause balance issues for unobservant players. All this said, I can't honestly think of a perfect solution to this. Stealing 1/3 of both engines and weapons energy would accommodate players who never touch the ETS settings, assuming you could handle edge cases like all energy in weapons correctly. It probably would be a more or less reasonable distribution under any circumstances, and players who are playing around with the ETS settings will probably have to re-jig everything in any scenario. |
|
I think rebalancing ETS equally after shields-on is the most reasonable solution. |
|
Rebalancing will work. You could also just expect FREDers to use the new get/set ETS sexps.. but that doesn't deal with old missions, obviously. |
|
Just to clarify, we're talking about the same effect as pressing CTRL-D when shields-on is called? i.e. set all indexes to 4 / INTIAL_????_RECHARGE_INDEX (then just deal with edge cases of ships missing weapons/engines) |
|
Fix committed to trunk@10023. |
|
That was pretty easy - let me know how this looks in the next nightly. |
|
Looking good, but now using shields-on when the shields are already on will still rebalance the ETS settings. I don't know how big a problem that would be, but maybe it would be cleaner if nothing happened at all? A mention of the ETS rebalancing in the SEXP help wouldn't go amiss either. |
|
Ah yes, I did notice that problem but I didn't think it'd be a big deal. I've got an idea of how to deal with that, just a few more checks for state changes and it should be good to go. I'll update the help as well. |
|
Fix committed to trunk@10032. |
|
3rd time lucky? :) While fixing this, I noticed that alter-ship-flag had the same problem, it should also be fixed. See 2nd attached test mission for a test case. |
|
|
|
Have you had a chance to confirm that the problem is gone in the latest nightlies? |
|
Oops, sorry. Just tested on 10145 and I couldn't find anything else to nitpick and complain about; it all worked just as I'd expected, including the alter-ship-flag version. |
|
Thanks :) |
fs2open: trunk r10014 2013-11-06 03:10 Ported: N/A Details Diff |
Fix mantis 2946: set ets shield index to zero when sexp shields-off is called |
Affected Issues 0002946 |
|
mod - /trunk/fs2_open/code/hud/hudets.h | Diff File | ||
mod - /trunk/fs2_open/code/parse/sexp.cpp | Diff File | ||
fs2open: trunk r10023 2013-11-07 03:25 Ported: N/A Details Diff |
Fix mantis 2946 part B: set defaults ets when calling shields-on |
Affected Issues 0002946 |
|
mod - /trunk/fs2_open/code/parse/sexp.cpp | Diff File | ||
fs2open: trunk r10032 2013-11-08 23:14 Ported: N/A Details Diff |
Fix mantis 2946 part C: when enabling sheields, only rebalance ETS if the shields were previously off Also fix same issue in alter-ship-flag ( "no-shields" ... ) |
Affected Issues 0002946 |
|
mod - /trunk/fs2_open/code/parse/sexp.cpp | Diff File |
Date Modified | Username | Field | Change |
---|---|---|---|
2013-11-01 17:16 | FelixJim | New Issue | |
2013-11-01 17:16 | FelixJim | File Added: ETSbug.7z | |
2013-11-02 09:36 | niffiwan | Note Added: 0015378 | |
2013-11-04 07:48 | niffiwan | Assigned To | => niffiwan |
2013-11-04 07:48 | niffiwan | Status | new => assigned |
2013-11-06 07:44 | niffiwan | Changeset attached | => fs2open trunk r10014 |
2013-11-06 07:44 | niffiwan | Note Added: 0015383 | |
2013-11-06 07:44 | niffiwan | Status | assigned => resolved |
2013-11-06 07:44 | niffiwan | Resolution | open => fixed |
2013-11-06 07:46 | niffiwan | Note Added: 0015384 | |
2013-11-06 07:46 | niffiwan | Status | resolved => feedback |
2013-11-06 07:46 | niffiwan | Resolution | fixed => reopened |
2013-11-06 07:47 | niffiwan | Note Edited: 0015384 | |
2013-11-06 07:59 | niffiwan | Relationship added | related to 0002950 |
2013-11-06 11:01 | niffiwan | Note Edited: 0015384 | |
2013-11-06 15:34 | FelixJim | Note Added: 0015387 | |
2013-11-06 15:34 | FelixJim | Status | feedback => assigned |
2013-11-06 17:54 | Goober5000 | Note Added: 0015388 | |
2013-11-06 19:34 | MjnMixael | Note Added: 0015390 | |
2013-11-06 19:43 | niffiwan | Note Added: 0015391 | |
2013-11-07 07:59 | niffiwan | Changeset attached | => fs2open trunk r10023 |
2013-11-07 07:59 | niffiwan | Note Added: 0015396 | |
2013-11-07 07:59 | niffiwan | Status | assigned => resolved |
2013-11-07 08:01 | niffiwan | Note Added: 0015397 | |
2013-11-07 08:01 | niffiwan | Status | resolved => feedback |
2013-11-07 16:32 | FelixJim | Note Added: 0015398 | |
2013-11-07 16:32 | FelixJim | Status | feedback => assigned |
2013-11-07 22:16 | niffiwan | Note Added: 0015400 | |
2013-11-09 03:48 | niffiwan | Changeset attached | => fs2open trunk r10032 |
2013-11-09 03:48 | niffiwan | Note Added: 0015402 | |
2013-11-09 03:48 | niffiwan | Status | assigned => resolved |
2013-11-09 03:49 | niffiwan | Note Added: 0015403 | |
2013-11-09 03:49 | niffiwan | Status | resolved => feedback |
2013-11-09 03:49 | niffiwan | File Added: ETSbug2.fs2 | |
2013-11-16 05:36 | niffiwan | Note Added: 0015412 | |
2013-11-22 17:39 | FelixJim | Note Added: 0015455 | |
2013-11-22 17:39 | FelixJim | Status | feedback => assigned |
2013-11-24 07:33 | niffiwan | Note Added: 0015461 | |
2013-11-24 07:33 | niffiwan | Status | assigned => resolved |
2013-11-24 07:33 | niffiwan | Fixed in Version | => 3.7.1 |
2013-11-24 07:33 | niffiwan | Resolution | reopened => fixed |