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 24th Mar 2010 at 2:15 AM Last edited by sunni9676 : 24th Mar 2010 at 2:29 AM.
Default Cloned object not functioning
I cloned the ofb chef stove and did not change anything other than giving it a new guid (so that it would be separate from the game chef stove). In the restaurant, the chef appears and is going through his cooking animations like normal, however the host podium continues to have a 'under construction' sign meaning no host or waiters appear.

As soon as I removed my cloned version and put the original game chef stove on the lot, the host and staff appear with the restaurant functioning properly.

Is the chef stove not 'cloneable' or should I be doing something other than just giving it a new guid? Obviously there is some 'communication' between the host podium and stove that I am not aware of. I'm actually beginning to think that the problem lies in the host podium and that it must identify the guid of the chef stove? Would I need to clone both as a set to make them work? Any help is greatly appreciated.

Visit these sites for more Medieval downloads: Sunni Designs, Plumb Bob Keep, and The Medieval Smithy.
Advertisement
Me? Sarcastic? Never.
staff: administrator
#2 Old 24th Mar 2010 at 4:26 AM
I'm guessing you are cloning that stove to have a different community/business lot stove and will be replacing the mesh at some point? Not that it matters, just curious is all.

Did you happen to play in debug mode and get any error logs? That could give you an idea of where the error lies.

Sounds like yes the stove and podium do someone link to each other, although I don't really play community lots to confirm this. The problem is probably in the BHAV. The podium is probably calling the specific GUID from the community stove and since you have changed it, it cannot function correctly. You may need to create the podium to go along with the community stove so that the BHAVs can reference the new stove. There is a tutorial by Echo about self referencing objects, http://modthesims.info/showthread.php?t=127742, while this may not be exactly a self referencing object the tutorial does show how to change the GUIDs in a BHAV.

I have not actually looked at either of these files in that way, so I cannot say with certainty that this is the only way it would work. It just sounds logical though and would be what I would look at first. Take a look at the tutorial and maybe look at the podium and stove BHAVs to see how they reference each other.
Lab Assistant
#3 Old 24th Mar 2010 at 11:08 AM
It's the same thing with the Shiny Tyme Cooktop which calls the Dorm Cook. I've tried cloning it and making the Dorm Cook fulfill her duties but absolutely cannot get it to work correctly. It schedules the NPC to come and uses the global scheduler for that. It's quite tricky with tons of bhavs. In one version 3 of her showed up. In another version she came to hang around and socialize. Still haven't got that project to work. It may be the same with the chef stove and it's definitely one of those self-referencing objects.
Field Researcher
Original Poster
#4 Old 24th Mar 2010 at 3:41 PM
Yeah I was either going to replace its mesh or invisible it. The link to the bhav info is helpful, but I could not find any instance of self-referencing, nor from the host podium (and thats a lot bhavs to look through on both objects!)! So, this is obviously out of my area of experience/knowledge. I do know that I made a successfully Invisible Default Replacement of it, which I am satisfied with doing at this point. At least that is better than having to look at a modern stove in a medieval hood.

Thanks for you response!

As for fairywitch, check that link HL gave and see if you can find any self-referencing in the bhavs. Otherwise, dont change the guid on your cloned stove and just make a Default Replacement of it. Id love to see what you can do with that ugly thing!

Visit these sites for more Medieval downloads: Sunni Designs, Plumb Bob Keep, and The Medieval Smithy.
Retired Duck
retired moderator
#5 Old 25th Mar 2010 at 12:41 PM Last edited by Echo : 25th Mar 2010 at 12:56 PM.
Hi Sunni,

Yep, HugeLunatic is right, the podium does reference the stove by its GUID, which is why it stops working when the GUID is changed. If it can't find the expected kind of stove on the lot, it switches into "under construction" mode. The reference is buried pretty deep though, which is why you had trouble finding it!

If you're happy to have an alternative podium to go with your alternative stove, here's how I'd go about fixing it:
- Clone the podium, and give it a new GUID.
- Clone the stove, and give it a new GUID. Take a note of the new GUID you give to the objd called "Stove - Restaurant - 0, 1 - Lead"
- Load up the podium clone, then use the "import semiglobals" function to import "Function - Main - Podium" from the "DiningGlobals" library.
- Open up the imported BHAV, then replace the GUID in line 0x14 with the GUID from the stove which you took note of earlier.

See how that goes. You'll have to use the new podium and the new stove together, but that should solve this particular problem. There may be other things which still don't work though, since the restaurant system is a fairly complicated and interwoven set of objects. Good luck!




fairywitch,

you're quite right, the dorm cook is really very hard to fix. The problem is that the NPC template itself refers to that stove by GUID (in the "Get My Stove" local BHAV). Unfortunately, creating alternative NPC templates requires a really broad-reaching global mod which would need to be custom-built for every EP combination, so it's not really a viable alternative.

How comfortable are you with BHAV editing? If you're fairly confident, I can give you some instructions on how to mod the main NPC so that s/he can detect any stoves which were cloned from the Shiny Tyme, as well as the Shiny Tyme itself. That would make it possible for many people to make alternative dorm cook tops, but the process is a bit involved.
Lab Assistant
#6 Old 27th Mar 2010 at 2:22 PM
Oooh, that would be great, Echo! Is it detection by proxy guid? I'd love to have a go. I don't mind it being involved. I did give up on the project because it ate up so much time that I would have rather spent creating - mainly because I had to experiment too much. It became less fun and more like work if you know what I mean.
Retired Duck
retired moderator
#7 Old 29th Mar 2010 at 10:05 AM
fairywitch,

Basically, yes... While the "set to next" doesn't allow you to search for objects by proxy, you do still have access to an object's proxy guid once you've got it as the stack object. The trick is narrowing down the set of objects to check first. Luckily, all stoves already have a category flag (Const 0x0106:0x3A "Stove" Value: 0x003A) which works nicely.

So what I'd suggest is that you create an override for the "Get My Stove" BHAV in the Dorm Cook's person template. Find the line which is searching for the stove's GUID, and replace it with this:
Set to next by object category (stove) [false => no stoves found]
Stack Object Definition (proxy GUID 1) == one half of the proxy GUID [false => loop back to the set to next]
Stack Object Definition (proxy GUID 2) == the other half of the proxy GUID [false => loop back to the set to next, true => dorm stove!]

The Proxy guid is stored in two values, but I can't actually remember which is the left four hex digits and which is the right four. If you look at the "object dump" part of a stack trace, then you should be able to tell which is which. Remember that they're little-endian, and will need to be entered in backwards!

That *should* do it. It may not work for cooks who are already on the lot, since they will already have tried and failed to find their stoves, but should work on any new hires.
Lab Assistant
#8 Old 1st Apr 2010 at 10:46 AM
Thankyou for the instructions. I will definitely give it a go. I have a 10 day break from work starting today. I'll let you know how it goes.
Back to top