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!
MTS has all free content, all the time. Find out how YOU can help to keep it running. Tell me how...

HoodReplace 2.3: Replace Neighborhood Terrain (Updated Jan 24, 2010)

by Mootilda Posted 31st Mar 2008 at 10:03 PM - Updated 27th Nov 2013 at 4:45 PM by Nysha
 
195 Comments / Replies (Who?) - 176 Feedback Posts, 18 Thanks Posts
Hide Thanks Posts for this thread (Show only feedback)
Page 2 of 8
Field Researcher
#26 Old 4th Apr 2008 at 6:12 AM
Quote: Originally posted by Mootilda
Can anyone confirm for me that HoodReplace works for FreeTime? The last time that I installed FreeTime on my machine, it immediately uninstalled Bon Voyage - so FreeTime is no longer on my machine. If necessary, I'll reinstall FT to test this, but I was hoping that someone had already tried it.


I have all expansions and stuff packs installed, I just tried the program and it worked perfectly. Many thanks for making the task easier and super fast, it took about 1 second to work, I had to double check to make sure it really did it!:D
Site Helper
Original Poster
#27 Old 4th Apr 2008 at 3:51 PM Last edited by Mootilda : 4th Apr 2008 at 6:54 PM.
Quote: Originally posted by CTNutmegger
I have all expansions and stuff packs installed, I just tried the program and it worked perfectly. Many thanks for making the task easier and super fast, it took about 1 second to work, I had to double check to make sure it really did it!:D
Thank you so much for testing this. I have updated the original post.
Site Helper
Original Poster
#28 Old 4th Apr 2008 at 4:21 PM Last edited by Mootilda : 5th Apr 2008 at 4:10 PM. Reason: Added title
Default Extract SC4 terrain from TS2 neighborhood
Quote: Originally posted by plasticbox
[ Extracting an SC4 file from a TS2 neighborhood package ] would be worth *trying* in any case, I think =)
Well, I tried it. Unfortunately, it looks like the SimPE DLLs do not save the SC4 file correctly, so SimCity 4 refuses to recognize them as cities.

I must admit that I was surprised. The basic file structures of the SimCity SC4 files and the Sims 2 package files appear to be identical, and SimPE (and therefore HoodReplace) are able to read, uncompress, and parse the records correctly. However, just loading and saving the SC4 file without any changes at all, using either SimPE or HoodReplace, makes the file unrecognizable to SimCity 4. Seems to point to a problem with the compression algorithm, but there doesn't seem to be any option to turn off compression.

I'll fool around with this a bit more, but I'm no longer hopeful that this is an easy feature to implement. If I can't get anything working today, I'll leave the code in-place, but disable the ability to choose SC4 files as either the source or destination.

While working on this, I've been mulling over ways to add roads to an existing neighborhood directly. This may turn out to be a more fruitful avenue of research.
Pettifogging Legalist!
retired moderator
#29 Old 4th Apr 2008 at 8:04 PM
[sc4 file extraction]

Thanks for the info, Mootilda!

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.
Not actually evil.
#30 Old 4th Apr 2008 at 10:54 PM
Default submit a SimPE bug report?
Quote: Originally posted by Mootilda
Well, I tried it. Unfortunately, it looks like the SimPE DLLs do not save the SC4 file correctly, so SimCity 4 refuses to recognize them as cities.

I must admit that I was surprised. The basic file structures of the SimCity SC4 files and the Sims 2 package files appear to be identical, and SimPE (and therefore HoodReplace) are able to read, uncompress, and parse the records correctly. However, just loading and saving the SC4 file without any changes at all, using either SimPE or HoodReplace, makes the file unrecognizable to SimCity 4. Seems to point to a problem with the compression algorithm, but there doesn't seem to be any option to turn off compression.


I would submit a bug report about this and let Quaxi or Numenor fix the SimPE dll's. Maybe in the short term they could just give us the option of disabling compression? There's lots of neat stuff that could be done if we could easily import / export SC4 files correctly. (not dissing SimPE, SimPE is lovely, all bow before Quaxi and Numenor)
Site Helper
Original Poster
#31 Old 5th Apr 2008 at 12:12 AM Last edited by Mootilda : 5th Apr 2008 at 4:11 PM. Reason: Added title
Default Extract SC4 terrain from TS2 neighborhood
Hardly a "bug", unless SimPE is supposed to handle SC4 files. More like "not backwards compatible". EA probably changed the format of the package files slightly between SC4 and TS2. I'm not even *sure* that it's the compression. Could also be an old (unhandled) version of the header or indexes or ...

Anyway, I appreciate your point and will see about submitting a ... feature request: to be able to write SC4 files. With any luck, it won't be too much work. Update: request submitted.

So, I'm curious: what other neat stuff would you do with exported SC4 files?
Not actually evil.
#32 Old 5th Apr 2008 at 1:39 AM
Quote: Originally posted by Mootilda
Anyway, I appreciate your point and will see about submitting a ... feature request: to be able to write SC4 files. With any luck, it won't be too much work. Update: request submitted.

So, I'm curious: what other neat stuff would you do with exported SC4 files?


You're right, feature request is much more accurate.

One thing I would like to do but can't because Sims2 won't let me is change the elevation at lot boundaries. (maybe there's a cheat and I just don't know it?) For example, if I make a river or stream on a lot in Sims2, I want the streambed to have correct low elevation at lot boundaries. Especially if I have two neighboring lots and the stream is supposed to flow through both. If the exported SC4 file captures enough detail, I might be able to lower the elevation at lot edges? Unless Sims2 specifically forbids that or would "auto-correct" it or something? I know I could put in riverbeds in SC4 before I play the neighborhood, but I don't always know what I'll build ahead of time or where, and whether I want rivers there or not, so it would be nice to be able to add rivers later. Maybe my sims decided to dig the Panama canal, you know? Or maybe they dammed a river and now there's a big reservoir lake?

I may want to level mountains as my neighborhood changes over time. Maybe the community has grown and they want to build a highway or strip mine? (naughty eco-destroying sims!) I like how Sims2 families grow and change over time, and would like the terrain and neighborhood to do the same.

Same goes for roads. Larger sim population -> new roads. Or maybe a giant robot has rampaged through the city and destroyed some roads? SC4 has some fun natural and unnatural disasters I may want to inflict on my poor unsuspecting sims in Sims2, and many of those destroy roads.

I would like to be able to export some of the premade neighborhoods and/or subneighborhoods from S2 and play them as cities in SC4. Zone them residential or business/commercial to reflect my home / community lots, and see if I can make a viable SC4 city. Don't know if most folks would think that's neat, but I'd enjoy it.

I don't have FT installed because it is beyond buggy and the FT patch borks it even more, based on what I read in the Sims2 forums. So SC4 <--> Sims2 is the only way I could modify neighborhood elevation.
Site Helper
Original Poster
#33 Old 5th Apr 2008 at 1:55 AM Last edited by Mootilda : 5th Apr 2008 at 4:29 PM.
Default Changing Lot Boundaries
Quote: Originally posted by CatOfEvilGenius
One thing I would like to do but can't because Sims2 won't let me is change the elevation at lot boundaries. (maybe there's a cheat and I just don't know it?) For example, if I make a river or stream on a lot in Sims2, I want the streambed to have correct low elevation at lot boundaries. Especially if I have two neighboring lots and the stream is supposed to flow through both. If the exported SC4 file captures enough detail, I might be able to lower the elevation at lot edges? Unless Sims2 specifically forbids that or would "auto-correct" it or something?
Thanks for the list.

This particular item (changing the elevation at lot boundaries) won't be fixed by changing the neighborhood terrain. The TS2 rule is that the neighborhood is changed temporarily to match the lot boundaries. (Although the roads seem to be changed permanently, thus the issue with terracing.) Very annoying. It seems especially silly given that the game forbids building on the outer 2 tiles of a lot: why disallow building on the edges if the edges can never change?

However, one of the things that I have on the back burner for the LotExpander is the ability to get the expanded lot terrain from the neighborhood terrain. With the work that I've been doing on HoodReplace, and the work that I've already done on the LotExpander, I might be able to come up with a quick utility which will fix the lot boundaries by setting them to the current (permanent) neighborhood terrain levels. Let me see what I can do.
Site Helper
Original Poster
#34 Old 5th Apr 2008 at 4:13 PM Last edited by Mootilda : 5th Apr 2008 at 6:25 PM.
Default Extract SC4 terrain from TS2 neighborhood
Update about the SimPE feature to write SC4 files:

Definitely not seen as a "bug", since SimPE is not seen as a tool for reading and writing SC4 files. Although it would be nice, I suspect that this isn't going to be "fixed". That doesn't mean that HoodReplace can't write out SC4 files, it just means that either:

1) I have to find SC4-specific tools for modifying an SC4 file. It's possible that I can use the DLLs from DataGen. Or, ...

2) I have to rewrite some part of the SimPE DLL functionality. Looks like I can get the uncompressed data for each record, so this might just come down to writing: header, index table, hole record, etc. Or, ...

3) I have to fix the SimPE source code myself... I believe that this is open source and available to be modded.

Not a completely intimidating list, just more work than I was hoping for.

I also asked about the ability to write uncompressed files and am waiting for an answer.
Sockpuppet
#35 Old 6th Apr 2008 at 11:03 AM Last edited by Kabuto : 6th Apr 2008 at 11:12 AM.
If you want to open SC4 files, you need to use DatGen because the package contents are different of the TS2 ones



About custom neighborhood ID, in order to get first my custom neighborhoods, I use C010 instead of N004, it seems the game support it but your program doesn't see it like SimPE, so I select the neighborhood package but no suburbs are listed just the main is shown.

Can you do something please ?
Site Helper
Original Poster
#36 Old 6th Apr 2008 at 4:18 PM Last edited by Mootilda : 8th Apr 2008 at 7:15 PM. Reason: Added title
Default Extract SC4 terrain from TS2 neighborhood
Quote: Originally posted by Kabuto
If you want to open SC4 files, you need to use DatGen because the package contents are different of the TS2 ones
Thanks for the pointer to DataGen. Do you have the pointer to the download page, where it lists the requirements, etc?

The file formats are identical between SC4 and TS2; Maxis seems to use this file format for all of their games. SimPE has no problems reading an SC4 file, parsing the individual records, and decompressing the data, which means that opening the SC4 files with SimPE isn't a problem. Since HoodReplace doesn't use SimPE to determine the internal format of the individual records, it doesn't matter that SimPE doesn't actually know the internal formats for any of the SC4 record types.

However, when the files are saved, it seems likely that SimPE is updating something to a newer version which The Sims 2 uses, but SimCity 4 doesn't recognize: either the compression algorithm or the contents of some portion of the file, like the header information or the index table.

I agree that changing HoodReplace to use the DLLs from DataGen to do the mid-level file access for SC4 files may be an option.

Quote: Originally posted by Kabuto
About custom neighborhood ID, in order to get first my custom neighborhoods, I use C010 instead of N004, it seems the game support it but your program doesn't see it like SimPE, so I select the neighborhood package but no suburbs are listed just the main is shown.

Can you do something please ?
Yes, I just noticed yesterday that the subneighborhoods weren't included; this will be fixed in the next version. Until then, just use the Browse button to find your neighborhood.
Sockpuppet
#37 Old 6th Apr 2008 at 8:27 PM Last edited by Kabuto : 6th Apr 2008 at 9:07 PM.
Quote: Originally posted by Mootilda
Thanks for the pointer to DataGen. Do you have the pointer to the download page, where it lists the requirements, etc?


Sadly the official Datgen site was shutdown but the archive of the site is there
http://web.archive.org/web/20060510...ww.datgen.info/


Quote: Originally posted by Mootilda
Yes, I just noticed yesterday that the subneighborhoods weren't included; this will be fixed in the next version. Until then, just use the Browse button to find your neighborhood.


Ok, thanks !
Site Helper
Original Poster
#38 Old 6th Apr 2008 at 10:56 PM Last edited by Mootilda : 8th Apr 2008 at 7:16 PM. Reason: Ask for pointer to source code, if available.
Default Extract SC4 terrain from TS2 neighborhood
Quote: Originally posted by Kabuto
Sadly the official Datgen site was shutdown but the archive of the site is there
http://web.archive.org/web/20060510...ww.datgen.info/
Ah, no wonder I couldn't find it... Thanks for the link. This should help.

I don't suppose that you've got a link to the source code? Was it open source?
Site Helper
Original Poster
#39 Old 8th Apr 2008 at 7:59 PM Last edited by Mootilda : 8th Apr 2008 at 8:53 PM.
Default Update on Progress
Just an update on my progress:

Changing Lot Boundaries:
- I was wrong about the neighborhood terrain being changed temporarily by moving a lot - looks like it changes permanently. This means that it won't be possible to change a lot boundary to match the neighborhood terrain unless the lot is moved or resized or unless the neighborhood terrain is changed.

Fixing Elevation of Structures to Match Terrain:
- Added code to change the elevation of trees so that they match the new terrain. No obvious problems.

- Added code to change the elevation of roads so that they match the new terrain. There's an obvious problem with disconnects at the edge of each segment of road. It appears that the road should flatten the neighborhood terrain from one side of the road to the other, although roads can slope in the direction of travel. Still needs work; although the problem can sometimes be fixed in game by moving lots around.

- Added code to change the elevation of bridges so that they match the new terrain. Along with the road slope problem above, there are additional problems:
  • Bridges will not be in the correct location for a different terrain. So, should the bridges stay where they are, or should bridges just be considered an extension of the normal roads and created / deleted as appropriate to allow a road to cross water? Does TS2 have different types of bridges?
    .
  • Need an algorithm to determine the "correct" height of a bridge. For example, the bridge in Pleasantview is quite high.
Extracting SC4 file:
- DataGen requires .Net 1.1. It doesn't seem reasonable for HoodReplace to require both .Net 1.1 and .Net 2.0, so I'm still exploring options.

Still to be done:
- Fix the issues with road and bridge elevation.

- Add code to change the elevation of decorations and lots so that they match the new terrain.

- Adjust the lot boundaries so that they match the new terrain.

- Explore strategies for extracting SC4 files.

Interesting Tidbit:
- When a road is floating in the air, the cars drive on the ground underneath it.
- When a road tunnels through a hill, the cars drive on the hill above the road.
Screenshots
Not actually evil.
#40 Old 8th Apr 2008 at 8:39 PM
changing lot boundaries
Does that mean if I package a lot, remove the lot, then put the lot back, the lot boundaries will match the terrain? Thank you so much for investigating this, I appreciate it.

tunnel roads
This could actually be useful "feature". If I *delibaretaly* make the roads run underground, and paint the terrain above to look like dirt roads, I could have dirt roads without using a global road appearance mod. I think this means I could also have BOTH regular roads and "dirt roads" in the same neighborhood. That would be rather neat! My "town" sims could have paved roads and the sims that live in the "county" could have dirt roads, all in the same neighborhood. If anyone tries this, post your pictures please!
Site Helper
Original Poster
#41 Old 8th Apr 2008 at 9:00 PM
Quote: Originally posted by CatOfEvilGenius
changing lot boundaries
Does that mean if I package a lot, remove the lot, then put the lot back, the lot boundaries will match the terrain?
No. It means that, even if I write a program to change the lot boundaries to match the neighborhood terrain, nothing will happen because the lot has already modified the neighborhood terrain to match itself. This doesn't make sense as a separate program, only as an added feature within an existing program, such as the LotExpander or HoodReplace.

Quote: Originally posted by CatOfEvilGenius
tunnel roads
This could actually be useful "feature". If I *delibaretaly* make the roads run underground, and paint the terrain above to look like dirt roads, I could have dirt roads without using a global road appearance mod. I think this means I could also have BOTH regular roads and "dirt roads" in the same neighborhood.
But, what will happen to the lots that are no longer associated with the underground road (because of the difference in elevation)?
Not actually evil.
#42 Old 8th Apr 2008 at 9:27 PM
Quote: Originally posted by Mootilda
But, what will happen to the lots that are no longer associated with the underground road (because of the difference in elevation)?


I didn't know the lots would no longer be associated with the road. I figured if the cars knew the road was there, the lots would too. Ah well, would have been neat. Thanks for letting me know before I messed up my neighborhood!
Sockpuppet
#43 Old 8th Apr 2008 at 9:33 PM
Quote: Originally posted by Mootilda
Extracting SC4 file:
- DataGen requires .Net 1.1. It doesn't seem reasonable for HoodReplace to require both .Net 1.1 and .Net 2.0, so I'm still exploring options.



You can see if you find something at Simtropolis.com forum but sadly the programs are all old.
Site Helper
Original Poster
#44 Old 9th Apr 2008 at 3:54 AM
Quote: Originally posted by CatOfEvilGenius
I didn't know the lots would no longer be associated with the road. I figured if the cars knew the road was there, the lots would too. Ah well, would have been neat. Thanks for letting me know before I messed up my neighborhood!
Backup your game and try it. I honestly have no idea what will happen... it may work perfectly.
Mad Poster
#45 Old 14th Apr 2008 at 11:31 AM
I had been looking for something-anything-to change the neighborhood terrain in Pleasantview; had been reading the thread at MATY which involved SimPE (and it was technical beyond my abilities)-then I found this download.
It took about 3 changes for it to happen, but it worked like a dream, and now the neighborhood terrain is larger, there are fewer trees and more room for expansion for more houses(thanks to another new map).
Thank you for this-although I had to go and find the houses (they were "buried) after using it, it was everything I needed and then some. It's a great addition to the modding community and it is definitely something that needed to be done. Great work!
Site Helper
Original Poster
#46 Old 15th Apr 2008 at 1:20 PM Last edited by Mootilda : 17th Apr 2008 at 10:46 PM.
I'm working on changing the elevation of the existing lots so that they are closer to the actual neighborhood terrain.

On another note: I just thought that the following conversation at MATY might be interesting to people here:
http://www.moreawesomethanyou.com/s....html#msg330170

Quote:
Quote from: J. M. Pescado on Today at 07:22:27
Does something supremely bad happen if you replace terrain without the roads, like roads tunnelling into the dirt or floating in the air?
My answer:
Yes, right now the various neighborhood elements maintain their assigned elevation. If you mix and match from two different terrains, you can get elements which float over the terrain, or which are under the ground. However, it hasn't been my experience that this is "supremely bad"... the game just doesn't seem to care.

For now, the selective replacement ability of HoodReplace is really meant for people who are fixing up an existing terrain, such as adding roads to Strangetown, rather than for people who are replacing the entire terrain with something very different.

If you want to replace the entire terrain with something different, then you should probably replace all of the terrain elements at the same time: roads, bridges, tree, and decorations... Still, your lots may appear to be floating in the air, or underground, just as they would when using SimPE to replace the neighborhood terrain. Not a problem, just pick them up and move them back where they belong.

I am currently enhancing HoodReplace to change the elevation of all of these elements, including the lots, so that they will match the new neighborhood terrain, even if it has changed dramatically.
Test Subject
#47 Old 27th Apr 2008 at 9:04 AM Last edited by quix : 27th Apr 2008 at 9:13 AM. Reason: spelling
Just tested this out in The Sims Life Stories - replaced the Free Play neighbourhood with the game-provided Pleasantview terrain, which is great since both the Free Play and the Riley's Story neighbourhoods were the same (what were they thinking?!?). It was a success. I'm going to try this in reverse and use the Four Corners terrain in one of my Free Time hoods - will let you know how that works.

Thanks so much for this utility! It makes it so much more fun to be able to resculpt a neighbourhood when necessary, and it works so quickly and simply!
Lab Assistant
#48 Old 27th Apr 2008 at 11:05 PM
Mootilda, the MATY thread is too old to post in and I had a problem with the link to the Pleasantville template. I downloaded it okey, and followed the instructions and it seemed to work great, till I opened it up to create a new hood, and it said that it was too big. I deleted everything (thinking that I screwed up) but thought to check the downloaded file and it also said it was too big. I works for others--did I have to do something special that I don't know about?

[SIZE=3]
"I asked for a car, I got a computer. How's that for being born under a bad sign?"

~Ferris Bueller's Day Off, 1986
[/SIZE]
Site Helper
Original Poster
#49 Old 28th Apr 2008 at 11:44 AM
I attached Melly_Sim's Pleasantville terrain to the original post. Try this and let me know what happens.
Lab Assistant
#50 Old 29th Apr 2008 at 10:56 PM
Quote: Originally posted by Mootilda
I attached Melly_Sim's Pleasantville terrain to the original post. Try this and let me know what happens.
I went ahead and used the file that Maxis made because I figured that I was changing it so much that it didn't matter if the roads were the same. Thank you so much for this. It was so easy and even easier doing another one. I was able to add roads to Strangetown and change it from the desert to grass( I always wanted to be able to do that). Thank you!

[SIZE=3]
"I asked for a car, I got a computer. How's that for being born under a bad sign?"

~Ferris Bueller's Day Off, 1986
[/SIZE]
Page 2 of 8