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!

Why is the SDK?

RHYMES

Wanderer
Why is the SDK?

Why does no one post here? I use the SDK everyday for making my own UO client... Anyone want to know something? How about a tutorial on displaing the UO game screen?



Here is something I did in 40 mins with the SDK as of Feb 24, 2006. The names are people around me at the time.

I logged into UO with UOLight and then used the Ultima SDK to do a printing of the map. Yes it sucks but hey it took 40 mins.

Update: Spent 30 mins more and realized the map is actually a gride twisted to the size.

Here is UO at sat view.



Fun with the SDK?

Note: I didnt figure out how the Z axies work yet, I thought it would be increasing the actual X (screen X) but nope, so if you know, knowing is half the battle.
 

Seanchen.net

Wanderer
Why does nobody post in this forum?

Because nobody who knows what they are doing, shares the information with one another besides Krrios to be honest.

You shared us what you were able to do, but not how, so its not exactly useful to anyone who is a programmer just doesn't know how to do stuff like that.

Sure you were able to figure out it, with trial and error and other could too, but you said "knowing is half the battle" so perhaps help others with their battle also?

** Disclaimer **
I have no personal need for this particular thing you did in ANY of my current projects, because I was able to fix my Arya's Map Control, so what you found out by doing this work I already knew. I did infact post my work, so one cannot say I have not done that.
 

RHYMES

Wanderer
Seanchen.net said:
Why does nobody post in this forum?

Because nobody who knows what they are doing, shares the information with one another besides Krrios to be honest.

You shared us what you were able to do, but not how, so its not exactly useful to anyone who is a programmer just doesn't know how to do stuff like that.

Sure you were able to figure out it, with trial and error and other could too, but you said "knowing is half the battle" so perhaps help others with their battle also?

** Disclaimer **
I have no personal need for this particular thing you did in ANY of my current projects, because I was able to fix my Arya's Map Control, so what you found out by doing this work I already knew. I did infact post my work, so one cannot say I have not done that.


Holy shit, sounds like people are scared of posting work or saying anything about work incase they said someone stold it. Sounds gay TBH.

***Discalimer****
I could care less
 

WarAngel

Wanderer
I'd be nice if you'd share more of how you used the SDK to take prints like for the people who don't know how.
 

Seanchen.net

Wanderer
RHYMES said:
Holy shit, sounds like people are scared of posting work or saying anything about work incase they said someone stold it. Sounds gay TBH.

***Discalimer****
I could care less

That might be part of it, so why not ignore what everyone, and share your work?

The only way more people will do it, is if at least one person does it.

To be honest, I would like to know how you did it.
 

RHYMES

Wanderer
I started reworking the code to display in a box pattern rather then a giant sidways box. The land tiles run off a double loop, which should be changed to run off a single loop, THEN be changed to run of DirectX or OpenGL, since its a lot faster.

Include the Ultima.dll in your app, run that code in main or a function and it will output a large land tile map of UO.

if you wanted to add static tiles. you need to run the loop after it. To get the ID you subtract by 0x4000

HuedTile[] htile = tlm.GetStaticTiles(x, y);

short trueID = htile[0].ID - 0x4000;

Also make sure you check the .length is > 0 before doing that. But it needs to be put in a single loop and not doubles like below.

RHYMES LOLOLOL

Code:
 TileMatrix tlm = new TileMatrix(0, 0, Map.Felucca.Width, Map.Felucca.Height);
            
            int size = 50;
            Bitmap FInalBMp = new Bitmap(44*size, 44*size);
            Graphics newBmpGraphics = Graphics.FromImage(FInalBMp);
            int TrueX = 0;
            int TrueY = 0;
            int PlayPosX = 1416 - size/2;
            int PlayPosY = 1674 - size/2;
            int IncY = 0;
            //Grid A Land Tiles
            for (int y = 0; y < size; y++)
            {
                for (int x = 0; x < size; x++)
                {
                    Tile tle1 = tlm.GetLandTile(PlayPosX + x, PlayPosY + IncY);
                    newBmpGraphics.DrawImage(Art.GetLand(tle1.ID), new Point(TrueX, TrueY));
                    TrueX += 44;
                    IncY--;
                }

                    TrueX = 0;
                    IncY = 0;
                    TrueY += 44;
                    PlayPosX++;
                    PlayPosY++;
              
            }
            //Grid B Land Tiles
             TrueX = -22;
             TrueY = 22;
             PlayPosX = 1416 - size / 2;
             PlayPosY = (1674 + 1) - size / 2;
             IncY = 0;
             for (int y = 0; y < size; y++)
            {
                for (int x = 0; x < size; x++)
                {
                    Tile tle1 = tlm.GetLandTile(PlayPosX + x, PlayPosY + IncY);
                    newBmpGraphics.DrawImage(Art.GetLand(tle1.ID), new Point(TrueX, TrueY));
                    TrueX += 44;
                    IncY--;
                }
                TrueX = -22;
                IncY = 0;
                TrueY += 44;
                PlayPosY++;
                PlayPosX++;
            }
            
            FInalBMp.Save("Map.bmp");
 

Twice

Wanderer
Code:
using System;
using System.Collections.Generic;
using System.Windows.Forms;
using System.Drawing;
using Ultima;

namespace WindowsApplication1
{
    static class Program
    {
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [STAThread]
        static void Main()
        {
            TileMatrix tlm = new TileMatrix(0, 0, Map.Felucca.Width, Map.Felucca.Height);

            int size = 50;
            Bitmap FinalBMP = new Bitmap(44 * size, 44 * size);
            Graphics newBmpGraphics = Graphics.FromImage(FinalBMP);
            int TrueX = 0;
            int TrueY = 0;
            int PlayPosX = 1416 - size / 2;
            int PlayPosY = 1674 - size / 2;
            int IncY = 0;
            //Grid A Land Tiles
            for (int y = 0; y < size; y++)
            {
                for (int x = 0; x < size; x++)
                {
                    Tile tle1 = tlm.GetLandTile(PlayPosX + x, PlayPosY + IncY);
                    newBmpGraphics.DrawImage(Art.GetLand(tle1.ID), new Point(TrueX, TrueY));
                    TrueX += 44;
                    IncY--;
                }

                TrueX = 0;
                IncY = 0;
                TrueY += 44;
                PlayPosX++;
                PlayPosY++;

            }
            //Grid B Land Tiles
            TrueX = -22;
            TrueY = 22;
            PlayPosX = 1416 - size / 2;
            PlayPosY = (1674 + 1) - size / 2;
            IncY = 0;
            for (int y = 0; y < size; y++)
            {
                for (int x = 0; x < size; x++)
                {
                    Tile tle1 = tlm.GetLandTile(PlayPosX + x, PlayPosY + IncY);
                    newBmpGraphics.DrawImage(Art.GetLand(tle1.ID), new Point(TrueX, TrueY));
                    TrueX += 44;
                    IncY--;
                }
                TrueX = -22;
                IncY = 0;
                TrueY += 44;
                PlayPosY++;
                PlayPosX++;
            }

            FinalBMP.Save("Map.bmp");
        }
    }
}



Where's the roofs?

-2x
 
Top