Replies: 2423 (Who?), Viewed: 453370 times.
Page 7 of 97
Site Helper
Original Poster
#151 Old 3rd Oct 2007 at 3:54 AM Last edited by Mootilda : 3rd Oct 2007 at 6:11 PM. Reason: Remove test version download
Here is a version of the LotExpander with my changes to date. Please let me know whether this solves your problems.

WARNING to everyone:

This is a TEST version of the LotExpander. Use at your own risk.

Here is a link to the current supported version of this tool: http://www.modthesims2.com/showthread.php?p=1747180

Changes from Version 1.2.5:
1) Add a Browse button to allow the user to select neighborhoods which are not in the standard EA Games\Sims 2 directory.
2) Fix a potential crash when using the "Unlock All Tiles" functionality.
3) Do not move the lot in the neighborhood when expanding.
4) Fix problem with disappearing custom paintings.
5) Attempt to run when the game installation has been modified. Note that this does not yet allow the LotExpander to be used with the AnyGame / BaseGame Starter.

Update:
Removed the TEST version. Look for the new Release version, coming soon.
Advertisement
Site Helper
Original Poster
#152 Old 3rd Oct 2007 at 4:07 AM Last edited by Mootilda : 3rd Oct 2007 at 5:13 AM. Reason: Corrected spelling error
Quote:
Originally Posted by aelflaed
The directory is there. Same error. I could try to uninstall the starter, although I'm not sure if I would lose anything I need to keep - have to do some checking beforehand. I don't have any other computer to install things on. Anyway, I really want it to work for basegame, so everyone can use the results.

No, don't uninstall the starter. I'm sure that we can figure this one out. Originally, I was thinking that your problem was the directory on the disk. Now, I'm beginning to suspect that the basegame starter changed your registry and the LotExpander expects the standard Sims 2 registry keys.

I'll check what the LotExpander is doing with the registry and see whether I can get rid of any assumption that the game is actually installed.

I know that this is a terrible way to figure out what's wrong, but I'm sure that we can do it, if you can just bear with me.
Alchemist
#153 Old 3rd Oct 2007 at 4:33 AM
Quote:
Originally Posted by Mootilda
(...) I'm beginning to suspect that the basegame starter changed your registry and the LotExpander expects the standard Sims 2 registry key.

I'll check what the LotExpander is doing with the registry and see whether I can get rid of any assumption that the game is actually installed.

I know that this is a terrible way to figure out what's wrong, but I'm sure that we can do it, if you can just bear with me.


I figure you're doing most of the bearing. I'm just bumbling!

Is there some question that should be asked of Numenor, if you think it's the Starter altering things? I never know what to ask, being very clueless about computer stuff really.

There is a newer version of the Starter, but I haven't changed over yet as I don't have BV and am in the middle of this process.

I've been fiddling with another lot in the meantime, a 1 x 2 (I think, it's confusing - the lot goes two squares back from the road, rather than alongside it). I had no trouble swapping the road, and am fiddling with the portals - the service stop portal is right on the edge of the lot, and the pizza boy won't get his pizza out of the boot - presumably this is why Andi had a negative value there, but I can't work out what to put in to fix it now. However, it's also interesting that this lot also has an unbuildable section where the road used to be - which makes it function like a 1 x 1, but the rear of the lot is still counted in the Y values, and is visible in the neighbourhood view.

I'm attaching a picture of the 1 x 2 lot, showing all the portals in use! (and the pizza chappie standing there...)

I could go and ask something on the Starter Pro thread, if I knew what to ask - willing but clueless, as always. Let me know if there is any way I can help, other than keeping coming back here to check for the latest update.

thanks.
Screenshots
Site Helper
Original Poster
#154 Old 3rd Oct 2007 at 4:57 AM Last edited by Mootilda : 3rd Oct 2007 at 5:39 AM. Reason: Fixed wording a bit.
Quote:
Originally Posted by aelflaed
I figure you're doing most of the bearing. I'm just bumbling!

OK, I believe that I have handled the situation where the registry has been modified after installation. Please download once more and let me know what happens.

I've updated the TEST version; download it from here:
http://www.modthesims2.com/showthread.php?p=1785958
Site Helper
Original Poster
#155 Old 3rd Oct 2007 at 5:02 AM Last edited by Mootilda : 3rd Oct 2007 at 5:48 AM.
Quote:
Originally Posted by aelflaed
Obviously I should have started this discussion two months ago, when I didn't have any expansions!

Ah, but two months ago, I didn't know C# or .Net and had never done any modding or even looked at the LotExpander or SimPE code.

So, I'm not sure that I would have been any help at all.

It's really hard for me to believe how much I've learned in the last month and a bit.

Quote:
Originally Posted by aelflaed
I've been fiddling with another lot in the meantime, a 1 x 2 (I think, it's confusing - the lot goes two squares back from the road, rather than alongside it).

Yes, I find this whole thing confusing as well. The main problem is the way that Maxis allows rotation of the lot in two completely different ways: one inside the neighborhood (Orientation) and the other inside the lot itself (U11). There doesn't seem to be any consistent terminology for describing the lot size; 1 x 2 can mean either 2 from side to side along the road, or 2 from the front yard to the back yard. And then there's the problem that every lot has at least one additional row or column for the road. No wonder you find it confusing!

Quote:
Originally Posted by aelflaed
I had no trouble swapping the road, and am fiddling with the portals - the service stop portal is right on the edge of the lot, and the pizza boy won't get his pizza out of the boot - presumably this is why Andi had a negative value there, but I can't work out what to put in to fix it now.

The Start Portals should be near the edges of the lot and the Stop Portals should be near the center.

Quote:
Originally Posted by aelflaed
However, it's also interesting that this lot also has an unbuildable section where the road used to be - which makes it function like a 1 x 1, but the rear of the lot is still counted in the Y values, and is visible in the neighbourhood view.

I continue to hope that the LotExpander can fix this with the "Unlock All Tiles" functionality - if we can ever get it working with the BaseGame Starter, that is.
Alchemist
#156 Old 3rd Oct 2007 at 6:01 AM
Quote:
Originally Posted by Mootilda
OK, I believe that I have handled the situation where the registry has been modified after installation. Please download once more and let me know what happens.

I've updated the TEST version; download it from here:
http://www.modthesims2.com/showthread.php?p=1785958


Sorry, no change. I deleted the previous versions, both 125 and 126, and tried un-raring the new test program both straight into the folder (where everything goes when I download it), and into its own subfolder.



I don't understand about the Orientation button (as distinct from the U11 etc). I changed it once to see what would happen to the lot, but couldn't tell what had altered. So many mysteries.
Site Helper
Original Poster
#157 Old 3rd Oct 2007 at 6:14 AM
Quote:
Originally Posted by aelflaed
Sorry, no change. I deleted the previous versions, both 125 and 126, and tried un-raring the new test program both straight into the folder (where everything goes when I download it), and into its own subfolder.

OK, I'm stumped. Leave this with me for a while... I need to look at what the LotExpander is doing between the first and second screen, other than accessing the Sims 2 directory and registry. There must be something else in that section of the code which is failure prone.

I can't help but think that this might be related to the BaseGame Starter. I suppose that you could ask whether anyone on that thread had any idea what might be wrong. Perhaps there is someone who has managed to get the LotExpander working with the starter?
Alchemist
#158 Old 3rd Oct 2007 at 6:27 AM
Quote:
Originally Posted by Mootilda
OK, I'm stumped. (...)I can't help but think that this might be related to the BaseGame Starter. I suppose that you could ask whether anyone on that thread had any idea what might be wrong. Perhaps there is someone who has managed to get the LotExpander working with the starter?


Okay, I'll go bug someone else for a while...

By the way, the service stop portal won't move - the car appears (and halts) right on the edge of the lot, no matter what value I put on it. I've now tried (3.5, 24), (7.5, 24), (-9.5, 24), and (12.5, 24). This wouldn't matter for anything but the pizza, I think, unless one of the other services gets stuff from the boot too. Must be related to Andi's minus value, surely? But it's beyond me.

I'll go jump up and down on the Starter Pro thread for a change. Thanks for all your patience.
Mad Poster
#159 Old 3rd Oct 2007 at 6:35 AM Last edited by niol : 3rd Oct 2007 at 6:53 AM.
In the past few days, I played the base game families hard to learn that come-home sims (say, when the at work command still on), pedestrian sims and NPCs after entering the lot, they all have to walk to the mailbox before they try to sort to an entry of the house thru the game routing logics. When non-residential sims leave a lot, they have to move to the 5-6 tile from the edge before they can "leave" the world regardless of the fact that they might have been at the edge already.
So, ther're at least 2 ways for sims to leave the lots. One is thru the vehicle and one is thru the pedestrian. The residential sims don't leave thru the pedestrian but only by specified side of the road while the non (esp. the drives of the vehicles) can do both sides of the roads.

For the vehicle direction, the start and stop seem to mean the points where the vehicles are placed. As for the direction, if this is related to the lot orientation like the driveway orientation, then we've got both ways to head to the preset point(s). But, I'm unsure if they're really co-related. It's only that 1 more way to try things out. If they're co-related and solved, lot builders of driveway and garages can have easier time to do their arts.

Rugs are also an interesting objects coz Maxis decided its graphical components are stuck to the floor grids and they can rotate.

Yes, the Base game Starter is meant to alter the registry infos for every use to ensure the chosen game version to load from what I read about it.
So, a relative variable setting for it is necessary.
One horse disagreer of the Apocalypse
#160 Old 3rd Oct 2007 at 8:28 AM Last edited by Inge Jones : 3rd Oct 2007 at 8:52 AM.
The portals are directional. If you use my portal revealer, you will see arrows on the placeholders. The start and stop names only describe destinations for the vehicle to do parts of its animation. They need to be aligned to the direction of travel, and the other portal must be in a straight line from there; the driver cannot navigate between two points by steering or anything :D

Later: I confirm that the latest version preserves the custom painting textures.

I have a little (I hope it's little) request to make. In the lot picker, please can you put the package name next to the lot name? I usually can't remember WTH silly name I gave my lots, especially ones I made just for testing, and the only way I can tell which lot I am meant to be expanding is to look in the Lots folder and see which one had the latest modified time on it. I would have to open it in SimPE to find out what its name is.

"You can do refraction by raymarching through the depth buffer" (c. Reddeyfish 2017)
Alchemist
#161 Old 3rd Oct 2007 at 12:12 PM
Quote:
Originally Posted by Inge Jones
The portals are directional. If you use my portal revealer, you will see arrows on the placeholders. The start and stop names only describe destinations for the vehicle to do parts of its animation. They need to be aligned to the direction of travel, and the other portal must be in a straight line from there; the driver cannot navigate between two points by steering or anything (...)


I have a little idea - the direction on my second rotated lot is actually correct as per Maxis, it's just that the car and service portals have swapped. This is different to the first lot, as far as I can remember, where both direction and side of road were changed.

So, maybe reversing the values will fix that pizza boy. I'll try it.

What portal revealer, Inge? It would be nice to find something that I could just turn around in-game...
One horse disagreer of the Apocalypse
#162 Old 3rd Oct 2007 at 12:54 PM
Quote:
Originally Posted by aelflaed
What portal revealer, Inge? It would be nice to find something that I could just turn around in-game...


I posted it in this thread, in message #122

"You can do refraction by raymarching through the depth buffer" (c. Reddeyfish 2017)
Alchemist
#163 Old 3rd Oct 2007 at 1:19 PM
Default portal revealer
Quote:
Originally Posted by Inge Jones
I posted it in this thread, in message #122


Aha. Thanks.

Is it likely to work for basegame? I probably overlooked it before, because it's in among BV-related discussion. Also, does it just show the direction, or does it allow you to change it? I already know which way they are going on these lots.

General update on my portal issues - I have fixed the service cars stopping too close to the edge of the lot - reversing the values works a treat. New values are:
Service Start (3.5,24) for a 2x1 lot, or (3.5,14) for 1x1.
Service Stop (9.5,24) for a 2x1, or (9.5, 14) for the 1x1 lot.

Much better. Now they can order pizza. And both lots have the cars travelling in the Maxis directions, just with the service and car portals on non-Maxis sides of the road (i.e., swapped).

Cheers everyone - sleeptime here.
One horse disagreer of the Apocalypse
#164 Old 3rd Oct 2007 at 2:04 PM
Dunno if it will work with basegame, I do everything in the latest EP and some of the resource formats might require that.

When the portals are revealed they are also made selectable and movable and rotatable etc etc.

"You can do refraction by raymarching through the depth buffer" (c. Reddeyfish 2017)
Mad Poster
#165 Old 3rd Oct 2007 at 2:30 PM
So, the "directional problem" of the garage and driveway can be solved like this. :D

And BTW, what made the lot lose the txtr referencing in the portrait case? Since this is fixed, and I assume the "error" is found.

What's more? Now, we can dig deeper to track how Maxis lock the edge and by what means that will stabilise walls at the lot edge.
BTW, how about graphically silence the expanded terrain for rowhouse lots to avoid the graphical glitch in the over-sized lot overlapping strategy? (so, adding a feature to the lotexpander to overwrite those reference to be null before and after use for common known fixed sizes.)
Or else?
Anyone that works can save further works unless it's meant to dig much deeper.
One horse disagreer of the Apocalypse
#166 Old 3rd Oct 2007 at 2:48 PM
Niol the remaining problem for a graphically repressed overlap, is that the sims may still be seen to walk through next door's house walls, so you are forced to also overlap fencing. Although I tend to be amused by these funny little things :D

"You can do refraction by raymarching through the depth buffer" (c. Reddeyfish 2017)
Mad Poster
#167 Old 3rd Oct 2007 at 3:05 PM Last edited by niol : 3rd Oct 2007 at 3:22 PM.
May use invisible fences with maywalkover = 0x00000000 to block your trespassing sims.. :D
I'm gonna have to update the fences I've made, too.

Surely, can also use inviisble object to block sims access .

Suddenly, thinking of if modded invisible tiles can do the job.
moonlight_muse
Invisible Floor Tile
http://www.modthesims2.com/showthread.php?t=166311
Site Helper
Original Poster
#168 Old 3rd Oct 2007 at 3:19 PM
Quote:
Originally Posted by niol
And BTW, what made the lot lose the txtr referencing in the portrait case? Since this is fixed, and I assume the "error" is found.

Andi's original code was deleting the entire txtr structure; ie, every txtr instance. I suppose that this worked fine, as long as nothing important was stored in the txtr records.

One of the newer EPs started storing custom pictures in these records, but I didn't realize that there was a problem, since I never expanded a lot with custom pictures. More on my testing strategy later.

I've been trying to understand Andi's LotExpander code as the need arises - sorting out each record only when there's a problem with the record. Since I didn't know that there was a problem with the txtr records, I never really looked at what the txtr logic was doing, or tried to understand why. More on my development strategy later.

After some experiementation, I changed this to delete only 3 instances of the txtr record: roofs_txtr, terrain_txtr, and terrainLmap_txtr. I'm not sure that it's actually necessary to delete all three of these to ensure that the game regenerates the information associated with lot size, but these three at least seem to be sufficient.

The primary problem that I had with this record was the lack of a flag to specify the type of records stored: roofs, walls, pictures, ... I could only find one way to distinguish between the different types of data: the file name. In general, I don't believe that it is a good programming practice to rely on string values (because of internationalization), so I decided that I should probably be deleting specific record instances, rather than deleting based on the type of data stored in the record.

One alternative would have been to delete only known txtr instances, but there are probably an "infinite" number of these: walls_0_txtr, walls_1_txtr, ... That lead me to try to find a "minimal" set of records required for the task.

Basically, I changed the default behavior for unknown txtr record instances from "delete" to "keep". This should also prevent future problems, should EA decide to store additional information in the txtr record.
Site Helper
Original Poster
#169 Old 3rd Oct 2007 at 3:59 PM
Default Development and Testing Strategies
I thought that it might be useful, for anyone considering modifying the LotExpander code, if I talked a bit about my development and testing strategies.

I have had one major problem working on Andi's code: it's a big "black box". Andi obviously understood what was stored within the lot records, but the format of the records isn't documented in any way.

There are very few comments in the code (and they're in German, which I don't understand). The Sims2Wiki often has little or no information, and the information that's there can be out-of-date. So, I'm left to rely on the source code to describe the record formats.

Unfortunately, Andi's code isn't written in a way which reveals the record structure... for example, instead of reading the "block version number", the code just reads and throws away 4 bytes. Please note, this is not meant to be a criticism of Andi, it takes a lot of time and effort to write code which reveals both the known and unknown structure of records. Andi did a wonderful job with this tool and I really appreciate his contribution.

However, when a problem arrises with one of the records, the source code doesn't help in any way. So, as I manage to understand something about a particular record, I have been trying to "document" my understanding within the source code... to make the LotExpander more "translucent", if you will. When I get a break from the LotExpander, I hope to take this information and update the Sims2Wiki.

Even if I don't currently need a particular piece of data within a record, I've been trying to document what that data is. I've been trying to code to allow for future EPs (the custom picture fix is an example of this). I've also been putting a lot of debug code into the LotExpander, to ensure that the programmer is warned when a new record instance or a new version of a known record instance is encountered. And, I've been "translating" the code into English. I hope that, over time, this will make the LotExpander easier to maintain and to upgrade for future EPs.

Once the LotExpander code has been changed, testing becomes an issue. Since I'm only one person with limited time, I've been trying to automate some of the testing.

My strategy until now has been to try to ensure that things continue to work exactly as they did. So, I added a "testing" mode to the code, which will attempt to expand every known lot in every direction. This gives me good code coverage. It also allows me to do a byte-by-byte comparison of the lot files before and after each change.

For the most part, my test cases have been the Maxis-made lots that come with the default neighborhoods and subneighborhoods. I have also been testing the Maxis-made lots which appear in the lot catalog. These two sets of lots allow testing of many of the new features in most of the EPs and SPs.

Believe it or not, the fix for the custom paintings is the first time that the LotExpander actually changes the format of an expanded lot so that it is different from an expanded lot created using Andi's last version. Previous code changes have only affected lots created with EPs and SPs which were not supported by Andi's code.
Mad Poster
#170 Old 3rd Oct 2007 at 4:03 PM Last edited by niol : 3rd Oct 2007 at 4:19 PM.
Thanks goodness, the essential txtr files to delete can be located.
Gonna try this in that failed lot.
:D

Thanks for the explanation BTW.

Site Helper
Original Poster
#171 Old 3rd Oct 2007 at 4:05 PM
Quote:
Originally Posted by niol
Yes, the Base game Starter is meant to alter the registry infos for every use to ensure the chosen game version to load from what I read about it.
So, a relative variable setting for it is necessary.

I don't have the BaseGame Starter installed, so it's a bit difficult for me to test the changes that I've been making, which depend upon the directory structure and registry keys.

If anyone else has the BaseGame Starter installed, it would be wonderful if you could try using the LotExpander on a lot in one of the starter's directories. If you are able to use the LotExpander, then aelflaed's configuration becomes more suspect. If, on the other hand, you get the same error... well I guess that I'll just have to install the starter and see if I can figure out what's happening.

Feedback is greatly appreciated.
Site Helper
Original Poster
#172 Old 3rd Oct 2007 at 4:13 PM
Quote:
Originally Posted by Inge Jones
The portals are directional. If you use my portal revealer, you will see arrows on the placeholders. The start and stop names only describe destinations for the vehicle to do parts of its animation. They need to be aligned to the direction of travel, and the other portal must be in a straight line from there; the driver cannot navigate between two points by steering or anything :D

Is the portal direction the only factor? Or, does the road actually have a direction associated with it. If so, is there any way to reveal the "direction of travel" at particular points on the road?

Quote:
Later: I confirm that the latest version preserves the custom painting textures.

Thank you. I'd like to release this version, but I was really hoping to solve aelflaed's problem first... perhaps if someone could confirm that the directory and registry logic are OK (by testing with the BaseGame Starter), then it's worth releasing anyway.

Quote:
I have a little (I hope it's little) request to make. In the lot picker, please can you put the package name next to the lot name? I usually can't remember WTH silly name I gave my lots, especially ones I made just for testing, and the only way I can tell which lot I am meant to be expanding is to look in the Lots folder and see which one had the latest modified time on it. I would have to open it in SimPE to find out what its name is.

This shouldn't be a difficult change. Let me look into adding an "Advanced" button which revels the package names.


{Added:}
If the portals are directional, can you tell us how to set the direction?
One horse disagreer of the Apocalypse
#173 Old 3rd Oct 2007 at 4:16 PM
How much of a priority is it to get this working with the basegame starter? Don't people normally use that just for testing their hacks? Would you be doing serious building under BS or AS?

"You can do refraction by raymarching through the depth buffer" (c. Reddeyfish 2017)
Mad Poster
#174 Old 3rd Oct 2007 at 4:20 PM Last edited by niol : 3rd Oct 2007 at 4:38 PM.
lol, may try the translation engines.
http://translation2.paralink.com/
http://dictionary.reference.com/translate/
http://www.freetranslation.com/

Lol, may ask some German-speaker members here as a few of them had shown up these threads before. May take a note on them...
Say,
plasticbox
http://www.modthesims2.com/member.php?u=178282
If I've remembered correctly, he has shown up to be willing to help the language translation from Deutsch to English.


added:

Mootilda,

As for the registry infos affected by the BGS or AGS, just go and bother Numenor with a nice "virtually literal " kiss... :D

Inge,

For a lot-builder who want most of the made lots to be compatible for all game versions, building it in a base game config. is necessary. Now Aeflaed wants to make importable 10x20 lot templates of different lighting directions.

Although I'll keep a base game copy in one of my HDs, I still wanna run various game versions from those fuller game verions in other HDs .
Site Helper
Original Poster
#175 Old 3rd Oct 2007 at 4:30 PM
Quote:
Originally Posted by Inge Jones
How much of a priority is it to get this working with the basegame starter? Don't people normally use that just for testing their hacks? Would you be doing serious building under BS or AS?

I'd really like to see this working. I've been thinking about installing the BS or AS on my machine, to help with my LotExpander work. Right now, I can't open the neighborhood packages in SimPE because I have Bon Voyage installed, which makes modding the files much more difficult. I suppose that I should just buckle down and install it and work out any problems.

For the rotated 1x1 lots, this is also imperative. I have a philosophy that lots which will be shared should always have the minimum necessary EP /SP requirements. The AnyGame Starter seems ideal for this.

However, your point is well taken. Let me do some additional testing on the latest version and I'll release it before working on the AnyGame / BaseGame Starter any more.
Page 7 of 97
Back to top