Menu

Can't import weapon to backpack

Help
e n
2022-10-26
2022-11-03
  • e n

    e n - 2022-10-26

    Hi,

    I'm trying to edit a borderlands 1 goty edition save game.

    I can open my save game in willowtree, but when I go to the weapons tab and import a file or from my clipboard I get an error message ''imported data is invalid. not inserted'' .

    The code i'm trying to import is:

    gd_itemgrades.Weapons.ItemGrade_Weapon_RepeaterPistol

    gd_manufacturers.Manufacturers.Dahl

    gd_weap_repeater_pistol.A_Weapon.WeaponType_repeater_pistol

    gd_weap_repeater_pistol.Body.body1

    gd_weap_repeater_pistol.Grip.grip4_Dahl

    gd_weap_repeater_pistol.mag.mag2a

    gd_weap_repeater_pistol.Barrel.barrel0

    gd_weap_repeater_pistol.Sight.sight5

    None

    gd_weap_repeater_pistol.Action.action1

    gd_weap_repeater_pistol.acc.acc5_Hornet_Dahl_Corrosive

    gd_weap_shared_materialparts.ManufacturerMaterials.Material_Dahl_1

    gd_weap_repeater_pistol.Prefix.Prefix_Nasty

    gd_weap_repeater_pistol.Title.TitleM_Dahl1_Hornet

    0

    2

    2

    28

    what am I doing wrong?

     
  • matt911

    matt911 - 2022-11-03

    I looked into this problem and the issue is that WT# was designed on a Windows-based computer and Windows uses a carriage return and a linefeed at the end of a text line, whereas POSIX compliant operating systems line UNIX, BSD, and Linux only use a carriage return at the end of a text line.

    It appears that the Chromium-based web browsers such as Brave Browser, Microsoft Edge, and Google Chrome may use only a carriage return at the end of a text line and do not use both a carriage return and a linefeed in the standard Windows fashion because Chromium is designed to work on some POSIX-compliant operating systems as well as Windows. Since the current code for parsing the clipboard is expecting CR/LF at the end of a line and not just CR, it doesn't detect any line breaks and gives an error because it finds only one continuous line of text when it expects a lot more.

    I will have to rewrite the code to allow it to work POSIX-style CR only line terminations. Most Windows text editors should use CR/LF because that is the Windows standard. More advanced editors like Notepad++ would have a configuration option so you could specify CR/LF endings or CR endings. I don't think any Windows text editor would by default use only CR endings, but all Linux text editors would and the Brave web browser on Windows also appears to. if I copy from that to the clipboard WT# will say imported data is not valid.

    As a workaround for now you can copy the text from your web browser or other application that doesn't use CR/LF line terminations to the clipboard, then open Notepad and paste it there. Notepad is Windows compliant not POSIX-compliant so it will convert the line terminations to CR/LF. After you paste the text into Notepad, reselect the text in Notepad and copy it back to the clipboard from Notepad and that can be imporrted into WT#.. After you have copied it to the clipboard, then on the weapons tab select Import->From Clipboard.

     
  • matt911

    matt911 - 2022-11-03

    I changed the code to allow any type of line ending that ends in a linefeed, a carriage return, or any combination. Blank lines will also be ignored now and no longer cause import failures. Version 2.4.0.312 has been published and should be available as the default download shortly.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.