Hiho!
When I saw the POL Emulator for the first time (since 2004r) there was a problem with config files - reloading config files. When I change for example monster color in config/npcdesc.cfg I must do a restart whole server. .unloadcfg never works for me - I know that issue.
Is there any possible to reload config files without a server restarts?
newest POL version 100
Thank you, Ciechu.
.unloadcfg - There is possible, now?
Moderator: POL Developer
-
- Distro Developer
- Posts: 2825
- Joined: Thu Feb 02, 2006 1:41 pm
- Location: San Antonio, Texas
- Contact:
Re: .unloadcfg - There is possible, now?
You cannot unload/reload itemdesc.cfg and npcdesc.cfg files. I suspect it is because doing so would require refreshing (removing and recreating) all items and NPCs in the world.
Re: .unloadcfg - There is possible, now?
You can totally unload npcdesc.cfg - you just have to unload them the way they are read in in any script(s)
::npcdesc :*:npcdesc :pkgname:npcdesc followed by ReloadConfiguration()
You can unload and reload an itemdesc.cfg for scripts to read in but it wont affect the core's handling of itemdesc.cfg data. Usually this is done as :*:itemdesc
::npcdesc :*:npcdesc :pkgname:npcdesc followed by ReloadConfiguration()
You can unload and reload an itemdesc.cfg for scripts to read in but it wont affect the core's handling of itemdesc.cfg data. Usually this is done as :*:itemdesc
Code: Select all
SendSysMessage(user, "Begining to unload npcdesc.cfg files...");
UnloadConfigFile(":*:npcdesc");
SendSysMessage(user, "Unloading :*:npcdesc");
UnloadConfigFile("::npcdesc");
SendSysMessage(user, "Unloading ::npcdesc");
foreach package in (Packages())
if ( package.npcdesc )
UnloadConfigFile(":"+(package.name)+":npcdesc");
SendSysMessage(user, "Unloading :"+(package.name)+":npcdesc");
endif
Sleepms(2);
endforeach
SendSysMessage(user, "ReloadConfiguration() -> "+ReloadConfiguration());
SendSysMessage(user, "All npcdesc.cfg files unloaded.");
-
- Distro Developer
- Posts: 2825
- Joined: Thu Feb 02, 2006 1:41 pm
- Location: San Antonio, Texas
- Contact:
Re: .unloadcfg - There is possible, now?
Good to know Austin. Unloading the npcdesc.cfg never worked quite right when I tried it before but that was pre 096. Maybe something was changed in the Core since then.
Will unloading npcdesc.cfg or itemdesc.cfg and reloading them make new NPCs and/or items added prior to the unload/reload sequence available in game?
Will unloading npcdesc.cfg or itemdesc.cfg and reloading them make new NPCs and/or items added prior to the unload/reload sequence available in game?
Re: .unloadcfg - There is possible, now?
Yes for NPCs.
No for itemdesc.cfg
No for itemdesc.cfg
-
- Distro Developer
- Posts: 2825
- Joined: Thu Feb 02, 2006 1:41 pm
- Location: San Antonio, Texas
- Contact:
Re: .unloadcfg - There is possible, now?
Cool. Thanks.