Duck and Cover Forum Index

  Duck and Cover  •  FAQ  •  Search  •  Memberlist  •  Usergroups   •  Register  •  Profile  •  Log in to check your private messages  •  Log in

 Support DAC!
 Books and Misc item scripts View next topic
View previous topic
Post new topicReply to topic
Author Message
Corpse
Vault Scion
Vault Scion


Joined: 20 Mar 2003
Posts: 188
Location: Sydney, Australia

PostPosted: Wed Mar 26, 2003 4:33 pm Reply with quoteBack to top

Does anyone know which scripts control books or other items such as explosives, etc. I have been working on a mod for sometime and would like to add more items like books and explosives, also I wouldn't mind a set of nightvision goggles which run on batteries (like the motion sensors) and give you the nightvision perk when equipped. Any suggestions would be welcome.

Thanks in advance.
View user's profileSend private message
Red
Hero of the Glowing Lands
Hero of the Glowing Lands


Joined: 15 May 2002
Posts: 2085
Location: Nowhere (important anyway)

PostPosted: Thu Mar 27, 2003 5:06 am Reply with quoteBack to top

Well, the nightvision trait's been disabled in F2 as far as I recall, though the trait itself MIGHT still be functional of you uncomment it, but I doubt it.

Scripts are indeed associated with items:
Email send by me to FIC author wrote:

SC> Anyhoo, at offset 0x1C, you'll find a word. if it's 0x0300 (normal hex, not
SC> motorola), then the next word (offset 0x1E) is the script's number.
So with a hex editor you can figure out which script is associated with which item. look at the proper number in script.lst in data/scripts for the proper script (itself found in data/scripts - all in master.dat).

Seeing as the trait might not work you should look at how the glasses work in adding 1luck to the character. If indeed it's a simple script then you can do something similar with your perception or whatever needs to be added when wearing/removing the item from your active slot.

As for it being conssumable, I have no idea, though you can certainly script batteries which when used could refill the goggles.
View user's profileSend private messageSend e-mailAIM AddressYahoo MessengerMSN MessengerICQ Number
Corpse
Vault Scion
Vault Scion


Joined: 20 Mar 2003
Posts: 188
Location: Sydney, Australia

PostPosted: Thu Mar 27, 2003 2:45 pm Reply with quoteBack to top

Ok, so that script number is actually listed in the item 'pro' file in offset 0x1e; thanks for the info, I have a lot of work ahead of me.
View user's profileSend private message
Corpse
Vault Scion
Vault Scion


Joined: 20 Mar 2003
Posts: 188
Location: Sydney, Australia

PostPosted: Tue Apr 08, 2003 7:56 pm Reply with quoteBack to top

I looked at few misc item pro files on the hexeditor and all I found at offset 1e was a null value (ff). Also I have looked through script lists and srcname.msg but haven't found any scripts assigned to books.

This (and the nightvision goggles script) is all that's preventing me from adding new books in my 1000 item mod; everything else (with the exception of a few graphics that need a bit of touch) such as new weapons, ammo, armor, drugs,item availability through dealers, random encounters is in place. If anyone knows where I could find the book scripts your help would be appreciated.
View user's profileSend private message
Red
Hero of the Glowing Lands
Hero of the Glowing Lands


Joined: 15 May 2002
Posts: 2085
Location: Nowhere (important anyway)

PostPosted: Wed Apr 09, 2003 2:41 am Reply with quoteBack to top

Well, if they lack any scripts, chances are it's something hardcoded into the game (and .pro)...
View user's profileSend private messageSend e-mailAIM AddressYahoo MessengerMSN MessengerICQ Number
Corpse
Vault Scion
Vault Scion


Joined: 20 Mar 2003
Posts: 188
Location: Sydney, Australia

PostPosted: Sun Apr 13, 2003 5:52 pm Reply with quoteBack to top

Hey, it looks like you can specify scripts in offset 1f in the proto files after all; all you need to do is start a new game.

Unfortunately I haven't found the scripts that control books, explosives or other miscellaneous items (I looked for the SID field but it is not specified for some reason) ; so I put together a book script that gives you bonus to traps for my "Terrorist Cookbook". I am still having problems with the script, I can't get it to remove the book from your inventory once you have read it, everything else seems to work but if I add a condition to check if the player is carrying the book, the script won't work. If I try adding an rm_object command then it crashes the game; I have tried setting local variables (if lvar=0 execute script "mod traps skill" and set lvar to 1 so it only runs once) but if I try this it fails execute the script when the object is used.

The nightvision goggles script is also having similar problems, I can get it to give you the Nightvision perk if the item is used, but I can't get it to remove the perk if it is used a second time. can anyone help me out?
View user's profileSend private message
Corpse
Vault Scion
Vault Scion


Joined: 20 Mar 2003
Posts: 188
Location: Sydney, Australia

PostPosted: Tue Apr 15, 2003 8:42 pm Reply with quoteBack to top

I got the Nightvision Goggle script working, now I would like to know how to make it use up its power every time you hit the use button and how to get it to remove and replace the working set of goggles in your inventory for a non-working set once it runs out of charges; can anyone help me out?
Thanks in advance.
View user's profileSend private message
Corpse
Vault Scion
Vault Scion


Joined: 20 Mar 2003
Posts: 188
Location: Sydney, Australia

PostPosted: Thu Apr 17, 2003 5:28 pm Reply with quoteBack to top

I got the book scripts working (sort of), the only problem is I can't get them removed from the inventory after use so I worked around this by reducing the number of points awarded by the book and increasing the time it takes to read. The books check for your character's intelligence before they can be used, some also require a minimum skill level and award points according to intelligence; higher intelligence also reduces the time it takes to read a book and increases the skill level gained by a particular book. And finally in addition to the skill bonus points, some books grant you perks if you meet the perk requirements (minimum stat or skill but ignore level). Once you have reached the maximum skill level granted by the book you can't use it again (unless your intelligence increases).
Now I only need help with the nightvision goggles script, just need to find a way for it to use up its power source like the geiger counters and motion sensors, so if anyone got any idea how to script its power source I'd like to hear it.
View user's profileSend private message
Red
Hero of the Glowing Lands
Hero of the Glowing Lands


Joined: 15 May 2002
Posts: 2085
Location: Nowhere (important anyway)

PostPosted: Thu Apr 17, 2003 5:43 pm Reply with quoteBack to top

Try using the editor to modify the pro file, it'll probably help you out, at worst, how the MISC format works (as the pro editor included in the editor doesn't seem to handle all MISC objects).
View user's profileSend private messageSend e-mailAIM AddressYahoo MessengerMSN MessengerICQ Number
Corpse
Vault Scion
Vault Scion


Joined: 20 Mar 2003
Posts: 188
Location: Sydney, Australia

PostPosted: Sun Apr 20, 2003 9:46 pm Reply with quoteBack to top

I looked at a few misc files using the editor and found the parameters that set the power source and script id; I tried setting it for the nightvision goggles but still it does not use its power when used, so my guess is you have to script it to reduce its power charge. On the other hand I got the book scripts working 100%, the reason why it crashed when I tried rm_obj command was that I specified the item PID so now I can get them removed once used; also the new book scripts check for Intelligence and Comprehension perk awarding bonus to skills accordingly.
Now that the remove object function is working I can make items that work on specific critter types and either damage or heal (including crippled limbs) so I am going to be a busy corpse for a while.

Thanks for your help.
PS. Has anyone tried making landmines, it there is a command for setting traps on a specific tile my guess is it is possible to make them.
View user's profileSend private message
Red
Hero of the Glowing Lands
Hero of the Glowing Lands


Joined: 15 May 2002
Posts: 2085
Location: Nowhere (important anyway)

PostPosted: Sun Apr 20, 2003 11:28 pm Reply with quoteBack to top

Currently the way landmines work in Fallout is area scripts... And you can't create those in the script, so I don't think so.

As for the items, have you noticed in the editor that you can set traits in one of the options? Maybe that oculd be useful?
View user's profileSend private messageSend e-mailAIM AddressYahoo MessengerMSN MessengerICQ Number
Corpse
Vault Scion
Vault Scion


Joined: 20 Mar 2003
Posts: 188
Location: Sydney, Australia

PostPosted: Mon Apr 21, 2003 3:26 pm Reply with quoteBack to top

Yes, that is pretty cool; I'm having a few problems trying to save prototype files in the editor, I set librarian=1 in the cfg but it won't save the files.

Pity about those landmines.

Now this is totally unrelated to the above subject but I was looking through the Global.h and other header files. Now what do you know about the Global variables marked reserved (GVAR 633 - 692), are any of these variables used in the game or would using one of them for a new quest mess up the game in any way?. And second how do I go about editing one of these files and where exactly do I place it; if I edit the ones extracted by the editor would the editor update the headers in the Fallout game directory?
View user's profileSend private message
Red
Hero of the Glowing Lands
Hero of the Glowing Lands


Joined: 15 May 2002
Posts: 2085
Location: Nowhere (important anyway)

PostPosted: Mon Apr 21, 2003 7:34 pm Reply with quoteBack to top

For the PROs, you need to make sure their PIDs match the actual line number in their respective lst files.

Say you take 00000001.pro, copy it as 0000483.PRO, internally 483.PRO still has "1" written as it's PID.

So
  1. Edit the new prototype, make sure to change something, press done. This creates the TXT file.
  2. Rebuild the protos (F9, you may need to go through F11...)
  3. Edit the proto again and it'll work this time.
I don't know about the reserved GVARs though, albeit I'm fairly certain none of the script themselves use it. But does the game do? No idea.

At some point I'll try to see all we can remove the game while it still working. I already went thorugh this process making a 2x2 section tile worldmap.
View user's profileSend private messageSend e-mailAIM AddressYahoo MessengerMSN MessengerICQ Number
Display posts from previous:      
Post new topicReply to topic


Jump to:  



View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group