Compiled Script Not Working At All

Sirren67

Look, Ma! Two Heads!
I made an experiment with an existing simple script to see if my machine was properly set up (yes I have Watcom C): opened NICATPW5 ( the script of Cat's Paw 5, + 10% to Energy Weapons) with FSE, saved it with another name and edited so that it gives + 10% to lockpick. FSE saved, compiled and registered it totally succesfully. I wrote the proper .msg and checked it was really registered. It was. I started the editor, put Cat's paw on the ground and chose "new script". My script was in the list. Hit f8 and made the PcC use it, and nothing happened of course, except for the item desappearing from the PC's inventory . I am going to learn scripting, but without a way to check if new scripts work I'm hitting a stone wall. Any idea about what I'm doing wrong ?
 
There is something special about books that works by PID number in the engine as far as I can tell. You'll notice that there are no scripts for the guns and bullets and most of the others. The catpaw5 has a script, but something is still being done in the engine to make it disappear.

Try making a new book item rather than using an existing one. Then it will have a different PID number. You'll notice that the book script works but the book doesn't disappear. That's because the engine isn't doing its book magic (whatever that is). Corpse showed me a way to make new books disappear a while ago using pointers.

http://www.nma-fallout.com/forum/viewtopic.php?t=10789&start=8

The above is just the code to remove the book. The code to mod skills should work. If yours isn't then something must not be configured properly.

To make a new book, copy the items.lst from fallout2\proto\items to your \data\proto\items. Start the mapper and go to the end of the item list. Click on the blank space and select Edit. Click the Type button and select item type Misc Item. Click the Action Flags button and make the item usable. Click the script button and select your script. Pick the ground and inventory images. And add a new line in pro_item.msg for the book.
 
Thank you dude_object, I'll try that out, I haven't start proto editing yet.
By the way, a couple more things
A): In my mapper all scripts work except for those attached to critters (I'm talking about regular scripts\characters\maps). Is it normal ?
I read a post by a modder stating he can test his scripts attached to a character directly in the mapper, once they are registered. He hasn't to restart the mapper when he applies changes to the scripts, too.
B): I'm looking for a simple handbook about scripting (I know that a "... for teenagers" series exists, for exemple). I looked in Amazon.com but found nothing specific. Please, could anyone point me to a specific title\publisher, if such a book exists? I'm sure it would interest a lot of people on this forum, too
 
Sirren67 said:
A): In my mapper all scripts work except for those attached to critters (I'm talking about regular scripts\characters\maps). Is it normal ?

No, my critter scripts work in the mapper. Most scripts should work, but scripts that use external variables (gvars etc) will probably not work properly in the mapper.

Sirren67 said:
I read a post by a modder stating he can test his scripts attached to a character directly in the mapper, once they are registered. He hasn't to restart the mapper when he applies changes to the scripts, too.

That might have been me, I have mentioned this. If I make a new script for rat, and its attached to the critter, if I recompile all I need to do is go in and out of game mode ( F8 ) and the critter will use the newly compiled script.

Sirren67 said:
B): I'm looking for a simple handbook about scripting (I know that a "... for teenagers" series exists, for exemple). I looked in Amazon.com but found nothing specific. Please, could anyone point me to a specific title\publisher, if such a book exists? I'm sure it would interest a lot of people on this forum, too

You won't find anything like that for fallout. The scripting shares some syntax with pascal and c, but its a unique language. The best thing to do is read the docs that came with the mapper many times over, look closely at define.h and command.h, and do a bunch of experiments with script commands. I was planning to write a scripting guide but I keep getting torn away from documentation by adding new stuff to the game.
 
Back
Top