Go Back   RunUO - Ultima Online Emulation > RunUO > Utility Support > Ultima SDK

Ultima SDK Support for the Ultima SDK.

Reply
 
Thread Tools Display Modes
Old 02-24-2006, 04:55 AM   #1 (permalink)
Forum Novice
 
Join Date: Jan 2004
Posts: 143
Default 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.
RHYMES is offline   Reply With Quote
Old 02-24-2006, 03:39 PM   #2 (permalink)
Forum Novice
 
Join Date: Jan 2004
Posts: 143
Default

Quote:
Originally Posted by Seanchen.net
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
RHYMES is offline   Reply With Quote
Old 02-24-2006, 03:52 PM   #3 (permalink)
Account Terminated
 
Join Date: Jun 2004
Location: Cincinnati, Ohio
Age: 20
Posts: 3,954
Default

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.
WarAngel is offline   Reply With Quote
Old 02-25-2006, 09:07 AM   #4 (permalink)
Forum Novice
 
Join Date: Jan 2004
Posts: 143
Default

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");
RHYMES is offline   Reply With Quote
Old 03-18-2006, 10:20 AM   #5 (permalink)
Forum Expert
 
Join Date: Dec 2005
Posts: 553
Default

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
__________________
"On principle, having read your previous posts, I'm neg-repping you. Yer a frackin' waste of space."
Twice is offline   Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0 RC5