Full Version : Karma and Fame from monsters.
xmlspawner >>Scripting Support >>Karma and Fame from monsters.
<< Prev | Next >>
Galfaroth- 02-14-2006
How can we adjust Karma and Fame gained from killing mob e.g.:

CODE
[Constructable] public Brzytwa() : base( AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4 ) { Name = "Brzytwa"; Body = 218;
BaseSoundID = 0x270;
Hue = 1879;
SetStr( 80, 100 );
SetDex( 80, 100 );
SetInt( 20, 25 );
SetHits( 80, 90 );
SetDamage( 18, 28 );
SetDamageType( ResistanceType.Physical, 40 );
SetResistance( ResistanceType.Physical, 40, 45 );
SetSkill( SkillName.MagicResist, 20, 25 );
SetSkill( SkillName.Tactics, 70, 100 );
SetSkill( SkillName.Wrestling, 70, 100 );
Fame = 120;
Karma = 120;
VirtualArmor = 12;
Tamable = true;
ControlSlots = 1;
MinTameSkill = 50;
PackItem( new Zab( 6 ) );
PackItem( new Pazur( 4 ) );
PackItem( new SuroweMieso( 2 ) );
}

There is Fame = 120, and Karma = 120, but it is fame and karma that mob have. How can we adjust karma and fame gained from killing this mob?
ArteGordon- 02-14-2006
in basecreature.cs

CODE
int totalFame = Fame / 100; int totalKarma = -Karma / 100; ArrayList list = GetLootingRights( this.DamageEntries, this.HitsMax ); bool givenQuestKill = false; bool givenFactionKill = false;
for ( int i = 0; i < list.Count; ++i )
{
DamageStore ds = (DamageStore)list[i];
if ( !ds.m_HasRight )
continue;
Titles.AwardFame( ds.m_Mobile, totalFame, true );
Titles.AwardKarma( ds.m_Mobile, totalKarma, true );

Galfaroth- 02-14-2006
All right so it takes arguments from mob's karma and fame. Why when player kill this Brzytwa and its karma is 120, he recieves e.g. -12 and should 12?
EDIT: So if monster is evil, he should have minus karma (for player gain plus karma from kills)?
ArteGordon- 02-14-2006
int totalKarma = -Karma / 100;

QUOTE
EDIT: So if monster is evil, he should have minus karma (for player gain plus karma from kills)?

exactly.