Small issue
911reg opened this issue · comments
Hey there Eliot, first of all, thanks again for the great app! This issue isn't really related to a bug or a problem with the app, it's more like a question, if solved it might be useful for someone else as well.
So basically, i've been trying to extract *.uc files from a file (this one specifically)
The problem i'm having is the following:
This is what the defaultproperties look like:
when they should look like this:
So basically it's showing up as "L2EffectEmitter" instead of "L2EffectEmiter'L2EffectEmiter0'
I'm 100% doing something wrong here, do you perhaps know how to solve this?
Here's the Array Definition i'm using: Package.Class.PreshotAction:ObjectProperty
Also, when i see the script inside UE Explorer, the reference is there, but it isn't applied to the ShotAction line for whatever reason
// Reference: L2EffectEmitter'l2_14207_skill.L2EffectEmitter53'
ShotAction(0)=L2EffectEmitter53
PD: i can fix this by hand, but sadly, i'd have to do that manually for over 4000 files.
Are you trying to re-compile the code? If so, either references should be fine, the compiler generally just looks up the object by the name's hash.
Nonetheless I'll label this issue as an enhancement request to output a qualified reference instead.
Strange, normally the compiler understands such references, maybe it's different for L2.
I will address this issue in the next release by always outputting a fully qualified reference.
Nice! I just ended up making a small tool to "fix" the files for me, it worked as a temporary measure xD
i'll leave it here just in case
#include <iostream>
#include <fstream>
#include <dirent.h>
#include <string>
using namespace std;
int main() {
DIR* dir;
struct dirent* ent;
if ((dir = opendir(".")) != NULL) {
while ((ent = readdir(dir)) != NULL) {
string fileName = ent->d_name;
if (fileName.find(".uc") != string::npos) {
// found a .uc file
cout << "Editing file: " << fileName << endl;
ifstream inputFile(fileName);
string line;
string editedFile;
while (getline(inputFile, line)) {
if (line.find("Action(") != string::npos) {
// found a line with "Action("
int equalPos = line.find("=");
if (equalPos != string::npos) {
// found the "=" symbol on the same line as "Action("
line.replace(equalPos, 1, "=L2EffectEmitter'");
line += "'";
}
}
editedFile += line + "\n";
}
inputFile.close();
// overwrite the .uc file with the edited content
ofstream outputFile(fileName);
outputFile << editedFile;
outputFile.close();
}
}
closedir(dir);
}
else {
cout << "Error opening directory" << endl;
}
return 0;
}