Obligatory "I need teh helpz" thread

Xavierblazer

Vault Senior Citizen
1: Does Destroy_p_proc get called when the critter dies or when he is killed by dude_obj only, and would it get called if another critter accidentally kills him?

2: give_xp(num); doesnt work while in combat. Is there an alternate way to give the xp?

3: My Gvars wont work even though ive updated the files. Is there more than one file I need to update?

Code:
procedure destroy_p_proc begin
 display_msg(mstr(127));
 display_msg(mstr(131));
 give_xp(100);
 set_map_var(MVAR_RAIDER, map_var(MVAR_RAIDER)+ 1);
  if (map_var(MVAR_Raiders_Killed) == 8) then begin
   give_xp(1000);
   set_global_var(gvar_Raiders_Killed, 1)
  end
end
 
Re: questions, questions

Xavierblazer said:
1: Does Destroy_p_proc get called when the critter dies or when he is killed by dude_obj only, and would it get called if another critter accidentally kills him?

Both and yes.

Xavierblazer said:
2: give_xp(num); doesnt work while in combat. Is there an alternate way to give the xp?

I'm fairly sure that xp gets dished out in combat several times during the game (e.g. killing Darion). Maybe you're using the wrong command, or else try sticking it into the map script instead of the critter (setting a map var in the death script).
 
Question 2: Try this:
give_exp_points(100); or this, as Per pointed out:
give_xp(EXP_KILED_DARION); Simply register your xp in EXPPOINT.H
Question 3:
You wrote: set_global_var(gvar_Raiders_Killed, 1) I think that GVAR must be always in capital letters.

EDIT
Now that I think about it (just as Cubik2k pointed out): I checked VAULT13.GAM and ALL global vars are written with Upper Case letters.
 
Re: questions, questions

Xavierblazer said:
(..)

3: My Gvars wont work even though ive updated the files. Is there more than one file I need to update?

Code:
procedure destroy_p_proc begin
 display_msg(mstr(127));
 display_msg(mstr(131));
 give_xp(100);
 set_map_var(MVAR_RAIDER, map_var(MVAR_RAIDER)+ 1);
  if (map_var(MVAR_Raiders_Killed) == 8) then begin
   give_xp(1000);
   set_global_var(gvar_Raiders_Killed, 1)
  end
end

Check this line: "set_global_var(gvar_Raiders_Killed, 1)"
This phrase "gvar_Raiders_Killed" should be written with Upper Case letters:

set_global_var(GVAR_Raiders_Killed, 1)

even maybe:

set_global_var(GVAR_RAIDERS_KILLED, 1)

or maybe I am wrong :?

EDIT: I have been late ;)
 
Thanks guys. Capitalizing everything seems to make the world happier with me. Now I have another problem(supprised?)


The Script i was testing only half worked. The EXP would be given awesomely when I made each test kill, but it wouldnt read the MSG file at all(errors everywhere), and my Mvar and Gvars still wont
work.

Then I had the crazy Idea of updating scrname with my guys name, and there aws no error for his name, but the scripts shut down. They are still applied, but they wont work anymore.

so then I put in their map enter procedures to float a message, and it works, but the kills dont give any scripted XP or anything else.


Code:
#include "c:\fallout\compiler\headers\define.h"
#include "c:\fallout\compiler\headers\testheader.h"
#define NAME                        SCRIPT_111AMAN
#include "c:\fallout\compiler\headers\command.h"

#define RAIDER_MVAR                MVAR_RAIDERS_KILLED
/* Standard Script Procedures */
procedure start;
procedure critter_p_proc;
procedure pickup_p_proc;
procedure talk_p_proc;
procedure destroy_p_proc;
procedure look_at_p_proc;
procedure description_p_proc;
procedure use_skill_on_p_proc;
procedure damage_p_proc;
procedure timed_event_p_proc;
procedure map_update_p_proc;
procedure iseetehdood;

/* Script Specific Procedure Calls */
procedure Node998;                                      // This Node is Always Combat
procedure Node999;                                      // This Node is Always Ending

procedure start begin
end

procedure timed_event_p_proc begin
end

procedure map_update_p_proc begin
end

procedure critter_p_proc begin
Call iseetehdood;
end

procedure damage_p_proc begin
end

procedure pickup_p_proc begin
end

procedure talk_p_proc begin
end

procedure destroy_p_proc begin
   display_msg(mstr(127));
   display_msg(mstr(131));
   give_xp(100);
set_map_var(RAIDER_MVAR,map_var(RAIDER_MVAR)+ 1);
 if (map_var(RAIDER_MVAR) == 8) then begin
give_xp(1000);
set_global_var(Gvar_Raiders_Killed, 1);
end

procedure look_at_p_proc begin
   script_overrides;
   display_msg(mstr(115));
end

procedure description_p_proc begin
   script_overrides;
   display_msg(mstr(116));
end

procedure use_skill_on_p_proc begin
end


procedure iseetehdood begin
variable num;
num:= random(1,4);

 if (self_can_see_dude) then begin
    if (combat_is_initialized == false) then begin
       if (num == 1) then floater_rand(102, 103);
       if (num == 2) then floater_rand(104, 105);
       if (num == 3) then floater_rand(106, 107);
       if (num == 4) then floater_rand(108, 102);
    end
       attack(dude_obj);
end
end

procedure Node998 begin
end

procedure Node999 begin
end
 
Thanks guys. Capitalizing everything seems to make the world happier with me. Now I have another problem(supprised?)

GVAR names don't need to be written using capitalization, but watcom precompiler is case sensitive so if you register global as GVAR_Some_Var and then use it in script like that:
GVAR_some_var then it will not work(must be identical).

This script that you posted is ok.
Your problem must be in wrong script registration(same with GVARS).

BTW 111aman is a wrong filename in fallout (first letter must be nonnumerical value)

1) HOW TO REGISTER NEW SCRIPT

- Add your script filename in fallout/data/scripts/scripts.lst

Code:
CIMine.int      ; Mines in Navarro                              # local_vars=6 
niBisHLk.int    ; New Reno Bishop Hard Locker                   # local_vars=1 
niBisHDr.int    ; New Reno Bishop Hard Locked Door              # local_vars=6 
ntRicRom.int    ; New Reno Richard Wright Room Spacial          # local_vars=1 
aman.int        ; New script for bla bla                           # local_vars=1

- Add your script NAME statement to headers/Scripts.h

Code:
#define SCRIPT_CIMINE           (1300)  // CIMine.int      ; Mines in Raiders Cave 
#define SCRIPT_NIBISHLK         (1301)  // niBisHLk.int    ; New Reno Bishop Hard Locker 
#define SCRIPT_NIBISHDR         (1302)  // niBisHDr.int    ; New Reno Bishop Hard Locked Door 
#define SCRIPT_NTRICROM         (1303)  // ntRicRom.int    ; New Reno Richard Wright Room Spacial 
#define SCRIPT_AMAN             (1304)  // aman.int     ; ble ble blah etc 
#endif // SCRIPTS_H

- Add name of the owner of this script to scrname.lst(you see this name in combat when script look_at_p_proc is not working)
Code:
{1400}{}{Mine}                          # CIMine.int      ; Mines in Raiders Cave 
{1401}{}{Locker}                        # niBisHLk.int    ; New Reno Bishop Hard Locker 
{1402}{}{Door}                          # niBisHDr.int    ; New Reno Bishop Hard Locked Door 
{1403}{}{}                              # ntRicRom.int    ; New Reno Richard Wright Room Spacial 
{1404}{}{Aman}                         # aman.int    ; Blah blah blah

- Compile your script (Script MUST be compiled after registration to work)

- Don't forget to create fallout/data/text/english/dialog/aman.msg

All Done.

Ait is a rather dull work so you can always use FSE.

- Open FSE and script that you want to register

- Press F7

- Enter object name and description

- Click OK

- Press F9 to compile your script

All Done


Now about global vars, you need to registr them too.

HOW TO REGISTER GLOBAL VAR

- Add your global var name to fallout/data/vault13.gam
Code:
GVAR_RESERVED_VAR56                     :=0;    //      (689)
GVAR_RESERVED_VAR57                     :=0;    //      (690)
GVAR_RESERVED_VAR58                     :=0;    //      (691)
GVAR_RESERVED_VAR59                     :=0;    //      (692)
GVAR_MODOC_JONNY_PIP                    :=0;    //      (693)
GVAR_NEW_RENO_FLAG_4                    :=0;    //      (694)
GVAR_PATCH_INVAIDITATOR                 :=0;    //      (695)
GVAR_YOUR_VARIABLE                      :=0;    //      (696)
- Add your global var to headers/global.h (at end of file)
Code:
#define GVAR_CZAS_ZAMACHU                         (696)
#endif
DONE

FSE option for Lazy scripter ;)

- Open FSE and script

- Chose Script->Add global variable from menu

- Enter variable name (without GVAR_ prefix)

- Click OK
DONE
 
I compiled my script without error(changed the numerical values to "A") and registered it like jargo said. I put the files both in their places in patch000 and data. I made a test map in the mapper with 8 raiders and weapons. Then I test it and when they see me they say error and attack(I quadruple checked the name of the script and the msg file) and their name is from scrname, not from the msg file. when I kill them I get the experience but the map variable doesnt work(no 1000 experience for killing all 8 ) so then I save it as artemple.map and change the name of the gam file to artemple.gam and make copies in both data and patch000. Then when I play the actual game the script doesnt work at all and they stand there motionless(but their name is displayed as the name in scrname, so I know the script didnt dissappear).

could something im doing wrong and not noticing be conflicting with anything?
 
1) As far as I know "error" msg is desplayed only if the .msg lines are not present or ther's a mistake in script registration: i.e. the related script is number 1345 in a file and 1346 in another, just to make an exemple. Checking this usually solves all my problems with .msg.
2) Did you edit the CONTENT of your new artemple.gam?
3) The first time I tinkered with MVARs I had a problem with a script not working properly: I was trying to EXPORT the map var from a critter script. It was not working, of course, and the critter did nothing...
4) I noticed a "mistake" in your destroy_p_proc.
You wrote: if (map_var(RAIDER_MVAR) == X).
It should be: if (map_var(MVAR_RAIDER) == X). Did you already try this? All vars must be prepended with LVAR_, MVAR_, GVAR_.
I also noticed you use a different way to implement MVARs in your script: where did you get it? Just a curiosity. Did you try the usual method, anyway?
 
Sirren67 said:
1) As far as I know "error" msg is desplayed only if the .msg lines are not present or ther's a mistake in script registration: i.e. the related script is number 1345 in a file and 1346 in another, just to make an exemple. Checking this usually solves all my problems with .msg.
Ill check them all again, but I dont think this is the problem. I know that the script number in scripts.lst corresponds with the one in scrname because its writing that name instead of the one in the msg file.

If the engine cant find the right msg file, does it turn to scname for naming or just put errors?

2) Did you edit the CONTENT of your new artemple.gam?
Yep.
4) I noticed a "mistake" in your destroy_p_proc.
You wrote: if (map_var(RAIDER_MVAR) == X).
It should be: if (map_var(MVAR_RAIDER) == X). Did you already try this?
you would be right, but I think you missed this at the top:
Code:
#define RAIDER_MVAR                MVAR_RAIDERS_KILLED
Ill try it the other way too just in case

I also noticed you use a different way to implement MVARs in your script: where did you get it? Just a curiosity. Did you try the usual method, anyway?
what do you mean different? I think I looked at smoke the dogs script from arroyo when I was first learning map varriables.


EDIT: I did find an error, but it didnt change anything. I had forgotten to put a number for my gvar in global.h
 
You wrote:
you would be right, but I think you missed this at the top:
Code:
#define RAIDER_MVAR MVAR_RAIDERS_KILLED
Yep, sorry.
I use MVARs this way: I include the map.H in both the map and critters scripts. Then I export the MVARs from the map script and import them in the critter sripts. After that I use MVARs just like you. This is simply the way I learned when I started and looked in various scripts: it's simply a way like any another one...

EDIT!!

I made a simple test script with this procedure:
procedure destroy_p_proc begin
inc_map_var(MVAR_test_rat);
if (map_var(MVAR_test_rat) == 2) then begin
give_exp_points(100);
end
end
It works, and probably it works in your script too. The bonus experience is assigned but not desplayed becouse you don't tell the script to do so. You can either register it in exppoint.H or have procedure destroy_p_proc show a msg line.
I noticed you did not assign a team and a AI in your script: I know it can cause a script to behave strangely (when dealing with shopkeeps). I don't know about the rest. If something comes to my mind I'll let you know.
 
Sirren67 said:
The bonus experience is assigned but not desplayed becouse you don't tell the script to do so. You can either register it in exppoint.H or have procedure destroy_p_proc show a msg line.
I used:
Code:
give_xp(1000);
which, when precompiled, is changed to code from a header to automatically display it.

But im probably going to completely rewrite the script from an existing script as a template, and ill try exporting/importing and adding teams and ai to it.
 
I use MVARs this way: I include the map.H in both the map and critters scripts. Then I export the MVARs from the map script and import them in the critter sripts. After that I use MVARs just like you. This is simply the way I learned when I started and looked in various scripts: it's simply a way like any another one...

Whoa!!!
No thats not the way Sirren67 ;) MVARS DON'T need to be imported or exported, MVARS are read from mapfilename.gam file.

Exporting creates a new dynamic(exported) variable and this has nothing to do with MVAR(in Your case it have the same number ;) ).

HOW TO REGISTER MVAR

1) Add entry in mapfilename.gam file (artemple.gam)

example:
Code:
 // Map vars for Den Business area 2 Map

 // Comments

//MAP_GLOBAL_VARS:
MAP_GLOBAL_VARS:
//GLOBAL                                        NUMBER

MVAR_Map_Guard_Count                         :=0;     //      (0)
MVAR_Current_Patrol_Guard                    :=0;     //      (1)
MVAR_Next_Patrol_Time                        :=0;     //      (2)
MVAR_Dead_Guard                              :=0;     //      (3)
MVAR_Church_Guard_Said_Warning               :=0;     //      (4)
MVAR_Church_Door_Guard_Count                 :=0;     //      (5)
MVAR_DEN_CHURCH_DOOR_TAMPER                  :=0;     //      (6)
MVAR_Caesar_Call_Guards                      :=0;     //      (7)
MVAR_den_billy_tile                          :=0;     //      (8)
MVAR_told_billy_to_split                     :=0;     //      (9)
MVAR_said_borrow_from_frankie                :=0;     //      (10)
MVAR_Frankie_Heard_Borrow                    :=0;     //      (11)
MVAR_Sheila_Visible                          :=0;     //      (12)
MVAR_New_Var                         :=0;     //      (13)

2) Add entry in mapname.h in headers folder


Code:
/*
	Copyright 1998-2003 Interplay Entertainment Corp.  All rights reserved.
*/

#ifndef DENBUS2_H
#define DENBUS2_H

 // Map vars for Den business area 2 Map

 // Comments

//MAP_GLOBAL_VARS:

//GLOBAL                                        NUMBER

// All Map Vars need to start w/ MVAR_

#define MVAR_Map_Guard_Count                         (0)
#define MVAR_Current_Patrol_Guard                    (1)
#define MVAR_Next_Patrol_Time                        (2)
#define MVAR_Dead_Guard                              (3)
#define MVAR_Church_Guard_Said_Warning               (4)
#define MVAR_Church_Door_Guard_Count                 (5)
#define MVAR_DEN_CHURCH_DOOR_TAMPER                  (6)
#define MVAR_Caesar_Call_Guards                      (7)
#define MVAR_den_billy_tile                          (8)
#define MVAR_told_billy_to_split                     (9)
#define MVAR_said_borrow_from_frankie                (10)
#define MVAR_Frankie_Heard_Borrow                    (11)
#define MVAR_Sheila_Visible                          (12)
#define MVAR_New_Var                         (13)

#endif // DENBUS2_H

3) #include mapfile.h in your script

Code:
#include "..\headers\DENBUS2.H"

4) Use it in script like that

Code:
set_map_var(MVAR_New_Var,100);
display_msg(" map var has value : " + map_var(MVAR_New_Var));

Ready.

I compiled my script without error(changed the numerical values to "A") and registered it like jargo said. I put the files both in their places in patch000 and data

Xavierblazer put all your files in subfolders of data and REMOVE patch000.dat file.
 
These are nice posts, jargo, very instructive, or at least they look like it. :)
 
These are nice posts, jargo, very instructive, or at least they look like it.

Yup , show that you can count up to four and post a big CODE listings and you're the boss :D
 
Jargo wrote:
Whoa!!!
No thats not the way Sirren67 MVARS DON'T need to be imported or exported, MVARS are read from mapfilename.gam file.
:shock: I really didn't know... I've been using that method for at least a couple of months now and never had problems with it... I really can't remember where I got it though...
Well, you never stop to learn... I'm only sorry i haven't been able to help Xavierbalzer...
 
well, thanks for the help guys. I dont know what is happening, but I completely rewrote the script and got the same result(nothing works with the critter at all, but his name shows up as the scrname name I gave him) but when I stripped down the script to just look, description, and attacking when he sees me then it works with no problems. so either map, global, or the way I use them are interfeiring with the script. But at least I now know that everything except global and map vars are working properly.

ill try everything everyone has said(just not all at the same time)
 
I deleted everything from the old script except the Vars and it worked. Even Expoting\importing variables works. That means that Im not doing something right when I register them.

Heres all the files ive used for the script.

P.bat:(located in C:\compiler)
Code:
if not exist C:\Compiler\aanaraider.ssl goto DONE

copy C:\Compiler\aanaraider.ssl C:\Compiler\temp.c

C:\Compiler\wcc386 C:\Compiler\temp.c /pc /fo=C:\Compiler\temp.i /w4

copy C:\Compiler\temp.i C:\Compiler\temp.ssl 
copy C:\Compiler\temp.i C:\temp.ssl 

C:\Compiler\dos4gw C:\Compiler\compile C:\Compiler\temp.ssl
if %errorlevel% neq 0 goto ERROR


copy C:\temp.int C:\compiler\aanaraider.int
rename C:\compiler\temp.int C:\compiler\aanaraider.int
del C:\Compiler\temp.c
del C:\Compiler\temp.i
del C:\Compiler\temp.ssl
del C:\temp.ssl
del C:\temp.int
goto DONE

:ERROR
ERROR: C:\Compiler\%_CWDS%%1.ssl >> C:\Compiler\err.log
del C:\Compiler\temp.c
del C:\Compiler\temp.i
del C:\temp.ssl
del C:\temp.int

:DONE

aanaheader.h:(located in c:\compiler\headers)
Code:
#ifndef aanaraider_H
#define aanaraider_H

#define MVAR_RAIDERS                (0)

#endif

part of Global.H(locatd in c:\compiler\headers)

Code:
/*
	Copyright 1998-2003 Interplay Entertainment Corp.  All rights reserved.
*/

#ifndef _GLOBAL_H_DEFINED
#define _GLOBAL_H_DEFINED

...
...
...
#define GVAR_RESERVED_VAR58                 (691)
#define GVAR_RESERVED_VAR59                 (692)
#define GVAR_RAIDERS                        (693)

/******************************************************************
    Variable States
******************************************************************/

#define KNOWLEDGE_NONE                      (0)
#define KNOWLEDGE_LEARNING                  (1)
...
...
...


Part of Scripts.H(located in c:\compiler\headers)
Code:
/*
	Copyright 1998-2003 Interplay Entertainment Corp.  All rights reserved.
*/

#ifndef SCRIPTS_H
#define SCRIPTS_H


... 
...
...
#define SCRIPT_CIMINE           (1300)  // CIMine.int      ; Mines in Raiders Cave
#define SCRIPT_NIBISHLK         (1301)  // niBisHLk.int    ; New Reno Bishop Hard Locker
#define SCRIPT_NIBISHDR         (1302)  // niBisHDr.int    ; New Reno Bishop Hard Locked Door
#define SCRIPT_NTRICROM         (1303)  // ntRicRom.int    ; New Reno Richard Wright Room Spacial
#define SCRIPT_AANARAIDER       (1304)

#endif // SCRIPTS_H

aanaraider.GAM(located in ...FO2\data\maps along with aanaraider.map)
Code:
MAP_GLOBAL_VARS:


MVAR_RAIDERS                   :=0;


Part of Vault13.GAM(located in ...FO2\data\data)
Code:
 // Comments

//MAP_GLOBAL_VARS:
GAME_GLOBAL_VARS:
//GLOBAL                                                NUMBER

GVAR_PLAYER_REPUTATION                  :=0;    //      (0)
GVAR_CHILDKILLER_REPUTATION             :=0;    //      (1)
...
...
...
GVAR_MODOC_JONNY_PIP                    :=0;    //      (693)
GVAR_NEW_RENO_FLAG_4                    :=0;    //      (694)
GVAR_PATCH_INVAIDITATOR                 :=0;    //      (695)
GVAR_RAIDERS                            :=0;    //      (696)


Part of Scripts.lst(located in ...FO2\data\scripts)
Code:
obj_dude.int    ; Player script.                                # local_vars=5
Test0.int       ; Used to Test Scripts                          # local_vars=8
Test1.int       ; Used to Test Scripts                          # local_vars=8
...
...
...
niBisHLk.int    ; New Reno Bishop Hard Locker                   # local_vars=1
niBisHDr.int    ; New Reno Bishop Hard Locked Door              # local_vars=6
ntRicRom.int    ; New Reno Richard Wright Room Spacial          # local_vars=1
aanaraider.int  ; El Scriptio                                   # local_vars=1

aanaraider.msg(located in ...FO2\data\text\english\dialog)
Code:
{102}{}{ah}
{103}{}{vhoo}
{104}{}{eye}
{105}{}{poo}
{106}{}{tee}
{107}{}{hee}
{108}{}{teehee}
{115}{}{You see: Raider}
{116}{}{The Raider Man}
{127}{}{You kill:}
{131}{}{Raiderman}
{113}{}{}
{114}{}{}

Part of SCRNAME(located in ...FO2\data\text\english\game))
Code:
{101}{}{}                               # obj_dude.int    ; Player script.
{102}{}{Script Test 0}                  # Test0.int       ; Used to Test Scripts
{103}{}{Script Test 1}                  # Test1.int       ; Used to Test Scripts
{104}{}{Script Test 2}                  # Test2.int       ; Used to Test Scripts
{105}{}{Script Test 3}                  # Test3.int       ; Used to Test Scripts
{106}{}{Script Test 4}                  # Test4.int       ; Used to Test Scripts
...
...
...
{1401}{}{Locker}                        # niBisHLk.int    ; New Reno Bishop Hard Locker
{1402}{}{Door}                          # niBisHDr.int    ; New Reno Bishop Hard Locked Door
{1403}{}{}                              # ntRicRom.int    ; New Reno Richard Wright Room Spacial
{1404}{}{scrname}                       # aanaraider.int  ; el raidero

And last but not least, the script aanaraider.ssl
Code:
/* Include Files */
#include "c:\compiler\headers\define.h"

#define NAME                        SCRIPT_AANARAIDER

#include "c:\compiler\headers\command.h"
#include "c:\compiler\headers\aanaheader.h"

/* Standard Script Procedures */
procedure start;
procedure critter_p_proc;
procedure pickup_p_proc;
procedure talk_p_proc;
procedure destroy_p_proc;
procedure look_at_p_proc;
procedure description_p_proc;
procedure use_skill_on_p_proc;
procedure damage_p_proc;
procedure map_enter_p_proc;
procedure combat_p_proc;
procedure timed_event_p_proc;
procedure map_update_p_proc;

procedure Node998;                                      // This Node is Always Combat

procedure start begin
end

procedure timed_event_p_proc begin
//   if ((obj_on_screen(self_obj)) and (is_fleeing == false)) then begin
//   end
//   add_timer_event(self_obj,game_ticks(random(1,7)),1);
end

procedure map_update_p_proc begin
   display_msg(MVAR_RAIDERS);
      display_msg(GVAR_RAIDERS);
end

procedure map_enter_p_proc begin
    if (is_loading_game == false) then begin
      if (map_first_run) then begin
      set_map_var(MVAR_RAIDERS,0);
      end
   end
end

procedure critter_p_proc begin
   if (self_can_see_dude) then begin
         floater_rand(102,103,104,105,106,107,108);
           self_attack_dude;
      end
end

procedure damage_p_proc begin
   if (source_obj == dude_obj) then begin
         floater_rand(102,103,104,105,106,107,108);
           self_attack_dude;
   end
end

procedure pickup_p_proc begin
end

procedure talk_p_proc begin
   script_overrides;
end

procedure combat_p_proc begin
end

procedure destroy_p_proc begin
   script_overrides;
   display_mstr(127);
      display_mstr(131);
inc_map_var(MVAR_RAIDERS);
               set_global_var(GVAR_RAIDERS,1);
end

procedure look_at_p_proc begin
   script_overrides;
   display_mstr(115);
      display_msg(MVAR_RAIDERS);
      display_msg(GVAR_RAIDERS);
end

procedure description_p_proc begin
   script_overrides;
   display_mstr(116);
end

procedure use_skill_on_p_proc begin
end

procedure Node999 begin
end
procedure Node998 begin
end
 
Ok now i know what is what ;)

1)MSG problem
First You get that nasty "Error" instead of your text from msg file because you named your files (script and msg) AANARAIDER.
How many letters it have? Well, it have 10 letters and Fallout is an old DOS program.
It WILL NOT read names longer than 8 letters from *.lst files.
Change your script and msg name to anraider or something like that(8 letters max).

You registered your script ok

2) Global var problem

Global.h file:

#define GVAR_RESERVED_VAR58 (691)
#define GVAR_RESERVED_VAR59 (692)
#define GVAR_RAIDERS (693)

Your GVAR_RAIDERS number is 693

Vault13.gam file:

GVAR_MODOC_JONNY_PIP :=0; // (693)
GVAR_NEW_RENO_FLAG_4 :=0; // (694)
GVAR_PATCH_INVAIDITATOR :=0; // (695)
GVAR_RAIDERS :=0; // (696)

Your GVAR_RAIDERS number is 696 !!!
So You registered GVAR_RAIDERS as number 696 in reality (Vault13.gam)
But for use in your script you give it number 693.
So by using GVAR_RAIDERS in your script you really using global variable number 693 with is GVAR_MODOC_JONNY_PIP.
Declaration in global.h should have the same number as in vault13.gam.
Please change number in Global.h to 696.



3) Wrong reading of map and global vars in map_update_p_proc
It should be like that:

Code:
procedure map_update_p_proc begin 
   display_msg(map_var(MVAR_RAIDERS)); 
      display_msg(global_var(GVAR_RAIDERS)); 
end

Writing

display_msg(MVAR_RAIDERS);

You get map variable NUMBER(from *.gam file) not it's value
To get it's value use map_var command:

display_msg(map_var(MVAR_RAIDERS));
 
jargo said:
1)MSG problem
First You get that nasty "Error" instead of your text from msg file because you named your files (script and msg) AANARAIDER.
How many letters it have? Well, it have 10 letters and Fallout is an old DOS program.
It WILL NOT read names longer than 8 letters from *.lst files.
Change your script and msg name to anraider or something like that(8 letters max).

That maks sense. Ill shorten the name from now on, but why did the script still work then? did it get changed somewhere to AAANERAI~1 or something like that?

2) Global var problem

Global.h file:

#define GVAR_RESERVED_VAR58 (691)
#define GVAR_RESERVED_VAR59 (692)
#define GVAR_RAIDERS (693)

Your GVAR_RAIDERS number is 693

Vault13.gam file:

GVAR_MODOC_JONNY_PIP :=0; // (693)
GVAR_NEW_RENO_FLAG_4 :=0; // (694)
GVAR_PATCH_INVAIDITATOR :=0; // (695)
GVAR_RAIDERS :=0; // (696)

Your GVAR_RAIDERS number is 696 !!!
So You registered GVAR_RAIDERS as number 696 in reality (Vault13.gam)
But for use in your script you give it number 693.
So by using GVAR_RAIDERS in your script you really using global variable number 693 with is GVAR_MODOC_JONNY_PIP.
Declaration in global.h should have the same number as in vault13.gam.
Please change number in Global.h to 696.
Okee dokee. I assumed that I would just add it to the end of the list, seeing how script.h and scrname are 100 numbers apart.

3) Wrong reading of map and global vars in map_update_p_proc
It should be like that:

Code:
procedure map_update_p_proc begin 
   display_msg(map_var(MVAR_RAIDERS)); 
      display_msg(global_var(GVAR_RAIDERS)); 
end

Writing

display_msg(MVAR_RAIDERS);

You get map variable NUMBER(from *.gam file) not it's value
To get it's value use map_var command:

display_msg(map_var(MVAR_RAIDERS));
Sounds good. We and I thank you.
 
That maks sense. Ill shorten the name from now on, but why did the script still work then? did it get changed somewhere to AAANERAI~1 or something like that?

It is possible i had same problem with one script and fixing name do the trick.

BTW It is really good idea to use some tool for writing scripts, it will do a lot work for You.
You can chose between FSE and Dscript Tool.
If You use FSE then it will register you script, global, map and local vars.
Compilation with no p.bat just click compile button(F9).
Create and check for errors in msg files etc. :o
 
Back
Top