You don't really need an example script. Just edit the sand.cfg file in \pol\regions to include a realm parameter then go to any realm but the one you defined in the sand.cfg file and locate a sand landtile and dig for sand. If you can harvest sand then the Core isn't restricting that resource to the realm specified. Not knowing the internals of POL I could hazard a guess that the bug is in the "resource manager".
Tell me if I am wrong on my understanding of the resource system in POL. Here is how I understand things. You define a resource type in a file with the resource name, ie. sand.cfg. In that file you list the landtiles where the resource can be obtained along with a region name. Under the region name you list various parameters one of which is the range where that resource can be obtained. The thing I noticed is there is no way to restrict a resource to a particular realm. Say for example I wanted a certain mushroom to only be found in
britannia_alt for example I can't specify that as a parameter in a resource type cfg file. I don't know if this was ever intended to be a feature. Maybe I'm not seeing a bug but just expecting something to be there that just wasn't conceived. Oddly enough I do know that POL Core parses the realm parameter when reading the "resource type" files because I tested it with a non-existent realm. What appears to have happened is someone just forgot to add a realm check to the resource manager during the upgrade to multiple maps that happened with POL 0.96.
So try modifying the last part of your sand.cfg file to look like the following and put your character in britannia and harvest some sand. You will be able to.
Code: Select all
Region The Whole World
{
UnitsPerArea 100
SecondsPerRegrow 30
Capacity 200000
Realm malas
Range 0 0 5119 4095
}
If this is a bug and you do fix it might I offer a suggestion? For the purposes of the resource manager if the Realm parameter is missing from a "resource type" file have the manager default to making the resource available in all realms. That way we won't have to create 6 different files corresponding to each map for those resources that developers want to be universally available. Or maybe create a wildcard value for Realm such as "All" to specify universally available resource types.
Thanks Nando. I hope I explained things clearly.