Downtown Bars

Discussion in 'Objects' started by Raeven, Jul 29, 2016.

  1. Raeven

    Raeven Well-Known Member

    (Heads up: There is no download in this post. It is just conversation for now.
    Edit: A zip is now available for local testing purposes.
    "Local" means your own game only.
    "Testing" means The bar is far from being finished and should not be used on a treasured lot unless you have a current backup.)

    I got the downtown bars working TS1 style; TSO's functions (stocking, selling drinks for a profit, etc) can't really be finished up until after the dialog boxes can be edited giving decent feedback to the management but I am currently exploring how that is done in the food counters so I can add it in as well.
    [​IMG]
    I have not uploaded the files, though, because I have two concerns:

    1) The bars are missing several required files. These are easily provided but I'm not clear on what can be included legally. (so I'm hoping for feedback on this point)
    The missing files are the NPC bar staff, the drinks controller, and the drinks objects themselves. Iffs only - all animations and props are included in the TSO download.
    Are altered versions of these files allowed? If so HOW altered? I've used the original maxis GUIDs. Should I use my clones instead?

    Some obvious alterations are the fact that none of the NPCs can't wear the same clothing as in TS1, the drinks controller has had a lot of TS1 to TSO changes, I made little changes to the barmaid and bartender's idles, and I merged the NPCs into less iffs (instead of 6 DTS & Rave bartender files there is one iff with all 6 guys, etc)

    BUT I am using an extracted, unaltered drinks.iff at this time. I know that is a no-no, but nothing NEEDED to be changed (functionally). I do have a few "custom drinks" done up already from our TS1 bars. The reason I didn't use that file is because along with the recolored sprites one needs matching recolored props. I have those done up as well, but can't convert them to TSO. If someone else can swing that, would such a conversion be enough of a change to count (legally)?

    2) The drinks controller might not clean itself up well. (further testing required)
    The bars were originally created for downtown lots. This lot type is never saved during live mode so there was no reason for them to be too considered with drinks controllers piling up, I guess. When they updated the drinks controller to include the vacation island beach bar they don't seem to have thought about the drinks controllers deleting themselves (perhaps Vacation Island's lot controller takes care of that sort of thing).
    I added a line in to tell the controller to delete itself after 5 sim-hours of disuse, but I'm not in a position to test it to my satisfaction.

    Frankly, the drinks controller is a bit of a mess anyway. The original one coordinates a sim and his date, which has no use in TSO. In fact, the means of identifying a date ("my auto-follow") translate into identifying which hat you've got on ("my hat id"). So I disabled all of that, but didn't clean any of the "interactions" BHAVs out. I thought they might be useful for TSO use later. I imagine the rest of what the drinks controller does could be handled by the bar and the drinks themselves, but, again thinking of future TSO use, keeping the drinks controller could allow the game to track info about individual sims. One obvious example being checking to see if the Sims it drunk and making it behave accordingly. But I can't be sure whether the fun factor of such things would outweigh the impact controllers might have on a busy lot.
    Last edited: Aug 19, 2016
  2. Raeven

    Raeven Well-Known Member

    INTERESTING ODDITIES
    Some "oddities" surfaced while working on the bar. The first 2 seem like the sort that may clear up "on their own" as FreeSO is developed.

    Reach - When a seated Sim reaches for a drink, he will pop into standing position during the reach.

    Facing - When the barmaid delivers the drink order, she is supposed to stand on top of the server station tile and face the bartender. Instead she turned her back to him. Changing from TS1's "On top of, facing" to "On top of, Same Direction" fixed this in FreeSo

    Sim Intersection - This third 'oddity' is just something to watch for when activating the hidden objects for use in FreeSO

    Tiles that allowed Sim Intersection in TS1, blocked the Sims in FreeSO.
    To be honest, I am not sure WHY they worked in TS1; The lines/node read (to me) like they should always block the Sim, but somehow TS1 was fine with it.
    Common init has the following node
    " My flags Set Flag: 2" // disallow person intersection
    but then counteracts that in the reserve tiles (behind the bar where the bartender is) with
    " My flags Set Flag: 3" // has zero extent

    Which is great for the bartender, but the barmaid and patron need to walk onto the 2 tiles in front of the bar (Server Station and Front of Register).
    The init for these tiles do have nodes that allow person intersection, but (bizarrely) they come BEFORE the common init is called so the common init has the last say and it says disallow. Somehow TS1 lets them walk there despite this. FreeSO follows the instructions and didn't allow Sims on those tiles. (I have no clue where TSO stood on such things.) So, again, something to watch out for whenever making TS1 objects usable in FreeSO (I'd like to think these bars are the only objects that are coded up in such a weirdly wtf way, but who knows.)
  3. RHY3756547

    RHY3756547 FreeSO Developer Staff Member Moderator

    "Has zero extent" disables the collision rectangle entirely when it is active, so "disallow person intersection" should do nothing. Note that some objects, while they do not allow collision with people or other objects according to the flags, use an "allows intersection" entry point tree to add an exception for NPCs specifically. (eg. food vendor on their reserve tile)

    Will need to look into "on top of, facing" since that seems like a really stupid case. (if you are standing on top of something, surely every direction is facing it? i suppose it just defaults to same dir)

    I'm not sure to what extent including ts1 scripts would be "dangerous". Maxis/EA have never targeted maxis-clone objects before in the case of TS1 mods, but this is a very different type of project and they might not be so forgiving. I'd imagine your substantial changes to scripts and maybe an additional recolour could be enough. You could give the bartender any other outfit in the game, though I haven't personally developed a mesh explorer for TSO so it might be hard to find a suitable one.
  4. Raeven

    Raeven Well-Known Member

    Point. This does explain why it works in TS1. FreeSO seems to be giving more weight to "disallow person intersection" though. I rewrote the inits moving "disallow person intersection" out of the common init to the only two inits that actually need.

    Ah, that would've done nicely! It didn't occur to me.

    The outfits shown in the screenshot above are TSO's "swank"(y) restaurants uniform copied from the bodystring of the busboy/girl. I included the list of head choices so they get a random head.

    For the rave bar I copied the outfit choices from the nightclub's NPC dancers (Disco, I think), though I did pick through the list and choose just two out of the many for the bartender and you're right, it's a tedious task. But it IS 'do-able'. The skins are all listed as hex values in the bodystring (STR#200 - line 9 is the heads array, line 10 the bodies), so to pick out a specific outfit you blindly plug them in one at a time to see what each is.

    The drinks use a combination of an object and a (set of) props so the drinks can be recolored like any other object, but would revert to the maxis colors each time the prop was used so a recolored TSO prop is also needed. With other objects i have eliminated the need for props by showing the object in the hand but in the case of drinks both the left and the right hand is used. In TS1 the right hand has a container slot, but the left hand does not (if I am remembering correctly), and I am assuming this is also the case in TSO.
  5. RHY3756547

    RHY3756547 FreeSO Developer Staff Member Moderator

    Yep, there's only one avatar container slot in the TS1 engine and it's the right hand. You can however set a "carry animation" and place a mesh prop in the sim's other hand, which is what cleaning up ash does. Doesn't quite work right in FreeSO though - resets at incorrect moments.

    We don't currently have any extensions to the content system to allow custom props, textures or avatar meshes. It's planned for the future, though.
  6. Raeven

    Raeven Well-Known Member

    As mentioned above I was hesitant to share these files. Rhys' assuaged the one worry, and I tested, then fixed the flaws in the bardrink controller's ability to delete itself.
    I've gotta say being able to see the labels while in the BHAV Trees made a huge difference. This isn't the first time I have worked on the downtown bars but I came away with an entirely new level of understanding of just what is going on in there. TS1 objects don't have STR#256 or STR#257 and nothing is labeled, so the files that I have supplied (the staff, the drinks and, most importantly, the drinks controller) are not labelled. Usually I keep a txt file on hand and Alt TAB back and forth to remind me what is (probably) what. But being able to fill in STR#256 and see it in use in all of the BHAVS really changed things and enabled me to figure out some attributes that I never could before. Being able to check values in the VMEntitiy Inspector filled a few more blanks in. Very cool.
  7. Raeven

    Raeven Well-Known Member

    Neighbor ID does not appear to get assigned in TSO/FreeSo; How does the game remember and identify individual Sims (and they log in and out and move from lot to lot)?
    I currently have the controller set up so that it periodically scans the lot Set To Next (Person)ing it's way thorough everyone and checking to see if Relationship Var 0 has been established with that person.
    If the person has left the lot, the controller deletes itself. I am thinking perhaps there's a better approach, similar to searching for the specific neighbor id.

    I'm also wondering if my approach will work if someone is a ghost. Am I right in assuming the relationship would not be reset and that the person would be found? (If not then no biggie. The controller just deletes itself and a new one can be generated the next time they want a drink. It would just be nice to know in general, if the information is already on hand).

    The bar is basically on it's way to being a food counter that gives fun instead of hunger
    I don't recall there being a lot of (any?) food counters by the time I stopped playing. It was all buffet tables and home cooked meals (you then tipped in the tip jar to show gratitude. Are there any additional benefits to the food counters, or are they simply a neat looking alternatives to a buffet table?
    Right now the bar is (speaking in practical terms) just a great role playing prop - purely decorative. Anyone needing fun would be better off getting it another way. (Don't get me wrong, I think a decorative role playing prop is awesome. I'm just trying to figure out if that is what it is or if more is expected from the McD's kiosk)
  8. RHY3756547

    RHY3756547 FreeSO Developer Staff Member Moderator

    None of the "neighbours" iterators can be used in TSO because they iterate over everyone in the neighbourhood. This would mean iterating over every sim that has ever existed in the city, so that's definitely impossible. There are some TSO Generic Calls to check if a sim is the lot/object owner or a roomie, but Volcanic does not let you select those yet.

    Relationships to people are per-lot unless the object has been created with a persistent id (eg. can be placed in inventory). Avatar/Object Persist ID are not visible to SimAntics.
    Raeven likes this.
  9. Raeven

    Raeven Well-Known Member

    A little side -fyi: There is a handy "Do I own this object" global that checks on that sort of thing and Is Housemate is person data so both of those are covered for anyone needing them for check trees or whatever.

    I guess I was hoping for a GUID-type identifier for the avatars that I could use with Set to Next. (Using Object ID wouldn't work because if someone left and someone else entered they would assume that now-available ID). It seemed like it might be bit more direct then the way I did it (but, honestly, I've never really been sure if Set to Next using a GUID or category was actually less resource intensive than the more vague Set to Next object/person, so perhaps it would not have been any improvement anyway)

    OK, so if someone leaves the lot and comes back immediately the relationship between him and his controller will vanish, next drink will create a second controller, in a short time the first one will delete itself and form a gameplay stand point everything worked smoothly - except that leaving the lot will instantly sober the sim up since the "drunk count" is in the controller. Works for me! Thanks, Rhys :)
  10. Raeven

    Raeven Well-Known Member

    I've decided to go ahead and upload the bar patches and objects for testing and just in case anyone else would like to have a poke around without going through and stripping TS1 stuffs out and whatnot.

    LOCAL USE ONLY
    Unlike everything else that I've uploaded so far, the patches for the bars must be uninstalled before you go visiting someone's server. If you are crashing trying to enter a server, it'll probably be because you forgot to remove these patches.

    And those who are running a server must not use these because any visitors who don't have the bar installed will crash trying to enter.
    Besides, the barmaid service is so sloooooow that actually trying to use these with a group of friends would be a bit maddening. Actually it's a bit maddening with just one person on the lot! I'll never tip. NEVER!

    STILL WIP AND TESTING
    This zip has is 2 of the 3 Maxis bars, the DTS/Restaurant bar (pictured in the first thread) and the Rave/Ice bar.
    [​IMG]
    The third bar, the "beach" resort's bar, is not included just yet. It's Interaction menu resource (chunk?) is corrupt and crashes Volcanic when I try to edit it to add my faux Open/Close (see below). I'm also still dressing the bartender.

    They have only been tested in rather sedate circumstances but I managed to break/confuse the bartender by putting 3 bars in a room and then opening and closing them rapidly. If anyone else breaks anything in them, I'd love hearing about it.

    USE/TEST AT YOUR OWN RISK - DISCLAIMER
    Having and playing with these files has not crashed my lot or screwed it up. But maybe I just didn't have the right combination of things present or whatever so BACK YOURS UP ANYWAY.
    If in doubt, don't use/test this.
    http://www.woobsha.com/files/FreeSO/DownTownBarsv-01.zip
  11. Becky with the good hair

    Becky with the good hair Administrator Staff Member Moderator

    Pretty cool
    [​IMG]

    I love it
  12. Raeven

    Raeven Well-Known Member

    That roman head puts a whole new spin on things!
    Maybe one long lazy day Ill figure out exactly which hex code is that head and we can put the barstaff in togas :D

    I probably should have listed "known issues" a bit better in the post above.
    • I managed to break/confuse the bartender by putting 3 bars in a room and then opening and closing them rapidly.
      Will look into. (I suspect it is to do with the relationship between bartender and bottle area)
    • As with all of the food cart NPCs, the body color comes in light skin when it is first spawned. If you save the house with him on it then the body will load correctly the next time you visit. (I am not trying to fix this since I believe it'll be fixed by FreeSO's further development)
    • The barmaid "wont pay attention". Actually she's just finishing what she's doing first and then will respond to you. Sometimes that takes FOREVER. She is using the generic idle animations from the global. Making custom/local animations for her will give us more control over that.
    • The bamaid lingers when the bar is closed or deleted - same problem as above .... she is finishing what she is doing before disappearing.
    • After ordering directly from the bar My Avatar mills around like a weirdo - definitely needs changing. Tentatively planning on making the Sim find an empty seat and sit to drink but open to suggestions.
    • Unlike TS1 there is no pianist (you should be able to place one in the room without errors, though.)
    Last edited: Aug 19, 2016
  13. xXJDrocks450Xx

    xXJDrocks450Xx Well-Known Member

    This object patch looks really cool! Is this still ongoing? If not I would love to help you out in anyway I could, these bars look like great objects to have for parties and things like that.
  14. Raeven

    Raeven Well-Known Member

    Kinda sorta. That is to say I fizzled a bit rather than formally stopping so it got stuck in some "to do" list gathering dust.
    So in practical/realistic terms "not really" is the better answer and you (or anyone) should not hesitate to work on the files. I agree with you -t hey woud be really great additions to the game. Most of what was done was the gruntwork of tracking TS1 specific stuff and removing/changing it. A few things were added in for the Faux Management options (open/close) and in preparation for proper Management features in the future. So using these as a starting point just saves a bunch of gruntwork and should not add any extra work in if you (or anyone) wants to continue working on those.

    Some of the stuff that needs to be addressed is beyond me. A couple of things I simply dropped the ball on and never got to.

    I never looked into how the bartenders broke. I still believe that I simply didn't set the relationship properly and someone more familiar with that would be able to fix it.

    The issue with NPCs spawning in the default lgt skintone isn't specific to the bar.
    It happens with the food carts as well and, as mentioned, I think that Rhys will end up fixing that in the game rather than it being something that needs to be addressed in the NPCs. (Eventually. It seems super low priority to me) But my plan B was gonna be to see if I couldn't kick off the main with a wardrobe change (to normal clothing) to force a redraw. I didn't actually try it out.

    The barmaid's poor service and delay in deleting herself is also not specific to the bar. It is a side effect of the animated idling.
    The adult idle is simply not being very good for NPCs. The idling sequences go one for too long a time and so any command pushed into their queu sits there waiting for them to finish before it is noticed. This is (I assume) why the the food service NPCs stand stark still instead of using an animated idle - so they can respond to the customer immediately.
    The bartender does not have this issue because he has custom idle animations that were designed especially for him. (The food service NPCs could always be assigned his animations to give them more life)
    TS1 introduced a "new adult idle". It looks like it uses the same animations but rearranged them so the sim is more responsive. I tried to simulate that within the barmaid but the animations are renumbered in TSO and I was unable to manage it (due to cognitive dysfunction). I do believe someone else would be able to do it (probably with ease). And it'd be handy for the other service NPCs, of course . (Actually I was thinking it would make much more sense for service NPCs to have their own semi-global instead of using person global. Not sure why they don't.)

    Why no pianist? Because of the way they find and use the piano. Or, to be more precise, because of the way they never stop using the piano once they start. They need to be completely redesigned so that they leave when the bar is closed and don't hog the piano when a player would like to use it. I don't see much value in a pianist in TSO (or, TS1, honestly) so I scrapped them rather than redesigning them.

    NOT mentioned in the 'issues' list above:


    The BCONs and Dialogs needed to bring it more inline with food carts (Management) are on hold (for me, that is) until Volcanic has those editors. (I don't HEX Edit)

    And there is also a third bar, the 'beachbar' designed for Vacation Isle (so it is a separate iff). A resource (TTAB maybe? can't remember) is corrupt and kept crashing on me so while it did get it working in the game, I wasn't able to add any of the faux management (open/close) stuff to it. I also haven't dress the barstaff in beach-y clothing yet ( I got distracted by cataloging some of the more interesting outfits' codes. So the bartender is currently in formalwear . :D )
    xXJDrocks450Xx likes this.
  15. francot514

    francot514 Well-Known Member

    Good work really interesting conversion to TSO, i think you could use Iffpencil to edit those BCONS and Dialog chunks, not sure if still needed..
    xXJDrocks450Xx likes this.
  16. xXJDrocks450Xx

    xXJDrocks450Xx Well-Known Member

    I gotta thank you for putting so much time into this response, it really goes far! I'll take a look at it in a little bit and see if I can't maybe fix a few things. I'd really like to see this working, like I said. This could really liven up lots in the GS a bit :D
  17. Raeven

    Raeven Well-Known Member

    @francot514 Sadly, IffPencil wont work. The bars are already in the game but they were never converted to TSO. The drinks controller, the drinks file and all of the NPC are missing, however. It appears that the hotdate far and vacation far (and the unleashed far) were copied over to TSO and some of the things were converted for use in TSO, others (like the bar station) were simply ignored. The missing files didn't end up in TSO because they were not in that far - they'd been put in ExpansionShared. So I was able to extract them and I used iffpencil on them. (Volcanic can be used to edit them instead, but I found that once I saved using Volcanic I could never go back to using iffpencil on those files.). But I had no way of extracting the bar from TSO's files and piffs are too different so I could not use iffpencil to work on them further.
    Those will be a really quick fix once the editors are available, though. It's just dialog boxes for the owner telling them how much is in stock, allowing them to restock, and that sorta thing.

    @xXJDrocks450Xx My pleasure!
    One of the issues I mentioned in the list (but not in this latest response) is the fact that your avatar will mill around after having bought a drink (from the bartender) while standing. It's not great! But you've recently been working on meals and you got Carry Plate working so I'm wondering ... Does "Carry Plate" then allow the player to choose what seat they want to sit at (to eat)? Because that type of thing would be perfect in this case. (My plan for that was to have the drink push the sim to find a random seat like meals and Unleashed espresso does, but I was never thrilled with the random seating part.)
    xXJDrocks450Xx likes this.
  18. xXJDrocks450Xx

    xXJDrocks450Xx Well-Known Member

    The milling around happens in Wait for Notify in my tests for some reason. It seems that param0 is being set to large number somewhere so the idle primitive waits for that many ticks. I'll look at that more today. I really want to get restock working but I can't because the dialog primitive is not functional yet.
    Also I had to disable group talks completely because it threw an Index of bounds of the array exception for some reason whenever group talk subroutines were opened.
  19. Raeven

    Raeven Well-Known Member

    The milling that I was talking about would be when the patron walks up to the bar and orders a drink from the bartender. After receiving his drink, the patron is sent to wander away (so he wont block the bar station, one imagines) which can get a little ugly in tight spaces. Eventually he just stops somewhere (potentially inconvenient) and drinks the drink. Switching that to seeking out empty seat and sitting down to drink would help but the random seat aspect could lead to a Sims walking around the world and across the lot (always annoying), so the ability to choose one's seat would be outstanding.
    OH!! Sorry! I thought that was already disabled. I must have bundled the zips before I'd done so. I was tinkering with it to see if it had any value at all in TSO (none that could see but I'm not sure if it would tick up relationships at all). I'd never got any error (that I noticed) from it, though. Glad you did (so you could catch it, I mean).


    OH GOSH! Very Important ( forgot to mention this in earlier post)
    STR 256 in the bar controller was filled in by me, not Maxis. So if something is just making no sense, be open to the idea that I got it wrong and the label is wrong. In fact, you might prefer to change them all to different (more succinct) labels anyway.
    Last edited: Dec 11, 2016
  20. xXJDrocks450Xx

    xXJDrocks450Xx Well-Known Member

    Oh sorry I must have been thinking of the wrong thing :p I see what you mean about sims taking long paths to tables, so I'll look into seeing about choosing where to drink it.
    No worries about the group talks, it was very easy to fix :)

Share This Page