Page 1 of 1

Posted: Thu Apr 17, 2003 4:17 pm
by Red
Yeah, we need a tutorial on "Getting your critter to react" or something as this seems to be hard for people...

I should also paste my "how to test a map in the real game" info I posted on the IPLY forums and noone gives a hoot about even though they ask the question 30 times a day (well, ok, twice now...)

Posted: Mon Apr 21, 2003 4:14 am
by Stevie D
Red wrote:Yeah, we need a tutorial on "Getting your critter to react" or something as this seems to be hard for people...

I should also paste my "how to test a map in the real game" info I posted on the IPLY forums and noone gives a hoot about even though they ask the question 30 times a day (well, ok, twice now...)
Any chance you could root that one out Red? Sounds like it needs to be a part of the FAQ, if you'd be happy with that.

Posted: Mon Apr 21, 2003 4:26 am
by Red
Oops, forgot about that, meant to do it but was taken by some other activity.

Here's the link http://forums.interplay.com/viewtopic.p ... 551#357551, feel free to copy/paste the information.

Posted: Mon Apr 21, 2003 4:37 am
by Stevie D
Nice one geezer! I'll chuck it up here for a while in case anyone wants to discuss it before it goes up in the FAQ.

Adding/Testing maps:
Use F8 to test your map (in the mapper, scripts work though remember that global vars aren't set... you can modify the player with Tools -> Modify OBJ_DUDE so you can test stuff right away).

Use Ctrl-R in the main menu of the game itself to test the map in Fallout2 itself. Save the game, press ctrl-R again and load the game you just saved.

If you want to REALLY test it out, then name it the same as an existing map in Fallout and slap it into Fallout2/data/maps.

If you want to change some maps within the game so you can actually enter it normally, then slap it in the same directory as mentioned above then you'll need to update maps.txt (in /data in either patch000.dat or master.dat - you'll obviously need a DAT extractor) and update the map_name field of one of entries to use as your own map.

--

You might want to look for the hack which adds more cities to Fallout2 too, since then you won't need to remove the original maps.

--

Giving weapons to people:
Not all sprites are rendered to support all weapons in the game. If you assign the critter a weapon which the sprites aren't included in the game (say a tribesman with a rocket launcher), the game simply won't draw him. So well, when that happens, don't do it since the game doesn't support it.

Plus another bit from a later post:
The AI packet isn't a script... It's a default reaction set for the critters and the text they can say when they're hit. You can find the list in one of the AI files (probably ai.txt) in data/data (or data in master.dat).

The text is in combatai.msg in data/text/english/game.

I still don't know what a spatial script really is, all I know is that critters (well, any proto really) can have it's own script - as well as the map. My current guess was that the spatial script was triggered when you entered a specific area (set by the area option when you place the spatial script. The vault city entrance to the vault would be an example of how I think it works).

Posted: Mon Apr 21, 2003 5:08 am
by Red
Right, the spatial script.

OK, well, first what's a script? A script defines how something in the game reacts.

Say you want an NPC to talk with you, you'll mke a script and include the talk_p_proc entry point which the game calls when you click the talk option on it. There are a bunch of predefined entry points like this which are triggered by various events in the game.

A normal script is always associated with a map, a critter, an object or a scenery item or a "spatial script".

What's special about spatial scripts is that you don't need to put a "map element" on them to use them, and they're triggered once you eneter the spatial script's defined radius (though note temaperacl's point about it not necessarely being the player himself). This event is triggered in the spatial_p_proc entry point.

In the game spatial scripts are usually defined to do two things:
- Descriptions when you enter an area (other then the map itself, that would be in the map script...)
- "Hidden" traps you can't disarm, such as the Navarro mines.
- The goo in the toxic caves.

Load any of those maps and you'll see them, along with their scripts if you press I.