Changing include files?

Get Help on scripting in POL with configurations, config setups, script trouble shooting, etc.
Post Reply
Terryl
Neophyte Poster
Posts: 32
Joined: Thu Aug 10, 2006 9:59 am

Changing include files?

Post 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?
User avatar
CWO
POL Expert
Posts: 1160
Joined: Sat Feb 04, 2006 5:49 pm

Post 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.
Terryl
Neophyte Poster
Posts: 32
Joined: Thu Aug 10, 2006 9:59 am

Post 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
User avatar
CWO
POL Expert
Posts: 1160
Joined: Sat Feb 04, 2006 5:49 pm

Post 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.
Yukiko
Distro Developer
Posts: 2826
Joined: Thu Feb 02, 2006 1:41 pm

Post 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.
User avatar
CWO
POL Expert
Posts: 1160
Joined: Sat Feb 04, 2006 5:49 pm

Post 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.
Yukiko
Distro Developer
Posts: 2826
Joined: Thu Feb 02, 2006 1:41 pm

Post 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.
:)
Post Reply