FAQ/Guides/Tutorials

Making ColorRIX Images for Fallout Loading Screens

Splash screens are those images seen as the game starts loading. They can only been seen if the game plays in 8bit (256 colors), otherwise you will get a temporary blank screen before the main menu appears.

This thread is designed to demonstrate how to build ColorRIX images: (ColorRIX Bitmap Graphic), for Fallout splash screens.

The beauty of the ColorRIX images is that there is no need to use the Fallout color palette, therefore the images are cleaner in appearance, but the Fallout color palette can be used to create the “Fallout look”. The only restriction with this version of Image Alchemy is the ColorRIX images can be no larger than 640x480 pixels. The software will accept 8bit, 16bit, and 24bit - BMP’s, GIF’s, JPEG’s, etc. The image that you wish to convert should be placed in the folder you installed Image Alchemy (this is to make the process easier), any ColorRIX images you build will also be saved into the Alchemy folder.

The first thing you need is the software Image Alchemy.

Now the software is ancient so you will need to mess around with the program to become familiar with its interface. The top menu is made up of - FILE – VIEW – RESIZE - PALETTE – COLORS – DITHER – MISC – BASIC PS – ADVANCED PS.

1). Go to FILE and - Select Input Image and locate the image file you wish to convert. A box (Input Image) in the bottom left will indicate the name and type of the file.

2). Go to VIEW and – View Image to check the file. ESC key gets you back to the menu. At this stage you can experiment with the COLORS and DITHER menus, and return to the VIEW to see the results.

3). Go to FILE and – Select Output Type. A red box will pop up – scan through the image formats and find RIX. A box in the bottom right-hand side (Output Type) will now have RIX described.

4). Go to FILE and – Convert! An Output File Name box will pop up. Change the name to SPLASH0 (Fallout SPLASH files are saved as SPLASH0, SPLASH1, etc), and change the .SCX to .RIX, and hit the enter key. The ColorRIX image will be saved to the Alchemy folder.

5). You will need a small program - Titanium Frm Browser to actually view the finished ColorRIX image, but this program can also view Fallout FRM’s. The finished SPLASH screens should be placed in a folder - \Fallout1\data\art\splash…or \Fallout2\data\art\splash.

*It’s important to remember that these images can only be seen in the actual game if the resolution patch has ‘not’ been installed, or the graphic are turned to 8bit.

Here is an example of one I made:

JPAwN1r.gif



Enjoy Pixote.
 
Last edited:
Building and cutting new tiles for Fallout 1 and 2.

This tutorial is designed to help modders cut and convert tiles for Fallout 1/2. It is based on the fine work of bbmultipass and friends, who originally built the Photoshop action and the program for converting GIF’s to Fallout FRM’s.

This is an extension to the original TileCutter.

The only difference between the two is - this version makes 400 tiles, the original made 100 tiles, and the new Photoshop action cuts the tiles from the bottom left hand corner (000) to the top right hand corner (399).

bfHCjPd.gif


The first thing you require is the folder “Tiles”. Inside the folder is the Photoshop file (PS - Tile Cutter), the Fallout color palette (Fallout Palette), the Photoshop action (Tilecutter 20x20), the program to convert the GIF’s to Fallout FRM's (Tilecutter), a folder named BIN, and finally the original readme file.

After opening the PS file (PS - Tile Cutter), you will notice the layer “tile mask”, it is being used as the template for cutting the tiles (It is the small blue box at position 000 - see above). Those images designed to be tiles must sit beneath this layer. Before running the action it is important to select the “tile mask” layer. Below is an example of a red brick dwelling soon to be made into roof tiles.

6YUftuf.gif


Steps…

*1 - Place the folder “Tiles” on the desktop (c: drive).

*2 - Load the action “Tilecutter 20x20” into Photoshop.

*3 - Load the file PS file "PS - Tile Cutter".

*4 - Load the Fallout Palette (Tiles folder) - (Photoshop Menu bar - Image/Mode/Index Color, Palette tab – Custom…). Change the Dither to Diffusion, amount 75%.

lLyzPsD.gif


*5 - Load the image you want made into tiles. Drag the image underneath the layer “tile mask” and the layer “GRID”. Turn on the grid layer and adjust the images position; see above. Note your image must be surrounded by the blue alpha color used in Fallout (#0000ff).

*6 - Turn off the grid layer. Turn on and select the “tile mask” layer (the small blue box).

*7 - Push the play button for the “Tilecutter 000-399” action. The files will be saved as GIF’s (000 to 399) into the folder “Tiles” on the desktop.

*8 - Delete all the blank blue GIF images. (You can get a lot of waste - this building takes up about half of the allotted 20x20 space, but the empty tiles can be easily deleted). See below.

wAV6Mm0.gif


*9 - Rename your files. (Ex: 000 to RDBRK001). Use the program - File Renamer Basic. See below.

V0PveaA.gif


*10 - Use the program Tilecutter to convert your GIF’s into working Fallout FRM’s. See below.

wdbH3vr.gif


The finished example in the Fallout 2 mapper.

CSSvuTX.gif


Good luck with the tile cutting – Pixote.
 
Last edited:
------------------------------------------------------------------------
Editing Fallout 1 maps in the BIS Mapper2
------------------------------------------------------------------------
[spoiler:95cecb2ff2]Here's what i've done to edit FO1 maps with BIS Mapper2. As far as I know, everything works and this is now a fully functional Fallout 1 map editor. Fuckin' A!

1) http://cubik2k.w.interii.pl/pliki/fofo_map_converter_V2.zip
This is absolutely necessary;
it automates the process that Sorrow detailed above, turning hex editing of map files to make them Fallout-1-compatible into a one click operation :mrgreen:

So once you've finished the long and annoying setup process below, and then have also done some changes to a map you wish to implement, you must run it through this converted to have it actually work properly in Fallout 1 (otherwise it will just be a black screen when that map file loads)

2) Obtain a copy of master.dat and critter.dat FROM BOTH FALLOUT GAMES. This is necessary for two reasons:

2a) You need FO2's data files because Mapper2 tries to read FO2's stuff by default, so this way it always has access to what it needs (font files, AI file, graphics, blah blah blah)

2b) You need to extract ALL of Fallout1's information if you want the Fallout 1 maps to look, work, save and play properly. So with that in mind:

3) Copy FO2 master.dat and FO2 critter.dat to a new folder, let's say C:\Mapper2

4) Extract ALL FILES from FO1 master.dat and FO1 critter.dat to the above directory. Personally I use F1UNDAT because it's very easy, just a "set it and forget it" command to extract everything.

Code:
f1undat -ep master.dat
and
Code:
f1undat -ep critter.dat

So now you'll have a full directory structure in the above, like this:
C:\Mapper2\DATA\ART
C:\Mapper2\DATA\ART\MISC
C:\Mapper2\DATA\ART\CRITTERS
C:\Mapper2\DATA\ART\WALLS
C:\Mapper2\DATA\ART\SCENERY
C:\Mapper2\DATA\PROTO\CRITTERS
C:\Mapper2\DATA\PROTO\ITEMS
C:\Mapper2\DATA\MAPS
...and so on.

4a) It's worth mentioning here that I don't know if installing Fallout 2 is technically required. For the sake of completeness, you might as well install Fallout 2 into the directory you're going to be using for Mapper2, but as far as I know, you only NEED the main data files, not the game install itself.

5) So to recap, we have the main .dat files from Fallout 2 in the same directory that Mapper2 is installed, and in that directory we also have the DATA\* file tree for all of Fallout 1's files. It should be somewhere in the realm of 20000-24000 files. Mine is currently 24,547 (twenty four thousand five hundred forty seven) but it could be as low as about 20,000 for you, because i've got some extra stuff in there. As long as the number is about that high, you've more than likely extracted everything as needed.

6) SCRIPTS.LST (from Fallout 1) must be modified, otherwise when hitting 'i' to display scripts, or 'e' with an object selected to modify the script its using, you'll get wildly incorrect display of script names.

EDIT: Here's my already-edited version http://www.megaupload.com/?d=JD72U7HD

Three lines must be added to SCRIPTS.LST, and later on, three lines removed.

The ones to ADD are lines 406,407,408:
Code:
403 DemoGen.int     ; Generator for the demo        # local_vars=0
404 DemoCryp.int    ; generic Crypt ganger member for the demo    # local_vars=4
405 DemoFool.int    ; generic Fool ganger memeber for the demo    # local_vars=4
406 **Added by Sduibek** BLAH.int    ; fix for display in Mapper2        # local_vars=0
407 **Added by Sduibek** FUDGE.int    ; fix for display in Mapper2       # local_vars=0
408 **Added by Sduibek** SCRIPTLOL.int    ; fix for display in Mapper2          # local_vars=0
409 Lenny.int       ; the Bhrama master for the demo       # local_vars=4
410 Icepick.int     ; Leader of the Fools.          # local_vars=4
411 Skizzer.int     ; gate guard for the demo       # local_vars=4

6a) Now, completely remove these three lines from SCRIPTS.LST

Code:
Line# 427 MVAirloc.ssl    ;  Master's Vault: Airlock door   # map_init  # local_vars=3
Line# 428 MVBShelf.ssl    ;  Master's Vault: Bookshelf    # local_vars=2
Line# 429 MVSctShf.ssl    ;  Master's Vault: Bookshelf with secret door # local_vars=5

6b) Lastly, make sure there are no empty lines at the bottom of the file. An easy way is to open SCRIPTS.LST in Notepad, then hit Ctrl+End. If your cursor is at the beginning of a blank row, hit Backspace. You want the cursor to be at the end of the last row of text when hitting Ctrl+End, otherwise the blank row will cause your last script line to duplicate in Mapper2

Good:
Code:
Line# 927  redfield.int    ; script allowing the red fields in MB to be destroyed          # local_vars=3
(Line # 928 does not exist)

Bad:
Code:
Line# 927  redfield.int    ; script allowing the red fields in MB to be destroyed          # local_vars=3
Line# 928  (blank)

See the difference?

7) Delete worldmap.dat and mapper2.lbm from your Mapper2 directory. Delete all instances of them in this directory.

8) Once you've run Mapper2 at least once, you should get a Mapper2.cfg file. Open up this file, and make sure override_librarian=0. If it's set to 1, change it. Otherwise you can't save maps at all.

9) As with SCRIPTS.LST, if you want critter AI Type to display properly, you need to modify the AI.TXT file (under DATA\DATA).

For a download link to my already-modified version, see the bottom of this post.

10) Finally, I made a version of FO2's master.dat with all MAP files removed -- I was really tired of scrolling through all the Fallout 2 maps I don't care about when looking for a Fallout 1 map to edit. So please check the links below to download the modified FO2 master.dat. If you plan on editing FO1 maps, it will make you happy :clap:

11) Oops almost forgot, like Sorrow says above you gotta put your critter .PRO files into 416 bytes. Nothing needs to be done with any other PRO files. The other benefit of this is then you can edit them in FUCK -- which is very useful, because I have yet to find a way to edit critters with Mapper2, it crashes.

12) Delete the entire SOUND folder in your Mapper2 folder, or rename it if you think you'll need those files later. (Probably better to just rename it to something like _SOUND, since hard drives are cheap these days and having the SFX for later use might be helpful).
This of course applies to all files and subfolders, so you have SOUND\MUSIC (about 20 files) SOUND\SFX (about 850 files) and SOUND\SPEECH (about 6400 files)

So in my case, we now have:
Code:
C:\Mapper2\DATA\_SOUND\*
And this directory DOES NOT EXIST:
Code:
C:\Mapper2\DATA\SOUND\*


13) Delete the file PERK.MSG in DATA/TEXT/(language)/GAME


--ADDENDUM--

In case it matters, here's the pertinent sections of what my Mapper2.CFG is currently set to:

Code:
[system]
art_cache_size=261
cdlock=
color_cycling=1
critter_dat=C:\Program Files\BlackIsle\Fallout2\critter.dat
critter_patches=C:\Program Files\BlackIsle\Fallout2\data
cycle_speed_factor=1
executable=mapper
free_space=0
hashing=1
interrupt_walk=1
language=english
master_dat=C:\Program Files\BlackIsle\Fallout2\master.dat
master_patches=C:\Program Files\BlackIsle\Fallout2\data
scroll_lock=0
splash=1
times_run=1

Code:
[debug]
mode=environment
output_map_data_info=0
show_load_info=0
show_script_messages=0
show_tile_num=0

[mapper]
default_f8_as_game=0
fix_map_inventory=0
fix_map_objects=0
ignore_rebuild_errors=0
librarian=1
override_librarian=0
rebuild_protos=0
run_mapper_as_game=1
save_text_maps=0
show_pid_numbers=1
sort_script_list=1
use_art_not_protos=0


Files you will want such as FUCK.exe, CHSIZE.exe, SCRIPTS.LST and AI.TXT, just copy over the TXT and LST, and use the other ones per their command line intructions:

http://www.megaupload.com/?d=JD72U7HD

Modified FO2 master.dat:

http://www.megaupload.com/?d=I1BIES3A
[/spoiler:95cecb2ff2]------------------------------------------------------------------------


------------------------------------------------------------------------
Implementing weapon drop on death for Fallout 1 critters (like in the FO2 RP/Megamod/Sfall)
here and here
------------------------------------------------------------------------
[spoiler:95cecb2ff2]
MIB88 said:
Code:
	variable LVar1;
	variable LVar2;
	LVar2 := critter_inven_obj(self_obj, 1);
	LVar1 := tile_num_in_direction(tile_num(self_obj), random(0, 5), random(1, 2));
	rm_obj_from_inven(self_obj, LVar2);
	move_to(LVar2, LVar1, elevation(self_obj));

For those wanting to expand on this, some notes:

-LVar2 is for item slot 1 (i.e.active hand).

-LVar1 is the random location part. The (0, 5) is the direction/six hexes you are asking about, Pixote. Random(1, 2) is the number of hexes. Replace that (random(1, 2)) with just a 1 or a 2 (or higher) to set it to be the same number each time. Same concept goes with the direction.

-This process can be repeated for the other hand (or even the armor slot) by copying this whole part and using two additional variables (such as LVar3 and LVar4).

Sduibek said:
If you want, the random(1,2) can also be substituted with random(0,2) -- in other words the weapon has a chance of falling on the corpse's hex. This isn't as bad as it sounds, as many weapons are long enough that you can still highlight to pick it up anyway.

EDIT>> This is what i'm using currently:
Code:
//BEGIN WEAPON DROP -- Jason12 & MIB88
	variable LVar1;
	variable LVar2;
	LVar2 := critter_inven_obj(self_obj, 1);//    Active item slot
	LVar1 := tile_num_in_direction(tile_num(self_obj), random(0, 5), random(0, 2));//    Random direction, 0 to 2 hexes from killed critter's hex (so under the corpse, next to it, or farther from it)
	if ((LVar2 != 21) or (LVar2 != 234) or (LVar2 != 235) or (critter_inven_obj(self_obj, 2) != 21) or (critter_inven_obj(self_obj, 2) != 234) or (critter_inven_obj(self_obj, 2) != 235)) then begin//    Brass Knuckles, Spiked Knuckles, Power Fist
		rm_obj_from_inven(self_obj, LVar2);
		move_to(LVar2, LVar1, elevation(self_obj));//    Drop active item slot's item 
//END WEAPON DROP -- Jason12 & MIB88
	end
This checks if their equipped weapon is Spiked Knuckles, Brass Knuckles, or Power Fist, and if it is NOT one of those three, runs the drop weapon code.
[/spoiler:95cecb2ff2]------------------------------------------------------------------------


------------------------------------------------------------------------
Fallout 1 - Reference tables for scripts, stats, critters.
------------------------------------------------------------------------
[spoiler:95cecb2ff2]I was looking for something like these and never found one that was sufficient for what i'm looking for -- the *.h from Fallout 2 work for some of them, but they can and do involve code, pointers and object names that don't exist in Fallout 1.

So without further ado, I bring you the data i've compiled so far, which I use for my own reference and benefit while working on FIXT. Hopefully it will be of use to others as well! :clap:


CRITTERS: OBJ_ID | NAME_STRING | OBJ_PID
Code:
1          Vault Dweller                    16777217
2          Townsman                    16777218
3          Townsman                    16777219
4          Loser                              16777220
5          Peasant                              16777221
6          Vault Dweller                    16777222
7          Power Armor                    16777223
8          Vault Overseer                    16777224
9          Super Mutant                    16777225
10          Greater Mole Rat          16777226
11          Radscorpion                    16777227
12          Person in Robes                    16777228
13          Merchant                    16777229
14          Zombie Guard                    16777230
15          Combat Armor Female          16777231
16          Glowing One                    16777232
17          Leather Jacket Man          16777233
18          Peasant                              16777234
19          Leather Jacket Woman          16777235
20          Peasant                              16777236
21          Male Combat Armor          16777237
22          Townswoman                    16777238
23          Super Mutant Lieutenant          16777239
24          Townswoman                    16777240
25          Nightkin                    16777241
26          Vault Dweller                    16777242          won't open in F.U.C.K.
27          Male Guard                    16777243          won't open in F.U.C.K.
28          Brahma                              16777244          won't open in F.U.C.K.
29          Peasant                              16777245          won't open in F.U.C.K.
30          Peasant                              16777246          won't open in F.U.C.K.
31          Man in Leather Armor          16777247          won't open in F.U.C.K.
32          Peasant                              16777248          won't open in F.U.C.K.
33          Citizen                              16777249          won't open in F.U.C.K.
34          Vault Dweller                    16777250          won't open in F.U.C.K.
35          Vault Dweller                    16777251          won't open in F.U.C.K.
36          Dog                              16777252          won't open in F.U.C.K.
37          Woman                              16777253          won't open in F.U.C.K.
38          Man                              16777254          won't open in F.U.C.K.
39          Peasant                              16777255          won't open in F.U.C.K.
40          Peasant                              16777256          won't open in F.U.C.K.
41          Person In Power Armor          16777257
42          Boy                              16777258
43          Lesser Centaur                    16777259
44          Mr. Handy                    16777260
45          Floater                              16777261
46          Scribe                              16777262
47          Overseer                    16777263
48          Cave Rat                    16777264
49          Gizmo                              16777265
50          Master                              16777266
51          Deathclaw                    16777267
52          Technician                    16777268
53          Technician                    16777269
54          Technician                    16777270
55          Guard                              16777271
56          Guard                              16777272
57          Guard                              16777273
58          Technician                    16777274
59          Citizen                              16777275          won't open in F.U.C.K.
60          Bum                              16777276
61          Worker                              16777277
62          Cathedral Student          16777278
63          Tandi                              16777279
64          Aradesh                              16777280
65          Seth                              16777281
66          Merchant                    16777282
67          Guard                              16777283
68          Mantis                              16777284
69          Robobrain                    16777285
70          Raider Guard                    16777286
71          Citizen                              16777287
72          Citizen                              16777288
73          Garl's Advisor                    16777289
74          Citizen                              16777290
75          Raider                              16777291
76          Ian                              16777292
77          Floating Eye                    16777293
78          Pig Rat                              16777294
79          Killian Darkwater          16777295
80          Lars                              16777296
81          Izo                              16777297
82          Traveler                    16777298
83          Citizen                              16777299
84          Citizen                              16777300
85          Traveler                    16777301
86          Peasant                              16777302
87          Citizen                              16777303
88          Merchant                    16777304
89          Stranger                    16777305
90          Guard                              16777306
91          Farmer                              16777307
92          Merchant                    16777308
93          Peasant                              16777309
94          Neal                              16777310
95          Peasant                              16777311
96          Worker                              16777312
97          Merchant                    16777313
98          Peasant                              16777314
99          Thug                              16777315
100          Stranger                    16777316
101          Child of the Cathedral          16777317
102          Vinnie                              16777318
103          Traveler                    16777319
104          Set                              16777320
105          Garret                              16777321
106          Zombie                              16777322
107          Nightkin Guard                    16777323
108          Tough Super Mutant          16777324
109          Ghoul Guard                    16777325
110          Undergrounder                    16777326
111          Dan                              16777327
112          Sheriff Greene                    16777328
113          Deputy Fry                    16777329
114          Kane                              16777330
115          Demetre                              16777331
116          Keri                              16777332
117          Rutger                              16777333
118          Daren Hightower                    16777334
119          Martha                              16777335
120          Lorenzo                              16777336
121          Jacob                              16777337
122          Dogmeat                              16777338
123          Jasmine                              16777339          won't open in F.U.C.K.
124          Troy                              16777340
125          Darrell                              16777341
126          Talus                              16777342
127          Thomas                              16777343
128          Mathia                              16777344
129          Razor                              16777345
130          Tangler                              16777346
131          Talius                              16777347
132          Gabriel                              16777348
133          Avellone                    16777349
134          VanHagan                    16777350
135          Surf                              16777351
136          Lasher                              16777352
137          Barracus                    16777353
138          Jeremiah                    16777354
139          Super Mutant Medic          16777355
140          Gideon                              16777356
141          Dominic                              16777357
142          Lucy                              16777358
143          Wiggup                              16777359
144          Viscious                    16777360
145          Super Mutant Lieutenant          16777361
146          Laura                              16777362
147          Morpheus                    16777363
148          Nicole                              16777364
149          Vree                              16777365
150          Maxson                              16777366
151          Rhombus                              16777367
152          Cabbot                              16777368
153          Decker                              16777369
154          Butch                              16777370
155          Loxley                              16777371
156          Jain                              16777372
157          Harold                              16777373
158          Harry                              16777374
159          Tough Rat                    16777375
160          Radiated Rat                    16777376
161          Tough Radiated Rat          16777377
162          Lesser Mole Rat                    16777378
163          Coyote                              16777379
164          Large Brahma                    16777380
165          Deathclaw Spawn                    16777381
166          Nasty Radscorpion          16777382
167          Bloody Floater                    16777383
168          Greater Centaur                    16777384
169          Lowly Peasant                    16777385
170          Peasant                              16777386
171          Farmer                              16777387
172          Worker                              16777388
173          Farmer                              16777389
174          Merchant                    16777390
175          Guard                              16777391
176          Great Mantis                    16777392
177          Mean Pig Rat                    16777393
178          Farmer                              16777394
179          Worker                              16777395
180          Merchant                    16777396
181          Guard                              16777397
182          Glower                              16777398
183          Mad Glowing One                    16777399
184          Zombie                              16777400
185          Guard                              16777401
186          Super Mutant Guard          16777402
187          Mean Super Mutant          16777403          won't open in F.U.C.K.
188          Mad Super Mutant          16777404
189          Deadly Super Mutant          16777405
190          Tough Nightkin                    16777406
191          Deadly Nightkin                    16777407
192          Super Nightkin                    16777408
193          Master Nightkin                    16777409
194          Guard                              16777410
195          Merchant                    16777411
196          Guard                              16777412
197          Guard                              16777413
198          Guard                              16777414
199          Girl                              16777415
200          Scribe                              16777416
201          Guard                              16777417
202          Stranger                    16777418
203          Thug                              16777419
204          Mercenary                    16777420
205          Guard                              16777421
206          Vault Dweller                    16777422
207          Garl                              16777423
208          Doc Morbid                    16777424
209          Gretch                              16777425
210          Tycho                              16777426
211          Jonathan                    16777427
212          Jacob                              16777428
213          Mary                              16777429
214          Rachael                              16777430
215          Caleb                              16777431
216          Traveler                    16777432
217          Stranger                    16777433
218          Thug                              16777434
219          Mercenary                    16777435
220          Guard                              16777436
221          Citizen                              16777437
222          Stranger                    16777438
223          Thug                              16777439
224          Mercenary                    16777440
225          Guard                              16777441
226          Citizen                              16777442
227          Traveler                    16777443
228          Stranger                    16777444
229          Thug                              16777445
230          Mercenary                    16777446
231          Guard                              16777447
232          Citizen                              16777448
233          Traveler                    16777449
234          Mercenary                    16777450
235          Guard                              16777451
236          Traveler                    16777452
237          Stranger                    16777453
238          Thug                              16777454
239          Mercenary                    16777455
240          Guard                              16777456
241          Thug                              16777457
242          Mercenary                    16777458
243          Guard                              16777459
244          Traveler                    16777460
245          Stranger                    16777461
246          Thug                              16777462
247          Mercenary                    16777463
248          Guard                              16777464
249          Traveler                    16777465
250          Stranger                    16777466
251          Thug                              16777467          won't open in F.U.C.K.
252          Mercenary                    16777468
253          Guard                              16777469
254          Traveler                    16777470
255          Stranger                    16777471
256          Thug                              16777472
257          Mercenary                    16777473
258          Guard                              16777474
259          Traveler                    16777475
260          Stranger                    16777476
261          Thug                              16777477
262          Mercenary                    16777478
263          Guard                              16777479
264          Initiate Knight                    16777480          //incorrect critter ID, works OK though
265          Senior Initiate Knight          16777481          //incorrect critter ID, works OK though
266          Apprentice Knight          16777482          //incorrect critter ID, works OK though
267          Journeyman Knight          16777483          //incorrect critter ID, works OK though
268          Senior Knight                    16777484          //incorrect critter ID, works OK though
269          Initiate Knight                    16777485          //incorrect critter ID, works OK though
270          Senior Initiate Knight          16777486          //incorrect critter ID, works OK though
271          Apprentice Knight          16777487          //incorrect critter ID, works OK though
272          Journeyman Knight          16777488          //incorrect critter ID, works OK though
273          Senior Knight                    16777489          //incorrect critter ID, works OK though
274          Junior Paladin                    16777490
275          Paladin                              16777491
276          Senior Paladin                    16777492
277          Junior Paladin                    16777493
278          Paladin                              16777494
279          Senior Paladin                    16777495
280          Initiate Scribe                    16777496
281          Senior Initiate Scribe          16777497
282          Apprentice Scribe          16777498
283          Journeyman Scribe          16777499
284          Senior Scribe                    16777500
285          Initiate Scribe                    16777501
286          Senior Initiate Scribe          16777502
287          Apprentice Scribe          16777503
288          Journeyman Scribe          16777504
289          Senior Scribe                    16777505
290          Robed Man                    16777506
291          Master's Child                    16777507
292          Cathedral Student          16777508
293          Robed Woman                    16777509
294          Master's Child                    16777510
295          Master's Pet                    16777511
296          Master's Thug                    16777512
297          Master's Guard                    16777513
298          Master's Pet                    16777514
299          Master's Thug                    16777515
300          Master's Guard                    16777516
301          Doctor                              16777517
302          Katja                              16777518
303          Sasha                              16777519
304          Mysterious Stranger          16777520
305          Mindless Ghoul                    16777521
306          Eyeball, Mk II                    16777522
307          Egg                              16777523
308          Dugan                              16777524
309          Mother Deathclaw          16777525
310          Hammer                              16777526
311          Dead Traveler                    16777527
312          Kenji                              16777528

STATS: [get_critter_stat(OBJ, # below)]
Code:
0 = Strength
1 = Perception
2 = Endurance
3 = Charisma
4 = Intelligence
5 = Agility
6 = Luck
7 = Maximum Hit Points
8 = Maximum Action Points
9 = Armor Class
10 = Unarmed Damage (I don't think this is used by the game, but haven't tested)
11 = Melee Damage
12 = Carry Weight
13 = Sequence
14 = Healing Rate
15 = Critical Chance %
16 = Better Criticals
17 = Damage Reduction (not %) NORMAL
18 = Damage Reduction (not %) LASER
19 = Damage Reduction (not %) FIRE
20 = Damage Reduction (not %) PLASMA
21 = Damage Reduction (not %) ELECTRICAL [How does this vary from 22?]
22 = Damage Reduction (not %) EMP [How does this vary from 21?]
23 = Damage Reduction (not %) EXPLOSION
24 = Damage Resistance (%) NORMAL
25 = Damage Resistance (%) LASER
26 = Damage Resistance (%) FIRE
27 = Damage Resistance (%) PLASMA
28 = Damage Resistance (%) ELECTRICAL [How does this vary from 29?]
29 = Damage Resistance (%) EMP [How does this vary from 28?]
30 = Damage Resistance (%) EXPLOSION
31 = Radiation Resistance %
32 = Poison Resistance %
33 = Age
34 = Gender (0 Male, 1 Female)
35 = Current HP
36 = Current Poison Level
37 = Current Radiation Level (# of rads)

SCRIPT ACTIONS: [defined under Procedure START in each script file. Only need to define the ones you're going to use.)
Code:
SCRIPT_ACTION ==
2          spatial_p_proc
3          description_p_proc
4          pickup_p_proc
   6          use_p_proc
   7          use_obj_on_p_proc
   8          use_skill_on_p_proc
11          talk_p_proc
12          critter_p_proc
13          combat_p_proc
14          damage_p_proc
15          map_enter_p_proc    [map_init]
16          map_exit_p_proc     [remove_party]
   18          destroy_p_proc
21          look_at_p_proc
22          timed_event_p_proc
23          map_update_p_proc

INJURIES:
Code:
Crippled LEFT LEG          critter_injure(OBJ, 4);
Crippled RIGHT LEG          critter_injure(OBJ, 8);
Crippled LEFT ARM          critter_injure(OBJ, 16);
Crippled RIGHT ARM          critter_injure(OBJ, 32);
Blindness (-5 Perception)          critter_injure(OBJ, 64);

***Add them together to cause multiple at once, for example:***
Cripple BOTH Legs          critter_injure(OBJ, 12);

DIALOG:
Code:
#Script/Dailog modifiers:
[At the end of display_msg, gsay_msg, greply_msg, you can use these to change their opinion of you:]
49 = makes happy(er)
50 = no change
51 = makes angry(er)

#Text colors
-1 = random          (chooses a different color each time it's called or displayed)
0 = yellow          (standard, neutral)
1 = grey          (???)
2 = red                    (angry, hostile, aggitated, mad)
3 = green          (happy, friendly?)
Goes up to 8 but I haven't tested those yet.

SKILLS:
(has_skill(OBJ, #below)
(is_success(do_check(OBJ, SKILL, MOD))
(is_success(roll_vs_skill(OBJ, SKILL, MOD%)))
Code:
0 = Small Guns
1 = Big Guns
2 = Energy Weapons
3 = Unarmed
4 = Melee Weapons
5 = Throwing
6 = First aid
7 = Doctor
8 = Sneak
9 = Lockpick
10 = Steal
11 = Traps
12 = Science
13 = Repair
14 = Speech
15 = Barter
16 = Gambling
17 = Outdoorsman
18+ = Avail Skill Points  [critter_mod_skill]

PERKS:
(has_trait(0, OBJ, #below) -- returns rank (1, 2, 3) if a ranked Perk
Code:
0          Awareness
1          Bonus HtH Attacks 
2          Bonus HtH Damage 
3          Bonus Move
4          Bonus Ranged Damage 
5          Bonus Rate of Fire
6          Earlier Sequence
7          Faster Healing
8          More Criticals
9          Night Vision
10          Presence
11          Rad Resistance
12          Toughness
13          Strong Back
14          Sharpshooter
15          Silent Running
16          Survivalist
17          Master Trader
18          Educated
19          Healer
20          Fortune Finder
21          Better Criticals
22          Empathy
23          Slayer
24          Sniper
25          Silent Death
26          Action Boy
27          Mental Block
28          Lifegiver
29          Dodger
30          Snakeater
31          Mr. Fixit
32          Medic
33          Master Thief
34          Speaker
35          Heave Ho!
36          Friendly Foe
37          Pickpocket
38          Ghost
39          Cult of Personality 
40          Scrounger
41          Explorer
42          Flower Child
43          Pathfinder
44          Animal Friend
45          Scout
46          Mysterious Stranger
47          Ranger
48          Quick Pockets
49          Smooth Talker
50          Swift Learner
51          Tag!
52          Mutate!
53          Nuka-Cola Addiction
54          Buffout Addiction
55          Mentats Addiction
56          Psycho Addiction
57          Radaway Addiction
58          Weapon Long Range (should apply to items only; haven't tested.)
59          Weapon Accurate (should apply to items only; haven't tested.)
60          Weapon Penetrate (should apply to items only; haven't tested.)
61          Weapon Knockback (should apply to items only; haven't tested.)
62          Powered Armor  (???)
63           Combat Armor  (???)

TRAITS:
(has_trait(2, OBJ, #below)
Code:
0          Fast Metabolism
1          Bruiser
2          Small Frame
3          One Hander
4          Finesse
5          Kamikaze
6          Heavy Handed
7          Fast Shot
8          Bloody Mess
9          Jinxed
10          Good Natured
11          Chem Reliant
12          Chem Resistant
13          Night Person
14          Skilled
15          Gifted
[/spoiler:95cecb2ff2]------------------------------------------------------------------------


------------------------------------------------------------------------
Fixing issue with crashes at The Glow, Military Base and Master's Vault.
------------------------------------------------------------------------
[spoiler:95cecb2ff2]This fix/patch is needed for some installations of Fallout, whether they are v1.1, 1.2, 1.21, or 1.3x TeamX -- some sources will state it's only required for versions 1.0 or 1.1

This crash can apply to The Cathedral, The Master's Vault, Mariposa Military Base, and The Glow (lame).

My current fix that seems to work is as follows:
1) Run the Cathedral Fix/Patch available here at NMA
2) Manually copy over the following files from a known good installation:
FALLOUT/DATA/MAPS
-- Children's Cathedral maps (*.MAP) & map variables (*.GAM)
-- Master's Vault maps (*.MAP) & map variables (*.GAM)
-- The Glow maps maps (*.MAP) & map variables (*.GAM)
-- Mariposa Military Base maps (*.MAP) & map variables (*.GAM)
FALLOUT/DATA/SCRIPTS
-- Script files (*.INT) for all of the above
FALLOUT/DATA/SOUND/MUSIC
-- Music track #6 (Vault)
-- Music track #8 (Vats)


Code:
Music/
06vault.acm
08vats.acm

Map files & map var files
CHILDEAD.MAP
childrn1.map
childrn2.map
GLOW1.MAP
GLOW2.GAM
GLOW2.MAP
GLOWENT.GAM
GLOWENT.MAP
MBDEAD.MAP
mbent.gam
MBENT.MAP
MBENT.VAR
MBSTRG12.GAM
MBSTRG12.MAP
MBVATS12.GAM
MBVATS12.MAP
MSTRLR12.GAM
MSTRLR12.MAP
MSTRLR34.GAM
MSTRLR34.MAP


Scripts
These are probably not ALL necessary, but better safe than sorry. It's essentially every possibly applicable non-critter script from each area.
MBDEAD.int
CATH2MV.int
Chid2Mas.int
Chid2Twr.int
Childrn1.int
Childrn2.int
ChocDoor.int
elev11.int
elev2.int
elev3.int
elev4.int
elev5.int
elev6_m1.int
elev7.int
ExitBase.int
GEnt2Lv1.int
Glo1Weap.int
Glo3Supl.int
Glo3Wep.int
Glo4Supl.int
Glo4Weap.int
GloBlElv.int
Glowent.int
GlowMap1.int
GlowMap2.int 
GLv12Ent.int
Mas2Chid.int
MASTER.int
MASTER1.int
MASTER2.int
MBENT.int
MBOUT2IN.int
MBSTRONG.int
MBVATS.int
MSTRCOMP.int
MVAIRLOC.int
MVBSHELF.int
MVCOMP.int
MVDWN2UP.int
MVNEWS.int
MVNUKE.int
MVRCRDOR.int
MVSCTSHF.int
MVUP2DWN.int
Tow2Chid.int
These are all included in my mod of course ;) :)[/spoiler:95cecb2ff2]------------------------------------------------------------------------
 
I've started a Wiki article for scripting.... the vast majority of info out there is for Fallout 2 scripting, and unfortunately, much of it has absolutely no use for Fallout 1 scripting. EDIT: Talking about function and syntax stuff... Obviously scripting theory and concepts are the same across the board, but as you get more and more into the details, 1 and 2 quickly diverge.

http://falloutmods.wikia.com/wiki/Fallout_1_and_Fallout_2_scripting_-_commands,_reference,_tutorials

As the page, my goal is to eventually have that be a "landing page" of sorts for scripting -- it will have its own unique and/or original content, but also link to various other good scripting references.

The goal is to have extensive info on both Fallout 2 and Fallout 1 separated in this page, but currently most of the info is for Fallout 1 (except for the huge Script Commands list from Avellone's doc) because I spent a few hours on this today and I'm tired of typing.

For an example of new stuff that as far as I know, has never had a walkthrough before:
http://falloutmods.wikia.com/wiki/F...ands,_reference,_tutorials#Getting_Started.21

(I'm especially proud of the linked batch files, because that will make a new Fallout 1 scripter take ten seconds to do what usually takes a lot of annoying footwork)

Cheers
 
Dude101 said:
Thanks! Wiki-ing (new word? lol) is addicting. That's not a good thing for free time! :lol:

Anyway I was going to post it as a new thread but figured adding here is appropriate... if a mod thinks this deserves its own thread feel free to suggest/create one.

At this point, I'm looking for feedback and (ideally) if anyone wants to add stuff to the article. That would be awesome. Links to other resources within the article would be the easier and least time-intensive addition. And like I said it's planned to get a lot bigger and more detailed, I just am tired of working on it for today.

----------------------------------------------
Edit

Heyyy I just used my wikia Scripting page for my own reference while coding for the first time! Couldn't remember the rotate_to_tile syntax.

Sweet :D
 
I might as well post the four Fallout 2 modding tutorials I recently made here. Big disclaimer: all of these are in tested-in-mapper-untested-in-game limbo and therefore (especially in the case of the party member one) should be taken with a grain of salt. So it's probably a good idea to read through the respective threads first should you want to use them.

Tutorial for adding party members
[spoiler:0c77f50845]I recently decided to give modding Fallout 2 another go and redid the hours-long routine of finding tutorials and modding tools, relearning them, etc. etc. Anyway, one recurring complaint has been that there aren't really any tutorials of intermediate difficulty. As in, there's the standard beginner stuff on compiling, and so on, and some very in depth stuff, but nothing on what you can actually do once you've set everything up in the first place. Specifically, there's (as far as I can tell) no tutorials on doing what everyone wants to do the second they start modding fallout: making weird extra party members and sending them into battle. The most common advice is to just copy what the designers did with existing party member x (which any beginner will know is nigh impossible).

Now, I'm not much more than a beginner myself, so part of the goal of this tutorial is to hopefully get some pointers on which step is wrong/unnecessary/whatever (hence the attempt part). Also, I'm assuming you already know the absolute basics. Anyway, without further ado:

Let's say you want to make Lucas in Arroyo (the fisticuffs guy) a potential party member, what to do?

1: Right now Lucas doesn't have his own prototype (he's just another villager, while party members need to be *unique*), so you need to go to the critter proto folder, copy the villager proto file (i.e. 00000003.pro) and rename this copy to an available slot (e.g. 00000484.pro), which you have to also add at the end of the critter.lst file. Problem is, right now the proto file still "thinks" it's the old one, so use FUCK or some other critter changing program and change the ID number to 484 (and any other parameters you want to change of course).

2: Now we should give this unique little prototype a name. Open the critrpid.h header file and add
Code:
 #define PID_LUCAS		                (16777700)
(remember that pids are the proto number + 16777216)

3: Now go to the party.h header file and just start copying, only with lucas instead op party member x.
So, instead of
Code:
 #define Sulik_Ptr                           party_member_obj(PID_SULIK)
you do
Code:
 #define Lucas_Ptr                           party_member_obj(PID_LUCAS)
etc.

4: Now go to the individual script file (i.e. acfist.ssl in the mapper scripts) and add
Code:
#define lucas_joins_party                 party_add_self;                                                   \
                                          critter_add_trait(self_obj,TRAIT_OBJECT,OBJECT_TEAM_NUM,TEAM_PLAYER)
and put lucas_joins_party at whichever point (e.g. in converstation) you want him to come in your party. Now put in some extra local variables you will need:

Code:
#define LVAR_WAITING                    (7)
#define LVAR_FOLLOW_DISTANCE            (8)
#define LVAR_TEAM                       (9)
#define LVAR_Joined_Party_Before        (14)

#define PARTY_NODE_X                      Node1000

Now add this line to the beginning of procedure map_enter_p_proc:

Code:
begin
   party_member_map_enter;
   if (Lucas_In_Party) then begin
      //do nothing
   end else... etc.

so he doesn't join the arroyo team everytime you enter a map. Then at critter_p_proc add

Code:
   else if (Lucas_In_Party) then begin
      if (party_is_waiting == false) then begin
      party_member_follow_dude
      end
   end
to get him to follow you around. Then add this line to the beginning of talk_p_proc:

Code:
   if ( ( Lucas_Ptr != 0 ) or ( party_is_waiting ) ) then begin
       start_gdialog(NAME,self_obj,4,-1,-1);
       gSay_Start;
           call Node1000;
       gSay_End;
       end_dialogue;
   end

This calls the party options screen we all love so much. Just copy the nodes 1000-1100 from an existing party member script (don't forget to also introduce them at the beginning of the script, i.e. procedure Node1000; etc.) and change the sultik_party_member_options (and similar) to party_member_default_options (same with the gear and follow variants).

Finally remove the
Code:
 critter_add_trait(self_obj,TRAIT_OBJECT,OBJECT_AI_PACKET,AI_ARROYO_WARRIOR);
line, so that you can alter the ai through the party options later on.

Now you should be able to compile.

5: Go to the party.txt file and copy whichever existing party member you want him to resemble (i.e. in Lucas' case, Sulik) and add a new entry, changing the PID number and removing level up stuff so that you get:

Code:
[Party Member 26]   ; pMLucas_PID
party_member_pid=16777700
area_attack_mode=always, sometimes, be_careful
attack_who=whomever_attacking_me, strongest, whomever, closest
best_weapon=melee, melee_over_ranged, ranged_over_melee, unarmed
chem_use=clean, stims_when_hurt_little, stims_when_hurt_lots, sometimes, anytime, always
distance=stay_close, charge, snipe, on_your_own, stay
run_away_mode=none, tourniquet, never
disposition=none, custom, defensive, aggressive, berserk
level_minimum=0
level_up_every=0
level_pids=-1

Of course, if you happen to want Lucas to be able to level up to a martial arts master later on, make some more protos, edit them in FUCK, and add each consecutive pid number to "level_pids".

6: Finally go into the mapper and replace Lucas' villager prototype with your new prototype, give him one of Sulik's AI's (i.e. Berserk or Aggressive or whatever, it's just the default setting you can change) and give him the acfist.int script again.

Now F8 and it should work swimmingly!
[/spoiler:0c77f50845]

Tutorial for scripting battles a la the Den Gang War or the Ghost Farm showdown
[spoiler:0c77f50845]Again the set up for this is the same as for the previous tutorial. When I began (and immediately stopped) modding fallout a few years ago I wanted to do two things: make new party members and put together fights like the one in the Den. Especially the latter completely baffled me (I couldn't even get critters to move I remember) and without any tutorials around I soon gave up. Because, in case you hadn't noticed, checking to see what the developers did with the Den battle is extremely disheartening (just open den.h and prepare for sensory overload). So here's a barebones tutorial on how to do more or less the same thing.

As with the previous tutorial, I note up front that I'm a beginner myself and hopefully veterans will show up to explain all the things I did wrong/could have done easier/should have done to avoid the game breaking. Also, again, it's assumed that you know the absolute basics.

Okay, so suppose I want to set things up so that salvatore's gang can either attack Bishop's Casino or Mordino's Casino en masse (the latter is included to demonstrate how cross-map attacks, like the ones in the Den and the Ghost Farm, take place).

1) Make a new global variable called SALVATORE_ATTACK, which will be the basis for our two attacks (value 1 will be the attack on Bishop, 2 the one on Mordino). Now have these triggered through whichever conversation options which make sense to you.

2) open the map scripts for the two maps we're going to use (newr1.ssl and newr2.ssl) and add these lines to the latter:

Code:
export variable bouncer1;
export variable bouncer2;

and this one to the former:

Code:
export variable bouncer3;
export variable bouncer4;

We will need these variables to give our brave Salvatore troopers something to attack in a minute (at least, if I understood things right, you can only have scripts attack *individual* objects, but if it's somehow possible to attack a random critter with a certain script or on a certain team, I'd love to hear about it).

3: open the Salvatore grunt script (salmen.ssl) and add the lines

Code:
import variable bouncer1;
import variable bouncer2;
import variable bouncer3;
import variable bouncer4;

Now, let's start with moving towards the Bishop casino. Unless I'm a particularly stupid person, scripting movement in Fallout 2 is a pain in the ass. Critters constantly get stuck in other animations which they won't get out of, so it's important to cancel these out. So here's what we do; we add this line to critter_p_proc:

Code:
    if (global_var(GVAR_SALVATORE_ATTACK) == 1) and (local_var(LVAR_Attack_1) == 0) then begin   
         	animate_run_to_tile(19899);      
		if art_anim(ANIM_stand) then begin  
			reg_anim_clear(self_obj);
         	animate_run_to_tile(19899);
         end

Ignore the LVAR for the moment. What's important is that everytime the critter is being an asshole and standing still because somebody went through the door before him, the script forces him to stop being an asshole and get moving again. The tile number is just in front of the casino entrance (it can't be much further; for some reason npc's don't like being forced to move very far, so if you want to get further you need to script it in babysteps).

Now, before we script the actual attack we want the Salvatore grunts to have some backup from their two pals upstairs, so we add the line underneath:

Code:
         	if (self_elevation != 0) then begin
   			critter_attempt_placement(self_obj, 16535, 0);
   			end

which puts them neatly beneath the stairs. Now to have them attack the bouncers, add this beneath the previous line:

Code:
if 
         	(self_tile == 19899) then begin
         		attack(bouncer1);
				set_local_var(LVAR_Attack_1, 1);
         	end
end

The LVAR just makes sure that they don't move back to tile 19899 after the battle like a bunch of idiots, but you can leave it out if you want. Of course, nothing happens yet because "bouncer1" doesn't exist yet. So now we go to step

4: Open the bouncer script (nccasbou.ssl), import the same variables (bouncer1, bouncer2, etc.) as in the Salvatore script and add the following line to map_enter_p_proc:

Code:
   if (map_first_run) and (cur_map_index == MAP_NEW_RENO_2) then begin
         if (bouncer1 == 0) then begin
            bouncer1 := self_obj;
            set_local_var(LVAR_Bouncer_Num, 1);
         end else if (bouncer2 == 0) then begin
            bouncer2 := self_obj;
            set_local_var(LVAR_Bouncer_Num, 2);
      	 end
   end else if (local_var(LVAR_Bouncer_Num) == 1) then begin
      bouncer1 := self_obj;
   end else if (local_var(LVAR_Bouncer_Num) == 2) then begin
      bouncer2 := self_obj;
   end

Here I just copied the system used for the "junkie_talker"s in the Den.

(Now, just a note if you want to script using the New Reno bouncers specifically; they have this weird thing (maybe it's just in the mapper) where the team allocation system (the Mordino and Bishop bouncers have the same script) doesn't really work. So unless you want to end up having the Salvatore boys fighting prostitutes, add extra team lines for Bishop in the one map and Mordino in the other just for good measure.)

Et voila, F8 and the Bishop attack should work swimmingly.

5: Now for the Mordino attack; the bouncers just need an extra line similar to the previous one (remember that the bouncers for both casinos share the same script):

Code:
else if (map_first_run) and (cur_map_index == MAP_NEW_RENO_1) then begin
         if (bouncer3 == 0) then begin
            bouncer3 := self_obj;
            set_local_var(LVAR_Bouncer_Num, 3);
         end else if (bouncer4 == 0) then begin
            bouncer4 := self_obj;
            set_local_var(LVAR_Bouncer_Num, 4);
         end
   end else if (local_var(LVAR_Bouncer_Num) == 3) then begin
      bouncer3 := self_obj;
   end else if (local_var(LVAR_Bouncer_Num) == 4) then begin
      bouncer4 := self_obj;
   end

6: Now it's time in the mapper to go to the Mordino casino map and put copies of all the Salvatore grunts somewhere near the exit grid. Now give these copies each the salmen.int script and fill up their inventories the same way as their alter egos in the other map.

7: Now add the following line in the Salvatore men script beneath map_enter_p_proc:

Code:
   if (cur_map_index == MAP_NEW_RENO_2) and (global_var(GVAR_SALVATORE_ATTACK) == 2) then begin
   		set_obj_visibility(self_obj,1);
   end
   if (cur_map_index == MAP_NEW_RENO_2) and (global_var(GVAR_SALVATORE_ATTACK) != 2) then begin
   		set_obj_visibility(self_obj,0);
   end
   if (cur_map_index == MAP_NEW_RENO_1) and (global_var(GVAR_SALVATORE_ATTACK) != 2) then begin
   		set_obj_visibility(self_obj,1);
  		end 
   if (cur_map_index == MAP_NEW_RENO_1) and (global_var(GVAR_SALVATORE_ATTACK) == 2) then begin
   		set_obj_visibility(self_obj,0);
  		end

This makes sure that the Salvatore men in the Mordino casino map stay safely nonexistent until the Mordino attack sequence fires, and that the men in Salvatore's bar dissappear when this happens. Of course you can make this more sophisticated by transporting the player along with them like in the Den gang war, but none of that is strictly necessary: what's important is that whenever one alter ego is visible the other is invisible.

Finally, just add these lines to the critter_p_proc beneath the others for the second attack to become possible:

Code:
   	     if (global_var(GVAR_SALVATORE_ATTACK) == 2) and (local_var(LVAR_Attack_2) == 0) and (cur_map_index == MAP_NEW_RENO_1) then begin   
         	animate_run_to_tile(17495);      
				if art_anim(ANIM_stand) then begin  
					reg_anim_clear(self_obj);
         			animate_run_to_tile(17495);    
         			end if 
         				(self_tile == 17495) then begin
         				attack(bouncer3);
						set_local_var(LVAR_Attack_2, 1);
         	   end
   	end

And there you have it! It took me a lot of tinkering and a couple of the errors I'm not even a hundred percent clear on how I got past them, but it *seems* to work well now. Of course, I'll undoubtedly be set straight on this account.

After this I think the only other tutorial I'll make is for setting up new caravans (because you can always use more caravans).


EDIT: I forgot to mention that the most important way this approach differs from the ones used for the Den and the Ghost Farm is that you start out as an observer (like in the random encounter fights). To change that, just insert a line somewhere that (temporarily) changes the team of the Salvatore men to TEAM_PLAYER)[/spoiler:0c77f50845]

Tutorial for adding new caravans
[spoiler:0c77f50845]To conclude my trilogy of tutorials by beginners for beginners, here's one on caravans. My last tutorial didn't get a single comment; which, being an eternal optimist I interpreted as a sign that the tutorial was perfect and every veteran simply nodded his head approvingly while reading it.

As an aside, caravans were always something I was a bit dissappointed in in Fallout. I mean, they were a lot of fun, but they basically only existed as little more than a get rich quick scheme, whereas you would think a world where even plants and ants have mutated into giant killing machines, moving around from town to town would generally require armed caravans.

But anyway, let's say we want to make a caravan of trappers from Klamath to the Den, what do we do? As previously, I'm going to assume you understand the basics (this time I'm also going to assume you understand that whenever you add a new procedure/node/variable, you need to introduce it in the script).

1: There are no existing caravan routes from Klamath to the Den, so we need to make one in BHRNDDST.H. Start by adding the line:

Code:
#define WM_In_Klamath_Den(x,y)                          ((x >= 300) and (x <500>= 100) and (y <= 300))

Here we delineate the area in which our encounters will take place. Unless there's a worldmap with x and y coordinates lying around somewhere I don't know of, you just need to look at the city coordinates in city.txt to get an idea where you are on the world map (e.g. the example is a box with Klamath at the top left corner and the Den at the lower right corner). Also, check that the area doesn't overlap with an already existing one. Now for the route:

To the bottom of the file, add:

Code:
// Klamath --> Den, 1 Encounter Only
#define Klamath_Den_1_1_x                        (420)
#define Klamath_Den_1_1_y                        (175)

// Klamath --> Den, 2 Encounters
#define Klamath_Den_2_1_x                        (390)
#define Klamath_Den_2_1_y                        (150)
#define Klamath_Den_2_2_x                        (450)
#define Klamath_Den_2_2_y                        (250)

The x,y coordinates show where you end up on the world map if the caravan "fails", and which encounter is fired (so, since all the coordinates are within our Klamath to Den box, these are the encounters that are fired). You can of course have as many possible encounters as you like, but 2 sounds about right here.

2: Now for the encounters, go to BHRNDDST.SSL (so this time the script, not the header file) and add the line:

Code:
                                        else if (WM_In_Klamath_Den(worldmap_xpos,worldmap_ypos)) then                  \
                                            call The_Den_Encounter;

Now let's define the procedure The_Den_Encounter:

Code:
procedure The_Den_Encounter begin
   variable Encounter;

   Encounter:=random(0,99);

   // enc_00
   if (Encounter < 50) then begin
       debug_msg("Klamath_Encounter Table, Encounter 01");
       display_msg(mstr(403));
       Encounter_Counter:=random(8,12);
       Encounter_Rotation:=dude_cur_rot;
       call Klamath_Rats;
   end
   // enc_01
   else if (Encounter < 100) then begin
       debug_msg("Den_Encounter Table, Encounter 01");
       display_msg(mstr(501));
       Encounter_Counter:=random(1,3);
       Encounter_Rotation:=dude_cur_rot;
       call Klamath_Robbers;
   end
end

I've kept it simple here: there's two possible encounters (50/50 chance) on the caravan: klamath_rats and klamath_robbers, which we'll get to in a second. Encounter_Counter is what determines how many critters show up, though you shouldn't mistake it for the exact number (e.g. in this example, there won't be 8-12 rats). To see what it does mean, let's set up the Klamath_Rats procedure:

Code:
procedure Klamath_Rats begin
   variable Critter_Counter:=0;
   variable Critter_Total;
   //variable Critter;
   variable Critter_Tile;
   variable item;

   Critter_Tile:=tile_num_in_direction(tile_num(dude_obj),Encounter_Rotation,dude_perception*2);

   Critter_Total:=(Encounter_Counter*2)/5;
   Critter_Counter:=0;
   if (Critter_Total < 1) then
       Critter_Total:=1;

   while (Critter_Counter < Critter_Total) do begin
       Create_Enemy(PID_MOLE_RAT,-1,SCRIPT_ECRAT);
       inc_map_var(MVAR_Hostile_Total);
   end

   Critter_Total:=(Encounter_Counter*4)/5;
   Critter_Counter:=0;
   if (Critter_Total < 1) then
       Critter_Total:=1;

   while (Critter_Counter < Critter_Total) do begin
       Create_Enemy(PID_PIG_RAT,-1,SCRIPT_ECRAT);
       inc_map_var(MVAR_Hostile_Total);
   end
end

Suppose the Encounter_Counter comes out as 10, then the outcome will be 10*2/5 = 4 mole rats and 10*4/5 = 8 pig rats, so twelve in total (in case you're wondering, non-round numbers get rounded down).

The thing I still can't get a handle on is how critters are placed. In this example, we defined Encounter_Rotation as dude_cur_rot so with
Code:
Critter_Tile:=tile_num_in_direction(tile_num(dude_obj),Encounter_Rotation,dude_perception*2);

you'd expect the enemies to get placed in front of where the player is facing; instead they end up all over the place. If anyone can tell me why I'd love to know.

3: Now to set up the caravan. First, make a global variable called TRAPPER_CARAVAN. Then, in the script of the trappers in Trapper Town (kctrapr.ssl), add the Start_Caravan procedure and have it called through dialogue or something:

Code:
procedure StartCaravan begin
   variable Caravan_Carts;
   variable Caravan_Encounters;
   variable Caravan_Guards;

   set_global_var(GVAR_CARAVAN_START, CARAVAN_KLAMATH);
   set_global_var(GVAR_CARAVAN_END, CARAVAN_THE_DEN);
   set_global_var(GVAR_TRAPPER_CARAVAN,CARAVAN_STATUS_ON_JOB);

   set_caravan_status(CARAVAN_STATUS_ON_JOB);
   Caravan_Encounters := random( 0, 2 );
   set_caravan_encounters( Caravan_Encounters );

   //debug_msg("ENCOUNTERS=" + k);

   if (global_var(GVAR_CARAVAN_ENCOUNTERS_TOTAL) == 0) then begin
      Caravan_Guards := 1;
      set_caravan_guards( Caravan_Guards );
      
      game_time_advance(6*ONE_GAME_DAY);
      load_map(MAPSTR_DEBBUS1,0);
      
   end
   else begin
      Caravan_Carts:=1;
      Caravan_Guards:=0;

      set_caravan_masters(1);
      set_caravan_guards( Caravan_Guards );
      set_caravan_carts( Caravan_Carts );
      set_caravan_brahmin( 2 * Caravan_Carts );
      set_caravan_drivers( 2 * Caravan_Carts );

      load_map(MAPSTR_BHRNDDST,11); //<-robs map script ignores this index...must be above 10
                                    //however to put caravan in center of map
   end
 end

As you can deduce, this caravan goes from Klamath to the Den, with 0 to 2 encounters (if you want more you need to add the coordinates to the header file in step 1), one caravan master, one cart (how many gecko pelts can they have), two brahmin, and two drivers.

4: Now, go back to BHRNDDST.ssl and add the following line to map_enter_p_proc:

Code:
       else if (global_var(GVAR_TRAPPER_CARAVAN) == CARAVAN_STATUS_ON_JOB) then begin
           call Trapper_Caravan;
       end

For the Trapper_Caravan procedure:

Code:
procedure Trapper_Caravan begin
   variable Encounter_Number;
   
   call Klamath_Den_Encounters;

   call Build_Caravan_Team;
end

Now, scroll down to the Build_Caravan_Team procedure. For my example, I just tried to replicate the three trappers in Trapper Town, but you can do whatever you feel like of course. For instance, for the first caravan driver I used:

Code:
       else if (global_var(GVAR_TRAPPER_CARAVAN) == CARAVAN_STATUS_ON_JOB) then begin
                 Critter:=create_object_sid(PID_MALE_TRAPPER,0,0,SCRIPT_RCCVNGRD);  
                 add_obj_to_inven(Critter,create_object(PID_10MM_JHP,0,0));     
                 item:=create_object(PID_SPRINGER_RIFLE,0,0);   
       end

This creates the leather jacket trapper with a pipe rifle (wielded) and some rounds. This is different from the system the script usually uses, which is in the form of a random male/female of a certain type, with a random weapon chosen from a few options. To simply copy this system is risky given that most models only support a few types of weapons. So, for instance, if I had used this system with either male or female trapper, with either a spear or a pipe gun, then the female trapper could end up with a pipe gun she couldn't use (because of no animation being there).

Finally, just add one additional procedure:

Code:
procedure Klamath_Den_Encounters begin
   variable Encounter_Number;

   Encounter_Number:=total_encounters - encounters_left;

   if (total_encounters == 1) then begin
       set_caravan_pos(Klamath_Den_1_1_x,Klamath_Den_1_1_y);
       set_exit_grids(0,-2,0,20100,0);                          // Exit grids on elevation 0 goto Worldmap
       game_time_advance(6*ONE_GAME_DAY);
       check_area;
   end

   else if (total_encounters == 2) then begin
       if (Encounter_Number == 0) then begin                    // this is the first encounter
           set_caravan_pos(Klamath_Den_2_2_x,Klamath_Den_2_2_y);
           set_exit_grids(0,-2,0,20100,0);                      // Exit grids on elevation 0 goto Worldmap
           game_time_advance(3*ONE_GAME_DAY);
           check_area;
       end

       else if (Encounter_Number == 1) then begin               // this is the second encounter
           set_caravan_pos(Klamath_Den_2_1_x,Klamath_Den_2_1_y);
           set_exit_grids(0,-2,0,20100,0);                      // Exit grids on elevation 0 goto Worldmap
           game_time_advance(3*ONE_GAME_DAY);
           check_area;
       end
   end

end

The only additional thing this really does in practice is let you decide the time that elapses between encounters.

And there you have it.
[/spoiler:0c77f50845]

Tutorial for scripting a change in character models
[spoiler:0c77f50845]Designating a specific object while modding Fallout 2 is quite annoying (imagine how nice it would be to be able to do so in the mapper). I already pointed out the basics for doing so in my tutorial for making a battle script, but that assumed you didn't care *which* of a number of critters carrying the same script became a certain object. That is to say, we had 4 bouncers in that example, and we simply wanted to number them bouncer1, bouncer2, etc. without caring which of them became which. But what if you *do* want to specify that?

For instance, suppose you have Jordan in Arroyo (the one always twirling his spear), and you want to "power him up" at one point in the game for some reason, e.g. by making him into a leather armored proto. In this case, you want to put the new proto next to him on the map, and then make the one go invisible as the other becomes visible, right? But if you only have one script for the both of them (i.e. acjordan.ssl), then how do you do this (making a new script is a very sloppy workaround, because all the changes in local variables get lost)?

The method I found most feasible (though others might of course have better ones), is to check for equiped weapons. So the Jordan with the spear becomes "jordan1" and the Jordan with a powered up weapon (e.g. a sharpened spear) becomes "jordan2".

This way you can script it as follows (as you'll see, the only other thing you need is some global variable to trigger the "powering up"). Under map_enter_p_proc add something along the lines of:

Code:
if (map_first_run) then begin
    if obj_carrying_pid_obj(self_obj, PID_SPEAR) then begin
    	jordan1 := self_obj;
    	end
    if obj_carrying_pid_obj(self_obj, PID_SHARP_SPEAR) then begin
    	jordan2 := self_obj;
    	end
end
    if (self_obj == jordan1) and (global_var(GVAR_ARROYO_SLAVERS) == SL_DEAL_SEALED) then begin
    	set_obj_visibility(self_obj, 1);
    	end
    if (self_obj == jordan2) and (global_var(GVAR_ARROYO_SLAVERS) != SL_DEAL_SEALED) then begin
    	set_obj_visibility(self_obj, 1);
    	end
    if (self_obj == jordan1) and (global_var(GVAR_ARROYO_SLAVERS) != SL_DEAL_SEALED) then begin
    	set_obj_visibility(self_obj, 0);
    	end
    if (self_obj == jordan2) and (global_var(GVAR_ARROYO_SLAVERS) == SL_DEAL_SEALED) then begin
    	set_obj_visibility(self_obj, 0);
    	end

The map_first_run thing is necessary to avoid a scenario where Jordan throws his spear, doesn't pick it up, and turns invisible when you come back to the map (not terribly likely, I know, but might as well rule it out). When you want to use the same trick only with multiple carriers of the same script, for instance to beef up all the Arroyo warriors, then all you need is a combination of the method used for the bouncers in New Reno and the method outlined above. After all, for all the warriors within their respective groups (i.e. the "beefed up group" and the "un-beefed up group) we don't have to be specific (they are all either invisible or visible); we only need to differentiate between the two groups. So what you get is (again under map_enter_p_proc):

Code:
if (map_first_run) then begin
         if (warrior1 == 0) and obj_carrying_pid_obj(self_obj, PID_SPEAR) then begin
            warrior1 := self_obj;
         end else if (warrior2 == 0) and obj_carrying_pid_obj(self_obj, PID_SPEAR) then begin
            warrior2 := self_obj;
      	 end else if (warrior3 == 0) and obj_carrying_pid_obj(self_obj, PID_SPEAR) then begin
            warrior3 := self_obj;
      	 end else if (warrior4 == 0) and obj_carrying_pid_obj(self_obj, PID_SPEAR) then begin
            warrior4 := self_obj;
      	 end else if (warrior11 == 0) and obj_carrying_pid_obj(self_obj, PID_10MM_PISTOL) then begin
            warrior11 := self_obj;
         end else if (warrior21 == 0) and obj_carrying_pid_obj(self_obj, PID_SHOTGUN) then begin
            warrior21 := self_obj;
      	 end else if (warrior31 == 0) and obj_carrying_pid_obj(self_obj, PID_10MM_SMG) then begin
            warrior31 := self_obj;
      	 end else if (warrior41 == 0) and obj_carrying_pid_obj(self_obj, PID_COMBAT_KNIFE) then begin
            warrior41 := self_obj;
      	 end
   end
    if (self_obj == warrior1) and (global_var(GVAR_ARROYO_SLAVERS) == SL_DEAL_SEALED) then begin
    	set_obj_visibility(self_obj, 1);
    	end
    if (self_obj == warrior11) and (global_var(GVAR_ARROYO_SLAVERS) != SL_DEAL_SEALED) then begin
    	set_obj_visibility(self_obj, 1);
    	end
    if (self_obj == warrior1) and (global_var(GVAR_ARROYO_SLAVERS) != SL_DEAL_SEALED) then begin
    	set_obj_visibility(self_obj, 0);
    	end
    if (self_obj == warrior11) and (global_var(GVAR_ARROYO_SLAVERS) == SL_DEAL_SEALED) then begin
    	set_obj_visibility(self_obj, 0);
    	end
    if (self_obj == warrior2) and (global_var(GVAR_ARROYO_SLAVERS) == SL_DEAL_SEALED) then begin
    	set_obj_visibility(self_obj, 1);
    	end
    if (self_obj == warrior21) and (global_var(GVAR_ARROYO_SLAVERS) != SL_DEAL_SEALED) then begin
    	set_obj_visibility(self_obj, 1);
    	end
    if (self_obj == warrior2) and (global_var(GVAR_ARROYO_SLAVERS) != SL_DEAL_SEALED) then begin
    	set_obj_visibility(self_obj, 0);
    	end
    if (self_obj == warrior21) and (global_var(GVAR_ARROYO_SLAVERS) == SL_DEAL_SEALED) then begin
    	set_obj_visibility(self_obj, 0);
    	end
    if (self_obj == warrior3) and (global_var(GVAR_ARROYO_SLAVERS) == SL_DEAL_SEALED) then begin
    	set_obj_visibility(self_obj, 1);
    	end
    if (self_obj == warrior31) and (global_var(GVAR_ARROYO_SLAVERS) != SL_DEAL_SEALED) then begin
    	set_obj_visibility(self_obj, 1);
    	end
    if (self_obj == warrior3) and (global_var(GVAR_ARROYO_SLAVERS) != SL_DEAL_SEALED) then begin
    	set_obj_visibility(self_obj, 0);
    	end
    if (self_obj == warrior31) and (global_var(GVAR_ARROYO_SLAVERS) == SL_DEAL_SEALED) then begin
    	set_obj_visibility(self_obj, 0);
    	end
    if (self_obj == warrior4) and (global_var(GVAR_ARROYO_SLAVERS) == SL_DEAL_SEALED) then begin
    	set_obj_visibility(self_obj, 1);
    	end
    if (self_obj == warrior41) and (global_var(GVAR_ARROYO_SLAVERS) != SL_DEAL_SEALED) then begin
    	set_obj_visibility(self_obj, 1);
    	end
    if (self_obj == warrior4) and (global_var(GVAR_ARROYO_SLAVERS) != SL_DEAL_SEALED) then begin
    	set_obj_visibility(self_obj, 0);
    	end
    if (self_obj == warrior41) and (global_var(GVAR_ARROYO_SLAVERS) == SL_DEAL_SEALED) then begin
    	set_obj_visibility(self_obj, 0);
    	end

And there you have it.[/spoiler:0c77f50845]
 
Sorry if this is wrong thread and if this question was in these forums a lot of times, but:

Burst formula calculates like this: for example, if dmg is 5-10 and weapon fires 10 shots, then every bullet of the burst attack will do 5-10, so total would be 50-100 (if every bullet reaches the target, right?

And if burst attack uses only 3 shot, then will the chance for every bullet to hit be the same?

P.S. Again - sorry if this is irritating.
 
Animation Prefixes

This list will be helpful for those who need to build critters or edit frame offsets.

V9idinf.jpg
 
Frame Offset Position Chart

This chart shows the numbers, in the various directions, to offset Fallout artwork within the hex position. It is best used when the artwork needs to be moved exactly in a certain direction and still remain true to its hex position. Often used with new scenery and walls.

7USywFx.gif
 
Today there is a tutorial video for everything on YouTube. Nonetheless I only found one BIS Mapper Tutorial and it's in french.

 
30 seconds in and my face already hurts. He just has to press + / - to increase / decrease the pattern size.

Also press M to switch to the pointer mouse cursor for easier wall placement.

And you DO NOT make the cave floor tiles as roof. You just don't. No, no, no. The walls have a "cave floor" top border already, which will connect visually to the outside graphics. You can clearly see in the video how the top right roof tiles are overlapping the walls, creating a sharp edge which easily can be avoided... by not putting the tiles on the roof level.
 
Back
Top