RunUO Community

This is a sample guest message. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

Creating a custom creature

john burns

Sorceror
I am helping a friend run his shard, and i came up with the brilliant idea of creating custom monsters. Better loot, damage, etc., and a different hue. Like making a Golden Dragon, Fire Dragon, u know what i want. He has told me that we cannot modify or copy the scripts for the monsters because they are part of the software that made the shard.

Needless to say, i would like to prove him wrong.

So my question is this: How do i create custom monsters and be able to get them into the game? Is there a way? Or is he just telling me that because he doesnt want to deal with the hassle of putting them in? And I know we are not running the Pol Server, i just know when i patch my client to get in, i cant go above 5.0.9.1 because that is the most solid version we have found in 2d, and the most supported by the many scripts out there.

Honestly, I think if we could do this, it would set apart everybody's shard from one another.
 

Marlando

Wanderer
Anything released in these forums can be modified as much as you see fit
Please note: By releasing your scripts here you are submitting them to the public and as such agree to publish them under the GPL licensing terms. The RunUO Team has made its software GPL for you to use and enjoy you should do the same for anything based off of RunUO

The only thing we ask is you keep the authors Header (if there is one) at the top of the script.
But apart from that you can do whatever you want to the script (can remove header too buts its a sign of respect)

as for the Client it seems your friend likes the old days pre New Haven imo he is missing out on alot of cool features and in general a more complete shard.
 

gemin99

Sorceror
It is simple
in your RunUO Folder, there is a 'scripts' folder

in RunUO\Scripts\Mobiles\ Folder, there are lots of Monstername.cs file
Ctrl+C and Ctrl+V and modify NewMonsterfile.cs then you can get a new creature

for example:

RunUO\Scripts\Mobiles\Monsters\Humanoid\Melee\Brigand.cs
if you want to make new monster 'NewBrigand' thencopy-paste Brigand.cs
and open new .cs file and edit like this

public class Brigand : BaseCreature -> public class NewBrigand : BaseCreature

public Brigand() : base( AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4 )
-> public NewBrigand() : base( AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4 )

public Brigand( Serial serial ) : base( serial )
-> public NewBrigand( Serial serial ) : base( serial )

and you could change details at your own will

after that
just type '[add NewBrigand' with GM or Owner account in UO to summon them
or if you want to spawn them continuously, '[add spawner' and set it to spawn NewBrigand

I hope this will be help
Sorry for bad english
 

john burns

Sorceror
It is simple
in your RunUO Folder, there is a 'scripts' folder

in RunUO\Scripts\Mobiles\ Folder, there are lots of Monstername.cs file
Ctrl+C and Ctrl+V and modify NewMonsterfile.cs then you can get a new creature

for example:

RunUO\Scripts\Mobiles\Monsters\Humanoid\Melee\Brigand.cs
if you want to make new monster 'NewBrigand' thencopy-paste Brigand.cs
and open new .cs file and edit like this

public class Brigand : BaseCreature -> public class NewBrigand : BaseCreature

public Brigand() : base( AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4 )
-> public NewBrigand() : base( AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4 )

public Brigand( Serial serial ) : base( serial )
-> public NewBrigand( Serial serial ) : base( serial )

and you could change details at your own will

after that
just type '[add NewBrigand' with GM or Owner account in UO to summon them
or if you want to spawn them continuously, '[add spawner' and set it to spawn NewBrigand

I hope this will be help
Sorry for bad english
 

john burns

Sorceror
Thank you for such quick responses. I didnt think i would get help like this so quickly.

Now another question has come up: How do i change the hue on the monster? Where would i put the code for that or change it at?
i.e: a regular dragon into a golden dragon

Once again, thank you all for responding.
 

gemin99

Sorceror
Thank you for such quick responses. I didnt think i would get help like this so quickly.

Now another question has come up: How do i change the hue on the monster? Where would i put the code for that or change it at?
i.e: a regular dragon into a golden dragon

Once again, thank you all for responding.

just add 'Hue = HueValue;'
here is my own monster gold dragon I hope this will be help

Code:
using System;
using System.Collections;
using Server;
using Server.Items;
using Server.Spells;
using Server.Engines.CannedEvil;

namespace Server.Mobiles
{
    public class dGoldDragon : BaseChampion
    {
        public override ChampionSkullType SkullType{ get{ return ChampionSkullType.Power; } }

        [Constructable]
        public dGoldDragon() : base( AIType.AI_Mage )
        {
            Body = 172;
            Hue = 2213;
            Name = "a gold dragon";

            SetStr( 1300, 1360 ); // min, max
            SetDex( 288 , 377 );
            SetInt( 480, 756 );

            SetHits( 3600, 3880 );
            SetStam( 650 );

            SetDamage( 38, 65 );

            SetDamageType( ResistanceType.Physical, 100 );

            SetResistance( ResistanceType.Physical, 86 );
            SetResistance( ResistanceType.Energy, 18 );
            SetResistance( ResistanceType.Cold, 68 );
            SetResistance( ResistanceType.Fire, 68 );
            SetResistance( ResistanceType.Poison, 68 );

            SetSkill( SkillName.Anatomy, 110.0 );
            SetSkill( SkillName.MagicResist, 140.2, 160.0 );
            SetSkill( SkillName.Tactics, 110.0 );
            SetSkill( SkillName.EvalInt, 125 );
            SetSkill( SkillName.Magery, 100 );
            SetSkill( SkillName.Meditation, 110 );
            SetSkill( SkillName.Wrestling, 110 );

            if ( 0.1 > Utility.RandomDouble() )
                                AddItem( new PolarBearMask() );

            switch ( Utility.Random( 3 ) )
            {
                case 0: PackItem( new BlazeOfDeath() ); break;
                case 1: PackItem( new GoldBricks() ); break;
                        }

            Fame = 22500;
            Karma = -22500;

            VirtualArmor = 130;
        }

        public override void GenerateLoot()
        {
            AddLoot( LootPack.UltraRich, 4 );
            AddLoot( LootPack.Gems, 6 );
        }

                public override bool HasBreath{ get{ return true; } }
        public override int BreathEffectSpeed{ get{ return 1; } }
        public override int BreathEffectHue{ get{ return 1161; } }
        public override int BreathPhysicalDamage{ get{ return 0; } }
        public override int BreathFireDamage{ get{ return 100; } }
        public override int BreathColdDamage{ get{ return 0; } }
        public override int BreathPoisonDamage{ get{ return 0; } }
        public override int BreathEnergyDamage{ get{ return 0; } }
        public override bool AlwaysMurderer{ get{ return true; } }
        public override bool CanRummageCorpses{ get{ return true; } }
        public override Poison PoisonImmune{ get{ return Poison.Lethal; } }
        public override ScaleType ScaleType{ get{ return ( Body == 12 ? ScaleType.Yellow : ScaleType.Yellow ); } }
        public override int Hides{ get{ return 60; } }
        public override HideType HideType{ get{ return HideType.Barbed; } }
        public override int Scales{ get{ return 50; } }

        public override void CheckReflect( Mobile caster, ref bool reflect )
        {

            if ( 0.4 > Utility.RandomDouble() )
            {
                reflect = true;
                                this.Say( "Dare you attack me with magic?!" );
                        }
        }

        public override void OnGaveMeleeAttack( Mobile defender )
        {
            base.OnGaveMeleeAttack( defender );

            if ( 0.1 >= Utility.RandomDouble() )
                Earthquake();
        }

        public void Earthquake()
        {
            Map map = this.Map;

            if ( map == null )
                return;

            ArrayList targets = new ArrayList();

            foreach ( Mobile m in this.GetMobilesInRange( 8 ) )
            {
                if ( m == this || !CanBeHarmful( m ) )
                    continue;

                if ( m is BaseCreature && (((BaseCreature)m).Controlled || ((BaseCreature)m).Summoned || ((BaseCreature)m).Team != this.Team) )
                    targets.Add( m );
                else if ( m.Player )
                    targets.Add( m );
            }

            PlaySound( 0x2F3 );

            for ( int i = 0; i < targets.Count; ++i )
            {
                Mobile m = (Mobile)targets[i];

                double damage = m.Hits * 0.6;

                if ( damage < 30.0 )
                    damage = 30.0;
                else if ( damage > 75.0 )
                    damage = 75.0;

                DoHarmful( m );

                AOS.Damage( m, this, (int)damage, 100, 0, 0, 0, 0 );

                if ( m.Alive && m.Body.IsHuman && !m.Mounted )
                    m.Animate( 20, 7, 1, true, false, 0 ); // take hit
            }
        }

        public override int GetAngerSound()
        {
            return Utility.Random( 0x2CE, 2 );
        }

        public override int GetIdleSound()
        {
            return 0x2D2;
        }

        public override int GetAttackSound()
        {
            return Utility.Random( 0x2C7, 5 );
        }

        public override int GetHurtSound()
        {
            return 0x2D1;
        }
        public override int GetDeathSound()
        {
            return 0x2CC;
        }

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

        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();
        }
    }
}
 

Marlando

Wanderer
Code:
using System;
using Server;
using Server.Items;

namespace Server.Mobiles
{
[CorpseName( "the remains of Tempest" )]
public class Tempest : BaseCreature
{
public override double DispelDifficulty{ get{ return 117.5; } }
public override double DispelFocus{ get{ return 45.0; } }

[Constructable]
public Tempest () : base( AIType.AI_Mage, FightMode.Closest, 10, 1, 0.2, 0.4 )
{
Name = "Tempest";
Body = 13;//change body value here
Hue = 1175;// change hue here
BaseSoundID = 263;

SetStr( 116, 135 );//change str here
SetDex( 166, 185 );//change dex here
SetInt( 101, 125 );//change int here

SetHits( 602 );//change HP here

SetDamage( 18, 20 );  // change damage delt here

SetDamageType( ResistanceType.Energy, 80 );//change damage type
SetDamageType( ResistanceType.Cold, 20 );

SetResistance( ResistanceType.Physical, 46 );//change resists
SetResistance( ResistanceType.Fire, 39 );
SetResistance( ResistanceType.Cold, 33 );
SetResistance( ResistanceType.Poison, 36 );
SetResistance( ResistanceType.Energy, 58 );

SetSkill( SkillName.EvalInt, 99.6 );//change skills
SetSkill( SkillName.Magery, 101.0 );
SetSkill( SkillName.MagicResist, 104.6 );
SetSkill( SkillName.Tactics, 111.8 );
SetSkill( SkillName.Wrestling, 116.0 );

Fame = 4500;
Karma = -4500;

VirtualArmor = 40;
ControlSlots = 2;
}

public override void GenerateLoot()
{
AddLoot( LootPack.Average );
AddLoot( LootPack.Meager );
AddLoot( LootPack.LowScrolls );
AddLoot( LootPack.MedScrolls );
}

public override bool BleedImmune{ get{ return true; } }
public override int TreasureMapLevel{ get{ return 2; } }

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

public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 );
}

public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();

if ( BaseSoundID == 263 )
BaseSoundID = 655;
}
}
}
 

john burns

Sorceror
THANKS YOU ALL!!

I should go back to school to learn scripting because after the last couple of months of learning about how to gm, deco, and setting up a shard, now this idea of scripting for custom items, monsters and stuff is starting to appeal to me. But, I should go back to school to learn all of this. There appears to be alot to learn here. Unless someone has an inside track to what i should learn and shouldnt learn, or if there is any programs that make this process easier.

But if i have to go back to school for this, what should i be studying? What language?

Thanks everyone, now i am starting to get an interest in all of this.

Who would know, 8 months ago i started as just a player, then a friend wanted me to help with building his own shard, then i had to learn all about it, came up with some ideas, started researching them, then i am at this point in time where i want to do the customizing stuff.

How cool is that.
 

tass23

Page
All RunUO scripts are C#. I don't know what your learning curve is, but I can tell you I learned a ton just from looking at other people's scripts, taking pieces here and there and putting things together to get what I wanted, or at least get close to what I wanted.
 

m309

Squire
Another easy way to rehue or change the hue on a mob is to manipulate the color palette in Fiddler's Animation Editor found in the Settings. You can change the entire color scale or simply choose a new hue from a file or image. Then just simply save the anim file you made changes too and patch it to the server and clients, its an easy way to accomplish the same thing without scripting and you can actually get a better depth of color whereas a lot of "hues" simply make the entire mobile one solid color which doesn't look as good (imo).
 

tass23

Page
m309 said:
Another easy way to rehue or change the hue on a mob is to manipulate the color palette in Fiddler's Animation Editor found in the Settings. You can change the entire color scale or simply choose a new hue from a file or image. Then just simply save the anim file you made changes too and patch it to the server and clients, its an easy way to accomplish the same thing without scripting and you can actually get a better depth of color whereas a lot of "hues" simply make the entire mobile one solid color which doesn't look as good (imo).​
But you're patching to the clients. You can change it in the script and type the hue, or a range of hues, or like for hiryu and cu-sidhe hues based on percentage rates, or with XMLSpawner, you can change the hue right on the spawner. Changing the hue right on an xmlspawner is the easier way to go. It doesn't require any server restarts to take effect, it doesn't require any files being patched, just a simple: skeleton/HUE/1162 and you're done.
 

nikkor1132

Sorceror
i have to agree with tass23 the XMLSpawner is the easy way to go with it i have many monster up and working that way with there hues and they work and look fine.
 

m309

Squire
I suppose if you already have the animations loaded and patched, then yes it is absolutely easier to simply rehue via XML, no argument there. If its a brand new animation load however, at least for the purpose of determining a good hue to use for the mob, using Fiddler is the better way imo. That being said, its always good to have multiple options when trying to accomplish the same end because some folks find different avenues more to their liking.

As for patching, tass23, the way I look at it is if players want the occasional cool new content (or for servers in alpha or beta stages) then patching is something they just have to live with if they want to play wherever it is they are. I for one have never minded a server patch for new art, mobs, maps etc because its something new to look forward to. I'll never not do something that requires a patch just because someone might not want to wait 7 minutes while a .rar downloads. As for server restarts, its again only a few minutes of logout time and definitely worth it (to me) for new stuffs. Players that don't have the patience for what likely takes 10-20 minutes total realtime likely won't be playing on my server, at least not for very long. :D
 

tass23

Page
Yeah, I understand all that. I'm just saying, minimizing downtime is the key and making things as "painless" as possible for players is what will keep players around. It's all fine and dandy if you've got a large patch for new players to your shard, one time download, as long as you give them the ability to remove it as well. Creating things using xmlspawner saves time, it adds a bit more to a world save because everything isn't stored in a script, but it's a miniscual amount and not noticeable. You'd probably notice a significant difference in save times if you populated an entire facet this way, with custom spawns like that though.
 

m309

Squire
Yea, I agree with you there, but don't get me wrong: I'm a huge advocate of xmlspawner for populating and even reconditioning mobs with hues, attacks, stats, etc etc. And if that's really more of what needs to be done, then absolutely simply doing that all on a spawner is far easier, especially for someone with no correlation of asses to elbows in regards to scripting like me.
 

JamzeMcC

Squire
http://www.battlezone.com.br/tools/
Note that there are a few SA/ML stuff that may not be supported by default RunUO.
Created this form to my Game Masters months ago.

Now thats a pretty kickass lil tool there. Theres a lot of generators out there that are neat and what not but this is the first web based one Ive seen. If you dont mind, ill pass that along to my GM's and see what they think!
 
Top