Aller au contenu

Photo

Bound Prisoner Animation for NPC


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

#26
Tchos

Tchos
  • Members
  • 5 042 messages

It should be easier to extract scripts from my work than from most others, because they're not contained within a hak or a mod file, but loose in the campaign folder.



#27
Claudius33

Claudius33
  • Members
  • 256 messages

@MokahTGS : there was a typo in my post read 270, for a NPC bearing South.

 

@Tchos : Just curious. Despite the campaign folder is a very convenient place to store files into, I only put critical or much used scripts, specific objects blueprints used in several module, critical or companion conversations and world map stuff. I put the rest into haks or directly into modules.

As a matter of fact I have read somewhere that NWN2 loads the whole content of the campaign folder into RAM, even if a very small part is used in the current module. If true, low end configs might experience important slowdowns. What's your opinion? 



#28
Tchos

Tchos
  • Members
  • 5 042 messages

I put nothing into haks except for 2DAs that must be there.  I put nothing into the module folders except for areas and other system files that must be there.  Everything that can be in the campaign folder is in the campaign folder.

 

Now, my own computer is a low-end config, being 8 years old with 4GB of RAM.  I don't generally do things that don't run well enough on my computer.

 

I've never heard that about NWN2 loading the whole content of the campaign folder into RAM.  I'll do an experiment to test that.

 

Okay, my preliminary tests indicate:

  1. Scripts are loaded into memory, and continue running even when I make changes to them or remove them while the game is running.  This applies to heartbeat scripts that could be expected to remain in memory, and also scripts that are fired upon using an object.  However, the changes take effect after I do a teleport transition across modules, or load a saved game after returning to the main menu.  Loading a saved game without first returning to the main menu does not force the game to re-check the scripts.
  2. Scripts that do not exist in the campaign folder when the game is loaded, but which are placed into it while the game is running, are not accessed by the game until after a transition across modules or loading a saved game as described above.  This applies both to heartbeats and to On Used scripts.  I have not tested scripts fired from conversations.
  3. Conversations are not loaded into memory, and change every time.  I began with a test conversation on an NPC, talked to the NPC, and got the expected response.  While the game was still running, I removed the conversation from the campaign folder, and switched back to the game.  The NPC no longer spoke.  I put a different conversation with the same name into the campaign folder, and switched back to the game.  The NPC spoke using the new conversation.

My earlier, non-comprehensive tests indicate that textures are loaded dynamically from their models, and as long as no model currently is displaying that texture, it should not be loaded.  Need more research in that area.

 

Also need to research whether models themselves can be spawned dynamically while the game is running if the model is added to the campaign folder while the game is running.  If so, then the game cannot be loading all models or textures into memory at the start.

 

Scripts are negligible in memory use, so I'm not concerned about them all being loaded.  I estimate the entirety of my campaign's script files amount to less than 3MB.

 

One note: anything stored in the campaign folder will not be saved into the saved game, while everything in the module file or folder will be saved into the saved game.  Thus, using the campaign folder creates smaller saved game files.



#29
Claudius33

Claudius33
  • Members
  • 256 messages

Very interesting Tchos, thanks a lot!

 

I should really consider putting more conversations and scripts into the campaign folder. Besides it makes testing and bug fixing more dynamic.Thanks again.

 

Sorry for being rather off topic. 



#30
Tchos

Tchos
  • Members
  • 5 042 messages

I'll make a new thread for it when I have more data.  :)  Another relevant test would be whether these same things are true of resources at the module level or within haks.