Skocz do zawartości

Zdjęcie

Caravan from Leilon to Crossroad Keep defunct


  • Zaloguj się, aby dodać odpowiedź
12 odpowiedzi w tym temacie

#1
kevL

kevL
  • Members
  • 4052 postów
I just spent the last coupla days rather choked because one of my caravans disappeared. The one from Leilon to CR Keep. When I did a search for it, the tag appeared indicating it was on the area somewhere, and when I called it it jumped to my feet. Once set rolling, it would get to CR Keep and *disappear* again.

It turns out it was in the middle of the ocean (at the restocking waypoint!) and could not get back because its Endpoint was not set properly - yes, a bug. The script, wp_2_to_14 in module F_X2 is missing a line of code:

SetLocalInt(OBJECT_SELF, "nEndpoint", 14);

At least this was so in my install, v1.23. Fix: compile this and put it in your override before the caravan is built,

--begin--
// 'wp_2_to_14'
/* Caravan Routing script */
// NLC 7/22/08

#include "ginc_wp"
#include "kinc_trade"

void main()
{
SetLocalInt(OBJECT_SELF, "nEndpoint", 14); // kL add
int iCurrentWP = GetCurrentWaypoint(); // the waypoint we just arrived at
int bReturn = GetLocalInt(OBJECT_SELF, "bReturn");

switch (iCurrentWP)
{
case 1:
ProcessCaravanOrigin();
break;

case 2:
if (bReturn) JumpToNextWP(1);
else SetNextWaypoint(3);
break;

case 3:
case 4:
case 5:
case 6:
case 7:
case 8:
case 9:
case 10:
case 11:
case 12:

case 13:
if (bReturn) SetNextWaypoint(iCurrentWP - 1);
else SetNextWaypoint(iCurrentWP + 1);
break;

case 14:
if (bReturn) SetNextWaypoint(iCurrentWP - 1);
else JumpToNextWP(1);
break;
}
}
--end--

Or if the caravan from Leilon to CR Keep is already built and gone missing, try this (it's based on what I used to fix mine, but not tested in this form),

--begin--
// 'kl_carafix', 2011 Mar 24
#include "x0_i0_walkway"

void main()
{
object oPC = GetFirstPC(FALSE);

object oCaravan = GetObjectByTag("nx2_caravan_2_14");
if (GetIsObjectValid(oCaravan))
{
SetLocalInt(oCaravan, "nEndpoint", 14);
AssignCommand(oCaravan, JumpToObject(oPC));

SetWWPController("2_to_14", oCaravan);

AssignCommand(oCaravan, SetNextWaypoint(GetLocalInt(oCaravan, VAR_WP_NEXT)));
AssignCommand(oCaravan, WalkWayPoints(TRUE));
}
else SendMessageToPC(oPC, "Sorry, no workie.");
}
--end--

Run rs kl_carafix from the console. Hopefully Google will snatch this ... right?


Ps. What's funny, though, is the closest I could find with regard to a bugSearch was just that (the last post in the thread). What's funnier is that this particular issue should appear only with relevance to the Leilon <-> CR Keep caravan, since I checked the other wp_x_to_y scripts and these were fine.


anyway, its rollin now: "Greetings! You honor us with your presence."   Posted Image

#2
I_Raps

I_Raps
  • Members
  • 1262 postów
I must say I've never had that problem. But as long as you're at it...

The caravan from Conyberry to Thundertree never finishes upgrading to Level 3.

(caravan_state_3_7)

http://nwn2forums.bi...59129&forum=128

Użytkownik I_Raps edytował ten post 25 kwiecień 2011 - 12:29


#3
kevL

kevL
  • Members
  • 4052 postów

I_Raps wrote...

I must say I've never had that problem. But as long as you're at it...

thanks for the input, I_Raps

as noted, it strikes me as funny that nobody else has mentioned this. I'm wondering if peeps have been confusing one of the other Leilon <-> north caravans with the L <-> CR route. i mean, stranger things have happened on both sides ..

Fortunately i Have a onPerception script that consistently sends me debug of the Tag of Creature perceiving my PC. Each caravan is expressly labelled with a suffix of the form #_#, where '2_14' is the correct suffix for Leilon to CR Keep; additionally, after scrounging around through code for 2+ days it was not until I assigned the variable "nEndpoint" to the caravan itself that it obediently turned around and sent itself back to Leilon, without disappearing. Finally, there are about a dozen of those wp_x_to_y scripts - every one of them except the wp_2_to_14.nss had/has as its first line, the SetLocalInt() manually inserted above. If there's a deeper problem its beyond my ability to deal with

The caravan from Conyberry to Thundertree never finishes upgrading to Level 3.

(caravan_state_3_7)

http://nwn2forums.bi...59129&forum=128

I'm halfway up the Sword Coast, consolidating as i go. With my issue out of the way, it's now safe to move beyond the Crossroad Keep-Phandalin nexus. (hehe) You can bet your petunias (not that I believe petunias should be subject to betting practices ..) that if I'm getting the infamous Conyberry to Thundertree bug, the heavy artillery comes out, so to speak

Użytkownik kevL edytował ten post 25 kwiecień 2011 - 07:55


#4
kevL

kevL
  • Members
  • 4052 postów
* cough

found it, mr. Raps


There is no script, wp_3_to_7 - it's not there, period. This set of 15 scripts (should be 16) control the WalkWays of the caravans; similar ones control the WalkWays of patrols. didn't check the patrols ..

It doesn't matter if you're constructing or upgrading the Conyberry to Thundertree caravan, it won't appear (well, it will .. in the middle of the ocean at its restocking pt.), unless the following code is compiled and snugged into the Override, say in a folder 'SoZ_carafix'. If yer going to do that might as well compile and do the same with what i mentioned above, eh

--- begin ---
// wp_3_to_7
// adapted by kevL's, 2011.05.06
/* Caravan Routing script */
// NLC 7/22/08

#include "ginc_wp"
#include "kinc_trade"

void main()
{
SetLocalInt(OBJECT_SELF, "nEndpoint", 5);
int iCurrentWP = GetCurrentWaypoint();	// the waypoint we just arrived at
int bReturn = GetLocalInt(OBJECT_SELF, "bReturn");

switch (iCurrentWP)
{
case 1: ProcessCaravanOrigin(); break;
case 2: if (bReturn) JumpToNextWP(1);
else SetNextWaypoint(3); break;
case 3:
case 4: if (bReturn) SetNextWaypoint(iCurrentWP - 1);
else SetNextWaypoint(iCurrentWP + 1); break;
case 5: if (bReturn) SetNextWaypoint(iCurrentWP - 1);
else JumpToNextWP(1); break;
}
}
--- end ---

and if someone has a cozy, comfortable, convenient place to include these in a Vault submission, just do it!1


note: these two scripts ( wp_2_to_14 & wp_3_to_7 ) do not reside (normally) in either the Data folder nor the Campaign folder. They are packaged inside F_X2.mod

Cheers! little wheels keep on rollin' ....

#5
AngryFrozenWater

AngryFrozenWater
  • Members
  • 8971 postów
Again, sorry for the necro. This post popped up on Google when I was looking for a fix to this problem, so I guess others will stumble on this thread too.

Great fixes, kevL! The one you created for I_Raps worked for me. Yay! :)

To make things a bit easier I have compiled your scrips and uploaded them so that people do not have to figure out how to do that.

I have only tested them on version 1.23 and they seem to work.

You can find the 3 scripts here:

CaravanFixes.zip

Unzip the files in the Documents\\Neverwinter Nights 2\\override folder.

The following 3 commands are now available:

rs wp_2_to_14

Use the one above before starting to create the route from Leilon to Crossroad Keep.

rs kl_carafix

If you already started that trade route then use the above command to fix it.

rs wp_3_to_7

The above command fixes the route between Conyberry and Thundertree. :)

Note the commands require the DebugMode 1 command before executing them and make sure you enter a DebugMode 0 after them.

Thanks again, kevL. :)

Użytkownik AngryFrozenWater edytował ten post 27 październik 2011 - 02:34


#6
kevL

kevL
  • Members
  • 4052 postów
ace, AFW !

tk-you


now, about those 2000000000 credits ........


Ps. some notes on the fixes ( from a very foggy memory ! )
- the "wp_x_to_y" scripts should not need to be run from console. If they are pre-placed in Override, the act of ingame creation will fire them up auto.

- the "kl_carafix" script should be run if the Leilon <-> CR Keep caravan was created before the script-fix was placed in Override. ( There is no corresponding script-fix for the Conyberry <-> Thundertree caravan, but kl_carafix could be adapted. ) Ironically you may be onto something by just firing off the wp_x_to_y scripts manually from the console; doing that *might* fix either/both caravans ( post-creation ).

#7
AngryFrozenWater

AngryFrozenWater
  • Members
  • 8971 postów
Hmmm. Here is my experience: I need to run the wp_3_to_7 script from the console. Without that it would keep giving the message that it was still upgrading.

About those 2 kazilion credits: As long as they are virtual you can have them. :P

Without your thread I would be stuck in the game. Thanks. :)

Użytkownik AngryFrozenWater edytował ten post 29 październik 2011 - 06:17


#8
kevL

kevL
  • Members
  • 4052 postów

AngryFrozenWater wrote...

Hmmm. Here is my experience: I need to run the wp_3_to_7 script from the console. Without that it would keep giving the message that it was still upgrading.

ok, good to know.


About those 2 kazilion credits: As long as they are virtual you can have them. :P

'course I'm referring to how much Loots ya make with those caravans. At one point i came back to CR Keep and tried to hand in 1.5b tradebars to Vara (?) - she just stood there dumbfounded, and i imagine her thinking "there isn't that much gold in Faerun!!"

- I took a battle ax to the algorithm and am looking forward to playtesting SoZ through .. :)

#9
AngryFrozenWater

AngryFrozenWater
  • Members
  • 8971 postów
Oh. There is a trade bar bug when you don't collect them. Instead of adding trade bars it multiplies them by two. Which of course can lead to silly numbers when you do collect them. It can even overflow: I.e. the result can be too big to fit in a 32 bits signed integer and can cause it to become negative. :P

#10
kevL

kevL
  • Members
  • 4052 postów
i Think they fixed the trade bar ( overflow ) bug in patch v1.22 - although the exorbitant amount remains .. exorbitant.

player1 introduced a fix, which is now marked Obsolete, that prevents compound interest from accumulating and so triggering the overflow bug. I believe it still works to cut back on the amounts gained - in fact i started with it and further chopped everything back to 10 - 20 %

but 10% of 2b is still, what, 200 megatradebars ..... so, blurth :\\


( of course it's the compounded interest that has most effect )

#11
AngryFrozenWater

AngryFrozenWater
  • Members
  • 8971 postów
Ah. It still grows very rapidly, though. If I forget it for just a bit I get a 5 figure income in 1.23. It's plain silly. ;)

Edit: Thanks for the heads up and the link. :)

Użytkownik AngryFrozenWater edytował ten post 29 październik 2011 - 08:00


#12
Axe_Edge

Axe_Edge
  • Members
  • 278 postów
Howdy, Kevl

I'm unable to find your caravan fix scripts on neverwintervault.org
*nudge...nudge*

It would be totally rad if they were compiled, too
*peers around while whistling softly*

I compiled the fixes years ago and I still consider dropping them (as well as your dragon files) into the override essential during every install. I'd hate to see these get lost.
;)

* necromancy forces alignment shift 5 points toward evil*

#13
kevL

kevL
  • Members
  • 4052 postów

hey Axe,

well uh yeah you know ... i think they're pretty safe here on Bioware for now. The problem is if I start packaging all these little fixes I'd never get anything done.  ;)

 

pt. taken tho

 

 

( you should see how I've butchered tradebar income - and removed most of those annoying debuff transitions /heh )