Author Topic: DM opens store for PC  (Read 297 times)

Legacy_henesua

  • Hero Member
  • *****
  • Posts: 6519
  • Karma: +0/-0
DM opens store for PC
« on: June 12, 2012, 04:05:47 am »


               I wanted to share a tag based script for a dm-widget I just made:
--->     do_storewidget

Why I made this (and why you might want to make use of it):
A situation that has often bugged me as a DM was the inability of a possessed NPC to spontaneously open their store to an interested player. The work around at the end of some DM-PC roleplay is to send the PC a tell explaining that now they should click on the merchant in order to open the store via the NPC's conversation. That always bugged me because it breaks immersion. I created this widget to remedy this situation.

How it works in game:
  • A DM with the widget can possess an NPC and target a PC with the widget to open the possessed NPC's store.
  • A DM with the widget can also target an NPC to record the NPC's store. This is a good way to determine if an NPC has a store. Then when the DM next targets a PC, the recorded store will open for them.
This does however require the builder to set the tag for the store on the NPC as a local string.

Anyone accustomed to scripting can likely see how this can be improved. I plan on giving some merchants more than one store. So I'll need a way to give a DM an option to make a choice between stores in those situations. Also, the widget at present can't store an array of stores long term. That should be done also. The advantage at present is that the widget is just point and click.
               
               

               


                     Modifié par henesua, 12 juin 2012 - 03:10 .
                     
                  


            

Legacy_ruadhri10

  • Jr. Member
  • **
  • Posts: 52
  • Karma: +0/-0
DM opens store for PC
« Reply #1 on: June 14, 2012, 03:59:32 am »


               Thanks, will check it out
               
               

               
            

Legacy_henesua

  • Hero Member
  • *****
  • Posts: 6519
  • Karma: +0/-0
DM opens store for PC
« Reply #2 on: June 14, 2012, 03:39:58 pm »


               Just noticed that I left my include in there... I just removed it.
               
               

               
            

Legacy_Failed.Bard

  • Hero Member
  • *****
  • Posts: 1409
  • Karma: +0/-0
DM opens store for PC
« Reply #3 on: June 14, 2012, 11:19:21 pm »


                 I'd likely add a fallback open on the GetStore routine, for if there's no variable found.  Somethng like:

object GetStore(object oNPC)
{
  object oStore = GetObjectByTag(GetLocalString(oNPC, "STORE_1"));
  if (!GetIsObjectValid (oStore))
       {
         oStore = GetNearestObject (OBJECT_TYPE_STORE, oNPC);
       }
  return oStore;
}

 
               
               

               
            

Legacy_henesua

  • Hero Member
  • *****
  • Posts: 6519
  • Karma: +0/-0
DM opens store for PC
« Reply #4 on: June 15, 2012, 12:33:23 am »


               That wouldn't work in my module. I've put all the stores in a separate area, out of play. (This reduces loading times of areas that the players enter)

Also, not all NPCs are merchants, so this widget helps a DM determine if the NPC has a store or not.

Nevertheless, I'm not going to dictate to you how to use this script. That is your choice as you likely know better than I how your own module plays, and what the DM needs.
               
               

               
            

Legacy_Lightfoot8

  • Hero Member
  • *****
  • Posts: 4797
  • Karma: +0/-0
DM opens store for PC
« Reply #5 on: June 15, 2012, 01:20:52 am »


               

henesua wrote...

That wouldn't work in my module. I've put all the stores in a separate area, out of play.



I was wondering if that was how your module was designed.  So here is a suggestion for an expansion to your system.  Add a Dynamic conversation to your widget that: 

1)  Lists all PC in the Current Area, Allowing  you to select one. In addition to directly Targeting the PC.   

2)  Gives an option of opening the store to all PCs in the Selected PC's party. 

3) Dynamically List all of the stores in your Store Room Area. Allowing the DM to select any store in the module to be opened. .  

4 ) Allow targeting of  an NPC to preselect Store to open.

5) Allow Targeting an PC  to Preselect a PC to open for.  

6) allow Targeting the Ground to Start the conversation. 


Conversatoin would look something like.   

Open Store:    <  Store name >  < store Tag >
For PC  :          <  Pc Name >    <  Only/Party >


   1)  Select/Change PC
    2) Toggle  single Party. 
   3)   Select/Change Store. 
   4 )  Open selected store For selected PCs



Just a thought.
               
               

               
            

Legacy_ShadowM

  • Hero Member
  • *****
  • Posts: 1373
  • Karma: +0/-0
DM opens store for PC
« Reply #6 on: June 15, 2012, 01:44:41 am »


               I think I have something similar already in HR DM tool, I do not think I have it open for party function though have to go back and look at it. Thanks for work and idea '<img'>
               
               

               
            

Legacy_henesua

  • Hero Member
  • *****
  • Posts: 6519
  • Karma: +0/-0
DM opens store for PC
« Reply #7 on: June 15, 2012, 02:30:05 am »


               Yes, good ideas, lightfoot. Thank you.

I'm not sure about enabling a DM to use any store, but perhaps as a special option. The option to select all players in the party also in the area is a good one.
               
               

               
            

Legacy_Shadooow

  • Hero Member
  • *****
  • Posts: 7698
  • Karma: +0/-0
DM opens store for PC
« Reply #8 on: June 15, 2012, 03:01:29 am »


               

henesua wrote...

That wouldn't work in my module. I've put all the stores in a separate area, out of play. (This reduces loading times of areas that the players enter)

interesting discovery, are you sure that stores loads at entering area? Arent they loaded only when opened?

But I guess its really like that. My 2x2 store - only area takes forever to load up.
               
               

               
            

Legacy_henesua

  • Hero Member
  • *****
  • Posts: 6519
  • Karma: +0/-0
DM opens store for PC
« Reply #9 on: June 15, 2012, 03:04:17 am »


               I noticed this when I had 5 stores in my starting area for PCs to buy starting equipment. It took longer than I would have expected to load. When I moved them out, the area loaded quickly as expected.