Announcement

Collapse
No announcement yet.

Build own shops and keepers?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Build own shops and keepers?

    I really dislike the limited, canned speech regurgitated by the default shopkeepers, so would like to construct my own shops. I know this will cut into my 100 people list, but so be it. I REALLY need the waitress at my restaurant to have some original dialogue, like ALL good waitresses. Also, I am planning on incorporating "bribing the bartender for info" kinda transactions. Am I wasting my time, should I just place another person in the shop to do this instead, or what? I also want to be able to buy "special" weapons or items and have the shopkeeper comment on it: "A dark stranger just dropped this off this morning, said you would understand..." kinda things.

    I got as far as her opening text, and the option to "buy/sell/exit". After this the conversation just closes. I am having trouble with understanding how event programming works. I am hoping figuring this one out might help me see the process...
    Last edited by Brotherbrian; 12-30-2007, 11:44 PM.
    Shalom,
    Brian

    #2
    Re: Build own shops and keepers?

    The most complicated element is tracking the party's gold, since there's no variable that directly tracks it.

    The easiest way to do this is by eliminating random encounters in favor of event encounters in dungeons. Then you can set a command in the event to change the variable you chose to track gold with.

    There's also a way to track random encounter gold drops (Which is also pretty useful for a lot of other stuff) listed in the "Tricks to spice up your game" thread stickied at the top of this forum.

    After that, it's just a matter of creating the people and the event branches.

    Comment


      #3
      Re: Build own shops and keepers?

      The primary problem there is is that, if you program the event to take away gold, it'll take it away even if you don't have enough. In order to fix that you need to track gold with a variable, by having monster parties drop treasure items that trigger events that increase the variable by the same amount as the gold you get. You'll also have to remove all normal shops, since they won't decrease the variable when you buy stuff.

      Sorry I can't be more articulate, It's late and I don't have much time on me.

      Comment


        #4
        Re: Build own shops and keepers?

        I personally love seeing custom shopkeepers and innkeepers. I'm using them in my own game and unless I have a good reason not to, I'll be using them in all of my future games as well.

        Now, if it's just for dialogue, you're putting yourself through a lot of effort just to make things a little more interesting, and it's up to you whether you'd rather expend that effort on the shopkeepers or on other parts of your game.

        Custom (scripted) shopkeepers can also offer much improved functionality, for example:
        *Allowing you to track how many of an item you bought, for example, tokens to play a minigame somewhere far away
        *Offering discounts once you've completed a quest, or having different keepers sell the same item at different prices
        *Allowing you to buy more than one of an item with a single click

        As far as the scripting itself, I'd suggest making modes 2 and 3 the "main" modes for buying and selling. Set them to auto, and have the "Buy" and "Sell" choices in Mode 1, have them set the mode of your event approrpriately. Inside mode 2, ask what the player wants to buy, and for each one (perhaps inside a new mode, if you run out of room in mode 2), check to make sure the player has enough gold (which you'll need to track via a variable), then if they do, subtract that amount of gold and add the item to the player's inventory.

        I haven't figured out a good way to script selling items in a custom shop yet, though. Has anyone?


        How Badly Do You Want It? (VX Ace) is now available for download! - no outside software necessary.

        "I live and love in God's peculiar light." - Michelangelo

        Comment


          #5
          Re: Build own shops and keepers?

          Knowing whats coming up next for your hero, a shopkeeper might "suggestive sell" a particular item that you will need for the next boss or whatever. He can make it, but it'll take a while, or something of the like. Come back later, special item is now available. Or he could be an old friend of the hero, gives him "special" offers. I dunno. Im better at writing stories than doing all this code stuph... this is still pretty greek to me.

          oops, you probably meant a diff thing by "script". I think I have been discovered as a noughbiegh (scottish sp of newbie)
          Last edited by Brotherbrian; 12-31-2007, 01:02 AM.
          Shalom,
          Brian

          Comment


            #6
            Re: Build own shops and keepers?

            By "scripting" I just mean using Event Codes to do stuff. I'm almost sure I understand what you're trying to do and I... I think you understand what I'm trying to say.

            The "suggestive sell" is a very cool idea; it's the kind of thing I'd love to see in a game. You could definitely pull it off. You can either use variable-conditional branches inside the code itself (which I'd recommend if this is an infrequent thing), or use variables alongside auto events which have conditions that a certain variable equals a variable.

            In plain English, you're checking to see that it's a certain time in the game (which you signal by setting the variable), and asking the event to make the "suggestive sell" based on the fact that it is that time. It's a bit tough to get your head around at first, but it's great practice for event coding.


            How Badly Do You Want It? (VX Ace) is now available for download! - no outside software necessary.

            "I live and love in God's peculiar light." - Michelangelo

            Comment


              #7
              Re: Build own shops and keepers?

              Any way to use the difference in daytime and nighttime events to accomplish this? "Come back tonight, your special Ginzu double edged laser emitting decapitator dagger will be waiting for you."
              Just a thought.
              And I just figured out how to get the characters to say different things. I didn't know that you could change the name also. I am in mode one, event code, new, enter text and change names as necessary. Am I doing it the complicated way, or is this how its done? I am just talking about simple dialogue between me and townsfolk. I know you guys all got this down a long time ago, but as storytelling and writing is my relative strong point in this game, I feel it is a small victory, and I feel much more empowered to write a good game.
              Is the "modify mode" used to change up to mode 2, when I need the character to speak NEW dialogue? Like after having completed a mission or finding an item?
              Last edited by Brotherbrian; 12-31-2007, 02:38 AM.
              Shalom,
              Brian

              Comment


                #8
                Re: Build own shops and keepers?

                You can set events to activate at a certain time, but not characters. What you would need to do is set an event for automatic activation with the condition being nighttime. That event would change the shopkeeper's mode to the one that causes him to give you the weapon, as well as it's own mode in order to avoid infinite loops.

                The "modify mode" command allows you to set a specific mode for the selected character or event, so if circumstances call for a characters mode to change from 1 to 5, that is the most efficient means of making that change. The "Add/Subtract mode" commands increase or decrease the event/character's mode by 1. Once a character or event is set to a mode, it doesn't change until an event code changes it. Each mode is a different script for the character or event, so changing modes is an effective means of managing what characters say and do.

                You can also use modes to determine whether a shopkeeper will suggest a certain item at a certain point in time.

                Mainly you just need to play with modes and variables and figure out which one you're more comfortable with. You will most likely need to use both to accomplish your goals, but everyone's got a favorite.
                Last edited by tjoris9; 12-31-2007, 05:15 AM.

                Comment


                  #9
                  Re: Build own shops and keepers?

                  Originally posted by Wavelength View Post

                  I haven't figured out a good way to script selling items in a custom shop yet, though. Has anyone?

                  If I understand what you are asking, I think I implemented something like that in my "farming sim" unreleased demo. Basically, you would buy seeds of different types from a custom shopkeeper, plant them, come back some time later (I was not able to figure out a way to slowly have the crops grow....due to there being a limited amount of town graphics that look like they might be crops, I basically had to have bare ground one day, and...voila!...full-grown crops the next...couldn't figure a way around this), and harvest the veggies/wheat. Then, I made a custom shopkeeper in order to sell your harvest to. I forget how exactly I wrote the script, but I seem to remember something along the lines of, there were different "skills" you could pay money to increase, such as "farming," "fishing," "hunting," etc, and with the increased levels of the farming skill, you could harvest more vegetables, and thus, make more money selling them.

                  The trick was, you needed to balance your initial outlay of cash and your initial earnings from selling fish and produce with the need to buy more seeds, and thus, being able to harvest more vegetables from other plants; and increasing your skills in order to maximize the output of your current crops and the capability to catch bigger and more valuable fish. Basically, it was looking at how to progress in order to maximize your profits without spreading yourself too thin.

                  To get back to the question at hand, I believe it involved multiple, multiple modes and variables in order to harvest and then sell the stuff. Basically, for the harvesting, variables would track what level skill you had, and if you bought fertilizer for your crops, and give you output based on that (let's say 5 ears of corn, 9, or 15). I think there were 3 or 4 different amounts possible for each crop, of which there were four total. Basically, I had to set some limits so the number of possible selling options didn't get too outrageous in terms of variables and branching val cond commands.

                  As for the fishing "minigame," more variables tracked your fishing skill, and which type of fishing pole you had (I think there was a basic model, and two upgrades), and through a semi-randomized piece of code, determined which type of fish you caught, ranging from a guppy worth 5 gold (for an example) to a salmon worth 20 gold (for an example....I can't remember the exact details). You were allowed to try to catch 2 fish per day (as to not allow the player to exploit the easy money to be made from fishing, and to limit the amount of branching paths I needed to make in order to sell the day's catch). As it was, I think I needed branching paths in increments of 5 gold, starting at 10 gold up to 40 gold (I think...once again, not sure about the details).

                  So, yeah, it is possible to do with some fairly complex coding. Also, this demo was a practice run for the "pseudo random number generator" I incorporated to a greater extent in A Series Aside. Also, another feature of the game was that you were allowed only a certain amount of time to do things every day, so you needed to pick and choose what activities you engaged in on any given day in order to maximize your profits.

                  Oh, there was also chicken raising, and harvesting eggs as another way to gain gold, but you get the idea.


                  Maybe I should just release this damn thing in demo form....

                  Comment

                  Working...
                  X