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 1st May 2022 at 12:59 PM
Default Dog swimming routing
I'm trying to see if I can make pets swim in oceans/ponds, and was going to do it by altering the DoggySwimHere interaction that's supposed to let dogs swim in pools, but actually it seems like DoggySwimHere doesn't work even in pools (sounds like a patch broke it?) - the dog just route fails at the pool's edge. The debugging messages I inserted say the first attempt to route fails with plan result "FailedBecauseNoDestinationSpecified", and the second succeeds but the dog route fails anyway. Is this something anyone else (maybe @echoweaver, I know you were also interested in this?) has had any luck looking into?
Advertisement
Inventor
#2 Old 1st May 2022 at 3:41 PM
I was working on this too. First I wanted to get cats swimming in pools. I'd also like to make it possible for pets to drown rather than be teleported.

In my tests, a small dog did swim in my pool, but I seem to recall there was a trick to it... like you had to direct it to jump into the pool, which is a different interaction. You could only use DoggySwimHere once the pet was already in the pool.

The swimming code was horrific when I tried to dig through it. That in itself led me to set that project aside for a while.

Echo Weaver's Simblr: http://echoweaver.tumblr.com/
A portrait in stubbornness - Playing the same legacy since 2009
Sample a Brave Legacy: http://sims3sample.illation.net
Field Researcher
Original Poster
#3 Old 1st May 2022 at 3:54 PM
Horrific is right :/ The routing code is a nightmare to read.

I'll fire up the game again and see if I can get a dog into the pool the way you're describing, thanks! If that works maybe I'll try to figure out if there's a PoolPortalObject/PoolPortalComponent getting associated with the route, there must be a way to check that somehow.
Inventor
#4 Old 1st May 2022 at 4:39 PM
The interaction is DoggyGetInPool in the code. I don't have my game open at the moment. I was thinking about returning to this project, so I'm happy to help.

Echo Weaver's Simblr: http://echoweaver.tumblr.com/
A portrait in stubbornness - Playing the same legacy since 2009
Sample a Brave Legacy: http://sims3sample.illation.net
Field Researcher
Original Poster
#5 Old 1st May 2022 at 8:31 PM
That would be great, I'd love to know what you've learned! I'm actually still stuck at the first part, my clone of the DoggyGetInPool interaction (nothing changed except that DisallowUserDirected is false in the ITUN) isn't showing up in the game - did you have to alter it somehow to get it to work?
Inventor
#6 Old 2nd May 2022 at 1:55 AM
Huh. I didn't do anything with the ITUN, and I'm sure I directed my test dog to do it. I'll go look and report back.

Echo Weaver's Simblr: http://echoweaver.tumblr.com/
A portrait in stubbornness - Playing the same legacy since 2009
Sample a Brave Legacy: http://sims3sample.illation.net
Inventor
#7 Old 2nd May 2022 at 3:37 PM
Hmm. I added a pool to my pets testing lot. When I clicked the pool water with my dogs active, I got the interaction, "Doggy Swim in Pool." This did work, and the dogs (large and small) jumped in with a splash.

The option to swim around inside the pool also appears as, "Doggy Swim in Pool." In the code, these are clearly different interactions, so they either have the same STBL or there's something going on to decide which one to execute. Maybe that was why the ITUN you looked at had DoggyGetInPool disallowed for user directed?

The route-fail at pool edge is what I had when I was trying to make a cat interaction. My current theory is that this was related to my handling of animations, but I could be totally wrong.

Echo Weaver's Simblr: http://echoweaver.tumblr.com/
A portrait in stubbornness - Playing the same legacy since 2009
Sample a Brave Legacy: http://sims3sample.illation.net
Field Researcher
Original Poster
#8 Old 7th May 2022 at 3:29 PM Last edited by lizcandor : 7th May 2022 at 6:03 PM.
Finally got time to test this again and my dogs still route fail even with the original "Doggy Swim in Pool" interaction, so weird. Are we on different patch levels, perhaps? I'm on 1.69. If that's not it I'll try pools in different worlds (so far I've been using Armiel's Builder's Island) in case that matters, different lots, and with different objects in them (I've tried ladder only, diving board only, and nothing at all).

I'll also go back to digging through the routing code this weekend and update if I learn anything useful! Maybe solving this for dogs in my game will reveal something about making it work for cats, somehow.

[Edit: I tried the Appaloosa Plains public pool with the premade dog Walter Blackburn, and "Doggy Swim In Pool" worked fine in the main pool and the fountain next to it - dog jumped in and swam. Also swam in a tiny 3x3 pool with no objects that I put in the Blackburn house's backyard. Wouldn't swim in the larger fountain at the dog park though.]

[Edit: "Doggy Swim In Pool" doesn't seem to work in Farhond Glacier either, but it works in Sunset Valley and Moonlight Falls. Starting to wonder if it's a custom world thing?]

[Edit: In worlds where dogs can swim, cats' attempts to swim fail with failure type "FailedBecauseDestinationPortalLocked", so I'm looking for where in the code non-dog animals might be getting locked out of PoolPortals now.]
Field Researcher
Original Poster
#9 Old 8th May 2022 at 2:59 PM Last edited by lizcandor : 8th May 2022 at 5:04 PM.
I think I might have found something! I've been looking through references to a few different enums that sounded relevant, and found the Pool.IsAllowedThrough method:
Code:
public PortalRestriction IsAllowedThrough(int srcRoomId, int destRoomId, Sim actor)
{
	if (actor.SimDescription.ToddlerOrBelow)
	{
		return PortalRestriction.DoorRestriction;
	}
	if (actor.IsPet && (!actor.IsADogSpecies || actor.SimDescription.Child))
	{
		return PortalRestriction.DoorRestriction;
	}
	return PortalRestriction.None;
}
I'll try altering this (either a core mod or a replacement of the PoolHelper object's OBJK) to remove the species check, and update on what that does. I think it might also be necessary to convert the dog swimming animations to other animals and add MoveController sections for them to the LocomotionConfig XML.
Inventor
#10 Old 8th May 2022 at 11:41 PM
Huh! I have no idea.

To be even more annoying, I use Builder's Island to test my mods too, and that's where I was experimenting with DoggySwimInPool. I don't suppose there's a chance of a mod conflict on your end? Not that I can think of many mods likely to interfere with dog swimming. I do have 1.67, so I suppose that's a possibility. That's a pretty obscure thing for EA to break with its Origin integration patch, but weirder things have happened.

I'm interested in your experiments with IsAllowedThrough.

I can't make much sense of that check. I guess it would help to know what DoorRestriction does.

Echo Weaver's Simblr: http://echoweaver.tumblr.com/
A portrait in stubbornness - Playing the same legacy since 2009
Sample a Brave Legacy: http://sims3sample.illation.net
Field Researcher
Original Poster
#11 Old 15th May 2022 at 11:08 PM
Well, changing the DoorRestriction in Pool.IsAllowedThrough() was not the answer :/ Still the same route failure as before. I've also tried a few other things that did not work either (core modding some parts of SimRoutingComponent.SetRouteOptions - no luck). My brain feels wrung out now but I will keep trying!
Test Subject
#12 Old 20th Nov 2023 at 3:37 PM
This is an one year old thread but I have been trying to fix this and this is my experiment, for people who are also trying to fix this...


There's a method on the OnPortalStart in PoolPortalComponent that blocks the fountain, and it probably needs to be removed for this to work.

Out of all my testing there's only one time a dog jumped in the fountain is when I changed the height of the mCenterPoint in DoggySwimHere. The dog jumped into it but then it levitate and drops back down. It would then swim around the floor and completely glitch out. When I directed them to swim back they get out immediately. So I think it's probably a height issue...

Sorry I really want my dog to swim in the fountains again
Inventor
#13 Old 12th Mar 2024 at 1:03 AM
Quote: Originally posted by fantuanss12
This is an one year old thread but I have been trying to fix this and this is my experiment, for people who are also trying to fix this...


I don't know what the general policy on necro'ing posts or if there is one, but I'm still here, and I still want to solve this problem. So thank you!

Echo Weaver's Simblr: http://echoweaver.tumblr.com/
A portrait in stubbornness - Playing the same legacy since 2009
Sample a Brave Legacy: http://sims3sample.illation.net
Back to top