Kazuo 0 Posted August 4, 2022 (edited) I'm working on modifying TSLPatcher to give it command line options and stripping away the GUI. This is intended to be used for mod tools so it can run TSLPatcher in the background. The repo can be found here: https://github.com/woodske/TSLPatcher I'm running into an issue when the tool attempts to perform the GFF tasks. I get this error message: Can't locate object method "get_field_ix_by_label" via package "Bioware::GFF::Field" at lib/site/TSLPatcher/FunctionsCLI.pm line 3804. I am using the K1 Galaxy Map Fix Pack mod to test: Perl command: perl TSLPatcherCLI.pl "C:\swkotor" "C:\KotorMods\K1 Galaxy Map Fix Pack" 0 Any ideas of what the issue could be? Some background on this project, I am new to Perl and there were no build or execution instructions in the original project so if anyone has some knowledge about TSLPatcher, maybe I'm missing something in my setup listed in the repo's README. Edited August 4, 2022 by Kazuo Quote Share this post Link to post Share on other sites
JCarter426 1,215 Posted August 4, 2022 This is just a guess because I don't know Perl either, likely far less than you, but it looks to me like you called the GFF Field method get_field_ix_by_label on a GFF Struct rather than a GFF Field: if(ref($struct->{Fields}) ne 'Bioware::GFF::Field') { print "\npath: $path"; $ix = $struct->get_field_ix_by_label($path); # print "ix: $ix\n"; if(defined($ix) == 0) { return (0, ''); } $old_value = $struct->{Fields}[$ix]{Value}; $struct->{Fields}[$ix]{Value} = $value; } line 3801 Maybe you need get a Field object from the struct first? It looks like it has a list of Field objects. Also, interesting project! Funny you should show up already working on a project like this. I just pestered @Fair Strides about the possibility of adding something like this the other day. Quote Share this post Link to post Share on other sites
Kazuo 0 Posted August 5, 2022 Thank you! It looks like you were right, I changed it below and I'm getting the same logs as the original TSLPatcher. $ix = $struct->{Value}->get_field_ix_by_label($path); Do you know if there is a tool out there to see these files in a human readable format? Just want to make sure it's modifying the files in the way they're intended to be. I started doing this cause I was too lazy to install all these mods by hand, so naturally it turned into a 3+ month long project. Quote Share this post Link to post Share on other sites
JCarter426 1,215 Posted August 5, 2022 You can use gff2xml from xoreos to convert the GFF files to XML. 1 Quote Share this post Link to post Share on other sites
Kazuo 0 Posted August 16, 2022 Thank you, those tools helped a lot. I think it's in a good state right now, just need to do some testing. If anyone wants to help out it would be much appreciated. You can download the exe here: https://github.com/woodske/TSLPatcher/releases/tag/testing or follow the readme to build locally. The usage is like below: (No install option): TSLPatcherCLI.exe <swkotorDirectory> <modDirectory> TSLPatcherCLI.exe "C:\Program Files (x86)\Steam\steamapps\common\swkotor" "C:\KotorMods\K1_Community_Patch_v1.9.2" (With install option): TSLPatcherCLI.exe <swkotorDirectory> <modDirectory> <installOption> TSLPatcherCLI.exe "C:\Program Files (x86)\Steam\steamapps\common\swkotor" "C:\Mods\K1 Galaxy Map Fix Pack" 0 Quote Share this post Link to post Share on other sites