• New Horizons on Maelstrom
    Maelstrom New Horizons


    Visit our website www.piratehorizons.com to quickly find download links for the newest versions of our New Horizons mods Beyond New Horizons and Maelstrom New Horizons!

Sneaky Trader Mod - coding dilemma help please?

CatalinaThePirate

Unholy Terror,
Storm Modder
<img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/hi.gif" style="vertical-align:middle" emoid=":gday" border="0" alt="hi.gif" /> all!

Here is the original concept of my Sneaky Trader mod for those of you who are unfamiliar with it:

<a href="http://forum.piratesahoy.net/ftopic2168.php" target="_blank">http://forum.piratesahoy.net/ftopic2168.php</a>

Now my dilemma:

See, I have the dialog set up so that when you talk to the sneaky trader, he'll make you some slick conversation that you can either rebuff or agree to see his wares. IF you rebuff him enough times he gets a little snippy and you get to threaten to call the guards or several other interesting choices.

With that, he says, "Whoops, gotta go!" and runs off, leaving you standing there swearing at him. It's a brief moment, but it's comedic and I love it.

UNFORTUNATELY it only works in OXBAY! <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/tongue.gif" style="vertical-align:middle" emoid=":blah:" border="0" alt="tongue.gif" />

I have him (or his cousin of various names but same face and stories, hmmm) turning up in all the towns in various places, but everywhere else he just stands there instead of running off.

Here is a fragment of the code:

<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->  case "exit_runaway":

     Dialog.Text = DLG_TEXT[34];

     Link.l1 = DLG_TEXT[35] + RandSwear();

     Link.l1.go = "exit";

     LAi_SetActorType(characterFromID("Sneaky Trader"));

     LAi_ActorRunToLocation(NPchar, "reload", "reload2", "none", "", "", "", 15.0);

 break;<!--c2--></div><!--ec2-->

I'm fairly sure there should be reload2 locators everywhere, but of course that's not certain, and I can't see what the locators are called when viewing it in GMView.

Location areas for my Sneaky Traders are:

Oxbay_town
Greenford_port
Douwesen_port
QC_town
Falaise_de_fleur_port_01
Muelle_port
Conceicao_port
Redmond_town_03

<img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/unsure.gif" style="vertical-align:middle" emoid=":?" border="0" alt="unsure.gif" /> Anybody got a clue what to do here? Is there a way to find out what are common locators for each area (I'm guessing if I get the RIGHT locator for the area it'll all work).

Thanks! <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/icon_mrgreen1.gif" style="vertical-align:middle" emoid=":cheeky" border="0" alt="icon_mrgreen1.gif" />
 
From what I can see in other files, there are references to "Reload2" in every city file except Greenford, but I don't see any references that include both 'LAi_ActorRunToLocation()' <i>and</i> 'reload2'. Unfortunately, I don't know enough about locator coding to really help get the problem sorted for you. <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/sad.gif" style="vertical-align:middle" emoid=":(" border="0" alt="sad.gif" />
 
E.g. FdF has no "reload2" locator. If you want to make locators visible in the game you could use the method described in the "Location Cloning" tut <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/icon_wink.gif" style="vertical-align:middle" emoid=";)" border="0" alt="icon_wink.gif" />

But e.g. Conceicao port HAS a reload2, so that can't be the main reason for your problem.

Is the sneaky trader always the same character in all towns?

Would it work if you change

LAi_SetActorType(characterFromID("Sneaky Trader"));

into

LAi_SetActorType(NPchar);

???

BTW, I love the idea. Just the kind of mod I like, funny, out of the ordinary and with unpredictable end <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/cheers.gif" style="vertical-align:middle" emoid=":cheers" border="0" alt="cheers.gif" />:
 
<img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/icon_eek.gif" style="vertical-align:middle" emoid=":shock:" border="0" alt="icon_eek.gif" /> CCC you are a genius! I would have probably figured it out eventually, but that setting it to Lai_SetActorType(NPchar); did the trick!

THANK YOU!!!

<img src="http://www.ganotherapyusa.com/extras/smileyhug.gif" border="0" class="linked-image" />

I fiddled about with that visible locator thing from the tut (I knew it was here somewhere, just couldn't remember where), and found that I can use goto3 as a common spot. I'm thinking I might change that, not sure - some have the sneaky trader running straight to a guard... I really want him to just run AWAY. <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/icon_mrgreen1.gif" style="vertical-align:middle" emoid=":cheeky" border="0" alt="icon_mrgreen1.gif" />

I'll sort it out. Thanks again! <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/me.gif" style="vertical-align:middle" emoid=":onya" border="0" alt="me.gif" />
 
for some reason this mod makes me think of Benny hill....

"Whaa.... Hey! This "Mithril Blade" is nothing more than wood and silverleaf!"

<img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/huhh.gif" style="vertical-align:middle" emoid=":eek:k" border="0" alt="huhh.gif" />

CUE MUSIC

::ugly jacketed dude proceeds to run around town, 5 guards in tow::

and you're left standing there with a toy sword that cost you $10,000

:x <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/tongue.gif" style="vertical-align:middle" emoid=":blah:" border="0" alt="tongue.gif" />
 
Nice work Catalina,I like your idea of him running away after rebuffing him.I know ye have spent a lot O' time on this mod <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/yes.gif" style="vertical-align:middle" emoid=":yes" border="0" alt="yes.gif" /> so am looking forward to playing it with anticipation <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/par-ty.gif" style="vertical-align:middle" emoid=":cheers" border="0" alt="par-ty.gif" />
 
<!--QuoteBegin-leadfoot+--><div class='quotetop'>QUOTE(leadfoot)</div><div class='quotemain'><!--QuoteEBegin-->for some reason this mod makes me think of Benny hill....<!--QuoteEnd--></div><!--QuoteEEnd-->

Does the mod include an old short bald bloke that I can follow behind and slap the top of his head? <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/laugh.gif" style="vertical-align:middle" emoid="xD:" border="0" alt="laugh.gif" />
 
Haha, yes, that's the whole idea. I've got some other ideas for him that I'm going to have to hack away at... I initially thought I'd try to make this a very small "footprint" on the game (avoid writing in quest_reactons.c) but now I've got these IDEAS... Heh. Well, I'll post an update when I've got that nailed down. Should be fun stuff, tho. <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/icon_mrgreen1.gif" style="vertical-align:middle" emoid=":cheeky" border="0" alt="icon_mrgreen1.gif" />
 
<!--quoteo--><div class='quotetop'>QUOTE</div><div class='quotemain'><!--quotec-->for some reason this mod makes me think of Benny hill....

"Whaa.... Hey! This "Mithril Blade" is nothing more than wood and silverleaf!"
CUE MUSIC
::ugly jacketed dude proceeds to run around town, 5 guards in tow::
and you're left standing there with a toy sword that cost you $10,000<!--QuoteEnd--></div><!--QuoteEEnd-->

Leadfoot, you forgot the girls in the short skirts and lingerie that make up part of the chasing party. <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/laugh.gif" style="vertical-align:middle" emoid="xD:" border="0" alt="laugh.gif" />

You guys didn't really expect that you could talk about Benny Hill and that I wouldn't show up, now did you? <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/icon_eek.gif" style="vertical-align:middle" emoid=":shock:" border="0" alt="icon_eek.gif" />
 
<!--QuoteBegin-CatalinaThePirate+--><div class='quotetop'>QUOTE(CatalinaThePirate)</div><div class='quotemain'><!--QuoteEBegin--><img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/icon_eek.gif" style="vertical-align:middle" emoid=":shock:" border="0" alt="icon_eek.gif" /> CCC you are a genius! I would have probably figured it out eventually, but that setting it to Lai_SetActorType(NPchar); did the trick!<!--QuoteEnd--></div><!--QuoteEEnd-->

Great to hear that my guesswork was a help <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" /> As for the genius, I would like to believe that but in contrast to you *I* was never able to create a decent stageexit for my nursing taverngirl in "Survival". So you are already better there <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/biggrin.gif" style="vertical-align:middle" emoid=":D" border="0" alt="biggrin.gif" />

Does your Sneaky stay at Goto3 after running away? Have you come across any actorcommand that let's the actor LEAVE the location?
 
<!--quoteo--><div class='quotetop'>QUOTE</div><div class='quotemain'><!--quotec-->Does your Sneaky stay at Goto3 after running away? Have you come across any actorcommand that let's the actor LEAVE the location?<!--QuoteEnd--></div><!--QuoteEEnd-->

If not, check the main quest, specifically when you return to Oxbay for the first time and talk to the french captain and convince him, in a drunken stupor, to go out of the city for a little romp with the womens.

I'm pretty sure it's not a command to actually go through a door, but fading out at the doors is a pretty good aproximation
 
<!--QuoteBegin-CouchcaptainCharles+--><div class='quotetop'>QUOTE(CouchcaptainCharles)</div><div class='quotemain'><!--QuoteEBegin-->*I* was never able to create a decent stageexit for my nursing taverngirl in "Survival". So you are already better there <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/biggrin.gif" style="vertical-align:middle" emoid=":D" border="0" alt="biggrin.gif" /><!--QuoteEnd--></div><!--QuoteEEnd-->My gosh! <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/icon_eek.gif" style="vertical-align:middle" emoid=":shock:" border="0" alt="icon_eek.gif" /> What did you want her to do?

<!--QuoteBegin-CouchcaptainCharles+--><div class='quotetop'>QUOTE(CouchcaptainCharles)</div><div class='quotemain'><!--QuoteEBegin-->Does your Sneaky stay at Goto3 after running away?<!--QuoteEnd--></div><!--QuoteEEnd-->Currently, he runs while the dialog is on - you can't move to watch him until you hit the spacebar (to say "HEY!). Then he continues to walk towards that locator, then stops and eventually walks on like the other townspeople. I'd like to get him to continue running - and I think I can do that, it's just getting into quests_reaction.c and making the correct commands for TIME...

<!--QuoteBegin-CouchcaptainCharles+--><div class='quotetop'>QUOTE(CouchcaptainCharles)</div><div class='quotemain'><!--QuoteEBegin-->Have you come across any actorcommand that let's the actor LEAVE the location?<!--QuoteEnd--></div><!--QuoteEEnd-->Leave, like go through a door or gate? Or just fade away?

I'm just guessing here, but there are many of the doorway/gate fades that happen during the tutorial with Malcolm. I'm sure there are commands there - and as far as fading away, check out my Fred Bob Quest - I have a spot where you can fire him (not like you would, but you can) - he walks away, then eventually fades away. I relocate him to a different place so you can find him again if you want to rehire him.

With my Danielle Fix, if you tell her you wish to part company, she walks off and eventually fades away to nowhere... This leaves her open if someone wanted to use her character for a different quest.

Here's the Danielle fadeout from quests_reaction.c, which is similar to the Fred Bob fadeout except that she goes "nowhere" -

<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->  case "Story_Danielle_Departs_Exit":

     RemoveOfficersIndex(pchar, GetCharacterIndex("Danielle"));

     RemovePassenger(pchar, characterFromID("Danielle"));

     LAi_ActorGoToLocation(characterFromID("Danielle"), "Redmond_town_01", "goto", "goto16", "", "", "", 25.0);

     LAi_QuestDelay("Story_Danielle_Departs_Exit2", 25.0);

 break;    



 case "Story_Danielle_Departs_Exit2":

     ChangeCharacterAddress(characterFromID("Danielle"), "", "");

 break;<!--c2--></div><!--ec2-->

The LAi_QuestDelay gives her time to walk a good distance away before she fades, and the ChangeCharacterAddress sends her to "" which is "nowhere" with a nice fade. <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/icon_mrgreen1.gif" style="vertical-align:middle" emoid=":cheeky" border="0" alt="icon_mrgreen1.gif" />
 
hey cat, sorry if you already know this, i just had a quick look and came across <b>CharacterExitFromLocation()</b>, have you already tried that? it seems to be called every time a npc dies, so i assume it's the one that fades them out. i haven't tested it though... <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/happy.gif" style="vertical-align:middle" emoid="^_^" border="0" alt="happy.gif" />
 
Yep, I knew that one, Kieron. I just didn't use it as there are usually time variables I like to add into the fades... <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/icon_mrgreen1.gif" style="vertical-align:middle" emoid=":cheeky" border="0" alt="icon_mrgreen1.gif" />
 
Thanks for the hints everybody:)

My gosh! What did you want her to do?
I fear that there are no actorcommands and no animations for THAT in a Disneygame <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/icon_mrgreen1.gif" style="vertical-align:middle" emoid=":cheeky" border="0" alt="icon_mrgreen1.gif" />

Nooo, actually I wanted to do only very chaste things with the taverngirl. After she told you why you are in her warm room instead of a cold grave I wanted her to walk to the door and disappear. Right now she immediately fades away right where she is standing, and you have just told me the reason for that:
The LAi_QuestDelay gives her time to walk a good distance away before she fades, and the ChangeCharacterAddress sends her to "" which is "nowhere" with a nice fade.
That should solve my problem. Thanks again <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" />[/quote]
 
<img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/cool.gif" style="vertical-align:middle" emoid="8)" border="0" alt="cool.gif" /> Cool! <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/me.gif" style="vertical-align:middle" emoid=":onya" border="0" alt="me.gif" /> Happy to have helped! <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/par-ty.gif" style="vertical-align:middle" emoid=":cheers" border="0" alt="par-ty.gif" />
 
Back
Top