Hello all. I am running into an issue while trying to utilize
Killer Town Crier v1.0 by Axe.
It has a persistent version, which is fine, but all the Town Criers use the same database. My attempt to rename it to a local variable failed, so I thought I would ask here to see if my logic is off.
Here is the default code, where it sets the DB name.
// Town Crier Library Script
//:://///////////////////////////////////////////////////
// _town_crier_inc
//:://///////////////////////////////////////////////////
// Contains several functions which can be used to change the Town
// Criers behavior from a script during play.
//:://///////////////////////////////////////////////////
const string DEFAULT_TOWN_CRIER_DATABASE_NAME = "TownCrier";
//:://///////////////////////////////////////////////////////////////
// GetTownCrierDatabaseName()
// Returns the database name used by the persistent system to store
// the town crier's persistent information.
//:://///////////////////////////////////////////////////////////////
string GetTownCrierDatabaseName()
{ return (DEFAULT_TOWN_CRIER_DATABASE_NAME +"_" +GetModuleName());
}
string TOWN_CRIER_DATABASE_NAME = GetTownCrierDatabaseName();
And here are my edits. Where i placed my localstring is on the individual TownCriers that i had placed in my test mod; three in total, each with a different localstring for the name of each town in which we need to place them.
string GetTownCrierDatabaseName()
{ return (DEFAULT_TOWN_CRIER_DATABASE_NAME +"_" +GetLocalString(OBJECT_SELF,"TownName"));
}
string TOWN_CRIER_DATABASE_NAME = GetTownCrierDatabaseName();
What I ended up with in my data folder was named "TOWNCRIER_ORIGINAL-BLANK", and each Town Crier cries news placed on other criers.
All I can figure is is that since the GetLocalString is called in an include file, perhaps the include is not really "on" the crier, and so it cannot read a local string placed on the crier?
Any ideas?
Everything else about this system works wonderfully, and I really hope we can work around the single DB for the criers.
'>
Thanks all, Russ
'>