View Issue Details

IDProjectCategoryLast Update
0020069AI War 2GUIAug 30, 2018 8:04 pm
ReporterOvalcircle Assigned ToChris_McElligottPark  
Status resolvedResolutionfixed 
Product Version0.763 Supersized Ship Caps 
Fixed in Version0.764 Mercenary Surge 
Summary0020069: Raid starship shown ship cap is wrong
DescriptionIt shows a cap of 1 but it should be 3 for Mark 3. See screenshots and save for a better explanation
TagsNo tags attached.

Activities

Ovalcircle

Aug 30, 2018 4:18 pm

reporter  

20180830161648_1.jpg (215,699 bytes)   
20180830161648_1.jpg (215,699 bytes)   
20180830161642_1.jpg (239,885 bytes)   
20180830161642_1.jpg (239,885 bytes)   

RocketAssistedPuffin

Aug 30, 2018 6:17 pm

reporter   ~0048624

Checked ingame - confirmed. Even fleetships are doing this: Mark 2 V-Wings claim a cap of 60, then (108 remaining in the galaxy).

Assault Starships do the same thing as Raids, in that you get one ship at MK1, one ship at MK2, then three ships at MK3. Their XML looks fine.

BadgerBadger

Aug 30, 2018 6:49 pm

manager   ~0048627

Last edited: Aug 30, 2018 6:50 pm

Hey Chris

So the UI code says
                            buffer.Add( "\n" ).Add( shipOrSquad ).Add( " Cap:" ).Add( " " ).Add( ( localPlayerFaction.GetGlobalTotalCap( relatedEntityData, 0 ) ).ToString( "#,##0" ) ); <=== I don't think we should pass in 0 here , I think it needs to be -1

but GetGlobalTotalCap says
        public Int32 GetGlobalTotalCap( GameEntityTypeData EntityType, int PretendIsMarkLevelIfGreaterThanOrEqualToZero )
        {
.....
            if ( PretendIsMarkLevelIfGreaterThanOrEqualToZero >= 0 ) <==== but we always pass in 0 in the hover entity code, so we always check the 0th element, aka mark level 1.
                markStats = EntityType.ForMark[PretendIsMarkLevelIfGreaterThanOrEqualToZero];
            else
                markStats = EntityType.MarkStatsFor( this );

I suspect that the right fix is to just have the UI code pass in -1 for this code path. I don't have time to check this though. I think the code change required is is in Window_InGameHoverEntityInfo.cs, which means that anyone who wants to compile things can test this.

Chris_McElligottPark

Aug 30, 2018 8:04 pm

administrator   ~0048629

Thanks!

* Fixed the bug where in the tooltips the cap of ships was being shown wrong.

Issue History

Date Modified Username Field Change
Aug 30, 2018 4:18 pm Ovalcircle New Issue
Aug 30, 2018 4:18 pm Ovalcircle File Added: 20180830161648_1.jpg
Aug 30, 2018 4:18 pm Ovalcircle File Added: 20180830161642_1.jpg
Aug 30, 2018 4:18 pm Ovalcircle File Added: Raid starship Wrong cap.save
Aug 30, 2018 4:18 pm Ovalcircle File Added: Raid starship Wrong cap.savemet
Aug 30, 2018 4:19 pm Ovalcircle Description Updated
Aug 30, 2018 6:17 pm RocketAssistedPuffin Note Added: 0048624
Aug 30, 2018 6:49 pm BadgerBadger Note Added: 0048627
Aug 30, 2018 6:50 pm BadgerBadger Note Edited: 0048627
Aug 30, 2018 6:50 pm BadgerBadger Note Edited: 0048627
Aug 30, 2018 8:04 pm Chris_McElligottPark Assigned To => Chris_McElligottPark
Aug 30, 2018 8:04 pm Chris_McElligottPark Status new => resolved
Aug 30, 2018 8:04 pm Chris_McElligottPark Resolution open => fixed
Aug 30, 2018 8:04 pm Chris_McElligottPark Fixed in Version => 0.764 Mercenary Surge
Aug 30, 2018 8:04 pm Chris_McElligottPark Note Added: 0048629