Need help changing starting Templates (RunUO 2.7)

librettomafia

Member
Feb 27, 2018
15
0
23
that is exactly how mine looks but for whatever reason im still not able to use those templates..it would be a huge setback to change to servuo but damn.

C#:
        public static bool VerifyProfession( int profession )
        {
            if ( profession < 0 )
                return false;
            else if ( profession < 8 )
                return true;
            else
                return false;
        }
Post automatically merged:

would this have any effect on why its not working?

C#:
            ClientFlags flags = args.State == null ? ClientFlags.None : args.State.Flags;
            Mobile m = args.Mobile;

            switch ( args.Profession )
            {
                case 4: //Tailor
                {
                    if ( (flags & ClientFlags.Malas) != 0 )
                    {
                        return new CityInfo( "Britain", "Sweet Dreams Inn", 3503, 2574, 14, Map.Felucca );
                    }
                    else
                    {
                        useHaven = true;

                        new BadStartMessage( m, 1062205 );
                        /*
                         * Unfortunately you are playing on a *NON-Age-Of-Shadows* game
                         * installation and cannot be transported to Malas. 
                         * You will not be able to take your new player quest in Malas
                         * without an AOS client.  You are now being taken to the city of
                         * Haven on the Trammel facet.
                         * */
                    }

                    break;
                }
 

Zavreyon

Gold Donator
Apr 5, 2015
82
26
31
that is exactly how mine looks but for whatever reason im still not able to use those templates..it would be a huge setback to change to servuo but damn.

C#:
        public static bool VerifyProfession( int profession )
        {
            if ( profession < 0 )
                return false;
            else if ( profession < 8 )
                return true;
            else
                return false;
        }
Post automatically merged:

would this have any effect on why its not working?

C#:
            ClientFlags flags = args.State == null ? ClientFlags.None : args.State.Flags;
            Mobile m = args.Mobile;

            switch ( args.Profession )
            {
                case 4: //Tailor
                {
                    if ( (flags & ClientFlags.Malas) != 0 )
                    {
                        return new CityInfo( "Britain", "Sweet Dreams Inn", 3503, 2574, 14, Map.Felucca );
                    }
                    else
                    {
                        useHaven = true;

                        new BadStartMessage( m, 1062205 );
                        /*
                         * Unfortunately you are playing on a *NON-Age-Of-Shadows* game
                         * installation and cannot be transported to Malas.
                         * You will not be able to take your new player quest in Malas
                         * without an AOS client.  You are now being taken to the city of
                         * Haven on the Trammel facet.
                         * */
                    }

                    break;
                }
I'm not sure. I don't have that code. But according to the text (and corresponding cliloc) it looks like it would still allow you to make the character, just sends you to haven. There must be a way to do it without changing softwares.
 
  • Like
Reactions: librettomafia

librettomafia

Member
Feb 27, 2018
15
0
23
whatever it is its far beyond what I know lol ive been at this for a few days now
Post automatically merged:

Only way I've figured it to work is if my CurrentExpansion.cs is changed, which I'm avoiding doing because I want the classic UOR feel.

C#:
using System;

using Server.Accounting;
using Server.Network;

namespace Server
{
    public class CurrentExpansion
    {
        private static readonly Expansion Expansion = Expansion.UOR;

        public static void Configure()
        {
            Core.Expansion = Expansion.SE;

            AccountGold.Enabled = Core.UOR;
            AccountGold.ConvertOnBank = true;
            AccountGold.ConvertOnTrade = false;
            VirtualCheck.UseEditGump = true;

            bool Enabled = Core.UOR;

            Mobile.InsuranceEnabled = Enabled;
            ObjectPropertyList.Enabled = Enabled;
            Mobile.VisibleDamageType = Enabled ? VisibleDamageType.Related : VisibleDamageType.None;
            Mobile.GuildClickMessage = !Enabled;
            Mobile.AsciiClickMessage = !Enabled;

            if ( Enabled )
            {
                AOS.DisableStatInfluences();

                if ( ObjectPropertyList.Enabled )
                    PacketHandlers.SingleClickProps = false; // single click for everything is overriden to check object property list

                Mobile.ActionDelay = 1000;
                Mobile.AOSStatusHandler = new AOSStatusHandler( AOS.GetStatus );
            }
        }
    }
}
 
Last edited:

Zavreyon

Gold Donator
Apr 5, 2015
82
26
31
Mine is set to Pre AOS and still working.

Really dumb question, but you did recompile your core after making the change to expansioninfo, right?
 
  • Wow
Reactions: librettomafia

Zavreyon

Gold Donator
Apr 5, 2015
82
26
31
that will compile the scripts, not anything in the server folder.

is there a batch in the runuo dir?
 

Zavreyon

Gold Donator
Apr 5, 2015
82
26
31
rename your server.exe to server.bak.

copy and paste this to a file named compile.bat in the same folder

C#:
del server.exe
C:\Windows\Microsoft.NET\Framework64\v4.0.30319\csc /optimize /unsafe /t:exe /out:RunUO.exe /win32icon:Server\runuo.ico /d:NEWTIMERS /d:NEWPARENT /recurse:Server\*.cs
and run it. you should get a new server.exe with todays date on it and the expansion info changes included./
 
  • Like
Reactions: librettomafia

Grimoric

Well-Known Member
Mar 21, 2015
174
40
43
librettomafia, I believe he is referring to this part, looks like it breaks out each expansion into clientflags, featureflags, charlistflags and housingflags:

C#:
Table = new[]
            {
                new ExpansionInfo(
                    0,
                    "None",
                    ClientFlags.None,
                    FeatureFlags.ExpansionNone,
                    CharacterListFlags.ExpansionNone,
                    HousingFlags.None),
                new ExpansionInfo(
                    1,
                    "The Second Age",
                    ClientFlags.Felucca,
                    FeatureFlags.ExpansionT2A,
                    CharacterListFlags.ExpansionT2A,
                    HousingFlags.None),
                new ExpansionInfo(
                    2,
                    "Renaissance",
                    ClientFlags.Trammel,
                    FeatureFlags.ExpansionUOR,
                    CharacterListFlags.ExpansionUOR,
                    HousingFlags.None),
                new ExpansionInfo(
                    3,
                    "Third Dawn",
                    ClientFlags.Ilshenar,
                    FeatureFlags.ExpansionUOTD,
                    CharacterListFlags.ExpansionUOTD,
                    HousingFlags.None),
                new ExpansionInfo(
                    4,
                    "Blackthorn's Revenge",
                    ClientFlags.Ilshenar,
                    FeatureFlags.ExpansionLBR,
                    CharacterListFlags.ExpansionLBR,
                    HousingFlags.None),
                new ExpansionInfo(
                    5,
                    "Age of Shadows",
                    ClientFlags.Malas,
                    FeatureFlags.ExpansionAOS,
                    CharacterListFlags.ExpansionAOS,
                    HousingFlags.HousingAOS),
                new ExpansionInfo(
                    6,
                    "Samurai Empire",
                    ClientFlags.Tokuno,
                    FeatureFlags.ExpansionSE,
                    CharacterListFlags.ExpansionSE,
                    HousingFlags.HousingSE),
                new ExpansionInfo(
                    7,
                    "Mondain's Legacy",
                    new ClientVersion("5.0.0a"),
                    FeatureFlags.ExpansionML,
                    CharacterListFlags.ExpansionML,
                    HousingFlags.HousingML),
                new ExpansionInfo(
                    8,
                    "Stygian Abyss",
                    ClientFlags.TerMur,
                    FeatureFlags.ExpansionSA,
                    CharacterListFlags.ExpansionSA,
                    HousingFlags.HousingSA),
                new ExpansionInfo(
                    9,
                    "High Seas",
                    new ClientVersion("7.0.9.0"),
                    FeatureFlags.ExpansionHS,
                    CharacterListFlags.ExpansionHS,
                    HousingFlags.HousingHS),
                new ExpansionInfo(
                    10,
                    "Time of Legends",
                    new ClientVersion("7.0.45.65"),
                    FeatureFlags.ExpansionTOL,
                    CharacterListFlags.ExpansionTOL,
                    HousingFlags.HousingTOL)
            };
        }
So if you are using Expansion.T2A in your currentexpansion.cs,

you can try changing the T2A section to look like this:

C#:
new ExpansionInfo(
                    1,
                    "The Second Age",
                    ClientFlags.Felucca,
                    FeatureFlags.ExpansionSE,
                    CharacterListFlags.ExpansionSE,
                    HousingFlags.None),
To enable the features. I tried just changing the Charlist Flags but still got the error message that I needed AOS/SE to use those profession slots. So I changed both charlistflags and featureflags, and was able to create a character with those additional profession slots, but am at work so have limited abilities to test things at the moment. I did chose SE as the expansion, so I still have 7 "top level" profession slots but fortunately it does still prevent elves/gargs on character create. What worries me now is whether this enables other features from later expansions that I don't want once ingame.

Grim, I realize you are on vacation, but from your recollection, will this enable other later expansion features or have any other undesired effects that you know of? Is there a different/better way?
Yes and No. The client festures will be activating things like new professions, races and sounds. Moongate location lists and soft features like crafting is checked at the server and can be changed.

This packet was added from T2A and future and is used to control how the hardcoded things in the client will work basen on what you have paid for at a OSI server. What expansion and extra festures like extra characrer slots or If you joint a SP like server with only one characer for each account.

Client.exe is same for all classic clients. GOLD. AOS2D and so on. Only the "vanilla" client is different. They changed the update approch from T2A to get out of heavy costs to keep different clients alive.
The feature flag + filestructure is what client.exe are using. T2A dont get MP3 filen at the release of UOR you had to "reinstall" client. But in reallity, If you copy mp3 files from UOR and add feature flag for UOR you would get mp3 throw the T2A installation.

-Grim
 
Last edited:
  • Like
Reactions: librettomafia

Grimoric

Well-Known Member
Mar 21, 2015
174
40
43
Okay,

After some testing, I have a figure that you need to change both 0xB9 and 0xA9 to make it work. The downside is that this turns the client into that expansion. So with SE, you will get all features like the special moves book on the right side in your paperdoll and skills will also be added to the list sins the client has that information hardcoded into it.

In this case, you will be needing to send a new profession file to your players so the best solution would be to distribute a patched Exe file at the same time.

I did reverse-engineer the client to figure out where the check was made. You can kill the check by hexedit your client.exe and change (NOP) the following bytes.

0F845A0100006A40 => 9090909090906A40
0F84E500000083FE => 90909090909083FE

This solution will work on any classic client with version 4.0.4t to 6.0.6.1 from gold and up.

-Grim
 
Last edited:

PyrO

Well-Known Member
Jan 27, 2015
1,152
92
Or you could, like I mentioned befor ;) do the character creation ingame while you join into the world with a blank slate itself.

Then you can do whatever your heart desires and you wouldnt need to distribute hacked up files.
 

Grimoric

Well-Known Member
Mar 21, 2015
174
40
43
Do you refer to something like a glorified skill ball? The issue is that you cant auto to pass the character creation. Well, you could fill the account with "unused" character but if the player deletes one what then? I think that not allowing delete from the character list would make it really strange for "new" players to that shard. Then that would also require an in-game menus system for handling characters.

A client modification like this is still optional. There would not be an impact if a player decides to use a standard (non-patched) client. The player could simply not be able to select the four highest standard professions (ninja/paladin) and the login would work as normal.

But a profession ball that is locked (with a 3-day delete timer) located in the bag of a new character is not a bad idea.

-Grim
 

PyrO

Well-Known Member
Jan 27, 2015
1,152
92
Hmm no I mean that it would fill empty slots with empty playermobile objects basically, when you join the world you would be unable to move, get a gump you can close and then create your character there. If you would go and delete the char? Then you would basically reset the char to being blank including the name.

Do you wouldnt need a skillball for that ^^
 
  • Like
Reactions: Grimoric

Grimoric

Well-Known Member
Mar 21, 2015
174
40
43
True I actually didn't think of that. The delete function is sent tho the server, stupid me :D
 

PyrO

Well-Known Member
Jan 27, 2015
1,152
92
hehe no worries, I just feel like it is a cleaner way than to even hack up the client.exe and trust me I looked into hacking the client.exe up to allow more visible skill slots with only minimal success :p
 

Zavreyon

Gold Donator
Apr 5, 2015
82
26
31
I did reverse-engineer the client to figure out where the check was made. You can kill the check by hexedit your client.exe and change (NOP) the following bytes.

0F845A0100006A40 => 9090909090906A40
0F84E500000083FE => 90909090909083FE

This solution will work on any classic client with version 4.0.4t to 6.0.6.1 from gold and up.

-Grim
Thank you, Grim. You wouldn't happen to know how to disable the "You must have three unique skills chosen!" prompt after clicking a category for nested professions? I found the message text in the .exe, but have no idea how to suppress the message from being shown, if that is even possible. (Essence UCS was supposed to be able to do this, but I've never been able to obtain it) It's not a big deal, as it doesn't break anything and still allows you to continue creating your character afterwards, but it is confusing as it makes it seem like the advanced button was clicked.