[Solved] Pickpocketing code source
Posted: 28 Feb 2023, 08:14
Hi,
Can you confirm me that, if i modify (in red below) the .../mwmechanics/pickpocket.cpp source file like this:
[...]
bool Pickpocket::pick(const MWWorld::Ptr& item, int count)
{
float stackValue = static_cast<float>(item.getClass().getWeight(item) *100 * count);
float fPickPocketMod = MWBase::Environment::get()
.getWorld()
->getStore()
.get<ESM::GameSetting>()
.find("fPickPocketMod")
->mValue.getFloat();
float valueTerm = 10 * fPickPocketMod * stackValue;
return getDetected(valueTerm);
}
[...]
and recompile,
i will get a working OpenMW with pickpocketing mechanism based on item weight instead of item value ?
Can you confirm me that, if i modify (in red below) the .../mwmechanics/pickpocket.cpp source file like this:
[...]
bool Pickpocket::pick(const MWWorld::Ptr& item, int count)
{
float stackValue = static_cast<float>(item.getClass().getWeight(item) *100 * count);
float fPickPocketMod = MWBase::Environment::get()
.getWorld()
->getStore()
.get<ESM::GameSetting>()
.find("fPickPocketMod")
->mValue.getFloat();
float valueTerm = 10 * fPickPocketMod * stackValue;
return getDetected(valueTerm);
}
[...]
and recompile,
i will get a working OpenMW with pickpocketing mechanism based on item weight instead of item value ?