SPEC Capacitors SVN 13248

Find any bugs in Vega Strike? See if someone has already found it, or report them here!
Post Reply
Hicks
Bounty Hunter
Bounty Hunter
Posts: 153
Joined: Sat Oct 22, 2011 9:17 am

SPEC Capacitors SVN 13248

Post by Hicks »

Buying or selling SPEC capacitors in a base does not seem to update the warp capacitor bank storage value. After a short flight and landing at another base it seemed to update, but after buying a new SPEC capacitor it failed to update again.
pheonixstorm
Elite
Elite
Posts: 1567
Joined: Tue Jan 26, 2010 2:03 am

Re: SPEC Capacitors SVN 13248

Post by pheonixstorm »

svn trunk or my branch?
Because of YOU Arbiter, MY kids? can't get enough gas. OR NIPPLE! How does that mkae you feeeel? ~ Halo
Hicks
Bounty Hunter
Bounty Hunter
Posts: 153
Joined: Sat Oct 22, 2011 9:17 am

Re: SPEC Capacitors SVN 13248

Post by Hicks »

trunk

edit: both actually, so i guess the problem is steming from the trunk
TBeholder
Elite Venturer
Elite Venturer
Posts: 753
Joined: Sat Apr 15, 2006 2:40 am
Location: chthonic safety

Re: SPEC Capacitors SVN 13248

Post by TBeholder »

The way to reproduce:
  1. Visit any base/planet and buy a non-milspec ship.
  2. Look at stats.
  3. Sell its warp cap.
  4. Look at stats. Warp capacitance decreased.
  5. Buy the warp cap back.
  6. Look at stats. Warp capacitance is not increased (unless you have "simulation while docking" turned on).
  7. Leave station, wait until warp energy bar noticeably replenishes (with speccap-1 and shield-1 on reactor-1 it's not that slow) and re-dock.
  8. Look at stats. Warp cap increased.
Answer: indication in basecomputer.cpp is messed up. It tries to use functions instead of checking fields directly. But it uses current warp energy instead of max warp energy because the coder didn't find a proper function. See also: comments.
"Two Eyes Good, Eleven Eyes Better." -Michele Carter
pheonixstorm
Elite
Elite
Posts: 1567
Joined: Tue Jan 26, 2010 2:03 am

Re: SPEC Capacitors SVN 13248

Post by pheonixstorm »

Interesting.. wonder how long its been screwy then.

We shall send a trained monkey to create a patch and pray by the seat of our pants that it works.

Knowing more or less where the naughty code is should make this easier to fix. Good catch!
Because of YOU Arbiter, MY kids? can't get enough gas. OR NIPPLE! How does that mkae you feeeel? ~ Halo
Hicks
Bounty Hunter
Bounty Hunter
Posts: 153
Joined: Sat Oct 22, 2011 9:17 am

Re: SPEC Capacitors SVN 13248

Post by Hicks »

I found out by starting a new game. When you sell the capacitor on the llama, the value doesn't go down.
pheonixstorm
Elite
Elite
Posts: 1567
Joined: Tue Jan 26, 2010 2:03 am

Re: SPEC Capacitors SVN 13248

Post by pheonixstorm »

Quirky. So it only goes down when you buy a new ship? That just seems... odd.
Because of YOU Arbiter, MY kids? can't get enough gas. OR NIPPLE! How does that mkae you feeeel? ~ Halo
Hicks
Bounty Hunter
Bounty Hunter
Posts: 153
Joined: Sat Oct 22, 2011 9:17 am

Re: SPEC Capacitors SVN 13248

Post by Hicks »

shouldn't there be a function in there to find max energy? how does it determine how much of the spec energy bar it needs to fill on the interface when you are flying?
TBeholder
Elite Venturer
Elite Venturer
Posts: 753
Joined: Sat Apr 15, 2006 2:40 am
Location: chthonic safety

Re: SPEC Capacitors SVN 13248

Post by TBeholder »

Hicks wrote:shouldn't there be a function in there to find max energy? how does it determine how much of the spec energy bar it needs to fill on the interface when you are flying?
Maybe, but it's done simply by reading the field maxwarpenergy itself.
Warp gauge shows ->WarpEnergyData(), which if maxwarpenergy>0 is warpenergy/maxwarpenergy, otherwise if jump.energy > 0, warpenergy/jump.energy, and failed that, 0.
"Two Eyes Good, Eleven Eyes Better." -Michele Carter
Post Reply