Hi there! You are currently browsing as a guest. Why not create an account? Then you get less ads, can thank creators, post feedback, keep a list of your favourites, and more!
Quick Reply
Search this Thread
Field Researcher
Original Poster
#1 Old 9th Aug 2015 at 8:29 PM
Default Trying to edit a resource from s4pe with Notepad++, only seeing "null" and "file doesn't exist"
Please let me know if there's somewhere else I should post about s4pe. (The thing on GitHub links to a Simlogical thread for questions!) I suspect it could also be something I need to do with Notepad++, but I couldn't find anything by Googling; not sure I was even using the right terms to search.

I took a screenshot of a random one so you can see what I'm talking about. I'm using Notepad++ as the external text editor, and this happens when I use the menu option to edit a resource in the text editor. I get a notification that "the file doesn't exist anymore," referring to the resource I'm trying to edit, in some temporary folder. Then if I select Yes to keep the supposedly non-existing file in the editor, I see it full of "null" as in the picture and impossible to edit. This happens no matter what kind of resource I'm trying to edit, and it happens in resources from all packages.

Does anyone one what I'm doing wrong here?

(A while back I actually saw another post here with the same problem, and I asked her about it but she was never able to resolve that particular issue)
Screenshots

My Simblr is FakeHouses|RealAwesome
Check out my Sim re-creations of 1920s kit homes:
The Shadow Lawn ||| The Plaza ||| The Trenton
Advertisement
Pettifogging Legalist!
retired moderator
#2 Old 9th Aug 2015 at 9:00 PM
What kind of resource are tying to edit / what is it that you ultimately want to acheive? The thread you are linking to is about editing stuff in a hex editor -- I think Notepad++ has a plugin for that, but out of the box I don't think it can edit hexadecimal files. Do you have that plugin?

What I normally do when I want to edit files externally is rightclick > Export to File, then edit that file, then rightclick > Replace and select the edited version.

Stuff for TS2 · TS3 · TS4 | Please do not PM me with technical questions – we have Create forums for that.

In the kingdom of the blind, do as the Romans do.
Field Researcher
Original Poster
#3 Old 9th Aug 2015 at 11:11 PM
Actually I was going to try to put your wood countertops onto some other counters. I did get the hex editor plugin for Notepad++ but it shows me that "null" stuff regardless.

What program are you using to edit files externally?

My Simblr is FakeHouses|RealAwesome
Check out my Sim re-creations of 1920s kit homes:
The Shadow Lawn ||| The Plaza ||| The Trenton
Pettifogging Legalist!
retired moderator
#4 Old 10th Aug 2015 at 12:38 AM Last edited by plasticbox : 10th Aug 2015 at 1:07 AM.
Ah OK. Afraid I don't know much about that Notepad++ plugin, I barely know that it exists XD

There's two hex editors I use more or less regularly, HxD and HexEdit. HexEdit I like better for search-and-replace stuff because it has an "All Open Files" search/replace (handy when you don't want to go "yes .. yes .. yes" 45 times =P); OTOH the paste/overwrite stuff (when you want to change something manually) can be very counter-intuitive sometimes .. for copying hex values you need to go Edit > Copy As > Hex Text; I don't think there's preferences where you can go "plz just copy hex (you are a hex editor, remember?) unless I tell you otherwise", so for that kind of thing I rather use HxD.

Also, if you have a high res monitor you may find HexEdit a bit annoying as well -- you need to View > Font > HugeSize in every file that you actually want to read (it seems to think that every monitor on the planet has 96ppi). But that is less of an issue when all you do is batch search/replace.


But I just checked what the matter might be with that Notepad++ plugin (turns out I actually have it installed, I just never use it) -- when opening a .MLOD I initially also got that "NUL"lified view, but when I go Plugins > HexEditor > View in Hex *after* the file is already open, it actually shows a hex view. Maybe that is what was missing? See screenshot!


Also, for this kind of edit, be aware that instance IDs and other units in TS4 are big endian (01 02 03 04) whereas in the hexadecimal files they are little endian (04 03 02 01). So when you try to find an instance 0x 00 00 00 00 00 01 02 03 in a hex file, you need to search for 03 02 01 00 00 00 00 00 (and also replace with 07 06 05 00 00 00 00 00 if you want it to point at 00 00 00 00 00 05 06 07 instead). There's oodles of online converters that do this kind of conversion (like http://www.scadacore.com/field-appl...e-hex-converter ) , but I don't really know a simple one that *just* converts between the endiannesses =/.
Screenshots

Stuff for TS2 · TS3 · TS4 | Please do not PM me with technical questions – we have Create forums for that.

In the kingdom of the blind, do as the Romans do.
Field Researcher
Original Poster
#5 Old 10th Aug 2015 at 3:23 AM
Ah, thanks so much for the info—and for your other message as well!

Quote: Originally posted by plasticbox
But I just checked what the matter might be with that Notepad++ plugin (turns out I actually have it installed, I just never use it) -- when opening a .MLOD I initially also got that "NUL"lified view, but when I go Plugins > HexEditor > View in Hex *after* the file is already open, it actually shows a hex view. Maybe that is what was missing? See screenshot!


Doh. Yes, that was it

Thanks again, I really don't know what I'm doing but it's always fun to learn. I will go bang on this and see if something interesting happens!

My Simblr is FakeHouses|RealAwesome
Check out my Sim re-creations of 1920s kit homes:
The Shadow Lawn ||| The Plaza ||| The Trenton
Back to top