Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Buggy defaultproperties for stripped Killing Floor 1 packages #40

Open
Shtoyan opened this issue Aug 26, 2021 · 2 comments
Open

Buggy defaultproperties for stripped Killing Floor 1 packages #40

Shtoyan opened this issue Aug 26, 2021 · 2 comments
Labels
bug enhancement T3D Text 3D Format (DefaultProperties etc)

Comments

@Shtoyan
Copy link

Shtoyan commented Aug 26, 2021

I know this is a bit difficult to fix, but it takes too much time to manually do batchexport stripped pckages just for defaultproperties blocks, then compare and copy-paste them to UE Lib exported classes. Most of the time defaultproperties are fine, but in some cases your decompiler fails to show array contents / prints wrong subobject name.

Example 1, weapon class:

 // Stripped
// Decompiled with UE Explorer.
defaultproperties
{
  FireModeClass=class'W_AK47Fire'
  PickupClass=class'W_AK47Pickup'
}

This will compile fine and run, until you crash when try to shoot, since FireModeClass is a static array and code should be.

FireModeClass(0)=class'W_AK47Fire'

Or, example 2, GUIBuyMenu / UT2k4MainPage classes :

 // Stripped
// Decompiled with UE Explorer.
defaultproperties
{
  PanelClass=/* Array type was not detected. */
}

should be:

PanelClass(0)="CsHDMut.GUI_BuyMenuTab"

And a subobject ,example 3:

 // Stripped
// Decompiled with UE Explorer.
defaultproperties
{
  begin object name=InventoryBox class=GUI_BuyMenuInvListBox
    OnCreateComponent=InternalOnCreateComponent
    WinTop=0.0708410
    WinLeft=0.0001080
    WinWidth=0.3282040
    WinHeight=0.5218560
  object end
  // Reference: GUI_BuyMenuInvListBox'GUI_BuyMenuTab.InventoryBox'
  InvSelect=InventoryBox
  begin object name=SaleBox class=GUI_BuyMenuSaleListBox
    OnCreateComponent=InternalOnCreateComponent
    WinTop=0.0643120
    WinLeft=0.6726320
    WinWidth=0.3258570
    WinHeight=0.6740390
  object end
  // Reference: GUI_BuyMenuSaleListBox'GUI_BuyMenuTab.SaleBox'
  SaleSelect=SaleBox
}

Where OnCreateComponent, SaleSelect should have names from commented section.

@EliotVU
Copy link
Owner

EliotVU commented Aug 27, 2021

Thanks for reporting this issue. Unfortunately both those issues are blocked by the lack of linking packages that are listed as "imports" within the particular package.

i.e. whether FireModeClass is an array or not cannot be determined without looking up the property in the importable packages, unless more than one element is being assigned. Although it should be possible to address this issue in certain circumstances

PanelClass Same issue, but this can be resolved manually by configuring predefined property types. Check options in UE Explorer.

OnCreateComponent Can you clarify this issue? I'm not sure what you mean by the "commented section"

@Shtoyan
Copy link
Author

Shtoyan commented Aug 29, 2021

Thanks for reporting this issue. Unfortunately both those issues are blocked by the lack of linking packages that are listed as "imports" within the particular package.

Ehh, gotcha. It adds 1-2 steps of class checking, but not a big deal.

OnCreateComponent Can you clarify this issue? I'm not sure what you mean by the "commented section"

Your decompiler prints this.

  begin object name=SaleBox class=GUI_BuyMenuSaleListBox
    OnCreateComponent=InternalOnCreateComponent
    ....
  object end
  // Reference: GUI_BuyMenuSaleListBox'GUI_BuyMenuTab.SaleBox'
  SaleSelect=SaleBox

Real code is:

Begin Object Class=GUI_BuyMenuSaleListBox Name=SaleBox
    OnCreateComponent=SaleBox.InternalOnCreateComponent
    ....
  End Object
  SaleSelect=GUI_BuyMenuSaleListBox'CsHDMut.GUI_BuyMenuTab.SaleBox'

I guess it's the same issue, so nvm.

@EliotVU EliotVU added the T3D Text 3D Format (DefaultProperties etc) label Jan 13, 2023
@EliotVU EliotVU mentioned this issue Jan 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug enhancement T3D Text 3D Format (DefaultProperties etc)
Projects
None yet
Development

No branches or pull requests

2 participants