Adding Merchants to Existing Game
#1
Posté 12 novembre 2009 - 10:39
Also, if you create a new model is there any way to access that from within the main story rather than the "Other Campaigns" menu?
I am not a programmer or a modder, but am trying to learn as much as I can about the toolset, as I might want to dabble in it in the future.
#2
Posté 13 novembre 2009 - 12:07
#3
Posté 13 novembre 2009 - 12:33
That link will probably be broken in a short time, so I hope Georg doesn't mind my quoting him here:
Georg Zoeller wrote...
Dynamic creation of objects in the engine is subject to a host of limitations, reason being our attempts to cut down 'unaccounted' memory usage.
Try avoiding CreateObject whenever possible.
One thing the OP wondered was if you could use a store in another area in the area list. I don't really know myself, but if it's like NWN2 (so maybe a bit like NWN1 then), then I thought the store had to be somewhat close to the merchant. Maybe that won't be an issue in DA, but there seem to be a few gotchas to contend with.
Modifié par FollowTheGourd, 13 novembre 2009 - 01:23 .
#4
Posté 13 novembre 2009 - 01:09
#5
Posté 13 novembre 2009 - 01:21
#6
Posté 13 novembre 2009 - 01:53
#7
Posté 13 novembre 2009 - 02:07
Kreugen wrote...
I was going to add a NPC to camp that
will teleport you to a new area with the vendor (unlimited regs all in
one place, yay) but I'm stuck on figuring out what the area name is for
the camp and how to get the coordinates. I assume you find these by
creating a new area and selecting the layout, but I can't find any such
layout for the camp.
You can find the area tags in the areadata.xls file. The tag for the camp is "cam100ar_camp_plains".
Alternatively you can retrieve the area tags and location coordinates through scripting.
- GetTag(GetArea(GetHero())) should give you a string representation of the are tag.
- VectorToString(GetPositionFromLocation(GetLocation(GetHero()))) should give you the X,Y,Z coordinates of your current position in one string.
If you omit the VectorToString() function you get the coordinates in vector format which is what's needed for most of the things.
Modifié par weriKK, 13 novembre 2009 - 02:10 .
#8
Posté 13 novembre 2009 - 05:37
I'll have a look at updating the Wiki later with some more info too
#9
Posté 13 novembre 2009 - 07:02
Edit: Turns out I just forgot to change the merchant object tag like an idiot. I have successfully added a new merchant!
Modifié par Hurrr, 13 novembre 2009 - 10:15 .
#10
Posté 13 novembre 2009 - 07:37
If someone tries to create an 'item' with CreateObject, can you please confirm that it doesn't work....or that I am doing something wrong....
In regards to creating merchants, you can scan through all the objects in an area to find an existing merchant and use that one. Or if you have another merchant in the same AreaList and you know the tag, you can also access that one.
I'm still investigating dynamic ways to do this though......there must be a better way some how....
#11
Posté 20 décembre 2009 - 09:17
#12
Posté 21 décembre 2009 - 01:15
This however makes all these mods incompatible with eachother as each override's the same file.
Is there a nice way to avoid this?
What I've been trying is to load my custom area with CreateObject(OBJECT_TYPE_AREA, R"yite_shopping_zone.are", lMerchantLocation) but I'm starting to guess that OBJECT_TYPE_AREA cannot be used in CreateObject.
#13
Posté 21 décembre 2009 - 07:21
#14
Posté 21 décembre 2009 - 10:10
What I was wondering is if there's another way to get your merchant area loaded (like with CreateObject) or maybe just the merchant (I know it's already been said that store's cannot be used with CreateObject but maybe some other function?)
It could be that adding merchants to an existing area was never intended and new vendors should be in their own area's.
#15
Posté 24 décembre 2009 - 11:54
Threw her in the Denerim brother, The Pearl. Other thoughts were the dwarven encampment outside of Orzzammar, Denerim Market, Gnawed Noble Tavern, Dalish Camp, Redcliffe Village, etc.





Retour en haut






