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!
Test Subject
Original Poster
#1 Old 20th Jun 2010 at 4:55 PM
Sims 2 Train Station
I'm in the process of creating a set of modded objects that will allow sims to travel between lots on a train. Basically, a sim can buy a ticket, and a train will appear on a 'railway line' object, which they can get on to. The train then acts like a taxi and takes them to another community lot, where they can get off. All of the animations and BHAVs seem okay, but I've come across a couple of problems.

Firstly, I need to create a BHAV that looks at each community lot in the neighbourhood in turn, and returns 'true' if there is an object of a given GUID on that lot, and 'false' if there isn't. It would be useful if it could also set that object as the stack object. I know this can be done because when a sim calls another sim on a phone, it gets rejected if they don't own a phone. However, I don't know how to do this and would appreciate any suggestions (I need this functionality because I want to offer sims a choice of destination, but only allow them to go to lots that also have the 'railway line' object).

Secondly, I need to know how I can actually transport a sim from one lot to another (e.g. how the taxi works), and be able to use an image of a train instead of the taxi on the loading screen.

And finally, If I find out how to do all of the above, would I be able to check for and then go to community lots in other neighbourhoods (e.g. send a sim from a lot in Pleasantview to a lot in Veronaville and back)? Sort of like a holiday - but without Bon Voyage.

If anybody has any suggestions or think they might be able to help me, it would be appreciated.

Thanks
Advertisement
Sesquipedalian Pisciform
retired moderator
#2 Old 20th Jun 2010 at 7:02 PM
Hi there - gosh, this takes me back. I had almost exactly the same idea and tried and tried for weeks - with no success. Like you, I hit a roadblock (or a trainblock) on the actual moving from one lot to another. I can't remember all the details, but I suggest that you look at the taxi object and the functions within it. IIRC the phone is in fact a red herring......

My BIGGEST problem was getting the lot to open when the sim got there - it opened, but was inactive as there was no active sim ( I was trying to build the Narnia wardrobe to go to a residential lot - dont ask... ). I had a look at how the lot files worked - and that is the problem - I think you are trying to edit the core.

I wish you the best of luck, and I hope Mog sees your thread.

Lee

More downloads by Leesester, BoilingOil and others at Leefish.nl | My Stuff at Leefish.nl | LeeFish RSS | Sims4 News Blog | TumblinLeefish
Site Helper
#3 Old 20th Jun 2010 at 8:51 PM
Quote: Originally posted by PlyrJames791
Firstly, I need to create a BHAV that looks at each community lot in the neighbourhood in turn, and returns 'true' if there is an object of a given GUID on that lot, and 'false' if there isn't. It would be useful if it could also set that object as the stack object. I know this can be done because when a sim calls another sim on a phone, it gets rejected if they don't own a phone.
I assume that the "has phone" flag in the family information is used for the phone. Other flags are "has baby" and "has computer". There would, of course, be no corresponding "lot has a train track" flag.

Quote: Originally posted by PlyrJames791
Secondly, I need to know how I can actually transport a sim from one lot to another (e.g. how the taxi works), and be able to use an image of a train instead of the taxi on the loading screen.
I believe that this is coded inside of the executable and therefore unchangeable. Instead, you'd have to have your train added as one of the standard travel mechanisms. For example, have your train replace the taxi.

Quote: Originally posted by PlyrJames791
And finally, If I find out how to do all of the above, would I be able to check for and then go to community lots in other neighbourhoods (e.g. send a sim from a lot in Pleasantview to a lot in Veronaville and back)? Sort of like a holiday - but without Bon Voyage.
No, I don't believe that this would be possible. Each neighborhood contains information about the sims in that neighborhood. If you tried to move a sim from one neighborhood to another, you'd likely run into a lot of problems with unavailable references.
Test Subject
Original Poster
#4 Old 20th Jun 2010 at 9:13 PM
Thanks guys, I'll take a look at the taxi BHAVs and see if I can come up with anything.
Test Subject
Original Poster
#5 Old 20th Jun 2010 at 10:40 PM
Okay, so after searching through the taxi behaviours, I came across a reference to GUID 0xAD522EB2, which is a Maxis object called "Controller - Travel". I can see that it is what I need in order to solve my lot transportation problem. However, I have absolutely no idea how to implement this controller. If anybody has seen this before or knows how to use it, please let me know.
Miss BHAVing
retired moderator
#6 Old 24th Jun 2010 at 10:46 PM
Take a look at the "Controller - Travel" object and see what it's BHAVs do - best way to understand any object. You can think of controller as invisible objects, you can see them or click on them but they are there in the lot (looking at the lot dump at the end of an error log will show them). You have the GUID so you can search in SimPE for code that makes up the object.

Mostly I fix Gameplay annoyances. I take requests and have made a few Requested mods already. Visit me on MTS Yearbook
My other projects: British High Street, Postal System for the Sims and Better Parking for Sims
Test Subject
Original Poster
#7 Old 25th Jun 2010 at 8:16 PM
Thanks, Mog. I'm confused as to why the LotTransition semiglobals contain pie menu string and function files, when the travel controller seems to be the only object that uses them. I don't understand, if it's invisible and has no mesh, what is there to click on?? Any ideas??
Retired Duck
retired moderator
#8 Old 27th Jun 2010 at 1:13 PM
Pie menu options can be called on one object via another object using the "Push Object Interaction" command. For example, picking up a grocery basket pushes an interaction with the fridge onto the sim's queue to "put away food". In the case of transportation, a sim might make a phone call using a public phone, and that pushes a controller interaction into the Sim's queue.
Sockpuppet
#9 Old 14th Jul 2010 at 12:37 AM
I was thinking to do a Metro mod, but it was simpler than your project.

It was an animated metro with walkby portal inside, so the sims could go anywhere.

If the community lot got a metro they leave it
If no metro, they walk.
Test Subject
#10 Old 1st Jan 2011 at 5:29 PM
Quote: Originally posted by PlyrJames791
I'm in the process of creating a set of modded objects that will allow sims to travel between lots on a train. Basically, a sim can buy a ticket, and a train will appear on a 'railway line' object, which they can get on to. The train then acts like a taxi and takes them to another community lot, where they can get off. All of the animations and BHAVs seem okay, but I've come across a couple of problems.

Firstly, I need to create a BHAV that looks at each community lot in the neighbourhood in turn, and returns 'true' if there is an object of a given GUID on that lot, and 'false' if there isn't. It would be useful if it could also set that object as the stack object. I know this can be done because when a sim calls another sim on a phone, it gets rejected if they don't own a phone. However, I don't know how to do this and would appreciate any suggestions (I need this functionality because I want to offer sims a choice of destination, but only allow them to go to lots that also have the 'railway line' object).

Secondly, I need to know how I can actually transport a sim from one lot to another (e.g. how the taxi works), and be able to use an image of a train instead of the taxi on the loading screen.

And finally, If I find out how to do all of the above, would I be able to check for and then go to community lots in other neighbourhoods (e.g. send a sim from a lot in Pleasantview to a lot in Veronaville and back)? Sort of like a holiday - but without Bon Voyage.

If anybody has any suggestions or think they might be able to help me, it would be appreciated.

Thanks



One question:

Is it going to be a steam train or a electric one like the Vancouver SkyTrain?
Back to top