Attaching my scripts to critters (compile question)

Thrawn

It Wandered In From the Wastes
Dark Red means I solved the problem.

I wrote a simple script following the directions from one of the tutorials I found in these forums. Now I need to attach that script so some guy on my map but I am not sure how. It doesn't show up when I "edit" the critter and hit the "scripts" button. I have both the .msg and the .int in their proper locations (Fallout/data/english/dialog and fallout/data/scripts respectively).

Do I need to comple the .int and if so, how do I do it? I downloaded Dscript but I don't know what .bat complier to point to.

EDIT: I ran through the compile tutorial but the lines:
..\dos4gw ..\compile temp.ssl
AND
copy temp.int "c:\Program Files\BlackIsle\Fallout2\data\scripts\%1.int"

Give me:
"The system cannot find the path specified."

I am 99% sure that I did everything else correctly according to the tutoral posted on Muntants Rising. Any idea what is wrong
 
Allright, I have everything working with one problem. When I include command.h the complier expects a ',' (comma) some where. Is there something wrong with command.h?
 
Allright, I have everything working with one problem. When I include command.h the complier expects a ',' (comma) some where. Is there something wrong with command.h?

Well, yes and no. Some of the macros in command.h already include a semicolon after the macro, some of them don't. Furthermore, you can't put a semicolon after some of the macros because the macro might be a an if statement or a while statement (this works in C/C++/Java but not in Pascal). That's why macros are evil and lead to frustrating bugs.

So, either you have one semicolon too much or one too little. See the lines around the reported error for starters.
 
Apperently it isn't command.h after and it is my start_gdialog, reply, and NOption statements. For each one of those lines it wants to have a comma that I don't have for it. Someone want to play "find the missing comma"?



#include "..\headers\define.h"

#define NAME SCRIPT_BILL

#include "..\headers\command.h"
#include "..\headers\ModReact.h"

procedure start;
procedure use_p_proc;
procedure look_at_p_proc;
procedure description_p_proc;
procedure use_skill_on_p_proc;
procedure use_obj_on_p_proc;
procedure damage_p_proc;
procedure map_enter_p_proc;
procedure map_update_p_proc;
procedure talk_p_proc;

procedure Node001;
procedure Node999; // Exit dialog
procedure Node998; // Combat

procedure start begin
end

procedure timed_event_p_proc begin
end

procedure use_p_proc begin
end

procedure look_at_p_proc begin
give_exp_points(10000);
end

procedure description_p_proc begin
give_exp_points(10000);
end

procedure use_skill_on_p_proc begin
end

procedure use_obj_on_p_proc begin
end

procedure damage_p_proc begin
end

procedure map_enter_p_proc begin
end

procedure map_update_p_proc begin
end

procedure talk_p_proc begin
start_gdialog(NAME,self_obj,4,-1,-1);
gSay_Start;
call Node001;
gSay_End;
end_dialogue;


end

procedure Node001 begin
Reply(100);

NOption(101,Node999,004);
end

procedure Node999 begin
end

procedure Node998 begin
attack(dude_obj);
end


Is it possible that there is an error in my bill.msg file? All that has is something like this:

{100}{}{A line of dialogue}
{101}{}{Another line of dialogue}

Anyway, help if you can, I really appricate it.
 
still got the "path not found" error?
is fallout installed on drive c?
if not change the drive letter to the relavent drive letter..


i'm not certain, but i'm prety sure you don't need to force an attack in node 998..
just set the local variable to hostile
it ends the dialogue and attacks automatically i think..

this is what it says in all the critter scripts i've read..

Code:
/* Should the Player ever cause the NPC too much discomfort that he desires to attack the player,
   this call will be made. Essentially, it stores the Hostile vaule so that the critter remembers
   he was once hostile towards the player.*/
procedure Node998 begin
   set_local_var(LVAR_Hostile,2);
end

/* Anytime that there is a need for an ending to dialog, this node is to be called. It will just
   exit from the dialog system without any reprisals from the NPC. */
procedure Node999 begin
end
 
I don't have a problem with paths anymore. The only issue I have is that it expects a comma on my gsay, reply and NOption lines.

Also, when I try to attach bill.int to a critter though the editor, when I scroll down to bill.int (I have added it to the list thing that I extracted from master.dat) I click on bill.int but it changes to ntricrom.int.

Help is appricated.
 
I don't see anything wrong with it. But just in case, double check if you have updated scripts.h (in the mapper directory), scripts.lst (in the game directory) and that your script, bill.int is really in the right directory. Also, if you are using Dscript, there is a new version out that fixes a bug in the scripts.h and scripts.lst updater, maybe this was your problem.
 
Awesome, I actually got my script into the mapper. Now when I look at bill I gain 10,000 exp. I still can't compile my script with start_gdialog(NAME,self_obj,4,-1,-1) in my code because it gives me an "Expecting a ','" error.

I greatly appricate the help thus far!

EDIT: Oh yes, the paths.

I didn't put scripts.lst back in master.dat after I extraced it. Will that be a problem?

Here are the paths as they are right now:

scripts.h: C:\program files\blackisle\FAllout 2 mapper\scripts\HEADERS\scripts.h

scripts.lst: C:\program files\blackisle\FAllout2\scripts\scripts.lst

bill.int: C:\program files\blackisle\FAllout2\scripts\bill.int
 
the .int and the .lst files should be in the folders they are in now, but under a folder called data..

ie C:\program files\blackisle\FAllout2\data\scripts\scripts.lst

in fact, it should all be under the data folder.. ( maps, scrips, proto's, text and so on.. )

also.. the patch000.dat overrides the content of the data directory..
 
Well, it is all in the correct spot, but I still get the "Expecting ','" error. I think I will uninstall fallout2 and start this over again since I might have screwed up somewhere along the way.

Thanks again for the help.
 
I noticed that in define.h there is no #define talk_p_proc or Noption or reply. Is this something I was supposed to manualy add?

Also, when I use fade to unpack master.dat to reference some of the scripts built into the game, all the scripts I look at are just filled with garbage. Is there a de-compiler I can get my hands on?
 
I noticed that in define.h there is no #define talk_p_proc or Noption or reply. Is this something I was supposed to manualy add?

No. talk_p_proc is a procedure and it must be declared in the script (but you have declared it, so that it not the problem.) Reply and NOption are defined in command.h IIRC.

Also, when I use fade to unpack master.dat to reference some of the scripts built into the game, all the scripts I look at are just filled with garbage. Is there a de-compiler I can get my hands on?

There is the noids IPP decompiler, but I don't have a link to it at hand. A number of the script sources can be found with the mapper, so you don't necessarily have to decompile all of the scripts.

One last thing I forgot to ask: Your script file is located in a subdirectory of the mapper/scripts directory, right? The includes will not work if it is not.
 
yes, de dood is right but you forgot about scrname.msg file, there are names of all scripts in sripts.lst(in same order).

Noid compiler/decompiler is a nice tool if you want to decompile int files.

aha and if you still have problems using scripts, try FSE. :)
 
Allright! I got it working finaly!

I uninstalled fallout and the fallout 2 mapper, then deleted everything that was left behind and started over using FSE (which is incredibly helpful and probably why my script actually worked this time).

Thanks to everyone for their help! There will definitly be more questions in the near future though :D
 
Back
Top