Home » MODDING HQ 1.13 » Flugente's Magika Workshop » New feature: Externalised Merchants
New feature: Externalised Merchants[message #313363]
|
Thu, 20 December 2012 02:04
|
|
Flugente |
|
Messages:3507
Registered:April 2009 Location: Germany |
|
|
More (and externalised) merchants
As recent features have increased the need to buy local Arulcan products dramatically :angel: , I have increased the number of merchants that Arulco has. There can now be up to 21 additional merchants (arbitrary number, it seems enough for the moment). I also externalised the merchant data.
Thus it is now possible, via xml, to define any NPC to be a merchant or repairguy. I figure modders might have a use for this
There are new xmls in TableData/NPCInventory. The most interesting one is Merchants.xml, which has the following entries (lets look at Tony's entries as an example):
<MERCHANTSLIST>
<MERCHANT>
<uiIndex>0</uiIndex> <-- index of merchant
<szName>Tony</szName> <-- name of merchant (orientation purpose only ;-) )
<dBuyModifier>0.75</dBuyModifier> <-- buy cost modifier (speed modifier for repairguys)
<dSellModifier>1.25</dSellModifier> <-- sell cost modifier (repair cost modifier for repairguys)
<ubShopKeeperID>91</ubShopKeeperID> <-- ID of this NPC. Relevant values are on top of xml
<ubTypeOfArmsDealer>0</ubTypeOfArmsDealer> <-- 0: buy/sell 1: sell only 2: buy only 3: repair
<iInitialCash>15000</iInitialCash> <-- cash at begin of game
<uiFlags>1342177280</uiFlags> <-- behaviour flags, explanation below...
<dailyIncrement>15000</dailyIncrement> <-- add this amount of money every day
<dailyMaximum>15000</dailyMaximum> <-- maximum cash every day
<dailyRetained>0</dailyRetained> <-- we can carry this amount of money to the enxt day
<minCoolness>1</minCoolness> <-- min coolness for our stock
<maxCoolness>10</maxCoolness> <-- max coolness for our stock
<addToCoolness>1</addToCoolness>
<coolnessProgressRate>10</coolnessProgressRate>
<daysDelayMin>2</daysDelayMin>
<daysDelayMax>3</daysDelayMax>
<useBRSetting>0</useBRSetting> <-- use BR settings?
<allInventoryAlwaysAvailable>0</allInventoryAlwaysAvailable> <-- is all inventory always available?
<nonprofile_loyaltyrequired>30</nonprofile_loyaltyrequired> <-- required town loyalty if this is a non-profile based merchant (ubShopKeeperID 200) in a town
</MERCHANT>
...
</MERCHANTSLIST>
The <uiFlags> is a flagmask. Only some of them are relevant to us at this point. They define the merchants' behaviour when dealing items:
#define ARMS_DEALER_ONLY_USED_ITEMS 0x08000000 // 134217728
#define ARMS_DEALER_GIVES_CHANGE 0x10000000 // 268435456 //The arms dealer will give the required change when doing a transaction
#define ARMS_DEALER_ACCEPTS_GIFTS 0x20000000 // 536870912 //The arms dealer is the kind of person who will accept gifts
#define ARMS_DEALER_SOME_USED_ITEMS 0x40000000 // 1073741824 //The arms dealer can have used items in his inventory
#define ARMS_DEALER_HAS_NO_INVENTORY 0x80000000 // 2147483648 //The arms dealer does not carry any inventory
The xml has slots for all merchants, and template fields for 20 new ones, jsut fill them in however ou like. The Inventory of the new merchants is set in TableData/NPCInventory/Additional_Dealer_xxx_Inventory.xml.
Note that UB gets a slightly different Merchants.xml, due to the different merchants there.
Some of the existing ini settings might alter Tony and Devin in a few regards - I'll eventually erase them I guess.
Note that this xml includes all existing merchants and removes hardcoded values. So any change will influence your dealers.
You can now simply define your own dealers, just fill in the correct values. However, when defining a new merchant, it can take a few days for them to get stock - better do that before starting a new game.
Non-merchant NPCs have no fitting speechfiles, thus they might say odd things when selling stuff. A noble exception is Tina. Altough no code section anywhere indicates that she was intended to be a merchant, her ingame story and speechfiles suggest exactly that. For this reason, I made her sell clothes and LBE gear from now on.
A local woman sells food, seems normal...
... but her son clearly has bad music taste, or watches a bit too much 2012 Anime. Or something.
This guy repairs all their stuff.
Lets hope he's not on the manufacturing side as well.
@JMich: I'll pm you the exact datatypes for the editor later.
By the way... this breaks savegame compatibility. Playing with this requires a new game, no way around that.
This is in the trunk since r5744, and requires GameDir >= r1578.
Go shopping! Christmas shows its ugly head!
[Updated on: Sun, 15 May 2016 18:28] Report message to a moderator
|
|
|
|
|
|
|
|
|
|
Re: New feature: Externalised Merchants[message #341344 is a reply to message #316708]
|
Thu, 04 June 2015 16:00
|
|
Flugente |
|
Messages:3507
Registered:April 2009 Location: Germany |
|
|
As or r7887 & GameDir r2251, Kyle finally takes over the San Mona leather shop once his quest is over (it always seemed a bit odd that he moved out of the tattoo parlour but never arrived in the leather shop - now he'll be there). He sells leather clothes (not that we have a wide selection of those) just like he said he would, plus all sorts of clothes. And a bit of kinky stuff, because gays in video games are always over-the-top kinky.
He also sells LBE MOLLE gear, so you now can get MOLLE in the country, if you do a quest beforehand. Quest reward or whatever.
I know now that it could never work between us, as much as we wanted to, it could never be! Not because you're a rabbit, but because you're black.
If you want, you can donate to me. This will not affect how and what I code, and I will not code specific features in return. I will be thankful though.Report message to a moderator
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Re: New feature: Externalised Merchants[message #357495 is a reply to message #313363]
|
Tue, 04 June 2019 06:02
|
|
Kitty |
|
Messages:473
Registered:October 2017 Location: Germany |
|
|
I'm struggling with adding merchants whose inventory should be allways completly available. The merchants shows up where it should, I can trade with him, but what's available seems to be random choice out of it's inventory (AdditionalDealerInventory 51 in this case).
Since placement and inventory seem to work I might have something wrong in merchants.xml. Anybody able to give me a hint why these setting didn't result in "allInventoryAllwaysAvailable" ? I tried it with 0 instead of 1 at this tag, too. Although I'm not sure what "addToCoolness" is refering to, I changed numbers from 0 to 10 but still... So, after numerous attempts with every combination I could think of, waiting for days and weeks inbetween next buying to allow restocking, liberating up to three cities before, etc. I never had a full inventory with all should-be-available items out of inventory. I don't get, what I'm possibly doing wrong.
<MERCHANT>
<uiIndex>70</uiIndex>
<szName>pharmacy Chitzena (A3)</szName>
<dBuyModifier>1.0</dBuyModifier>
<dSellModifier>1.3</dSellModifier>
<ubShopKeeperID>200</ubShopKeeperID>
<ubTypeOfArmsDealer>1</ubTypeOfArmsDealer>
<iInitialCash>1500</iInitialCash>
<uiFlags>268435456</uiFlags>
<dailyIncrement>1500</dailyIncrement>
<dailyMaximum>3000</dailyMaximum>
<dailyRetained>1500</dailyRetained>
<minCoolness>1</minCoolness>
<maxCoolness>10</maxCoolness>
<addToCoolness>10</addToCoolness>
<coolnessProgressRate>100</coolnessProgressRate>
<daysDelayMin>1</daysDelayMin>
<daysDelayMax>2</daysDelayMax>
<useBRSetting>0</useBRSetting>
<allInventoryAlwaysAvailable>1</allInventoryAlwaysAvailable>
<nonprofile_loyaltyrequired>5</nonprofile_loyaltyrequired>
</MERCHANT>
(It's for an AR-Map, that's why there is a paharmacy at A3)
Edit: The reason for the inventory not full is probably time. So, waiting a week or so helped.
[Updated on: Sat, 27 July 2019 16:58]
How to get: latest 1.13, 7609 and more | 7609 SCI (eng) | Compiling+SVN
I need more details. (Didi Hallervorden) Report message to a moderator
|
|
|
|
|
Re: New feature: Externalised Merchants[message #358673 is a reply to message #313363]
|
Wed, 18 December 2019 02:37
|
|
rotundrew |
Messages:2
Registered:March 2016 |
|
|
is the merchant in a wheelchair that was in the rebel hideout removed, also the merchant in the middle sector of Drassen that has a store in her home. I played a SCI build a few months ago and they were present and the newest build they are not?
Report message to a moderator
|
Civilian
|
|
|
Re: New feature: Externalised Merchants[message #358797 is a reply to message #358673]
|
Thu, 16 January 2020 02:37
|
|
ZedJA2 |
|
Messages:202
Registered:January 2018 |
|
|
Don't forget that there is also an .ini file that needs to have the setting on for the Additional Merchants to be active. I believe the default is OFF so you will have to check your main .ini file to make sure it is on -- at least that was the way in the 8696 version EXE. Not certain if there were any changes to merchants since.
EDIT IN: The location is in JA2options.ini, around line 1019-1023. There are actually two lines that need to be set as TRUE, one pertains to Allow Extra Civilians, the other to Allow Extra Merchants:
<<
;----------------------------------------------------------------------------------------------------------------------- -------
; Default: FALSE
; Additional civilians can be placed in maps via Lua scripts, see Scripts/strategicmap.lua: HandleSectorTacticalEntry()
; It is also possible to place new merchants (that don't require a NPC profile) this way, see the same file
;----------------------------------------------------------------------------------------------------------------------- -------
ALLOW_EXTRA_CIVILIANS = TRUE
; Allow placing of new merchants
; Note: this requires ALLOW_EXTRA_CIVILIANS to be TRUE
ALLOW_EXTRA_MERCHANTS = TRUE
>>
The other possibility would be that the LUA file that needs to have the script for inserting the Additional Merchants was either changed or is not where it should be. However, that is a less likely scenario.
For example, whenever you upgrade, if you copy over the .ini file, it may overwrite your previous selection.
One of the horrors of updating, is that most options are reset, some options are moved from one file to another location, some are moved to being a new in-game selectable option, and additional files from the directories may be required, but those overwrite previous customizations unless you do everything by hand. If you do it by hand, though, the chance for errors and the need for hours of hand work, makes it a bit of a pain in the neck.
[Updated on: Thu, 16 January 2020 02:44] Report message to a moderator
|
Sergeant 1st Class
|
|
|
|
|
|
Re: New feature: Externalised Merchants[message #360378 is a reply to message #360377]
|
Tue, 16 June 2020 01:22
|
|
Flugente |
|
Messages:3507
Registered:April 2009 Location: Germany |
|
|
At the very least we'd need to differentiate between genders I think.
Shopkeepers use the following quotes in the shopkeeper screen:
Toggle Spoiler
// COMMON shop keeper quote enums
enum
{
// Quotes 0-9 are generic NPC quotes common to everyone and controlled by the normal NPC Dialogue system.
//10
SK_QUOTES_DEALER_OFFERED_MONEY_AS_A_GIFT = 10,
SK_QUOTES_PLAYER_FIRST_ENTERS_SKI,
SK_QUOTES_RANDOM_QUOTE_WHILE_PLAYER_DECIDING_1,
SK_QUOTES_RANDOM_QUOTE_WHILE_PLAYER_DECIDING_2,
SK_QUOTES_RANDOM_QUOTE_WHILE_ITEMS_CHOSEN_TO_TRADE,
//15
SK_QUOTES_RANDOM_QUOTE_WHILE_ITEMS_CHOSEN_TO_SELL_OR_REPAIR,
SK_QUOTES_PLAYER_REQUESTED_EVALUATION,
SK_QUOTES_DURING_EVALUATION_STUFF_REJECTED,
SK_QUOTES_EVALUATION_RESULT_VALUE_OF_ZERO,
SK_QUOTES_EVALUATION_RESULT_SOME_REALLY_DAMAGED_ITEMS,
//20
SK_QUOTES_EVALUATION_RESULT_NORMAL,
SK_QUOTES_EVAULATION_PLAYER_DOESNT_HAVE_ENOUGH_VALUE,
SK_QUOTES_PLAYER_HAS_EXACTLY_ENOUGH_MONEY_FOR_TRANSACTION,
SK_QUOTES_PLAYER_HAS_TOO_MUCH_MONEY_FOR_TRANSACTION,
SK_QUOTES_PRESSES_DONE_HAS_AT_LEAST_1_TRANSACTION,
//25
SK_QUOTES_PRESSED_DONE_HASNT_MADE_TRANSACTION,
SK_QUOTES_PRESSED_DONE_STILL_HAS_STUFF_IN_OFFER_AREA,
SK_QUOTES_CANT_AFFORD_TO_BUY_OR_TOO_MUCH_TO_REPAIR,
#ifdef JA2UB
SK_QUOTES_BETTY_IS_ENEMY,
SK_QUOTES_NPC_HEALED_BY_PC,
//30 JA25 UB
SK_QUOTES_DEFAULT_WHEN_FIGHTING_NEARBY,
SK_QUOTES_FOLLOWS_QUOTE_1_POSITIVE,
SK_QUOTES_FOLLOWS_QUOTE_1_NEGATIVE,
SK_QUOTES_NPC_WANTS_TO_CLOSE_UP_SHOP,
SK_QUOTES_WHEN_PLAYER_BUYS_PORNO,
//35
SK_QUOTES_INTRO_TO_TEX,
SK_QUOTES_INTRO_TO_TEX_FOLLOW_UP_1,
SK_QUOTES_INTRO_TO_TEX_FOLLOW_UP_2,
SK_QUOTES_RANDOM_QUOTE_WHILE_PLAYER_DECIDING_3,
SK_QUOTES_RANDOM_QUOTE_WHILE_PLAYER_DECIDING_4,
//40
SK_QUOTES_NPC_SPECIFIC_40,
SK_QUOTES_NPC_SPECIFIC_41,
SK_QUOTES_NPC_SPECIFIC_42,
SK_QUOTES_NPC_SPECIFIC_43,
SK_QUOTES_NPC_SPECIFIC_44,
SK_QUOTES_NPC_SPECIFIC_45,
SK_QUOTES_NPC_SPECIFIC_46,
SK_QUOTES_NPC_SPECIFIC_47,
SK_QUOTES_NPC_SPECIFIC_48,
SK_QUOTES_NPC_SPECIFIC_49,
SK_QUOTES_NPC_SPECIFIC_50,
SK_QUOTES_NPC_SPECIFIC_51,
SK_QUOTES_NPC_SPECIFIC_52,
SK_QUOTES_NPC_SPECIFIC_53,
SK_QUOTES_NPC_SPECIFIC_54,
#endif
NUM_COMMON_SK_QUOTES,
// Quotes 28+ are NPC Specific, and are not under direct control of the SKI system. The get used by .COD files
};
That is quite a bit to play with. I recall having a bit of trouble when I added Additional Dialogue for shopkeepers with displaying the text to the sound - the game really didn't like that - so I'm just playing the sound. But that sounds fine I think.
I'm still pondering where one would implement parts of it - whether to just build a sound file name in the code and search a specific location for a fitting file, or whether to script it in lua - but this shouldn't be too hard, apart from navigating the swamp that is shopkeeper stuff.
In a way this somewhat opens the door to having non-profile based people talk (apart from grunting when we shoot them in the face), but I see that more as a positive.
[Updated on: Tue, 16 June 2020 01:23]
I know now that it could never work between us, as much as we wanted to, it could never be! Not because you're a rabbit, but because you're black.
If you want, you can donate to me. This will not affect how and what I code, and I will not code specific features in return. I will be thankful though.Report message to a moderator
|
|
|
|
Re: New feature: Externalised Merchants[message #360379 is a reply to message #360378]
|
Tue, 16 June 2020 02:00
|
|
Kitty |
|
Messages:473
Registered:October 2017 Location: Germany |
|
|
Flugente wrote on Tue, 16 June 2020 01:22
I'm still pondering where one would implement parts of it - whether to just build a sound file name in the code and search a specific location for a fitting file, or whether to script it in lua - but this shouldn't be too hard, apart from navigating the swamp that is shopkeeper stuff.
In a way this somewhat opens the door to having non-profile based people talk (apart from grunting when we shoot them in the face), but I see that more as a positive.
Wouldn't using "PlaySound" instead of "PlayJA2Sample" be useful for this? Then Vritran wouldn't be restricted to a sample-array for sounds in code, since this would allow to take the sounds directly from a directory instead.
At least for ActionItems this seems to be working, I did this. Plays a sound directly from directory of choice.
if ActionID == 25 then
PlaySound("Sounds\\Engine01.wav", SoundVolume.HIGHVOLUME, sGridNo)
end
[Updated on: Tue, 16 June 2020 02:14]
How to get: latest 1.13, 7609 and more | 7609 SCI (eng) | Compiling+SVN
I need more details. (Didi Hallervorden) Report message to a moderator
|
|
|
|
Re: New feature: Externalised Merchants[message #360381 is a reply to message #360379]
|
Tue, 16 June 2020 02:23
|
|
Flugente |
|
Messages:3507
Registered:April 2009 Location: Germany |
|
|
Uh, yes? But he still needs the number to know which sound to play, at which point one could easily define a file name pattern like "merchantID_shopkeepersoundID" and habe the game use that. Lua offers a lot more flexibility, true, but one also has to write that down, then.
Note that PlaySound does not use the third argument, so your sGridNo is actually unnecessary.
I know now that it could never work between us, as much as we wanted to, it could never be! Not because you're a rabbit, but because you're black.
If you want, you can donate to me. This will not affect how and what I code, and I will not code specific features in return. I will be thankful though.Report message to a moderator
|
|
|
|
|
Re: New feature: Externalised Merchants[message #360388 is a reply to message #360386]
|
Wed, 17 June 2020 01:06
|
|
Flugente |
|
Messages:3507
Registered:April 2009 Location: Germany |
|
|
As expected, it works fine. I'm using a lua function that looks like this:
-- functions used here:
--
-- path: path and name of soundfile we want to play (in .wav, .ogg or .mp3 format)
-- volume: optional sound volume (65: medium volume, 127: loud), default 65
-- PlaySound(path, volume)
-- handle
-- sSectorX, sSectorY and bSectorZ indicate the sector coordinates
-- ubMerchantID is the ID of the merchant for whom this is called
-- usQuoteNum is the event of the dialogue that is supposed to be called
function HandleNPCMerchantQuote(sSectorX, sSectorY, bSectorZ, ubMerchantID, usQuoteNum )
-- test sounds
choicenr = math.random(1, 7)
if ( choicenr == 1 ) then PlaySound("Sounds//Weapons//38//38 CALIBER.ogg")
elseif ( choicenr == 2 ) then PlaySound("Sounds//Weapons//38//38SUPER PISTOL SINGLE SHOT.ogg")
elseif ( choicenr == 3 ) then PlaySound("Sounds//Weapons//38//380 MAC11 BURST 5.ogg")
elseif ( choicenr == 4 ) then PlaySound("Sounds//Weapons//RIFLE SILENCER BURST 5.ogg")
elseif ( choicenr == 5 ) then PlaySound("Sounds//Weapons//PUMP-ACTION.ogg")
elseif ( choicenr == 6 ) then PlaySound("Sounds//Weapons//BOLT-ACTION SPRINGFIELD.ogg")
elseif ( choicenr == 7 ) then PlaySound("Sounds//Weapons//50CAL.WAV")
end
end
As I assume the plan isn't to have the merchants double as firearms, this is where the sounds would go. ubMerchantID is the ID used when placing a merchant in HandleSectorTacticalEntry(...) in strategicmap.lua:
-- armour store (Skin Tight Fashions)
CreateCivilian(13010, CivGroup.KINGPIN_CIV_GROUP, 67, Bodytype.MINICIV, -1, -1, -1, -1, -1, -1, -1, -1)
so in this case it would be 67. usQuoteNum meanwhile is number of the quote that would be played if this were a profile-based merchant, which I posted earlier.
I could add extra arguments but am not that hopeful about it. Due to the way this lua function is accessed deep in the code, I'd prefer not having to drag in extra arguments, like stats of the merchant themself, though one should already know their bodytype and thus gender as we set that ourselves via CreateCivilian(...)
The only thing I'm unsure of is whether to add any sounds from movies/games/etc. you find to the GameDir trunk. That feels... unsafe, which is one of the reasons the mercs I made are not part of 1.13.
But even then nothing would stop one from simply packing the sounds as an addon.
[Updated on: Wed, 17 June 2020 01:09]
I know now that it could never work between us, as much as we wanted to, it could never be! Not because you're a rabbit, but because you're black.
If you want, you can donate to me. This will not affect how and what I code, and I will not code specific features in return. I will be thankful though.Report message to a moderator
|
|
|
|
|
Re: New feature: Externalised Merchants[message #360398 is a reply to message #360393]
|
Wed, 17 June 2020 23:24
|
|
Flugente |
|
Messages:3507
Registered:April 2009 Location: Germany |
|
|
Well, as of r8821 & GameDir r2550, this is now a thing. I added the function to Overhead.lua, and also added the shopkeeper's bodytype as an argument, so we can determine the gender:
-- (relevant) bodytypes
Bodytype =
{
REGMALE = 0,
BIGMALE = 1,
STOCKYMALE = 2,
REGFEMALE = 3,
FATCIV = 11,
MANCIV = 12,
MINICIV = 13,
DRESSCIV = 14,
HATKIDCIV = 15,
KIDCIV = 16,
CRIPPLECIV = 17,
}
-- shopkeeper quotes while in the shop interface
Shopkeeperquote =
{
SK_QUOTES_DEALER_OFFERED_MONEY_AS_A_GIFT = 10,
SK_QUOTES_PLAYER_FIRST_ENTERS_SKI = 11,
SK_QUOTES_RANDOM_QUOTE_WHILE_PLAYER_DECIDING_1 = 12,
SK_QUOTES_RANDOM_QUOTE_WHILE_PLAYER_DECIDING_2 = 13,
SK_QUOTES_RANDOM_QUOTE_WHILE_ITEMS_CHOSEN_TO_TRADE = 14,
SK_QUOTES_RANDOM_QUOTE_WHILE_ITEMS_CHOSEN_TO_SELL_OR_REPAIR = 15,
SK_QUOTES_PLAYER_REQUESTED_EVALUATION = 16,
SK_QUOTES_DURING_EVALUATION_STUFF_REJECTED = 17,
SK_QUOTES_EVALUATION_RESULT_VALUE_OF_ZERO = 18,
SK_QUOTES_EVALUATION_RESULT_SOME_REALLY_DAMAGED_ITEMS = 19,
SK_QUOTES_EVALUATION_RESULT_NORMAL = 20,
SK_QUOTES_EVAULATION_PLAYER_DOESNT_HAVE_ENOUGH_VALUE = 21,
SK_QUOTES_PLAYER_HAS_EXACTLY_ENOUGH_MONEY_FOR_TRANSACTION = 22,
SK_QUOTES_PLAYER_HAS_TOO_MUCH_MONEY_FOR_TRANSACTION = 23,
SK_QUOTES_PRESSES_DONE_HAS_AT_LEAST_1_TRANSACTION = 24,
SK_QUOTES_PRESSED_DONE_HASNT_MADE_TRANSACTION = 25,
SK_QUOTES_PRESSED_DONE_STILL_HAS_STUFF_IN_OFFER_AREA = 26,
SK_QUOTES_CANT_AFFORD_TO_BUY_OR_TOO_MUCH_TO_REPAIR = 27,
}
-- functions used here:
--
-- path: path and name of soundfile we want to play (in .wav, .ogg or .mp3 format)
-- volume: optional sound volume (65: medium volume, 127: loud), default 65
-- PlaySound(path, volume)
-- handle
-- sSectorX, sSectorY and bSectorZ indicate the sector coordinates
-- ubMerchantID is the ID of the merchant for whom this is called
-- ubBodyType is the character model the merchant uses
-- usQuoteNum is the event of the dialogue that is supposed to be called
function HandleNPCMerchantQuote(sSectorX, sSectorY, bSectorZ, ubMerchantID, ubBodyType, usQuoteNum )
-- do stuff here!
end
You should post what you come up with using this, btw.
I know now that it could never work between us, as much as we wanted to, it could never be! Not because you're a rabbit, but because you're black.
If you want, you can donate to me. This will not affect how and what I code, and I will not code specific features in return. I will be thankful though.Report message to a moderator
|
|
|
|
|
Re: New feature: Externalised Merchants[message #360446 is a reply to message #360442]
|
Wed, 24 June 2020 22:53
|
|
Flugente |
|
Messages:3507
Registered:April 2009 Location: Germany |
|
|
Hu? It's in there, at the end of the file, it's just empty:
- functions used here:
--
-- path: path and name of soundfile we want to play (in .wav, .ogg or .mp3 format)
-- volume: optional sound volume (65: medium volume, 127: loud), default 65
-- PlaySound(path, volume)
-- handle
-- sSectorX, sSectorY and bSectorZ indicate the sector coordinates
-- ubMerchantID is the ID of the merchant for whom this is called
-- ubBodyType is the character model the merchant uses
-- usQuoteNum is the event of the dialogue that is supposed to be called
function HandleNPCMerchantQuote(sSectorX, sSectorY, bSectorZ, ubMerchantID, ubBodyType, usQuoteNum )
end
I know now that it could never work between us, as much as we wanted to, it could never be! Not because you're a rabbit, but because you're black.
If you want, you can donate to me. This will not affect how and what I code, and I will not code specific features in return. I will be thankful though.Report message to a moderator
|
|
|
|
|
|
|
Re: New feature: Externalised Merchants[message #360474 is a reply to message #360473]
|
Mon, 29 June 2020 22:33
|
|
Flugente |
|
Messages:3507
Registered:April 2009 Location: Germany |
|
|
That looks good to me. The third version would work best if you have several lines for the same merchant, and is what I would use.
Note that you don't need to use the sector coordinates or the bodytype etc., it's just there in case you need it. This might become necessary, depending on how one sets up the merchants. After all it is possible to have several civilians having the same merchant ID, even in different sectors. It is even possible to create an instant gear teleportation service this way
I know now that it could never work between us, as much as we wanted to, it could never be! Not because you're a rabbit, but because you're black.
If you want, you can donate to me. This will not affect how and what I code, and I will not code specific features in return. I will be thankful though.Report message to a moderator
|
|
|
|
|
|
Goto Forum:
Current Time: Sun Dec 01 14:25:37 GMT+2 2024
Total time taken to generate the page: 0.02303 seconds
|