So Ryuzaki, it was indeed global_var(119) that was not set to 1 in your savegame.
Whether it didn't get set in the first place or it somehow disappeared later I can't tell (there is no script that resets it as far as I could find). I didn't find anything wrong with the scripts either and I couldn't reproduce it in-game, so I would put it down to a freak accident somehow. Maybe killap can find something I might have missed or misunderstood.
Anyway killap, I have some stuff for you to take a look at.
Seeing as the caravans haven't gotten as much love as other areas, I thought it was about time.
These are mainly vanilla issues but some are not so I chose to put it in here.
Caravan bugs:
------------------------------------------------------------------------------------------------------------------------------------------
Chad:
In procedure start, procedure map_enter_p_proc and procedure map_update_p_proc you have added the following code:
Code:
if (metarule(46, 0) == 6) then begin
Chad_Ptr := self_obj;
end
Why and what does it do?
It is interfering with Chad's normal behavior and should be removed or changed somehow.
The problem is that while he's on a caravan run, that code makes it so that his script won't run until the second time you enter a map (if it's in procedure start, otherwise it's just the relevant procedure affected). So the first time he's on the caravan map you don't get his proper description, and he won't tell you the coast is clear. If you get no encounters at all and are moved to Vault City straight away, he will not show up until you exit and then return to the map again.
someone said:
If you turn in Chad in BH, then no more caravan runs from there. (I believe I saw that this was being addressed already.
Well, if Chad dies you don't get any more caravan runs either, why should this be any different? In fact it's the same with all caravan masters. Then again, the devs did at some point have plans to replace Chad if he died/got arrested, as can be seen in the leftover files hcencha, hcenchb and the bhrndmtn map and script. $500 a run with an option to go back again within the same day. That's way better than what Chad has to offer.
------------------------------------------------------------------------------------------------------------------------------------------
someone said:
After first encounter, Stanwell and NCR clad police guards are replaced by people in combat armor with lead guy saying "keep your eyes peeled" instead of "the coast is clear." On arriving in Redding... no Stanwell.
So Stanwell got replaced by Hal (Cattle run from Duppo) It's caused by a bug with G_var 338 in Rcstanwl.ssl, more on that below. But in short, because of that bug the caravan setup in bhrnddst.ssl can't start Stanwells caravan and goes through the list of possible caravans until it finds one it can do. Normally that would be the 'Default caravan' that many have reported, but not in this case. Anyway it happens if you have done a cattle run with Hal, since G_var 266 don't get reset afterward. Don't think anything needs to be done about this unless it causes problems to Hal himself.
------------------------------------------------------------------------------------------------------------------------------------------
Stanwell, the Redding - NCR caravan master:
someone said:
The Stanwell caravan seems to work fine going from Redding to NCR, but is broken while going from NCR to Redding. I tried it several times and it consistently broke in the same way each time. Assuming the caravan run will have more than one encounter, the initial encounter on the way from NCR to Redding goes fine, and then the second one breaks the run. What happens is:
---Stanwell and the guards are gone/nowhere in sight
---There is a female caravan master called "Grand Master Trader" with several guards in leather armor and a cart. The guards have a float text if clicked on, but the woman is unresponsive; she has neither a dialogue screen nor a float text.
---Other than the pc and party and the Grand Master Trader and her caravan, no one else (encounters or enemies) is on the map.
---There's nothing to do but leave the map, which results in a repeat of this scenario for as many encounters were scheduled; at the end of the run the player and party materialize in Redding with no caravan folks around or in the tents (i.e. no Stanwell, no Stanwell's backup guy) and no way to get paid.
This happens when the caravan g_var is set to finished (or wrong value) before the caravan encounters g_var is set to 0. In this case it's a problem with G_var 338 in Rcstanwl.ssl. As far as I've seen it only happens when you talk to him while on map 94, G_var 338 gets set to 5, 6, 7 or 8, while it should remain at 4 (or 7 after the last encounter, or Stanwell won't show up back in Redding).
Simple solution...
Code:
procedure talk_p_proc
if ((global_var(338) != 0) and (global_var(338) != 3) and (global_var(338) != 9)) then begin
// should be changed to:
if ((global_var(338) != 0) and (global_var(338) != 3) and (global_var(338) != 9) and (not(cur_map_index == 94))) then begin
Also, his 'Coast is clear' float in map update procedure keeps spamming and blocking the normal 5 lines he should be able to say when talked to. Can something be done about that? Maybe shutting of the float in the talk procedure and then turn it back on it after a little while?
Oh, and it would be nice if there was a check to not use that float while in combat as it looks ridiculous when you are still fighting (critters that are non hostile from the beginning, like caravans etc).
------------------------------------------------------------------------------------------------------------------------------------------
Nording, the stand in clerk for Stanwell:
He is a bit messed up. You added a float for when you talk to him again after already being paid.
Well you got a misplaced parenthesis in the talk procedure that causes the float to come up before you've gotten paid (you never get paid).
Code:
if (global_var(516 != 1)) then begin
should be...
if (global_var(516) != 1) then begin
In node008a all the < and > are reversed and should be changed to the opposite of what they currently are (as it is now it is rewarding failure and punishing success).
Also, I find it odd that Nording pays so little. First Stanwell promises you $2000 (- $1500 to + $500 bonus), and Nording says he'll settle the debt. You get a measly $100 (± $50 bonus) and you don't complain. Makes no sense.
I believe the caravan profits where increased at a later state in development and they simply forgot about the replacement guys.
Perhaps that is also why you get so little from Chad, but what do I know?
I'm not all to thrilled about Nordings placement on NCR1.map Could maybe place him a bit lower down in the NCR1 map script, so he don't stand deep inside the exit grid. I'll include a pic...
[spoiler:c80afd2ee0]
[/spoiler:c80afd2ee0]
------------------------------------------------------------------------------------------------------------------------------------------
Savinelli, Redding-New Reno Caravan Master:
someone said:
While on a caravan with Savinelli (from Redding to New Reno), in one instance of a caravan screen, he was oddly changed to someone called "Grand Master Trader" and was a female sprite instead.
Exactly the same issue as with Stanwell, but this time it's G_var 340. So just add the same check for not being on map 94.
Also has map 94 floats that are blocked by the 'Coast is clear...' message.
------------------------------------------------------------------------------------------------------------------------------------------
Velani, stand in for Savinelli:
Exactly the same issues as Nording has in his script.
There are also a couple of problems in newr1.ssl. First of all you can only meet Velani in New Reno if it's the first time you enter that map, because of some slave_guild_ guy code (whatever that is) blocking it otherwise. The Velani code looks misplaced to me.
Second of all, the script that gets attached to him is for Nording and not his own.
Code:
Maybe this part in map_enter_p_proc...
if (((global_var(495) bwand 131072) != 0) == 0) then begin
set_global_var(495, global_var(495) bwor 131072);
if ((global_var(518) == 0) and (global_var(383) == 1)) then begin
LVar0 := create_object_sid(16777252, 0, 0, 811);
critter_attempt_placement(LVar0, 27507, 0);
end
end
Should look like this...
if (((global_var(495) bwand 131072) != 0) == 0) then begin // and yeah, still don't know what the hell this is...
set_global_var(495, global_var(495) bwor 131072); // I couldn't find it's purpose.
end
if ((global_var(518) == 0) and (global_var(383) == 1) and (global_var(340) > 0)) then begin
LVar0 := create_object_sid(16777254, 0, 0, 812);
critter_attempt_placement(LVar0, 27507, 0);
end
------------------------------------------------------------------------------------------------------------------------------------------
Wade, Redding-Vault City Caravan Master:
Same problem as Stanwell, this time G_var 339. And the floats...
someone said:
In Ben Wade's script, the content of nodes 006 and 007 are switched around, possibly resulting in a bug if the caravan takes heavy losses.
No they aren't. Or wait, I suppose you can say that. It's the casualty calculations that have been mixed up.
Code:
if ((global_var(273) < (global_var(279) / 2)) or (global_var(276) < (global_var(281) * 6 / 10))) then begin
set_global_var(339, 5);
end
else begin
if ((global_var(273) < (global_var(279) / 4)) or (global_var(276) < (global_var(281) * 4 / 10))) then begin
set_global_var(339, 6);
end
else begin
should be...
if ((global_var(273) < (global_var(279) / 4)) or (global_var(276) < (global_var(281) * 4 / 10))) then begin
set_global_var(339, 5);
end
else begin
if ((global_var(273) < (global_var(279) / 2)) or (global_var(276) < (global_var(281) * 6 / 10))) then begin
set_global_var(339, 6);
end
else begin
Damn, it's the same for all three Redding caravan masters and their temps too.
Got an empty encounter, and it happens every time on that save. The caravan is proper, just no other encounters. It's the second and last encounter (when you have only two scheduled encounters), going from Redding to VC. After a little testing I found out it's a problem with the world map y position. After checking the encounter tables in bhrnddst.ssl and doing some testing I realized it don't work quite as I expected.
Simplified it works something like this:
First encounter section:
1. Enter a map.
2. Set a world map location for the map.
3. check your position against an encounter table to determine what critters to put against you.
Second encounter section:
1. Enter another map (well, same map again really).
2. Set a new world map location.
3. Check your position against a different encounter table to determine what critters to put against you.
...and so on. This is all pretty clear. What isn't though is that when it is checking your world map position it does not get your newest map location (the one you just entered) but instead gets the old one (the map you just left).
I don't know if this was intentional, a bug , engine limitations or whatever, but I hope and think it was accounted for, or there would be a lot more trouble. Wouldn't it?
So yeah, anyway. To see if the second encounters table is correct you need to check it against the map position set in the first encounter. If it isn't you get a blank encounter, like the one I got.
In bhrnddst.ssl / Red_VC_Encounters procedure:
Code:
if (global_var(283) == 2) then begin
if (LVar0 == 0) then begin
wm_area_set_pos(44, 475 + random(-25, 25), 300 + random(-25, 25));
the last part should be changed to:
wm_area_set_pos(44, 475 + random(-25, 25), 325 + random(-25, 25));
Or perhaps you can adjust the table under the 'if (LVar0 == 1)' section instead. Either way, as it is now there's a 50% chance of an empty encounter here.
There is also a 98% chance of an empty second encounter when you are scheduled for four of them.
Code:
if (global_var(283) == 4) then begin
if (LVar0 == 0) then begin
wm_area_set_pos(44, 475 + random(-25, 25), 575 + random(-25, 25));
last line could probably be...
wm_area_set_pos(44, 475 + random(-25, 25), 525 + random(-25, 25));
Or change the table under 'if (LVar0 == 1)', I think it's meant to be the Redding_DNRV_Encounter.
Note that I haven't gone through all the other encounter tables, and I won't be doing it either. So there might be more bugs than these two.
EDIT: OK, so I did go through them all and this was the last I found. On the second map out of two you have a 97% probability to run into an empty encounter.
VC_Red_Encounter:
Code:
if (global_var(283) == 2) then begin
if (LVar0 == 0) then begin
wm_area_set_pos(44, 975 + random(-25, 25), 175 + random(-25, 25));
the last part should probably be changed to:
wm_area_set_pos(44, 975 + random(-25, 25), 225 + random(-25, 25));
------------------------------------------------------------------------------------------------------------------------------------------
Ferndown, substitute for Wade:
Exactly the same issues as Nording has in his script.
------------------------------------------------------------------------------------------------------------------------------------------
Hal's Cattle drive:
There's a 50% chance of an empty second encounter out of 2 due to wrong x position:
In bhrnddst.ssl / NCR_Red_Encounters procedure:
Code:
if (global_var(283) == 2) then begin
if (LVar0 == 0) then begin
wm_area_set_pos(44, 800 + random(-25, 25), 1200 + random(-25, 25));
the last part should be changed to:
wm_area_set_pos(44, 775 + random(-25, 25), 325 + random(-25, 25));
Or adjust the table under the 'if (LVar0 == 1)' section instead. It's the Redding_NRNR_Encounter it should be.
Since 'NCR_Red_Encounters' is shared with Stanwell's NCR - Redding trip, this should fix it for him as well.
Since Hal is the only cattle driver without a "coast is clear" float, would you consider giving him one?
Something like this:
Code:
procedure map_update_p_proc
if (cur_map_index == 94) then begin
if (map_var(1) <= 0) then begin
float_msg(self_obj, message_str(14, 450), 8);
end
end
I don't think it's the same person who wrote Hal's script that wrote the the other caravans, and the float is in generic.msg.
So I consider it an oversight.
------------------------------------------------------------------------------------------------------------------------------------------
someone said:
Caravans: This is really a vanilla bug, but y'ought'a be aware of it, because the RP exacerbates it in a minor way. I'm sure you're aware that, sometimes, when you finish a caravan encounter and leave, you jump back into the same encounter, with everything as it was (corpses still on the ground and such).
It comes from saving your game while on the caravan map (it's fine loading one though). When you leave the map and have encounters left, you are returned to the same map you just left (it will be in the state it was when you saved it, so if the critters where dead, they'll still be, otherwise they'll be alive). Revisiting the map like that does not effect the encounter count though, so it's more of an annoyance (also, tends to crash when loading or quitting a game from a revisited map).
I don't know if anything can be done with the engine, but if not the best solution is to have a second identical map and switch between the two for every encounter. It works. I had problems with the world map position not being accepted for the second map (turns out the new map needed it's own 'Area' in city.txt, can't share 'Area 44' with the original).
What I did was to use bhrnddst.ssl as the map script for the new map as well. Just edited it a bit to swap exit grids and
set the correct 'wm_area_set_pos' depending on which map was currently being used. There was also a few checks for map 94 in Chad's script that needed to be changed to also include the new map (I just tested with Chad, the other caravan masters would need to be fixed as well). And sadly the same must be done for every critter that is in the caravan encounters, to keep track of the kill count. Also, when a game is saved on the new map it gets a label with error error, I believe something needs to be added to worldmap.msg or something, but didn't look into it.
If that's too boring for you, then maybe saving can be disabled via sfall?
------------------------------------------------------------------------------------------------------------------------------------------
- Check why robbers disarm after/on first turn.
Remember that old robber cave fix? I failed to realize that script was used for a lot of other places as well.
Code:
ecrobber.ssl
procedure combat_p_proc
begin
if (do_once == 0) then begin
do_once := 1;
if ((wep_pid != 21) and (wep_pid != 293) and (wep_pid != 235) and (wep_pid != 407)) then begin
metarule(43, self_obj);
end
end
end
Maybe you could add in a map check. something like...
if ((cur_map_index == 70) or (cur_map_index == 71) or (cur_map_index == 72) or (cur_map_index == 73) or (cur_map_index == 80)) then begin
And maybe even check that it's only for the second elevation (inside the cave) if possible?
------------------------------------------------------------------------------------------------------------------------------------------
Brahmins that belong to other caravans you might meet on your run have two problems.
1. They belong to your team, so if anyone outside of your team accidentally hits them they will pull you into the fight.
2. If they are killed they are counted as your caravan losses and will decrease your salary.
Fix:
Copy everything from the ECCRTBRA script into a new one and then edit the team given to TEAM_CARAVAN or something (I believe that's the correct one). Also edit out the stuff in 'destroy_p_proc' procedure. After that you just have to edit the 'Build_Grey_Caravan' procedure in Bhrnddst.ssl and set it to use your new script instead of ECCRTBRA.
------------------------------------------------------------------------------------------------------------------------------------------
If you get an encounter where two other teams are fighting, you can't rest on that map until both are gone (in those cases where the one left is not hostile). Probably engine related and not a big problem, so I haven't bothered looking into it.
------------------------------------------------------------------------------------------------------------------------------------------
It looks to me like the car was meant to come with you for the caravan runs. But for whatever reason it was edited it out from bhrnddst.ssl with this comment; "// need to fix this querry".
Was there a problem or is it something that could be reimplemented?
------------------------------------------------------------------------------------------------------------------------------------------
Stealing from caravan not implemented. How was it supposed to be? Steal from master and guards and get caught (now set to hostile)?
Or maybe containers somewhere, perhaps the carts?
------------------------------------------------------------------------------------------------------------------------------------------
- What is default caravan with Grand Master trader?
Do you have any idea what the purpose with her was supposed to have been? I couldn't really find anything specific.
------------------------------------------------------------------------------------------------------------------------------------------