<img src="style_emoticons/<#EMO_DIR#>/laugh.gif" style="vertical-align:middle" emoid="
:" border="0" alt="laugh.gif" /> I love you guys! <img src="style_emoticons/<#EMO_DIR#>/laugh.gif" style="vertical-align:middle" emoid="
:" border="0" alt="laugh.gif" /> <img src="style_emoticons/<#EMO_DIR#>/bow.gif" style="vertical-align:middle" emoid="
" border="0" alt="bow.gif" /> <img src="style_emoticons/<#EMO_DIR#>/buds.gif" style="vertical-align:middle" emoid="
" border="0" alt="buds.gif" /> <img src="style_emoticons/<#EMO_DIR#>/razz.gif" style="vertical-align:middle" emoid="
" border="0" alt="razz.gif" />
Regarding the post count, HA, I am sure if I'd stuck around I'd be closing in fast on 25,000! <img src="style_emoticons/<#EMO_DIR#>/rolleyes.gif" style="vertical-align:middle" emoid="
" border="0" alt="rolleyes.gif" />
Pieter, I should bust up that package so you can download it. I will try to find a moment to put it into pieces for you (and anyone else who finds the huge download a problem).
Here's the notes I wrote:
<!--quoteo--><div class='quotetop'>QUOTE </div><div class='quotemain'><!--quotec-->From: CatalinaThePirate July 29th, 2008
To: Anyone interested in working on the Sneaky Trader mod that I started but never finished up
Here are all the files I could find. Let me give you some sort of idea of how I thought this would work.
The Sneaky Trader is someone who could be set up to be a multiple quest giver – He has numerous items to buy that might (or might not) trigger a quest somewhere else in the archipelago. This has the potential to be expandable at any time – new quests could be written for new items, and added in when they are ready.
There are a lot of pictures of the items, and I think I even set some of them up to use – you'll see, there are textures... He has lock picks, jewelry, native icons, a compass, and even a ship at a very good price – depending upon your luck level (or it might even be random) you might get a great ship for a small price, or you might find just a leaky tub with little value. I thought the jewelry might get you into trouble on another island – for instance triggering recognition in a merchant who will tell you, well, that belongs to Lady So-And-So, and her husband Lord So-And-So will be angry – or give you a reward – or ask you to deliver it somewhere – or a lot of other things. There's a lot of potential here to make side quests or mini quests with the items he sells.
There's also four pieces to a “treasure map†which should lead you all over, too.
This Sneaky Trader should be all over – at least on every major island – and when you encounter him – each time you encounter him he should look a little more ragged – or more beat-up – because people have been upset by him and his deals – but he never claims to be the person you dealt with on the last island - “Oh, you must be talking about my cousin†“Who? Never heard of him.†“I've been told I have a twin somewhere, but I think he's back in Spain (or England, or wherever).â€
He should always be bragging about his special way with the ladies... After all, tinkers and traveling salesmen always seem to have the ladies trailing after them – and this could be another gag – or gig – where you might find a lady accosting him and having him run away before you can get your item from him after you've paid – or a lady telling him she's pregnant with his baby – or an irate husband chasing him with an axe, LOL, you could do a lot of things with that.
I mainly thought that if I could get him set up as a multiple quest-giver, depending upon the item you buy from him you could end up finding that you've bought your way into a quest on a different island – or MANY different islands... The potential for expansion is great – he could have more items added to his list – but he's the only one who has these items (the normal merchants would not have the things he sells, and he would not sell the things a normal merchant would sell).
I wish I had the time to develop him more as I really loved this idea – I think I had some dialog set up for him in my tests. There are also notes from CouchCaptainCharles and NathanKell and perhaps some others – suggestions on how to fix this or that – the trading system &tc. I'm not sure how relevant these notes will be since I am sure things have changed from the original way we had to mod...
Anyhow, I wish you luck in making this rascally scoundrel someone that will be fun to encounter in-game, and who will give you multiple quests that will send you on adventures all over the Caribbean.
Should be fun! Email me if you have any questions, I'll try to help if I can.<!--QuoteEnd--></div><!--QuoteEEnd-->
And here are some notes CCC wrote about the trading interface - as Sneaky will need one of his own:
<!--quoteo--><div class='quotetop'>QUOTE </div><div class='quotemain'><!--quotec-->Seems like the evil genius virus is spreading here Shocked Shocked devil ( How about Dani in the QC establishment? Clad in black leather and wielding a cat_o_nine_tail ? sing grr )
Well, trading and interfaces is something I have hardly done so far. So I can't give you any hints out of experience, but I can tell you what I would TRY
To keep a sneaky item from being offered by normal traders insert this in items\initItems.c:
itm.skiptrade = true;
And to mark it as a sneaky item add an attribute of your own creation, e.g.
itm.sneaky = true;
By checking for that attribute you can always identify and sort out these items elsewhere in the program.
The normal item_trader dialog uses the GiveItemToTrader function to select tradeitems. That one is in quests_reaction.c . The original function, before Nathan changed it, looked like this
void GiveItemToTrader(aref ch)
{
int irand;
ref pchar = GetMainCharacter();
DeleteAttribute(ch, "items");
irand = rand(9);
if (irand == 1) {TakeNItems(ch,"jewelry1", Rand(5)+1);}
irand = rand(9);
if (irand == 1) {TakeNItems(ch,"jewelry2", Rand(5)+1);}
irand = rand(9);
if (irand == 1) {TakeNItems(ch,"jewelry3", Rand(5)+1);}
irand = rand(9);
....
if (irand == 1) {TakeNItems(ch,"indian14", Rand(5)+1);}
irand = rand(9);
if (irand == 1) {TakeNItems(ch,"indian15", Rand(5)+1);}
irand = rand(9);
if (irand == 1) {TakeNItems(ch,"indian16", Rand(5)+1);}
}
So Akella used an "unelegant bunch of if/else statements" as well, and maybe you can use that section in the sneaky dialog as well.
Or you insert a heavily condensed version of Nathan's GiveItemToTrader:
ref itm;
int i;
for(i=0; i<ITEMS_QUANTITY; i++) // this loop cycles through all items
{
makeref(itm,Items
);
if(!CheckAttribute(itm,"sneaky")) continue; // if it's no sneaky item it is being skipped
if(rand(100)> 50) // 50 percent chance that...
{
TakeNItems(ch,itm.id, Rand(2)+1); // ... the trader gets up to 3 items
}
}
As I said, just ideas, don't know if it really works.
The pricecalculation etc. seems to take place largely in interface\itemstrade.c. In there is e.g. the function GetTradeItemPrice. The last line of that
return makeint(makefloat(itmprice)*skillModify);
If you want to add any pricechanges try it there.
Could you record that tune as soundfile for the dungeons ? Shocked
Back to SLIGHTLY less bizarre topics:
Cat do you still have problems with not reappearing traders? This weekend I worked on NPCs who run away as well, and I made something that might work for you as well: NPCs that alternate between two or more locations.
Applied to a Sneaky this would work like this: You'd meet him first in e.g. Oxbay town, and when you scare him he would run away and reappear in Oxbay port. If you scare him there again he would run back to town. Or you could let him shuttle between two or more "hideout" houses, so that you always had to search a little for him.
One nice thing about this is that you don't have to make a case for that in quest_reactions. You can include the whole code in the dialogfile, like this
case "scare":
dialog.text = "I didn't cheat you, I swear!";
Link.l1 = "I'll kill you for that!... Hey, stay here...";
Link.l1.go = "exit_run";
break;
case "Exit_run":
LAi_SetActorType(Npchar);
if(Npchar.location=="Oxbay_town")
{
LAi_ActorRunToLocation(Npchar), "reload", "reload1", "Oxbay_port", "goto", "goto1", "", 20.0);
}
if(Npchar.location=="Oxbay_port")
{
LAi_ActorRunToLocation(Npchar), "reload", "reload1", "Oxbay_town", "goto", "goto1", "", 20.0);
}
DialogExit();
NextDiag.CurrentNode = NextDiag.TempNode;
break;
You must only somewhere switch off the actor type before you can talk to him again.<!--QuoteEnd--></div><!--QuoteEEnd-->
I also discovered something unusual about the Parrot mod note I included - I think I wasn't paying attention when doing it (not enough rum!) and somehow it got all kerfluffeled up. <img src="style_emoticons/<#EMO_DIR#>/dunno.gif" style="vertical-align:middle" emoid="" border="0" alt="dunno.gif" /> If anyone wants to REALLY see what's in there, the .txt file "about_the_parrot" should have a .zip ending instead of .txt - rename it, unzip it, and there are some .xml files in there and some other stuff, not sure at all what's in there - I HOPE it's notes about the the parrot stuff - I don't really know, I have NO IDEA why all this stuff was in this file. <img src="style_emoticons/<#EMO_DIR#>/modding.gif" style="vertical-align:middle" emoid="" border="0" alt="modding.gif" />
Anyhoo... <img src="style_emoticons/<#EMO_DIR#>/icon_mrgreen1.gif" style="vertical-align:middle" emoid="" border="0" alt="icon_mrgreen1.gif" />
Have fun with it, hope it will add to the general madness that usually goes on around here... <img src="style_emoticons/<#EMO_DIR#>/onya.gif" style="vertical-align:middle" emoid="" border="0" alt="onya.gif" />
Sir Christopher, I ALWAYS save that first Pirate Waltz for you! <img src="style_emoticons/<#EMO_DIR#>/laugh.gif" style="vertical-align:middle" emoid=":" border="0" alt="laugh.gif" /> Cognac Big Gulp, LOL! <img src="style_emoticons/<#EMO_DIR#>/laugh.gif" style="vertical-align:middle" emoid=":" border="0" alt="laugh.gif" />
You know, I just set up Redguard on an old laptop with Win98 installed. I was running Cyrus around Stros Mkai and of course it reminded me of you.
And Vassal's poem, LOL!
Here's a current pic of me at our local RenFaire:
<img src="http://www.catalinathepirate.com/extras/me.jpg" border="0" class="linked-image" /> <img src="style_emoticons/<#EMO_DIR#>/hi.gif" style="vertical-align:middle" emoid=":gday" border="0" alt="hi.gif" />
BTW, I might have an email addy for Alan Smithee, I'll see if I can find him.