LesboIsBesto Posted March 23, 2021 Posted March 23, 2021 Ages ago I was linked to a page on Baidu from this site for a mod that merges an assload of Mihail's monster mods & ofc I downloaded it as I have no clue how to merge them myself & Mihail is more interested in making even more mods than ever merging them for people. Ofc getting it from Baidu meant its in Chinese, which while annoying I decided to ignore it. Though it has renamed alot of vanilla assets & Im going through my mods to start cleaning them out, I wanted to tackle this mod but Im running into issues. First as you can see in the pic below, the names aren't even Chinese like I expected, they're gibberish. They were boxes in game & I figured it was just cuz Im using an english game & thats all but this is just ridiculous. What's worse is I cant even edit the names myself. xEdit wont let me touch them even tho I have edited names for vanilla & mod assets for Skyrim, Oblivion, & Fallout 4 in the past so idk why it won't let me do it to these. CK crashes upon trying to load the plugins & I cannot use xTranslator either, I already tried & it wouldnt translate anything because its all in gibberish instead of Chinese like it should've been. When I set it to go to Chinese, it actually shows it in Chinese but it keeps the gibberish for English. I only want to rename the actor's names, item names, & any vanilla stuff this mod touches, etc. so they appear normal ingame. No need to touch anything I normally cant see like scripts or effects. I already know how to identify each monster the pack adds from the originals, i just need xEdit to let me actually rename them so I dont have to try merging the originals myself.
jmf890 Posted March 23, 2021 Posted March 23, 2021 Assuming those plugins are not corrupted, you can try this. Spoiler unit NameToEditorID; function IsAscii(s: string): boolean; var i: cardinal; c: string; begin for i := 1 to Length(s) do begin c := Copy(s, i, 1); if (c < ' ') or (c > '~') then begin result := false; exit; end; end; result := true; end; function Initialize: integer; begin result := 0; end; function Process(e: IInterface): integer; var edid: string; begin result := 0; if not ElementExists(e, 'EDID') then exit; if not ElementExists(e, 'FULL') then exit; if IsAscii(GetElementEditValues(e, 'FULL')) then exit; edid := GetElementEditValues(e, 'EDID'); if edid <> '' then SetElementEditValues(e, 'FULL', edid); end; function Finalize: integer; begin result := 0; end; end. Apply this script to all records with non-ASCII characters in their names. The script will set their names to be the same as their editor IDs.
LesboIsBesto Posted March 23, 2021 Author Posted March 23, 2021 22 minutes ago, jmf890 said: Assuming those plugins are not corrupted, you can try this. Hide contents unit NameToEditorID; function IsAscii(s: string): boolean; var i: cardinal; c: string; begin for i := 1 to Length(s) do begin c := Copy(s, i, 1); if (c < ' ') or (c > '~') then begin result := false; exit; end; end; result := true; end; function Initialize: integer; begin result := 0; end; function Process(e: IInterface): integer; var edid: string; begin result := 0; if not ElementExists(e, 'EDID') then exit; if not ElementExists(e, 'FULL') then exit; if IsAscii(GetElementEditValues(e, 'FULL')) then exit; edid := GetElementEditValues(e, 'EDID'); if edid <> '' then SetElementEditValues(e, 'FULL', edid); end; function Finalize: integer; begin result := 0; end; end. Apply this script to all records with non-ASCII characters in their names. The script will set their names to be the same as their editor IDs. ive never tried that before, do I completely overwrite the other stuff in that window with your code?
jmf890 Posted March 23, 2021 Posted March 23, 2021 Either overwrite what's in <new script> with that and answer no to saving, or put that into a file at xEdit\Edit Scripts and name it something.pas.
LesboIsBesto Posted March 23, 2021 Author Posted March 23, 2021 4 minutes ago, jmf890 said: Either overwrite what's in <new script> with that and answer no to saving, or put that into a file at xEdit\Edit Scripts and name it something.pas. o shiet it worked, thnx man :3
LesboIsBesto Posted March 23, 2021 Author Posted March 23, 2021 8 minutes ago, jmf890 said: Either overwrite what's in <new script> with that and answer no to saving, or put that into a file at xEdit\Edit Scripts and name it something.pas. wait actually another thing. It works but a bit too well. Characters are getting names like "DLC1Serana" for example because of that editor ID (yeah I realize thats the point but its kind of a band-aid scenario). I need to be able to edit them still to remove that extra gunk.
jmf890 Posted March 23, 2021 Posted March 23, 2021 What names exactly do you want? I assumed you just needed identifiable names in ascii so you can re-write them to whatever you want.
LesboIsBesto Posted March 23, 2021 Author Posted March 23, 2021 17 minutes ago, jmf890 said: What names exactly do you want? I assumed you just needed identifiable names in ascii so you can re-write them to whatever you want. well like in my original picture, vanilla characters should have their actual names used by Skyrim or the DLC's like "Serana" & "Valerica". As for the characters added by the plugins, i need them to have normal names. Example: mihailwerebat should be "Werebat" while mihailnekker2 would be "Nekker". Not sure if a script can account for those variations in the editor IDs so unless there's a way to force xEdit to let me edit their names again or a way to get CK to open the plugins without crashing, not sure how to fix this. Below is what turns up from the modded actors after the script is used.
jmf890 Posted March 23, 2021 Posted March 23, 2021 If it's an override and its master record has the correct name, you can use this to rename to its previous name. Spoiler unit NameToEditorID; function IsAscii(s: string): boolean; var i: cardinal; c: string; begin for i := 1 to Length(s) do begin c := Copy(s, i, 1); if (c < ' ') or (c > '~') then begin result := false; exit; end; end; result := true; end; function Initialize: integer; begin result := 0; end; function Process(e: IInterface): integer; var masterRecord: IwbMainRecord; begin result := 0; if not ElementExists(e, 'EDID') then exit; if not ElementExists(e, 'FULL') then exit; if IsAscii(GetElementEditValues(e, 'FULL')) then exit; if not IsMaster(e) then begin masterRecord := Master(e); if Assigned(masterRecord) and ElementExists(masterRecord, 'FULL') then begin SetElementEditValues(e, 'FULL', GetElementEditValues(masterRecord, 'FULL')); exit; end; end; SetElementEditValues(e, 'FULL', GetElementEditValues(e, 'EDID')); end; function Finalize: integer; begin result := 0; end; end. If it's not an override and it doesn't have a proper name to it, you would need a list of valid names for it to compare against the editor id. Don't expect me or anyone else to do that for you, you are better off manually renaming the ones that got renamed to their editor ids by selecting them and pressing F2.
LesboIsBesto Posted March 23, 2021 Author Posted March 23, 2021 10 minutes ago, jmf890 said: If it's an override and its master record has the correct name, you can use this to rename to its previous name. Reveal hidden contents unit NameToEditorID; function IsAscii(s: string): boolean; var i: cardinal; c: string; begin for i := 1 to Length(s) do begin c := Copy(s, i, 1); if (c < ' ') or (c > '~') then begin result := false; exit; end; end; result := true; end; function Initialize: integer; begin result := 0; end; function Process(e: IInterface): integer; var masterRecord: IwbMainRecord; begin result := 0; if not ElementExists(e, 'EDID') then exit; if not ElementExists(e, 'FULL') then exit; if IsAscii(GetElementEditValues(e, 'FULL')) then exit; if not IsMaster(e) then begin masterRecord := Master(e); if Assigned(masterRecord) and ElementExists(masterRecord, 'FULL') then begin SetElementEditValues(e, 'FULL', GetElementEditValues(masterRecord, 'FULL')); exit; end; end; SetElementEditValues(e, 'FULL', GetElementEditValues(e, 'EDID')); end; function Finalize: integer; begin result := 0; end; end. If it's not an override and it doesn't have a proper name to it, you would need a list of valid names for it to compare against the editor id. Don't expect me or anyone else to do that for you, you are better off manually renaming the ones that got renamed to their editor ids by selecting them and pressing F2. Yeah the vanilla & DLC characters still have their original names, they're just being overwritten by the plugins. Had to restart xEdit to rename them with the new script & it worked so at least I can fix vanilla assets now, thanks for that! :3 As for the assets this mod introduces, I can't rename them at all. Pressing F2 just takes me to change its formID. It wont let me change their display name in either the left section or the quoted name in the right section.
jmf890 Posted March 23, 2021 Posted March 23, 2021 You need to scroll down on the right pane until you find the entry "FULL - Name", select the one from the plugin you want to rename and press F2.
LesboIsBesto Posted March 23, 2021 Author Posted March 23, 2021 16 minutes ago, jmf890 said: You need to scroll down on the right pane until you find the entry "FULL - Name", select the one from the plugin you want to rename and press F2. b r u h cant tell ya how retarded I feel right now, like deadass >.< Thanks for pointin it out lmao, can finally fix all dis shiet at last, really appreciate ya man.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.