Jump to content

Is there a script to change ownership of a cell?


angelmendez003

Recommended Posts

I added a new Quest Node, not a new Branch node.

Then add your quest to the new Quest node.

 

I also tried moving the get in faction condition to the new Quest Node, but it fails.

So I left the condition back where it was originally.

 

Also tried if you could use an unfilled alias for the book, nope the quest won't start.

So I used the original book you left in the cell as a filler for the alias.

But when it gets up to the part where the player receives the book, I spawn a new book and force the reference alias to the new book and give the player the new book instead.

When the quest ends I force the reference alias back to the book in the cell.

This way when you fire the quest again it works and the player gets the new book each time.

 

I don't think you need the read book script attached to both the book and the alias, should only need on 1 or the other, not both.

I'd say leave the read book script on the ref alias, this way the book won't try firing the quest stage every time it's read by the player once they have completed that instance of the quest.

 

You also need to deal with the original merchant as he's still in the merchant faction, so the dialogue will fire again if you speak with them after buying the shop.

 

In general I think you'll run in to problems trying to give the player a shop that wasn't designed to be done.

In other words for example you walk in to any native skyrim shop and buy it.

You will have issues with it as there's a lot more to it then cell ownership.

The vanilla shop keeper has AI Packages and faction related stuff that is added in the CK before the game is loaded.

Trying to null those AI packages on the fly may be a problem or may break other quests or radiant quests.

You would need to force the original merchant in to an alias that has ai packages attached to the Alias so the original merchant would follow your AI Packages instead.

Your Quest Alias AI Packages will only override the original merchant AI Packages if they are not from a quest alias that has a higher priority.

So how many shops you can buy is governed by how many alias slots you have to fit the original merchants in.

 

Other things are what will the original merchant do once you buy the shop?

Will they hang around at the shop?

Will they go somewhere and hangout?

Will they have a home (not all merchants have houses or homes).

 

Really it's a lot of work and learning to pull of what your trying.

Don't let this discourage you as it could be done, but it will take more then a simple couple of lines of dialogue and setting cell ownership.

 

Maybe instead of trying to drastically alter the vanilla merchants, maybe create a few new shops scattered around various cities/towns as well as stalls.

Populate them with your own merchants and then do your quest idea so it only works with those new merchants, shops and stalls you've added.

 

Once again, still a lot of work and learning.

 

Really start off with something a little more easier to learn as you said.

Less ambitious maybe just a vacant stall.

You purchase a license to open the stall and you hire an assistant to look after the stall.

While your out and about a courier gives you a customer order with the items needed and a due date (sent by the stall assistant).

You find the items and return them to the stall before the due date.

More orders you complete the more customers you get, the more profit you make.

 

It still takes a lot of work and learning, but at least you can focus on what your adding.

 

Maybe as the stall progresses then you add a simple shop added in a town or city.

Start with a building that is abandoned and for sale.

The player buys the building and has the options to upgrade it's interior/exterior

eg: Place the counter and shelves etc where they like.

 

Then once you get the shop furnished, you can hire a shop assistant or assistants to maintain the counters.

Then when you visit your shop you check the shop order book.

The book contains recent orders for customers and a due date.

Or at random times while your out and about, a courier pops up giving you a new customer order (shop assistant sent the courier to find you).

So while your out doing other quests you find those unique and obscure items to keep your customers happy.

The more orders you fill successfully, the more the word spreads about your great shop and the more customers you get, the more income you earn.

 

You could add some unexpected twists to the shop events.

Shop assistant needs to take time away for family matters, you need a temp assistant to fill their place or they need your help to fix the family issue.

Shop assistant has been skimming the till, you need to deal with it.

Shop has been robbed and stock is at a bare minimum, you need to get the shop up to scratch.

A customer would like to invest in your business for cheaper prices to them in the future as well as they will promote your shop by word of mouth to raise more customers.

Shop needs to be expanded due to customer growth., time for a new stall in a new area, lets add another business to our empire!

 

The list of possible twists could get quite extensive, depending on your imagination.

 

But start with the simple part of a stall and or building and where it will be placed.

Who you purchase it from?

eg: Jarl or Jarls steward or some person in the pub or a vagrant you randomly meet while on your journey through skyrim.

Could set it up so multiple ways to fire off the sale of the stall or shop building.

 

Stall/Shop assistants, maybe random actors that you've created for the job.

Will they approach you or will you approach them about your available position?

Will your assistants have somewhere they go after the shop/stall is closed?

 

Maybe look in to how the courier works natively in skyrim.

How will you implement the quest system?

Link to comment
Share on other sites

  • Replies 48
  • Created
  • Last Reply

Top Posters In This Topic

Here's your esp back, but changed the way the dialogue works.
Well you didn't give the qf script fragment with your esp so I had to improvise :P
Removed some stuff, added some stuff, merged your 3 dialogue branches so 1 branch has the 3 topics, changed it to a startup quest,... etc
(Startup quest seems to be more consistent as the dialogue option is there first go every time, for me anyway.
Where the SM event method seems like a delay, sometimes not showing the dialogue for the first time you talk to the merchant)

Changed the way the book spawns, added another forced ref alias to accommodate the way the book spawns.
Removed the script from the book, left it on the book ref alias.
Added a dummy faction and a couple more conditions on the main quest dialogue, so the dialogue isn't offered on a merchant you already purchased their shop from.

The quest works in a loop.
So when you reach the end of the quest, it stops and starts itself again ready for the next merchant you speak with to start all over again.

I didn't add anything that actually changes the merchant, apart from setting the relationship rank to 3 if it's below 3 after you purchase.
This way any stuff laying around owned directly by the merchant won't be flagged as steal.

If you ask a merchant about selling the shop and it starts the quest and you don't buy the shop,
then go to another merchant and ask them to buy their shop instead,
then that instance of the quest will continue on with the new merchant your speaking with.

If you buy the shop and don't read the book,
then the dialogue won't be offered on other merchants until you read the book and complete the quest.
Then you can talk with other merchants about buying the shop and it fires off the quest start again.
Rinse, lather, repeat :)

Keep in mind this doesn't actually make you a merchant and them not a merchant, it's just the basic dialogue, with cell ownership set to the player and relationship rank set to ally with the merchant upon purchase.

 

Replace your esp and scripts with the ones from this (back up first).

Load a save that hasn't had your quest run on it and go talk with a merchant.

 

Link to comment
Share on other sites

hey sloppy sorry for the long delay, I was thinking about what you said earlier with all of the questions you have presented to me, it was hard for me to imagine how all of that could be achieved in my skill level. My initial thought after purchasing the shop was to make the shop keeper stick around at a bar or something so people could still do their quests but that seems to be harder when you have to manipulate the ai packages like what you said. As for the other parts of your questions it will be answered throughout my explanation.

 

I didn't think you would have gone through the trouble to fix my mod, I'm sorry if it was a pain and extensive work but I think with the dialogue system you have made we can use it for something I have been strongly considering. For the past few days like I mentioned before I was thinking of using the hearthfire mod so players can build and develop their shop/house and build the mod upon on that. I think this way we can focus more on the quest aspect than the actual mechanics since we will be taking advantage over a system that has already been made which is the house building system.

 

For the past few days I've been playing around with the hearthfire plugin and done some research about it. People had some mixed views about it, some say that yeah it made a lot of items and the professions such as wood cutting, mining ect more useful but it didn't really have much customization into it. after playing around a bit with hearthfire and building my own homestead it did seem a little bit too limited and after your done with everything there's not much to do. I'm still not done with the DLC but I do know that I can somehow hire assistants, bards, a carriage and so forth. I think at this point we can have some interesting additions into this DLC that can spice things up and make the homestead enjoyable. This is where you come in.

 

I did like your ideas of making grinding quests that will allow the player to gather materials so they can go back to their shop and resupply the shop assistant with items to sell for the shop while your away, I also did like the implications on getting requests from people by a courier system so you can supply with their needs. I think this would do great with the homestead, we can have a courier give the player a request letter and a due date and the player can either give it to them personally or give it to the carriage for transport. With the quest design you have made for the dialogue system we can do the same thing, since there is a time frame in which you have to fulfill an order, having a loop system that only runs when you have completed an order would be great because I wouldn't want the players to have multiple requests going on and not finishing them on time. I think it would be best to have a limit whether its 3 jobs or just 1, that will depend on what quests we make and how much supplies/items is needed to produce.

 

As for the overall mechanics, in the beginning i was thinking about making the player the official shopkeeper. I wasn't a fan of having an assistant take care of the shop while your away gathering the items because it would be the same as any other quests you find all over skyrim right? I was hoping to make it that the player stays at the shop and does the actual selling of items as the customers come in and talk to the player. But I think now with your idea of having assistants in a homestead it would be great and it gives the player the opportunity to go and and do regular quests and gathering materials for their shops at the same time so its funner that way. But I would still like to have that option somehow take direct control over the shop and let the customers come to player, depends on how things goes from here maybe there's still a chance for that. I noticed in the hearthfire DLC that they have some materials that you can mine and gather from close to the homestead so perhaps we can hire some helping hands to gather materials for us at a daily price or something, after mining for a few minutes it does get tedious and boring lol :D

 

as for the other things, it seems like in the wiki pages it mentions that bandits and all sorts of interlopers attack your homestead so that covers the other aspects that I wanted in the first place :D I've noticed that almost everything that I wanted to implement in my mod has already been made and I think we should take advantage over this because there is no point in reinventing the wheel.

 

I hope you don't take this the wrong way or anything like that, its pretty much the same mod but moved over to the hearthfire DLC system. I appreciate your help with the dialogue system you've made and I'm surely going to implement it as a base for the quest system.

 

What am I going to do now? well the best way to learn more about something is to play around with it, so I'll be taking another day to play with the DLC and seeing how you can get assistants into the homestead and see how I can start my quest up, I know there is a way to set up a quest to allow the courier to give you a message here is a video link of how this guy did it. I actually followed the tutorial and got it to work for a simple test mod I was doing to learn how the questing system worked in the CK but it seems I still got a long way to learn everything lol. https://youtu.be/iustaHoHnEE The only problem is that I'm not sure a courier will go to the player's homestead since he seems to only approach the player in towns. We might have to make our own courier or something to go directly to the homestead.

 

As always thanks for everything and lmk if your interested in anything you would like to do for the mod, I know your like an expert on this and if you see something that might need improving or you just want to do let me know. When I do start working on the mod my first step would be to do the quest startup and then from there see how I can structure it using your method. I'm also going to run the mod file that you sent to me again so I can see it in action.

 

Cheers,

Link to comment
Share on other sites

I'm no expert at all, I'm learning as I go along.

I'm clueless with quests and CK, but I do have the ability to dissect whatever is already in skyrim and work out things from there.

Well that's how I learn what's what and how to approach things.

I'm also not shy of scripting, so it helps to fill the gaps.

 

Myself I'd avoid making it so other DLC is required for your mod.

You can still use DLC assets if the user has the DLC installed, but making it dependent on DLC's narrows down the users that can use your mod.

 

HF really offers nothing that you can't create yourself.

The Building side of HF it pretty well unique to HF houses, so trying to use the building parts of HF DLC to do stuff seems almost pointless as you would still need to write things for yourself to suite anyway.

 

So it's just as easy to mimic the style of HF building methods without actually needing HF.

 

As for setting up shop at home or anywhere and getting staff to stay there and run the shop, that's pretty easy (to me anyway).

Just a quest with ref alias's that that AI Packages on them and some dialogue to ask the potential staff member to work for you.

They say yes and you tell this is where they work which puts them in to the ref alias slot.

From then they stay there and follow the ai packages that ref alias has.

 

For you being the shop keeper, it'll take to learn how scenes work.

So for example you stand at the counter and a NPC approaches you and starts the conversation asking you for goods.

This will be based on scenes (I'm still an absolute n00b with scenes).

 

I might do a test and see if I can make it so I purchase a stall from one of the merchants out front of the Bannered Mare Inn (the elf looking bloke next to the old biddies stall, I think he sells food and I don't think he's used in any quests).

Then once I purchase the stall, the merchant will go and hang at the Bannered Mare Inn and no longer offer stuff for sale.

(This part I can do quite easily, or I should say I'm able to do it).

 

From there I stand at the stall counter and get customers to randomly approach and ask me to buy items I have in my inventory.

(This part will be a learning curve as it will require scenes and having the quest fill the alias as needed with NPC that are within range and will probably use the Story manager to fire things off).

 

I won't do anything elaborate, just a simple couple of dialogue lines using generic shared voice responses.

Link to comment
Share on other sites

Well I managed to do a brief test on purchasing the stall from Anoriath outside the Bannered Mare Inn.

After I purchase the stall from him he walks off to his home (The Drunken Huntsman that his brother Elrindir owns).

From there he hangs out there for the hours that he would normally be at the stall, and then he goes to bed.

 

I stand at the stall and various people randomly walk up to me and say "For that price, sure." and then I get given a random amount of coins between 5 to 50.

If I leave the stall then it stops npc's from coming up to me and purchasing.

So I got the very basics of it worked out

 

I can purchase the stall and the merchant leaves and doesn't offer to sell anything from there on.

I can stand at the stall after I purchase it and random npc's approach me and give me money while I'm there.

 

So my customer quest scene is firing, but I haven't got it all worked out yet.

When the NPC comes up to me they are meant to open a dialogue with me where I say "I can do you a fair price on that."

Then when I click the option the NPC should say "For that price, sure." and then give me the money and walk away.

But instead it's like they just respond as if I've clicked the dialogue response (which hasn't shown).

 

Won't take me to long to get worked out I'm sure.

 

Edit:

Got it sussed.

Now the NPC walk up to me and say "How Much" and then the dialogue shows with 2 options.

"You decide the how much it's worth to you, I can't be fairer then that." when clicked the NPC says "For that price, sure." and gives anywhere from 5 to 50 coins.

2nd Option is "I said a fair price, not give it away." when clicked it basically closes the dialogue and the NPC says "Whatever you say!" and walks away, you get nothing...lol

 

I always say No to Naziem, never did like him so he can keep his gold! ...lol

The Guards often stop by and give me money as well as anyone else that's wandering by.

 

So the basic of it is simple.

Just need to actually make it so they are buying something, instead of them just giving me money because I'm standing there.

Link to comment
Share on other sites

Yeah you are absolutely right on that, after a few hours of playing HF I became a thane and converted my assistant to a housecorl, instead of me spending time on building the house manually I tell her to do the modifications for me so it got me thinking that the building system is very similar to the dark brotherhood system. I suspect that it is a simple enable/disable function on objects and when you purchase an upgrade the objects are enabled so that's simple to do I hope.

 

So what your saying about the quest alias is that you can leave it blank and then assign objects to it through code? I didn't know that was possible, it makes things much easier to code that way :D we can use location aliases as what you mentioned and put the actors into that alias so they know where to go and allow the quest to stay at that location, amazing!!!! just amazing!!!! lol :D

 

Wow that is great news so you figured out how its done, maybe we can use the stall as like a beginner stall that is cheaper for the players. it is not a requirement to start there first but it allows the player to earn money to then buy a more stabled establishment. I was looking around whiterun since it seems like everyone loves to do their mods there lol and I noticed a house that is abandoned that I'm sure the player can buy from the jarl, was this the place that you recommended me to do the quest at in the first place? I was thinking of making a new building but I see there is no room at all to place the shop within the city so that abandoned house is our only option.

 

I have to say this is some cool stuff we are working on, to have people walk up to you so you can sell items is really cool and rare in games. The only game that I know that has this system was harvest moon a wonderful life for the gamecube. Well you have the most impotant aspects done which is to make the NPCs come up to you and have a dialogue system running. Now that is left to do is somehow make the NPCs look at your inventory and choose randomly on an item they wish to buy.

 

How often do people come up to you to start the conversation and do you think we can use the speechcraft skill level to make a percentage chance of people coming up to you? if not then I don't think there will be a problem in leaving that out, it works for the most part and thats just what we need. :D

 

lol btw speaking of refusing to make a deal, we can make persuasive topics so we can use our speechcraft skills to try and convince them to buy in our prices like in some dialogue cases, that would be a great edition as well.

 

I see that you have done a lot of work with the mod and have practically most of the necessities done, I wish to help too you know lol :D is there anything you need me to do or try out? I can probably make a test on how to upgrade the shop and see how it works with an npc. If we get this done do we need to do it again on the main mod file or do we just create another one from scratch or what do we do? how do 2 people work on the same mod?

 

I have a skype if your interested in an instant message than using the forum that is like 3 pages now, my name is Angel Mendez.

 

like always thanks for helping me,

Link to comment
Share on other sites

Sorry no messengers, as I'm not reliable when it comes to instant message and I tend to ignore people when I don't feel up to it, so I avoid using them to save conflict.
I'm an unsociable person mostly, well at least I'm honest about it.... lol

What I was writing is just a test, to see how accomplish certain things.

Eg:
A dialogue to get the ball rolling in buying the stall (eg: your original esp).
After buying the stall the original merchant what will they do.
If I stand at the purchased stall can I get npc's to approach me and initiate dialogue.

Those were just some of the basic things to work out how you'd accomplish doing what you originally intended.
Which at this point I have a basic concept of, but it's you that needs the basic concept.

The way it is atm, the npc is not actually buying anything, they are just initiating a dialogue with you and if you select the sale option then the dialogue adds a random amount of Gold to the player.
The illusion of the NPC buying something.

NPC's randomly approach anywhere from 8 seconds up to 2 mins (real time, not game time) .
Basically it's just a simple quest with 2 stages, no objectives, an alias that get's filled with with any near by actor that is not a creature, 1 Branch 3 topic dialogue and a 2 phase scene (travel to player, ForceGreet player using the 1 branch dialogue) set to run on quest start, after you select a dialogue option the quest is stopped.

The quest is fired from a trigger box that I placed around the stall.
If the player owns the stall and they enter the trigger box then it fires a RegisterForSingleUpdate(15.0)

In the event OnUpdate I have a simple check to to see if the Customer quest IsStopped, if so start it.
After the customer quest check I RegisterforSingleUpdate(Utility.RandomFloat(8.0, 120.0)) again.

This way the customer quest is fired at a random amount of time and only fires if it's actually stopped.
When you leave the trigger box I UnregisterForUpdate() which in turn stops the customer quest from being fired any further until you enter the trigger box again.

The using speech to base the type of customers or delay between customers approaching would be quite easy, as well as incrementally increase speech xp as as sales progress.

Instead of jumping in at the deep end start with those basic things first.
Understanding the basic before starting an overall project will save a lot of grief in your actual main goal.
Purchasing the stall, which your part the way there, but actually work out exactly what the dialogue is doing and how so you may progress it further.

eg: adding a an empty Ref Alias , adding some AI packages to the Alias, so you can get the merchant to do what you want once you have purchased the stall.

Check out other merchants in CK and follow what the do, quests they are in and ai packages they use and what those packages are scheduled or linked to.
This gives you a better Idea of what the NPC should do or where they should go when you purchase their stall or shop.

Working out another quest that handles a simple scene so you can get npc's to approach you and offer you dialogue.

Work out how you use each quest to make it seamless to the user and gives the illusion of what your after.

Once you have the basics of what your mod will do, then you can start building the actual mod itself.
Then you can really start intergrating some more complex things such as side quest, stock quests, assistant quests, etc.

Link to comment
Share on other sites

lol its all good I understand, ever since I graduated from high school I only have like 3 friends and no one really understands video games so yeah I'm kind of the same. I still go out and party like regular people but since no one that I know personally are into video games its like playing basketball by yourself all the time.

 

Awesome I thought you were doing the mod for me so I was scared that you would do everything and I wouldn't get the chance to learn it. All of this is overwhelming but from past modding tools and games I understand most of what your saying. I have to admit that out of all of the modding tools this one is the most complex one. I'm sure by looking at what you have done so far I should be able to understand how you did it but for now this is what I picture how it works.

 

So as a test you just have the NPCs give you gold and approach you.

 

To my understanding an alias is like a variable or class that you can use to have pre-set functions that whatever it is tied to like an NPC, the NPC will follow that function of the alias correct? So how you used it is that you have a condition and if the object follows that condition it is placed within the alias so it can do the function. For example, like what you stated, as long as the NPC that is near the player is not a creature it will follow the alias that requires the NPC to force greet the player. By force greeting the player you allow the NPCs to walk to the player. lol I thought I would have to use like a travel script in order for that to work.

 

My only question is........ what if the player buys a shop? the player will be in doors, how would that script function work if the player will not be near NPCs to trigger the force greet script?

 

 

As for the triggerbox method, I think thats awesome, you pretty much made a timer that checks to see if the quest is still running correct? if the player leaves his position then it automatically stops, is it because the player is in like a scene mode where he cant move like for example chopping wood ect? I'm not too sure about this method I might have to take a look at this to understand it.

 

I really do like the triggerbox idea you have to start with the quest, maybe we can do the same and place it in the player's house with the merchant's book on top of it. I see that I'm getting closer and closer to understanding this CK, I am really good using game maker, warcraft 3 world editor and such but like I said this CK is something I have no relation with so if i can master this modding tool then I think I can do anything lol :D After doing a few mods and getting tired of skyrim I'm thinking of moving more into the 3D world and try out unity. I've never made a game before but I know a lot of how games are coded and made for 2D games but I've never stepped up for the 3D world, its going to be a bumpy ride but I'm sure I'll get it eventually. :)

 

I'm going to keep playing the game and write down the quests that I find useful for this mode to dissect them later in the CK. I'm going to buy the house in whiterun and see what I can actually do in a regular house and not a homestead. Can you move furniture around in skyrim? I know oblivion allowed you to do that or is everything fixed? I'm dying to see how you made your basic dialogue system so I can go from there and see what I can come up with. I do know that once I get this merchant quest down packed I'll be doing other professions as well. I'll release the merchant part when its done and then update it with the rest afterwards, its getting the first one done that takes the longest but once its done the rest should be easier to do since its almost the same thing.

 

Thanks again

Link to comment
Share on other sites

What I've played with now is adding the 4 stall owners in front of the Bannered Mare.

 

So now when you purchase a stall and stand near the stall the original merchant goes off to their home or where ever they should normally go.

When you leave the stall the original merchant goes back to their normal routine and mans the store an they do as they normally would.

Otherwise it would be pretty vacant if you owned all stalls and there was no one at any of the other stalls.

It makes it like your leasing the stall while your there....lol

 

This way you can buy all 4 stalls and go and stand at a stall and customers approach you, but the other stall are still manned while your not at them.

You leave that stall and the merchant come back and mans the stall.

 

Go to the next purchased stall and the merchant leaves and and customers approach you at that stall.

You leave that stall and the original merchant comes back and mans the stall... etc

Rinse, lather, repeat.

 

I'll just refine it a little and post it so you can dissect it and piece together what it's doing.

 

I'm using the merchant book.

You have to read after the purchase, once you've read the book and if your in the range of the stall then the merchant will leave and the customers will randomly start approaching you.

Link to comment
Share on other sites

lol wow that is pretty cool, I have never ever seen that in all of skyrim before lol, thats really cool I like it, so maybe we can make it that the stalls are rent-able and when your done with it the original merchants return to what they are doing and when you want to rent them again you can speak to the owner again.

 

I never thought about having empty stalls, that would of been a bad idea having them empty and I do know that there is a woman there that is approached by imperials in a scene so if she was gone for good then that quest might have been broken. This also allows us to keep the quests available to the player and not break them, dam your really good at this!!

 

All of this is possible with aliases correct? wow their more useful then I thought they were. :)

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...