ControlSlots Problem!

fanzilla

Citizen
I add some new mount creatures.but when the servuo run, all new creatures'controlslots are all become 0,and can't change.and followers are 0.I try to fix it ,and can't find the reason,Some expert who can help me to solve this.

Here is one of my new script below:
using System;
using Server.Mobiles;
using Server.Items;

namespace Server.Mobiles
{
[CorpseName("a Wind runner corpse")]
public class WdrunnerMount : BaseMount
{
public virtual double BoostedSpeed
{
get
{
return 0.1;
}
}

[Constructable]
public WdrunnerMount()
: this("a Wind runner ")
{
}

[Constructable]
public WdrunnerMount(string name)
: base(name, 1410, 16076, AIType.AI_Mystic, FightMode.Aggressor, 10, 1, 0.2, 0.4)
{
this.BaseSoundID = 0xA8;

this.SetStr(800, 1000);
this.SetDex(225, 300);
this.SetInt(500, 800);
this.SetMana(800, 1200);
this.SetHits(1150, 1450);

this.SetDamage(25, 32);

this.SetDamageType(ResistanceType.Energy, 100);

this.SetResistance(ResistanceType.Physical, 70, 85);
this.SetResistance(ResistanceType.Fire, 50, 70);
this.SetResistance(ResistanceType.Cold, 70, 85);
this.SetResistance(ResistanceType.Poison, 75, 85);
this.SetResistance(ResistanceType.Energy, 90, 100);

this.SetSkill(SkillName.Mysticism, 110.0, 120.0);
this.SetSkill(SkillName.MagicResist, 100.0, 110.0);
this.SetSkill(SkillName.Tactics, 80.0, 90.0);
this.SetSkill(SkillName.Wrestling, 110.0, 115.0);

this.Fame = 300;
this.Karma = 300;

this.VirtualArmor = 20;

this.Tamable = true;
this.ControlSlots = 3;
this.MinTameSkill = 107.9;

this.CanSwim = true;
this.CurrentSpeed = BoostedSpeed;
this.SetWeaponAbility(WeaponAbility.MysticArc);
}

public WdrunnerMount(Serial serial)
: base(serial)
{
}

public override FoodType FavoriteFood
{
get
{
return FoodType.FruitsAndVegies;
}
}

public override int Hides
{
get
{
return 10;
}
}
public override int Meat
{
get
{
return 10;
}
}
public override void GenerateLoot()
{
AddLoot(LootPack.AosFilthyRich, 5);
}

public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);

writer.Write((int)0); // version
}

public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);

int version = reader.ReadInt();
}
}
}
 
Hi !

When adding custom pets, I think you have to add a new line in the pet training definitions in the file PetTrainingHelper.cs.

For example :
Code:
new TrainingDefinition(typeof(NewCustomPet), Class.None, MagicalAbility.Vartiety, SpecialAbilityBitingAnimal, WepAbility1, AreaEffectDisease, 1, 3),

Adjust with the settings you want (knowing Constrol Slots are the last two numbers, and before that are the profiles for your pet).

Maybe adding a "default definition" where all pets that aren't in the list would go is a good idea ?
I think there are a few default mobs that aren't in the list. VampireMongbat is one of them, if I quite remember.

But anyway, thanks for that great new and wonderful system !

-Rek-
 

Dexter_Lexia

Administrator
ServUO Developer
Well, if the pet isn’t defined as trainable, it’s min/max should be set in its constructor like prior to the new system. That I will look into.
 

Dexter_Lexia

Administrator
ServUO Developer
Well, looking at the code, there is a default pet training definition. It should be setting the pet min/max slots at the defined control slots you have in the constructor. Let me see whats going on...
 

fanzilla

Citizen
Hi !

When adding custom pets, I think you have to add a new line in the pet training definitions in the file PetTrainingHelper.cs.

For example :
Code:
new TrainingDefinition(typeof(NewCustomPet), Class.None, MagicalAbility.Vartiety, SpecialAbilityBitingAnimal, WepAbility1, AreaEffectDisease, 1, 3),

Adjust with the settings you want (knowing Constrol Slots are the last two numbers, and before that are the profiles for your pet).

Maybe adding a "default definition" where all pets that aren't in the list would go is a good idea ?
I think there are a few default mobs that aren't in the list. VampireMongbat is one of them, if I quite remember.

But anyway, thanks for that great new and wonderful system !

-Rek-
-------------------------------------------------------------------------------------------------------------------------------------------
Well, if the pet isn’t defined as trainable, it’s min/max should be set in its constructor like prior to the new system. That I will look into.
------------------------------------------------------------------
The default min=max=0, Idont know how to cause this.
And another bug by the way : the great dragon (or greater dragon I forgot) , when to training it to 100%, I can't save the dragon's point. In other words,the dragon can't training. This bug just occurs on the dragon.