Jokerine Posted August 4, 2015 Share Posted August 4, 2015 Hello everybody! So, there's this idea I've had in my mind for a while - just something fun I'd like to have in my own game, and figured I could post here about it. A restaurant! :dance: But it would require scripting that I don't know, so I was wondering if I could maybe get someone interested in teaming up - I could put together the building, the NPCs and everything else except for the scripting because I'm a noob. I know of Katixas Ciderhouse Restaurant, but my idea is extremely simple because this is just mostly a mod I'd like to have for myself. :smile: DISCLAIMER: My coffee is too hot right now so I haven't taken a sip. Therefore, this may come out all rambly and hard to understand! :laugh: So, to give some details, I'm thinking of just dividing this little building I'll make into two rooms, the cooking area and the serving area. I may put a tiny basement with respawning food containers too. Crafting stations would be in the cooking room, obviously, and some random sandboxing NPCs on the other side, just with generic dialogue. The whole point of the mod would be to cook food and sell it, nothing more really. So, there would be something like one of these tables in a corner of the cooking room (no idea where I could find one, may have to make my own in Nifskope...) that would be an activator. When activated, it would remove all of the food found in the player's inventory (would it be possible to do this with keywords, so mod-added food would be taken as well?) and give them back some gold. Not sure how to handle it so you'd actually make a profit, though. Perhaps it would be possible to make it so you'd always get the base price of the food and then add in a varying amount of gold to account for tips or whatever. That's pretty much it, really. I'm not really thinking about hiring assistants or whatnot - gonna start with the building already decorated and ready to go. May put some NPCs named "assistant" just for flavor. So yeah, that's my stupid idea. Would this be doable? If so, would anybody be interested in scripting this for me? As I said, I'd build the store and everything else. Not sure if I'd share it, but perhaps it would be something fun for others to play as well. Let me know what you think! Link to comment Share on other sites More sharing options...
Mattiewagg Posted August 4, 2015 Share Posted August 4, 2015 I'd totally give you a hand if I had the time right now. :( If you're still interested after December, maybe? That's a long way off though. :( Link to comment Share on other sites More sharing options...
Mattiewagg Posted August 4, 2015 Share Posted August 4, 2015 http://forums.bethsoft.com/topic/1527032-wip-vanaheim-meadery-and-restaurant/ This is in progress but is probably more than what you're looking for. Link to comment Share on other sites More sharing options...
Jokerine Posted August 4, 2015 Author Share Posted August 4, 2015 Yeah, that is a bit too elaborate methinks. Well, if nobody else steps up I wouldn't mind waiting for you, Mattie. I was thinking it would be cool to have maybe another activator, like a crate, that would do the same as the cart but I could label it "catering service" or something, just to have another activator to sell food with. We'll see. If anybody else wants to help, please say so! :) Link to comment Share on other sites More sharing options...
Mattiewagg Posted August 4, 2015 Share Posted August 4, 2015 Yeah, that is a bit too elaborate methinks. Well, if nobody else steps up I wouldn't mind waiting for you, Mattie. I was thinking it would be cool to have maybe another activator, like a crate, that would do the same as the cart but I could label it "catering service" or something, just to have another activator to sell food with. We'll see. If anybody else wants to help, please say so! :)I definitely do want to help at some point. I just can't guarantee when that will be. Link to comment Share on other sites More sharing options...
sLoPpYdOtBiGhOlE Posted August 4, 2015 Share Posted August 4, 2015 Not quite the same, but I did similar with stalls, where you make an investment with the stall owner.After your investment a small chest shows on the stall and and you can add or remove the stock you want to sell.(Only the same type of stock as the the stall would normally sell could be added/removed from the stall stock) After you did that you could tell the stall owner to take a break ( they would wander off to their home or inn) and you stand near the stall and customers would approach at random times and ask "How Much' and you could say "No" or "Yes' to sell to them.If you say yes they would buy a random amount of items from your stock (sometimes they may not buy anything).(i based the random amount on your speech skill as to the random limit they can buy and used random as to what or if they would buy.)If you ran out of stock customers would no longer approach. When you walk away from the stand the original stall holder would walk back to stand and continue on doing what they normally would.The part of the customers coming and buying your food was pretty easy to set up. From your description it sounds like you just want to activate an object and what the player has in their inventory that can make food then the items removed and they get the cash.Easy enough to add a small percent profit per item or the lot based on things like speech (better speech slightly better profit).You could obviously scale profit from what ever attributes you like.So what you wanted to is fully able to be done. Edit: I would like to help, but my biggest problem is mods that have custom resources and requiring the mod files to be able to help.My bandwidth is very tight (1GB) a month so I really can not contribute to oversize projects that require downloading large amounts of files. Link to comment Share on other sites More sharing options...
Jokerine Posted August 5, 2015 Author Share Posted August 5, 2015 Yup, all is want is two activators that would both do the same - remove all of the food from the player inventory (raw and cooked, so in theory the player would need to manually put aside the food they want to keep in some container before using the activator) and then give them some money in return. If you could help, that would be so cool, Sloppy! Well, as I said, I could just send you the esp with the bare building (no custom resources or anything, just the building with the vanilla structure, so it would only be a few kb) so you could do the scripting, and then send me back the new esp with the pex files so I could manage the rest - put in all of the custom resources and thingamabobs. That should play along with your bandwidth cap :dance: Now I just really gotta find one of those serving table things... I remember I converted this one to NV some time ago. Maybe it would be possible to convert it to Skyrim? Link to comment Share on other sites More sharing options...
sLoPpYdOtBiGhOlE Posted August 5, 2015 Share Posted August 5, 2015 Sure, but here's a sample esp to see if my perception is on the right track.(Requires SKSE 1.7.3) I just created a new activator using the static uppershelf02.nifAttached a basic sloppy script to the activator and filled the properties. Scriptname TakeMyFoodScript Extends ObjectReference Formlist Property TakeMyFoodList Auto KeyWord Property VendorItemFood Auto KeyWord Property VendorItemFoodRaw Auto Message Property ValueTotalMsg Auto MiscObject Property Gold001 Auto Event OnInit() ; Would probably be better to call this OnPlayerLoadGame() from an alias as Maintenance. ; This way if the user adds or removes mods you can update the foodlist. GetFoodFromMods() EndEvent Auto State Waiting Event OnActivate(ObjectReference akActionRef) GoToState("Busy") ObjectReference FoodTemp = GetLinkedRef() If akActionRef == Game.GetPlayer() && FoodTemp Int iValueTotal Int iValueTmp Int TotalItems Int iItemCount Form CurItem akActionRef.RemoveItem(TakeMyFoodList, 999, True, FoodTemp) Int iBaseCount = FoodTemp.GetNumItems() While iBaseCount iBaseCount -= 1 CurItem = FoodTemp.GetNthForm(iBaseCount) iValueTmp = CurItem.GetGoldValue() If iValueTmp > 0 iItemCount = FoodTemp.GetItemCount(CurItem) iValueTotal += (iValueTmp * iItemCount) TotalItems += iItemCount Else ;Don't want 0 gold value items, give em back to the player akActionRef.RemoveItem(CurItem, iItemCount, True, FoodTemp) EndIf EndWhile If iValueTotal > 0 iValueTotal = iValueTotal + (iValueTotal / (100 / (akActionRef As Actor).GetActorValue("Speechcraft"))) As Int If ValueTotalMsg.Show(TotalItems As Float, iValueTotal As Float) > 0 FoodTemp.RemoveAllItems(akActionRef) Else ; Player accepted akActionRef.AddItem(Gold001, iValueTotal) FoodTemp.RemoveAllItems() Endif EndIf EndIf GoToState("Waiting") EndEvent EndState State Busy Event OnActivate(ObjectReference akActionRef) ;busy processing user food item values. EndEvent EndState ; Dirty workaround since RemoveItem won't work with keywords? ; Scan all the user loaded mods and dump any food forms into a list based on keywords. Function GetFoodFromMods() TakeMyFoodList.Revert() Form[] TmpForm KeyWord[] KW = New KeyWord[1] String TmpSting Int i = Game.GetModCount() While i i -= 1 TmpSting = Game.GetModName(i) If TmpSting != "" KW[0] = VendorItemFood TmpForm = GameData.GetAllPotions(TmpSting, KW, True, True) If TmpForm.Length > 0 TakeMyFoodList.AddForms(TmpForm) EndIf KW[0] = VendorItemFoodRaw TmpForm = GameData.GetAllPotions(TmpSting, KW, True, True) If TmpForm.Length > 0 TakeMyFoodList.AddForms(TmpForm) EndIf EndIf EndWhile EndFunction Dropped the shelf activator into the render window in Whiterun Bannered Mare Inn (just behind the counter on the left).Dropped a playerhousechest in the render window in aaamarkers cell.Added a linked ref from uppershelf02 activator to playerhousechest. Loaed game and went to Whiterun Bannered Mare Inn.Purchased some food from Hulda as i had none in my inventory. Walked behind the counter activated the shelf ....It adds a percent to the total value based on your speech. (Requires SKSE 1.7.3) Edit:Hmm, maybe I should have scanned the ingredients for food as well.Easy enough to fit in.The script in the post is different (updated) to what's attached in the zip.(Realized I nested an If statement, that means it may miss some food items being added to the list) GameData SKSE functions are new to me and there's not really much documentation on them.eg: what return when you feed erroneous parameter values.or if it spits spam to papyrus logs etc..I didn't actually check..lolI just assume it return an array of zero length so that's what I used as return error check..lolBut assumptions don't often seem lucky for me usually. Link to comment Share on other sites More sharing options...
Jokerine Posted August 5, 2015 Author Share Posted August 5, 2015 That actually works perfectly! So excited, I can't believe it! So, would it be possible for me to PM you the new esp with my custom cell to rebuild this there? I'll probably send it in a few hours if so. This is so cool! :woot: Link to comment Share on other sites More sharing options...
sLoPpYdOtBiGhOlE Posted August 5, 2015 Share Posted August 5, 2015 By all means fire away when your ready :) Link to comment Share on other sites More sharing options...
Recommended Posts