Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

[EAdvanced] Screen & Map size Changing


clark
 Share

Recommended Posts

Hey Guys , actually i don't know if you have made a tutorial about changing Map size in sources with vb6 … anyways feel free to correct or complete the code i'm starting a little vb6 so don't blame me!

> From Synergy about changing resolution :
>
> [background=rgb(247, 247, 247)]In modGeneral, find:[/background]
>
> frmMain.Width = 12090
>
> frmMain.Height = 9420
>
> [background=rgb(247, 247, 247)]That is measured in twips, which you can convert to/from pixels [/background][here](http://www.unitconversion.org/typography/pixels-x-to-twips-conversion.html)[background=rgb(247, 247, 247)]. Change that value.[/background]
>
> [background=rgb(247, 247, 247)]Also make sure you change the screen size in modGraphics:[/background]
>
> ScreenWidth = 960
>
> ScreenHeight = 720
>
> [background=rgb(247, 247, 247)]Change this the value you want in pixels. I don't know if it's strictly needed, but I guess it helps to not have conflicting sizes in the code.[/background]

After that :

Search for :

```

' Map constants

Public Const MAX_MAPS As Long = 100

Public Const MAX_MAPX As Byte = 24

Public Const MAX_MAPY As Byte = 18

Public Const MAP_MORAL_NONE As Byte = 0

Public Const MAP_MORAL_SAFE As Byte = 1

```

You have to divide by 32 the resolution you want for example :

1024 divided by 32 = 32

768 divided by 32 = 18

Then change this :

```

Public Const MAX_MAPX As Byte = 24

Public Const MAX_MAPY As Byte = 18

```

By this :

```

Public Const MAX_MAPX As Byte = 32

Public Const MAX_MAPY As Byte = 18

```

Also in the map propriety i changed the x and y value to 98 both (it's seem's to be the maximum with the changes , because 99 will hide your character it don't stop at the window border

Actually i don't know if you should only do it for Client , but i suggest you to make it in the Server side too

(Make a backup of your project before doing this it's working for me ![:)](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/smile.png) )
Link to comment
Share on other sites

Actually it combine both ^^ Screen resizing and map resizing to fit because some people had a problem the size of the screen was big but the actual map size didn't go up than 50 X and 50 Y so with this it fix ^^ (watch EA engine thread) also your private messages ![:P](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/tongue.png)
Link to comment
Share on other sites

  • 3 weeks later...
Here's a handy function for converting pixels to twips:

```
Public Function PixelsToTwips(ByVal pixel_val As Long, ByVal XorY As Byte) As Long

If XorY = 0 Then

PixelsToTwips = pixel_val * Screen.TwipsPerPixelX

ElseIf XorY = 1 Then

PixelsToTwips = pixel_val * Screen.TwipsPerPixelY

End If

End Function
```

And for Twips to Pixels:

```
Public Function TwipsToPixels(ByVal twip_val As Long, ByVal XorY As Byte) As Long

If XorY = 0 Then

TwipsToPixels = twip_val / Screen.TwipsPerPixelX

ElseIf XorY = 1 Then

TwipsToPixels = twip_val / Screen.TwipsPerPixelY

End If

End Function
```
Link to comment
Share on other sites

Or just a website ![:P](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/tongue.png)

[http://www.unitconversion.org/typography/pixels-x-to-twips-conversion.html](http://www.unitconversion.org/typography/pixels-x-to-twips-conversion.html)
Link to comment
Share on other sites

> Or just a website ![:P](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/tongue.png)
>
> [http://www.unitconve…conversion.html](http://www.unitconversion.org/typography/pixels-x-to-twips-conversion.html)

I don't even know why I bother.
Link to comment
Share on other sites

Did you read all the tutorial correctly? i explained what to do and synergy too

Go to that site :

http://www.unitconversion.org/typography/pixels-x-to-twips-conversion.html

To convert pixels to twips

Read the tutorial i can't explain it better xD
Link to comment
Share on other sites

Oh so its pixels at first? i kinda misunderstood your tutorial, I thought it was in twips at first… Ill try when i get home , and will update if it worked or not, Thanks! :3

Edit , I finally got it to work , Thanks alot! You saved alot of my time by making this and answering so fast! Thank you!
Link to comment
Share on other sites

What exactly am i looking for? o.o Just got into vb6 , sorry.'

EDIT Found it! Should i delete it or move it? o.o

EDIT2: I made it really small and put it in a corner , Everything seems to work fine.. Or will this ruin things?
Link to comment
Share on other sites

> I got it to work but ran into a problem. I get this white dot on the screen, And it moves with the screen.
>
> ![](http://i.imgur.com/8d6LC.png)
>
> Please help! :3

It is picSS used for screenshots, but in EA it isnt working so just delete than
Link to comment
Share on other sites

  • 2 weeks later...
  • 1 year later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...