Page MenuHomeSchine - Phabricator

Starmade | Ship structure tab ion defence effect % not matching in use %
Closed, DuplicatePublic

Description

I noticed quite a few times when I was making up ion defence effects for some turrets that the actual % defence given wasn't matching what the % listed in the structure tab was showing. After doing some testing and number crunching I figured it out.

I had a ship with 7642 blocks but only 218.7 mass. There was 25 ion effect modules with a mass of 2.5.
The structure tab was showing around 3.9% effect and when I activated it I got 13.7% effect show on screen and damage indicated when shot was reduced by 13.7%.

The structure tab is calculating the % effect from the block count or is assuming all blocks are the same mass.
Where 5% of blocks gives 60% ion defence.

ion blocks / total blocks / 5 x 60 = 0.039 = 3.9%

Actual % is based on mass
Where 2.5 mass ion blocks out of 218.7 mass total
ion mass / total mass / 5 * 60 = 0.137 = 13.7%

I didn't check the structure tab for any of the other defence effects % if they had the same issue.

Details

Commits
Restricted Diffusion Commit
Task Type
Bug
Testing Results
Affected Gamemode(s)
Singleplayer
Reproducible
Yes
Category
Ingame GUI/HUD
First occurrence (version)
0.197.42
Hardware/Software/System
OS-Specific
No
Hardware-Specific
No
Video Card Vendor
uncertain
Video Card Model
Nvidia GT730
User/Reporter/Contact
Username on Registry
Mork2
Username/Profile on Steam
Mork
Tester information (Internal use only)

Partially fixed:

  • It is calculated correctly now, but it also shows percentage over the maximum allowed for that effect.

Ion effect for example should cap out at 60% but it doesn't in the structure menu.
Simple adding a math.min(max effect percentage, math.max(0, percentage calculation)) over it should do the trick.

Serverconfig (server.cfg)
<replace this line with the file content>
Clientconfig (settings.cfg)
<replace this line with the file content>

Event Timeline

mclaih updated the task description. (Show Details)Oct 10 2015, 1:15 PM
mclaih changed Category from none/unspecified to Ingame GUI/HUD.
mclaih changed Affected Gamemode(s) from none/unspecified to Singleplayer.
mclaih set First occurrence (version) to 0.19431.
mclaih changed Reproducible from uncertain to Yes.
mclaih set Video Card Model to Nvidia GT730.
mclaih edited Serverconfig (server.cfg). (Show Details)
mclaih edited Clientconfig (settings.cfg). (Show Details)
mclaih set Username on Registry to Mork2.
mclaih set Username/Profile on Steam to Mork.
mclaih added a subscriber: mclaih.
mclaih created this task.
Restricted Application added a project: Issue Navigation. · View Herald TranscriptOct 10 2015, 1:15 PM
SmilingDemon shifted this object from the S1 Public space to the S3 Starmade space.Oct 12 2015, 3:33 PM
SmilingDemon changed the visibility from "Custom Policy" to "Public (No Login Required)".
SmilingDemon changed the edit policy from "Task Author" to "Starmade (Project)".
SmilingDemon set Task Type to Bug.
SmilingDemon set OS-Specific to No.
SmilingDemon set Hardware-Specific to No.
SmilingDemon set Video Card Vendor to uncertain.
SmilingDemon triaged this task as Low priority.
SmilingDemon removed SmilingDemon as the assignee of this task.

-Validated-

Similar problems are around where menus show inconsistent data ( like T669)
Keeping this open and maybe test all the defensive effects for shown info.

As it is only a visual problem of incorrect shown data set to Low

Chandler changed the task status from Open to In Queue (Game).Oct 13 2015, 12:21 AM
Restricted Application edited projects, added Game Development; removed Issue Navigation. · View Herald TranscriptOct 13 2015, 12:21 AM
lancake mentioned this in Unknown Object (Maniphest Task).Apr 17 2016, 10:39 AM
schema added a commit: Restricted Diffusion Commit.Apr 20 2016, 6:52 AM
schema changed the task status from In Queue (Game) to Resolved by committing Restricted Diffusion Commit.
Restricted Application edited projects, added Quality Assurance; removed Game Development. · View Herald TranscriptApr 20 2016, 6:52 AM
lancake changed the task status from Resolved to In Queue (Game).

-QA Testing-

Partially fixed:

  • It is calculated correctly now, but it also shows percentage over the maximum allowed for that effect.

Ion effect for example should cap out at 60% but it doesn't in the structure menu.
Simple adding a math.min(max effect percentage, math.max(0, percentage calculation)) over it should do the trick.

Restricted Application edited projects, added Game Development; removed Quality Assurance. · View Herald TranscriptApr 20 2016, 2:05 PM
lancake edited Tester information (Internal use only). (Show Details)Apr 20 2016, 2:06 PM
lancake changed First occurrence (version) from 0.19431 to 0.197.42.
Restricted Application removed a project: Game Development. · View Herald TranscriptSep 19 2016, 10:27 PM
AndyP added a parent task: Unknown Object (Maniphest Task).Dec 13 2016, 8:53 PM
AndyP removed a parent task: Unknown Object (Maniphest Task).Dec 13 2016, 8:57 PM
Restricted Application added a project: GUI/HUD. · View Herald TranscriptMar 10 2017, 6:24 PM