Aller au contenu

Photo

How do I make Triggers for Overland Map encounters like in SoZ?


  • Veuillez vous connecter pour répondre
29 réponses à ce sujet

#1
Ugly_Duck_01

Ugly_Duck_01
  • Members
  • 69 messages

How do I make Triggers for Overland Map encounters like in SoZ?  That are primarily for spawning overland map hostile creature encounters, like a band of trolls attacking the PC?



#2
Dann-J

Dann-J
  • Members
  • 3 161 messages

I'm pretty sure OLM encounters are spawned via the area HB script, rather than via triggers.



#3
Ugly_Duck_01

Ugly_Duck_01
  • Members
  • 69 messages

Anyone know how to set up this thing?  HB script for area, Triggers or whatever?



#4
Ugly_Duck_01

Ugly_Duck_01
  • Members
  • 69 messages

Somebody?  Anybody know?



#5
kamal_

kamal_
  • Members
  • 5 240 messages

Obsidian OM tutorial. Other OM tutorials. Take apart the SoZ OM. Why reinvent the wheel?



#6
rjshae

rjshae
  • Members
  • 4 485 messages

What you need to do is peruse the scripts in SoZ and figure out how they work--particularly the OnClientSpawn and Heartbeat scripts, IIRC. The encounters are specified in a set of .2da files, so you can modify those and make your own additions.



#7
Dann-J

Dann-J
  • Members
  • 3 161 messages

Obsidian OM tutorial. Other OM tutorials. Take apart the SoZ OM. Why reinvent the wheel?

 

I often find myself re-coding things from scratch, if only to get them working the way I want them to. The various SoZ OLM scripts are so inter-dependent that you pretty much have to use either all of them or none of them. The OLM in my current module is a cut-down version that omits the features I didn't like, and includes new features of my own (hunting, horses, active searching/tracking, localised weather conditions, etc).


  • Loki_999 aime ceci

#8
Ugly_Duck_01

Ugly_Duck_01
  • Members
  • 69 messages

I've been trying to use the  Obsidian scripts/triggers/whatever's to get this to work, but I can't seem to figure out the part that spawns the creatures.  I've used all of the scripts from SoZ, copied the entire nx2 campaign folder into my campaign folder too, but it still doesn't work...



#9
Ugly_Duck_01

Ugly_Duck_01
  • Members
  • 69 messages

I've also read every tutorial that you guys have suggested to me, but they don't seem to have the info. I need to make the overland creature spawning work.



#10
rjshae

rjshae
  • Members
  • 4 485 messages

You've laid down your Terrain trigger regions and given them their enter/exit/heartbeat scripts?



#11
Ugly_Duck_01

Ugly_Duck_01
  • Members
  • 69 messages

[Scripts]

OnEnter = gtr_terrain_en

OnExit = gtr_terrain_ex

OnHeartbeat = gtr_terrain_hb

 

[Variables]

nTerrain = 5

nEncounterChance = 50

nEncounterTable = 24

nRespawnTime = 5

 

I set the test trigger down, and walked over it several times.  the music changes, but no creatures spawn.



#12
rjshae

rjshae
  • Members
  • 4 485 messages

Looks like that should be reading the om_enc_g_torich_hills.2da file for encounters. Not sure why it isn't working as long as that and the om_encounter_table.2da files are okay. You might have to debug the gtr_terrain_hb script and see what part isn't working. (Poor man's debugging: make a local copy of the script and insert some SendMessageToPC() calls to the GetFirstPC() object.)



#13
Ugly_Duck_01

Ugly_Duck_01
  • Members
  • 69 messages

What does "debug" mean and how do I do it?



#14
rjshae

rjshae
  • Members
  • 4 485 messages

It means you trace the flow of a program by inserting stop points and checking the state of information at those points. Thus you'd look to see what variables are set to, see whether branches are followed (such as entering 'if' statemen blocks), see what routines are called and with what values, &c. The simplest approach is just to put in print statements (like SendMessageToPC) to show when a point of a program is passed. Thus you could insert a SendMessageToPC in the a copy of the gtr_terrain_hb script so you can see it being called. A more in depth method is to use the debugger. There's some information in the Debugging section of the toolset guide, volume 1, linked in my sig.



#15
Tchos

Tchos
  • Members
  • 5 042 messages

The necessary creature blueprints that are called from the encounter 2DAs are not in the SoZ campaign folder.  I expect they're saved in the overland map module, and need to be exported.



#16
Ugly_Duck_01

Ugly_Duck_01
  • Members
  • 69 messages

If I can find the 2das, where do I put them?  In MY campaign folder?



#17
Loki_999

Loki_999
  • Members
  • 430 messages

In your override folder under My Documents\Neverwinter Nights 2



#18
Tchos

Tchos
  • Members
  • 5 042 messages

It's not 2DAs you need now, it's creature blueprints.  The 2DAs you needed were in the SoZ campaign folder, which you said you copied.  In any case, if you export the blueprints from the SoZ overland map module, then you put them in your campaign folder.  Not the override folder, unless you plan to later move them into the campaign folder, but there's no reason not to just put them there now.


  • rjshae aime ceci

#19
Ugly_Duck_01

Ugly_Duck_01
  • Members
  • 69 messages

I can't tell by looking into G_X module, what monsters are the overland spawn.  There are a few creatures under the heading, "Random Encounters" that appear, but they don't have the names like, "Monsterous Band" or whatever..



#20
rjshae

rjshae
  • Members
  • 4 485 messages

There's nothing under the Encounters blueprints that matches up with the om_enc_g_torich_hills.2da entries? (I don't have the toolset in front of me at the moment, so that's just a wild guess.)



#21
Tchos

Tchos
  • Members
  • 5 042 messages

As Bob suggests, don't look for something called "Monstrous Band".  Look for the creature blueprints with resrefs (not names) as listed in the encounter 2DA you're using (which Bob says is Torich Hills).  One such creature blueprint resref is "g00_wyvern".

 

The 2DA also lists encounter resrefs and conversation files that you'll also need to export for the system to work.



#22
Ugly_Duck_01

Ugly_Duck_01
  • Members
  • 69 messages

rjshae, I checked the om_enc_g_torich_hills.2da.  Several of the creatures in the G_X2 module from SoZ are on it.  Thanks so far too btw to everyone.

 

What 2da do I need to use to put my own creature encounters in?  In a homemade overland map that is?



#23
Ugly_Duck_01

Ugly_Duck_01
  • Members
  • 69 messages

Tchos, do I need the SoZ conversations if I'm using an entirely homemade set of creatures?  Do I even need the homemade conversations that I made for them to work?



#24
rjshae

rjshae
  • Members
  • 4 485 messages

rjshae, I checked the om_enc_g_torich_hills.2da.  Several of the creatures in the G_X2 module from SoZ are on it.  Thanks so far too btw to everyone.

 

What 2da do I need to use to put my own creature encounters in?  In a homemade overland map that is?

 

You should be able to override the om_encounter_table.2da file and add your own rows at the end. Those added entries will then identify the .2da files you will add for encounters within each of your terrain areas. Thus, you might use a consistent naming convention like om_enc_ud_grey_marches.2da, for example.



#25
Tchos

Tchos
  • Members
  • 5 042 messages

Tchos, do I need the SoZ conversations if I'm using an entirely homemade set of creatures?  Do I even need the homemade conversations that I made for them to work?

 

Only because the encounter 2DA calls for them.  If you replace the items in the 2DA with your own, then you won't need them, but if you just want to get the thing working before altering things, put the SoZ conversations in there.  You can start customising once it's all working.