Jump to content

[0.25] Aligned/Formatted Currency Indicator


xEvilReeperx

Recommended Posts

I'm sure many have noticed the stock currency cost/funds display:

2nA1B3C.png

And wished it was more like one of these:

steSgpt.pngOZoq2sE.png

Now it can! What more is there to say?


Download 1.2 Here


Configuring style:

Edit the settings.cfg file, located in (by default) /GameData/AlignedCurrencyIndicator/settings.cfg. See file for details
  • Note: Default is the "Calculator" (right) style

Changelog

  • 1.2
    • Updated for 0.25
    • Small bug that prevented the indicators from updating correctly when a craft was loaded is fixed

    [*]1.1

    • Critical: Fixes a serious bug that occurs when completing contracts if you use the "Calculator" style widgets
    • Now automatically disables in game modes other than Career

    [*]1.0

    • first release

Known Issues

  • If total funds are changed while in the editor with the 'tumbler/altitude' widget style, the cost widget tumblers will jump briefly

If you discover any bugs or other issues, let me know.

Source

Licensed under the MIT License, included in download

Edited by xEvilReeperx
Updated for 0.25
Link to comment
Share on other sites

Getting various NullReferenceExceptions.

I think these were while in the VAB (multiple instances of this one):

NullReferenceException: Object reference not set to an instance of an object
at AlignedCurrencyIndicator.CalculatorWidget.SetCost (Double cost) [0x00000] in <filename unknown>:0
at AlignedCurrencyIndicator.CalculatorWidget.RefreshCost () [0x00000] in <filename unknown>:0
at AlignedCurrencyIndicator.CameraListener.OnPreRender () [0x00000] in <filename unknown>:0

this was on launch of a vessel:

(Filename: C:/BuildAgent/work/d63dfc6385190b60/artifacts/StandalonePlayerGenerated/UnityEngineDebug.cpp Line: 49)

AlignedCurrencyIndicator, CameraListener: Adding to EZGUI camera

(Filename: C:/BuildAgent/work/d63dfc6385190b60/artifacts/StandalonePlayerGenerated/UnityEngineDebug.cpp Line: 49)

AlignedCurrencyIndicator, Failed to find EZGUI camera!

(Filename: C:/BuildAgent/work/d63dfc6385190b60/artifacts/StandalonePlayerGenerated/UnityEngineDebug.cpp Line: 49)

NullReferenceException: Object reference not set to an instance of an object
at AlignedCurrencyIndicator.CalculatorWidget.FundsChanged (Double value) [0x00000] in <filename unknown>:0
at EventData`1[System.Double].Fire (Double data) [0x00000] in <filename unknown>:0
at Funding.set_Funds (Double value) [0x00000] in <filename unknown>:0
at Funding.onVesselRollout (.ShipConstruct ship) [0x00000] in <filename unknown>:0
at EventData`1[ShipConstruct].Fire (.ShipConstruct data) [0x00000] in <filename unknown>:0
at FlightDriver+.MoveNext () [0x00000] in <filename unknown>:0

this appears to have been just after recovery of a vessel (multiple instances of this one):

NullReferenceException
at (wrapper managed-to-native) UnityEngine.Component:InternalGetGameObject ()
at UnityEngine.Component.get_gameObject () [0x00000] in <filename unknown>:0
at UnityEngine.Component.GetComponentInChildren (System.Type t) [0x00000] in <filename unknown>:0
at UnityEngine.Component.GetComponentInChildren[TextMesh] () [0x00000] in <filename unknown>:0
at AlignedCurrencyIndicator.CalculatorWidget.SetCost (Double cost) [0x00000] in <filename unknown>:0
at AlignedCurrencyIndicator.CalculatorWidget.RefreshCost () [0x00000] in <filename unknown>:0
at AlignedCurrencyIndicator.CameraListener.OnPreRender () [0x00000] in <filename unknown>:0

and this was while in "flight" (actually splashed down), trying to complete a contract (I think that this error is related to the fact that the contract isn't completing properly when I hit the "run test" button, even though all the test conditions are green):

NullReferenceException: Object reference not set to an instance of an object
at AlignedCurrencyIndicator.CalculatorWidget.FundsChanged (Double value) [0x00000] in <filename unknown>:0
at EventData`1[System.Double].Fire (Double data) [0x00000] in <filename unknown>:0
at Funding.set_Funds (Double value) [0x00000] in <filename unknown>:0
at Contracts.Contract.AwardCompletion () [0x00000] in <filename unknown>:0
at Contracts.Contract.SetState (State newState) [0x00000] in <filename unknown>:0
at Contracts.Contract.Complete () [0x00000] in <filename unknown>:0
at Contracts.Templates.PartTest.onParameterChange (Contracts.ContractParameter p, ParameterState s) [0x00000] in <filename unknown>:0
at EventData`2[Contracts.ContractParameter,Contracts.ParameterState].Fire (Contracts.ContractParameter data0, ParameterState data1) [0x00000] in <filename unknown>:0
at Contracts.ContractParameter.SetComplete () [0x00000] in <filename unknown>:0
at Contracts.Parameters.PartTest.OnPartRunTest (.ModuleTestSubject p) [0x00000] in <filename unknown>:0
at EventData`1[ModuleTestSubject].Fire (.ModuleTestSubject data) [0x00000] in <filename unknown>:0
at ModuleTestSubject.RunTest () [0x00000] in <filename unknown>:0
at ModuleTestSubject.RunTestEvent () [0x00000] in <filename unknown>:0
at BaseEvent.Invoke () [0x00000] in <filename unknown>:0
at UIPartActionButton.OnClick () [0x00000] in <filename unknown>:0

EDIT: I quicksaved and quickloaded on the vessel I was trying to complete the contract on. Now the contract is gone from my contracts list. It looks like it got marked as completed, but I never received the reward for it. Still can't prove that this mod was what caused it, but that NRE looks really suspicious.

EDIT #2: I checked, and while the contract is no longer in my contracts list, I still have access to the experimental engine (that I was supposed to be testing) from that contract (it's still marked as experimental). Weird.

EDIT #3: The contract shows up in my Archives of completed contracts. So it looks like the contract got marked as completed, but the code that should have given me my reward/removed my access to the experimental part didn't get activated properly.

Edited by ArcFurnace
Link to comment
Share on other sites

Is there the .24 version still available? I see lots of talk about a right click bug and I really have no reason to update to .1 because of that.

Thanks in advance!

*EDIT*

Just noticed that this was released after .24.1

I guess there was no .24 version =P Now to test this in .24!

Edited by WololoW
Link to comment
Share on other sites

Getting various NullReferenceExceptions.

This is very strange. Can you tell me more about what you were doing or provide any reproduction steps? Something has gone wrong in initialization or destruction or both. Any chance of getting the full log?

@WololoW: It should work fine (assuming ArcFurnace's bug isn't affecting everyone)

Link to comment
Share on other sites

Is there the .24 version still available? I see lots of talk about a right click bug and I really have no reason to update to .1 because of that.

Thanks in advance!

*EDIT*

Just noticed that this was released after .24.1

I guess there was no .24 version =P Now to test this in .24!

You are strongly advised to update to 0.24.1 as there was a bug with PartModules getting messed up which can cause serious issues with existing craft.

Link to comment
Share on other sites

Installing this mod messed with contract completion (game refused to recognize the state of a rocket on the launchpad as either on Kerbin or landed) and also seems to screw up elements of the UI (revert dialog box text is offset and unreadable and buttons don't appear, cannot be backed out of, requires hard exit). Removing it again causes problems to disappear.

Link to comment
Share on other sites

Suggestion: Use local system settings for the thousands seperator, it could irritate alot of players from other countries (especially here in europe).

It should be doing this automatically. I haven't used NumberFormatInfo before though so if it's not, let me know and I'll try to figure it out

@LuisCorinthiano, rabidsi: Can you provide your logs? Whatever is going wrong, I'm having a hard time tracking down. It sounds like you have a similar problem as ArcFurnace but it doesn't make any sense by itself: if that camera didn't exist, you couldn't see any of the UI in the VAB at all

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...