Author Topic: How can I disable bosses respawning?  (Read 725 times)

Legacy_Dekinais

  • Newbie
  • *
  • Posts: 46
  • Karma: +0/-0
How can I disable bosses respawning?
« on: November 27, 2014, 03:37:00 pm »


               

I play a module called Shargast, and as described, it is a fully downloadable PW. I play it in the single-player mode.
The problem is that after I kill a boss, it respawns. An example: I killed Bigrack (and it was not easy), I saved the game and exited.
When I reloaded ... Bigrack is back!
And not only him, but all of his lieutenants. I wanted very much to smash my screen!

Is there any way to disable respawning?



               
               

               
            

Legacy_henesua

  • Hero Member
  • *****
  • Posts: 6519
  • Karma: +0/-0
How can I disable bosses respawning?
« Reply #1 on: November 27, 2014, 05:09:01 pm »


               

go to the area in the toolset and investigate what method they are using for spawning. You'll likely need some scripting skills to deal with it, or if they are using NESS, you'll need to understand how to configure a NESS spawn point.



               
               

               
            

Legacy_Dekinais

  • Newbie
  • *
  • Posts: 46
  • Karma: +0/-0
How can I disable bosses respawning?
« Reply #2 on: November 27, 2014, 08:08:27 pm »


               If that's the case, I guess I'm out of luck. I don't have any coding skills, I'm just a player '<img'>

Thanks anyway.
               
               

               
            

Legacy_MrZork

  • Hero Member
  • *****
  • Posts: 1643
  • Karma: +0/-0
How can I disable bosses respawning?
« Reply #3 on: November 27, 2014, 08:27:34 pm »


               

A very brief look implies the module uses Sir Elric's (SE) Simple Creature Respawns. If I understand that system, you can disable respawning for a particular creature by changing its tag to include the string "NSP". Not really as flexible as one might hope, since many modules use creature tags for other scripting checks and changing those tags could cause trouble. However, it would be easy to modify the system to add an additional check for a local int on creatures, which could be set on non-respawning creatures from the Toolset without interfering with other scripting. Regardless, neither approach is all that player-friendly, unless there are only a handful of creatures whose respawn you want to disable.


 


But, it would be pretty straightforward to disable the SE system entirely, by editing se_respawn_inc.nss and adding a return near the beginning of SE_DoCreatureRespawn().


 


I don't really see a way to easily (automatically) disable respawns only for bosses or areas in which bosses reside. Either one must go through the module in the Toolset and individually mark creatures as non-respawning or disable SE respawns everywhere. If the second result is what's desired, that at least shouldn't require much work.


 


[EDIT]


It looks like there are only a handful of OnDeath scripts calling SE_DoCreatureRespawn(). Of course, that list includes nw_c2_default7.nss and x2_def_ondeath.nss, so it seems likely that pretty much all creatures respawn using the SE system. However, some of the other OnDeath scripts appear to be specific to bosses (e.g. bosskill.nss and shardrecovery.nss). So, if the goal is to disable respawning for bosses but leave it alone for others, then just changing those scripts may do the job.



               
               

               
            

Legacy_MrZork

  • Hero Member
  • *****
  • Posts: 1643
  • Karma: +0/-0
How can I disable bosses respawning?
« Reply #4 on: November 27, 2014, 08:57:36 pm »


               

Sorry, I didn't see your reply before posting mine above. If all you want to do is entirely disable the SE respawn system, it doesn't require much understanding of scripting. Here's the outline:


 


Open the module in the Toolset and open the script editor (Ctrl-Alt-S). Open se_respawn_inc and find the SE_DoCreatureRespawn function. Then add a return; on the line after the first curly brace {.


 


So, when that is done, the part of the code that currently looks like



void SE_DoCreatureRespawn()
{
  location lLoc;
  float fFacing;

would then look like



void SE_DoCreatureRespawn()
{
  return;
  location lLoc;
  float fFacing;

Save the script (Ctrl-S) and close the script editor.


 


Now, rebuild the module by going to Build -> Build Module. Only three checkboxes on that widget need to be checked: Advanced Controls, Compile, and (below Compile) Scripts. Click Build and wait for it to finish. Click Done and then save the whole module. That should do it.


 


You will have to restart the module and play from the beginning to see the change. It's possible to inject the changed scripts into a saved game, but it's a more complicated process.


 


You may also want to do the same thing for the 'b' module.



               
               

               
            

Legacy_Dekinais

  • Newbie
  • *
  • Posts: 46
  • Karma: +0/-0
How can I disable bosses respawning?
« Reply #5 on: November 28, 2014, 12:08:22 pm »


               

Mr Zork, thank you very much! Your instructions are very clear and I think I understand how to do that. A question though: if I disable the entire respawning system, I will lose much xp? Because the module seems to rely on killing many monsters to gain xp.



               
               

               
            

Legacy_MrZork

  • Hero Member
  • *****
  • Posts: 1643
  • Karma: +0/-0
How can I disable bosses respawning?
« Reply #6 on: November 28, 2014, 11:35:15 pm »


               

Since I am not familiar with how every area is designed, I really can't say how much impact disabling the SE respawns will have on level progression. I mean, there are areas with creatures placed in them that are set up to respawn using the SE system and there are Toolset encounters that have also be set to respawn (independent of the SE system). Both methods are used in the module. But, I haven't played it myself, so I don't know how often the PC is supposed to go through the same areas and re-kill any creatures that respawn. I also don't know if the module is designed so that most of the XP comes from killing bosses, killing mobs, completing quests, etc., so it's hard to say how much disabling the SE system will change XP. My guess is that most modules aren't designed so that the PC has to kill the same bosses over and over to level, so disabling the boss respawns shouldn't hurt XP too much.


 


And, keep in mind that there are normal Toolset encounters in most areas and many of those are set to respawn. It seems like the bosses are set up as SE respawns, so my guess would be that most of the "mobs" are encounter spawns and they will still come back after some period of time and you will have the opportunity to kill them again and any XP you would have gotten from them will still be available.


 


Also note that there is an option in the Toolset (Edit -> Module Properties, Advanced tab) where one can tweak the XP scaling. If you find that you are getting significantly less XP on your run with the SE respawns disabled and that you are too low in level to take down the bosses, you can bump up that XP slider a little and see if that helps. It looks like the normal setting for this module is at 0, which implies to me that either 1) most of the XP is intended to come from quest completion and not from killing monsters, or 2) that there is some other XP reward system scripted into the module. You can usually spot the latter if there are two XP reward lines in the log after you kill a creature.


 


Sorry I don't know enough about how the module is supposed to play to give you a definitive answer. I think that the best approach would be to play and see if it seems like encounters and bosses are becoming impossible because your level is too low. If that's the case, then tweak the XP slider or re-enable SE respawning. Or, just use the console every so often when you are getting consistently overmatched and give yourself a level. That last approach has the advantage that you don't need to restart the module or dig around with Leto to use it.