Aller au contenu

Photo

Default on Heartbeat script?


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

#1
Bassix

Bassix
  • Members
  • 33 messages
I'm afraid I made quiete a big blooper. I accidententally replaced the original on heartbeat script with my own script. Posted ImageCould anyone post the default script?
Big thanks!

#2
420

420
  • Members
  • 190 messages
Just delete the script and the default one will magically reappear.



-420

#3
Bassix

Bassix
  • Members
  • 33 messages
No, I mean that i practically deleted the original script. I edited the original onheartbeat script and accidententally saved. Do you understand me?

#4
420

420
  • Members
  • 190 messages
Yes, I do actually.



When you edit any of the BioWare scripts it simply saves it as a new copy, the original is still there but overridden. Simply delete your edited copy and the original will be restored. Do you understand me?



-420

#5
Xovian

Xovian
  • Members
  • 87 messages
420 is correct, unless of course you're saying you rewrote the .2da?

Replacing scripts that are the default names only over write for that module, if deleted they revert back to the original source script.

#6
Bassix

Bassix
  • Members
  • 33 messages
Yes, I understand you. My bad. I'm deleting it right now, takes a very long time.. But I guess that's because almost every NPC uses the script.
Thank  you very muchPosted Image

#7
Shadooow

Shadooow
  • Members
  • 4 465 messages
OH NO! You did it badly, use backup of the module ASAP!



You did choose to delete this script from every npc's events. You mustn't do that.

#8
Bassix

Bassix
  • Members
  • 33 messages
No, it's alright. 420 is correct, everything is replaced with the default on heartbeat script (Y).

#9
Shadooow

Shadooow
  • Members
  • 4 465 messages
Yes, thats right, but if you choose to delete script, there is confirmation pop up.



"Would you like to remove all references to the Script from the Conversations, Instances, and Blueprints in the Module?"



I predicted you chooses YES as you stated it took long time to finish, and you must not click on YES, because if you do that all creatures in your custom palette or placed in any area in your module will have the heartbeat script deleted from their events, breaking very much AI for them...



Check it again.

#10
Lightfoot8

Lightfoot8
  • Members
  • 2 535 messages
Shadoow is correct. I just think he missed the point that your script was named 'default' So the only thing you removed the script from was a few traps. At least I think that is all. The PC who you are wanting the script to run on where never loaded into to toolset to have the script removed from them.



In short you Took a long time deleting the script when it should have been don in a heart beat. Well less then a heart beat. 6 sec is a long time.



Now if I miss understood and you really did delete and remoce the NPC HB script(nw_c2_default1) from everything. Like shadow said, I hope you have a back up of your module.

#11
Grymlorde

Grymlorde
  • Members
  • 219 messages
This is why I prefer to A) write new scripts instead of overwriting the default ones and B) I have to to overwrite then if I need to delete it I delete from the temp0 directory rather than the toolset directly.

#12
Lightfoot8

Lightfoot8
  • Members
  • 2 535 messages

Grymlorde wrote...

This is why I prefer to A) write new scripts instead of overwriting the default ones and B) I have to to overwrite then if I need to delete it I delete from the temp0 directory rather than the toolset directly.



If you wrote a new script and named it something else, It would no longer be called 'default' and no longer work as the pc's heart beat.    If you delete the scripts from the temp0 folder, make sure you get both of them.  the .nss and the .ncs

#13
Bassix

Bassix
  • Members
  • 33 messages
Could someone post the default onheartbeat script?

#14
Shadooow

Shadooow
  • Members
  • 4 465 messages
nw_c2_default1

#15
Bassix

Bassix
  • Members
  • 33 messages
Thanks. At the moment I'm placing the nw_c2_default1 script on my custom NPC's. Hell, that's a lot of work. Will it work?

#16
Shadooow

Shadooow
  • Members
  • 4 465 messages
Yes... The rule of thumb is to never delete script referrences aka "No" at second confirmation, there are no side effects of this.

#17
Bassix

Bassix
  • Members
  • 33 messages
Learning by doing, eh?Posted Image

#18
Lightfoot8

Lightfoot8
  • Members
  • 2 535 messages
Yes, that will work for half the problem. When you say you are adding it to the 'custom NPC's' I am assuming you are talking about the blueprints in the palette. The problem is that every intsance of an NPC's in the module, Does not matter if it was created from a custom or standard Blueprint, has also had the script stripped from them. So you will have to also add the script it every NPC already created in the module. I guess you could use the update all instances option from the palette. But that would make remove any thing custom already added to the instances of the NPC.



I hope that makes since.

#19
Invisig0th

Invisig0th
  • Members
  • 170 messages

ShaDoOoW wrote...
The rule of thumb is to never delete script referrences aka "No" at second confirmation, there are no side effects of this.

Well, that may be Shadooow the Troll's "rule of thumb", but as usual, he doesn't speak for the rest of the NWN community (thank goodness).

In general, you will indeed want to remove references if you make a custom script and then change your mind and decide to remove it. That's exactly why Bioware implemented this option. This removes every reference to that script in all events for all creatures, placeables, etc.  If you do not do this, you will get a warning for every remaining reference to the deleted script when you do a full compile of your module. I (and the majority of other builders) would consider unnecessary complaints from the compiler as an undesirable "side effect" that is best avoided if possible. In this case, it's as easy as clicking "yes" and allowing some time for the Toolset to remove the references. Yes, this does take extra time, but it should be obvious that keeping references to non-existent scripts isn't going to benefit your module, and it can sometimes lead to a lot of confusion.

In this particular case, you wanted to keep the references, because even though you deleted a customized version of that script, you still wanted to keep all the references to the default Bioware script of that name.

Modifié par Invisig0th, 12 septembre 2010 - 06:42 .


#20
Bassix

Bassix
  • Members
  • 33 messages

Lightfoot8 wrote...

Yes, that will work for half the problem. When you say you are adding it to the 'custom NPC's' I am assuming you are talking about the blueprints in the palette. The problem is that every intsance of an NPC's in the module, Does not matter if it was created from a custom or standard Blueprint, has also had the script stripped from them. So you will have to also add the script it every NPC already created in the module. I guess you could use the update all instances option from the palette. But that would make remove any thing custom already added to the instances of the NPC.

I hope that makes since.


Yes, it does. Problem is already solves. It was so much work. I'll never make that mistake again, haha! So, now I'm finally going to continue with real builidng, finally. I would love to post the mod on the internet but it's Dutch. I'm able to write/speak English but I'm not cabaple to write whole conversations. Well, maybe I am. But it will take a very, very long time.

Cheers everyone for your help!

#21
Shadooow

Shadooow
  • Members
  • 4 465 messages

Bassix wrote...

Yes, it does. Problem is already solves. It was so much work. I'll never make that mistake again, haha! So, now I'm finally going to continue with real builidng, finally. I would love to post the mod on the internet but it's Dutch. I'm able to write/speak English but I'm not cabaple to write whole conversations. Well, maybe I am. But it will take a very, very long time.

Cheers everyone for your help!

Basixx, ignore what Invisig0th, the biggest scripting expert said. If you follow my "rule", it won't break anything. But it will avoid to repeat the mistake you made.

If the script do not exist, it won't run or eat any resources, yes if you will build the module you will be warned about non existing script, but you can ignore it, or remove manually, I dont believe you will place some script to hunderd places and then you remove it, I can't imagine such case, and even if you did as I said it don't matter.

Furthermore building module is useless, you just need to compile all scripts so in Build module option, you can uncheck everything else, this will spare you so much time.

#22
Invisig0th

Invisig0th
  • Members
  • 170 messages
Having references to a non-existent script can be extremely confusing when a problem arises, particularly for a new builder. And in general, you never want to leave stuff like this in your module. That's why Bioware added the ability to easily remove these orphaned script references for a good reason.

There are also plenty of reasons why someone might need to recompile their module, the most important of which is general troubleshooting. If you search the old Bioware forums, you will see that people encountering problems are often told to recompile their entire module and report any warnings or errors. In those situations, it should be obvious that purposefully doing things that cause pointless compiler warnings is counterproductive. Bioware put those compiler warnings in there for a good reason. They are there to tell you something is wrong, so that you can do something about it. Having lots of unnecessary warnings in your module can make it very hard to recognize an important warning that you need to know about to solve a specific problem..

So it's not really open to debate whether removing references to deleted scripts is a good idea. It is obviously a good idea. Advising people to purposefully keep references to non-existent scripts is terrible advice.

Modifié par Invisig0th, 14 septembre 2010 - 04:49 .