Aller au contenu

Photo

Dual Restocking


  • Veuillez vous connecter pour répondre
6 réponses à ce sujet

#1
Silverque

Silverque
  • Members
  • 5 messages
Hello everyone.

I am trying to create a mod that gives players access to the two backpacks that many miss at ostigar. At first I just wanted to somehow link that merchants inventory to another merchant who was more readily accessable, but I realised that probably wasn't going to be possible when I noticed he actually seems to restock after the wild meaning he only ever has one even if you negelct to purchase the first backpack before hand.

So my question is this. Is it feasable to create a script that checks to see if the player purchased these two backpacks? I don't want the backpacks to be avaible if the player actually bought them; only if they missed them.

Thank you in advance.

Further Explaination:

What I think I need to do is watch for the event that causes the quartermaster to restock the backpack (no idea what that event is or how to find it.) Then, before it runs check to see if the backpack has been bought and if it has not add a backpack to the other merchants inventory. This should be repeated when the talk with Duncan begins the Battle at Ostigar.

Alternately, (and this one somehow seems more elegant to me) start the alternate merchant with 2 backpacks and when you purchase a backpack while in Ostigar subtract one from his inventory.

I also have the concern that my merchant, by nessicity of what I am trying to do, has to be someplace else; possibly Denerim. Is is possible for me to effect a merchant in a different area like that?

Either way, I am not sure if what I am doing is possible and I don't particularly want to spend a ton of time figuring out how to do if it can't be done. Any points on functions that would help me with either method of determinging if backpacks have been bought would be lovely.

Modifié par Silverque, 06 mai 2010 - 07:09 .


#2
CID-78

CID-78
  • Members
  • 1 124 messages
there isn't a event, only two diffrent areas one day and one night. each holding it's own inventory. so what you need todo is check how big inventory the player has when leaving the diffrent states of the story.

#3
Silverque

Silverque
  • Members
  • 5 messages

CID-78 wrote...

there isn't a event, only two diffrent areas one day and one night. each holding it's own inventory. so what you need todo is check how big inventory the player has when leaving the diffrent states of the story.


Excellent, that actually should make a it A LOT easier. Thanks.

Modifié par Silverque, 06 mai 2010 - 07:45 .


#4
Silverque

Silverque
  • Members
  • 5 messages
 Alrighty, I know how to find the inventory size. So of course I have another question now >.<.

I do need an event handler to watch and run after the Battle at Ostigar starts and add the backpacks to the alternate merchant inventory or is there a neater way to do it? Preferably while keeping everything compatible and not editing any of the actual game scripts.

Modifié par Silverque, 06 mai 2010 - 07:53 .


#5
TimelordDC

TimelordDC
  • Members
  • 923 messages
Create a plot with the following flags:
MAIN:
need_backpack_1 (default FALSE)
need_backpack_2 (default FALSE)
merchant_processed (default FALSE)

It's been so long since I played the main campaign so you will need to verify/correct what's below:

I believe from the Day Area, you can exit only into the Korcari Wilds and for the Night Area, only into the Tower. If that is the case, you can have a PRCSCR script that runs against the following areas:

Ostagar: check player inventory size and check if the grey warden initiation is complete (I believe you return to the night area when this is complete). If backpack has not been purchased till now, set need_backpack_1 to TRUE (this means player has already finished day area and didn't buy backpack)

Tower: check player inventory size and need_backpack_1 flag. If you determine inventory size is less than with 2 backpacks, set need_backpack_2 to TRUE

Area where new merchant is: check merchant_processed, need_backpack_1 and need_backpack_2 flags and create the required number of backpacks on the merchant and set merchant_processed_flag to TRUE (so you don't do this again)

You can either create a single PRCSCR script (arealisttag in the PRCSCR m2da set to any) that will process these specific areas based on the area tag or you can create three separate PRCSCR scripts each assigned to one of the areas.

I believe that should do what you are looking for.

#6
Silverque

Silverque
  • Members
  • 5 messages
Something else to consider is that if I just check against inventory size the mod will really only work if it was installed before you bought another backpack from someplace else. I made this mistake as you might guess. The idea here is to provide a little mercy to folks who forgot to buy the backpacks and found out afterwards they could. If they knew they could buy the backpacks at Ostigar there is almost no reason to use this mod if they progress past Lothering and buy the pack in camp.

So I am kind of back to square one I guess. I need to check the merchants inventory at the proper times before and after he restocks. Is this doable retrospectively (i.e. if I loaded this game into an existing save could it go back and look at the merchants inventory)?

I looked at the prelude folder and found 3 merchants. I think that the merchants are 1) the regular quartermaster 2) the quartermaster's 'special goods' and 3) The tranquil merchant. Regardless of if night and day are two different areas, the merchants seem to be the same and somehow an extra backpack is added to the existing inventory. (Feel free to show me I am wrong at any point here.)

As far as I can tell this means that even if I can go back to look at the merchant inventory in an existing save I will, at best in that scenario, only be able to know if one backpack was skipped, so there is still value in checking inventory size at the end of Ostigar and populating the alternate merchants backpack supply then, but as mentioned this is primarily meant as a bailout mod for folks that realize there mistake far to late.

Modifié par Silverque, 06 mai 2010 - 08:54 .


#7
Silverque

Silverque
  • Members
  • 5 messages
@TimelordDC - Thank you very much. That is certainly going to be useful. A couple questions and thoughts though.

1) Do I really need to check twice? There are no backpack in the game before that point so I should just be able to check once (when the battle begins) and since I know the base carrying capacities (70 for no pack, 80 for one, and 90 for two) check against those. 

2) At night you can go into the wilds until you talk to Duncan and start the battle. I don't think that really interferes with what you suggested though. Just thought I'd mention it in case I am missing something

Modifié par Silverque, 06 mai 2010 - 08:49 .