Page 1 of 1

Changing include files?

Posted: Mon Aug 28, 2006 1:54 am
by Terryl
What do I have to do after changing include files? Because right now I am trying to fix something that makes enemies run away after a certain time of not doing dmg (they regain max hp while running away too which sucks even more). But no changes, even erasing loads of text in the include files show after I restarted shard and recreated the npc. Do I have to do something more for changes to take effect?

Posted: Mon Aug 28, 2006 9:31 am
by CWO
you have to recompile every script that uses that include. Or at least all the scripts with the include that you want the changes to take effect on. Then either restart the NPCs or reboot the shard. It should work after that.

Posted: Mon Aug 28, 2006 2:48 pm
by Terryl
CWO wrote:you have to recompile every script that uses that include. Or at least all the scripts with the include that you want the changes to take effect on. Then either restart the NPCs or reboot the shard. It should work after that.
Ahh, okay ;) it was the recompiling I didnt do :p thx

Posted: Mon Aug 28, 2006 6:46 pm
by CWO
Any time you make any change to .src or .inc, you must recompile then unload the script or reboot the shard (better to just .unload scriptname). For NPCs, you can just restart them after compiling and unloading and the change will be loaded. Almost everything else unless continuously running forever should work with the change after compiling and doing .unload scriptname in game.

Posted: Mon Aug 28, 2006 8:50 pm
by Yukiko
I think though that for scripts like start.src it does require a restart. I don't think you can just unload them since they only get executed at startup.

Posted: Tue Aug 29, 2006 5:09 pm
by CWO
Well, if you somehow executed it it would and with changes applied. Why wouldnt it? I think you could possibly start_script a start.src unless theres some internal core block of it.

Posted: Tue Aug 29, 2006 10:00 pm
by Yukiko
Why it wouldn't is because 'start' scripts are designed to run once during an instance of the emulator; when it starts. Atleast that's my understanding. I could be mistaken and if I am I apologize.

You could create a special set of scripts to run all the 'start' scripts for one special condition, ie. for an unloadall situation. But then that seems more bother than it's worth.

My primary reason for posting the comment was to note one special situation where a restart is necessary under normal conditions. For most every other script mod an unloadall will do fine.

I'm just trying to cover all bases. Though it might not happen I could imagine someone beating their head against the wall because they changed a 'start' script, did an unloadall and then couldn't figure out why the changes didn't take effect.
:)