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

[Eclipse Galaxy v0.9]


The New World
 Share

Recommended Posts

  • Replies 224
  • Created
  • Last Reply

Top Posters In This Topic

Now the client cannot be running while another instance of the client is in use, by any user on the computer.

This image shows the first running instance of the client, and an error message showing after the attempted execution of another.

![](http://www.freemmorpgmaker.com/files/imagehost/pics/a308323687c98bc874ef45c918a923ce.PNG)
Link to comment
Share on other sites

I don't understand how your converter work. Could you explain to me please?

For mine, I manually set ALL the data and at the end, add extra value.
For example:

>! ```
Public Sub ConvertPlayers()
Dim i As Long
Dim i2 As Long
Dim i3 As Long
Dim i4 As Long
Dim i5 As Long
Dim i6 As Long
Dim i7 As Long
Dim i8 As Long
>! For i = 1 To MAX_PLAYERS
    With Player(i)
        .Login = .Login
        .Password = .Password

        ' General
        .Name = .Name
        .Sex = .Sex
        .Class = .Class
        .Sprite = .Sprite
        .Level = .Level
        .exp = .exp
        .Access = .Access
        .PK = .PK

        ' Vitals
        For i2 = 1 To Vitals.Vital_Count - 1
            .Vital(i2) = .Vital(i2)
        Next

        ' Stats
        For i3 = 1 To Stats.Stat_Count - 1
            .Stat(i3) = .Stat(i3)
        Next
        .POINTS = .POINTS

        ' Worn equipment
        For i4 = 1 To Equipment.Equipment_Count - 1
            .Equipment(i4) = .Equipment(i4)
        Next

        ' Inventory
        For i5 = 1 To MAX_INV
            .Inv(i5).Num = .Inv(i5).Num
            .Inv(i5).Value = .Inv(i5).Value
        Next

        For i6 = 6 To MAX_PLAYER_SPELLS
        .Spell(i6) = .Spell(i6)
        Next

        ' Hotbar
        For i7 = 1 To MAX_HOTBAR
            .Hotbar(i7).Slot = .Hotbar(i7).Slot
            .Hotbar(i7).sType = .Hotbar(i7).sType
        Next

        ' Position
        .Map = .Map
        .x = .x
        .y = .y
        .Dir = .Dir

        'Quest
        For i8 = 18 To MAX_NPCS
            .NPCQuest(i8).NPCQuestProgress = 0
        Next

    End With
    Call SavePlayer(i)
Next
>! ```
In this example, I'm adding the Quest Data Holder(I guess that's what it's called?) in and set the value to 0 because the old account data do not contain the Quest Data. I tried using only one i but it doesn't work so I had to dim and use many different i for loop.

I don't really understand how your work but it look more effieciant.

Sincerely,
Rithy
Link to comment
Share on other sites

@Rithy58:

> I don't really understand how your work but it look more effieciant.
>
> Sincerely,
> Rithy

You're probably talking about the```
Get #F, , Resource(i)
```All this does is load the Entire UDT as it is right now. Then to add the Data it holds you simply do```
Put #F, , Resource(i)
```and then under that you add the specific new members to be added to the converted file. For example:```
Put #F, , Resources(i).TreeGender
```
@Damian666:

> nice, by process ID?
>
> Dami

Nah, cheap function that checks it by process title. Figured it'd be different for every game.

```
' check for already running game client
    If WindowIsOpen(Options.Game_Name) Then
        Call MsgBox("Client already running!", vbCritical, "Error")
        Call DestroyGame
    End If

```
I recommend that the Options.Game_Name is changed to a hard coded string. Or I'll just make the Game_Name an in-client constant.
Link to comment
Share on other sites

@Rose:

> You're probably talking about the```
> Get #F, , Resource(i)
> ```All this does is load the Entire UDT as it is right now. Then to add the Data it holds you simply do```
> Put #F, , Resource(i)
> ```and then under that you add the specific new members to be added to the converted file. For example:```
> Put #F, , Resources(i).TreeGender
> ```

OH! Okay, thanks. I never actually know what the Get and Put do. Thanks a lot!
So the Put will add the new type at the end of the file?

So let me see if I understand the usage correctly.
My goal is to convert the old NPC data by adding the Quest type to NPC.
1\. Modify the Public Sub ConvertNpcs()
```
    For i = 1 To MAX_NPCS
        filename = App.Path & "\data\npcs\npc" & i & ".dat"
        F = FreeFile
        Open filename For Binary As #F
        ' Load old Values
        ConTextAdd ("Loading npc " & i & ".dat!")
        Get #F, , Npc(i)
        ' Add old Custom Values for the file being converted below
        'Do I need to put anything here?

        ' Put new values with old values
        ConTextAdd ("Converting npc " & i & ".dat!")
        Put #F, , Npc(i)
        ' Add new Custom values to add to the file being converted below
        Put #F, , Npc(i).Quest

        Close #F

        ConTextAdd ("Npc " & i & ".dat converted!")
    Next

```2\. Compile, Run Server, Press Convert NPC
3\. Close the Server and then add the Quest in the NPCRec in modType
4\. Remove Put #F, , Npc(i).Quest, Compile. Done

Sincerely,
Rithy
Link to comment
Share on other sites

Oh wow, you just made my converter look like a piece of poop >.>

This is so much better. One problem though is, what if I want to add a new type between the 2 current Vit type. So like instead of going Vit(1) then Vit(2) then some other type but I want a Vit(3) before those other type. Your current converter would add the Vit(3) to the end of the file, right?

Sincerley,
Rithy
Link to comment
Share on other sites

@Rithy58:

> Oh wow, you just made my converter look like a piece of poop >.>
>
> This is so much better. One problem though is, what if I want to add a new type between the 2 current Vit type. So like instead of going Vit(1) then Vit(2) then some other type but I want a Vit(3) before those other type. Your current converter would add the Vit(3) to the end of the file, right?
>
> Sincerley,
> Rithy

How it currently is, yes. But all you'd have to do is add the extra Get and Puts to Get the old data and use Put to put it in the order you want.
Link to comment
Share on other sites

any progress on that tile converter?

since you were on the topic, would love to add extra layers, still fucks up for me >.<

normal map conversion is easy, but the layers… *shivers

oh, and thanx for the explanation of the no 2 clients stuff :P

Dami
Link to comment
Share on other sites

@Damian666:

> any progress on that tile converter?
>
> since you were on the topic, would love to add extra layers, still ducks up for me >.<
>
> normal map conversion is easy, but the layers… *shivers
>
> oh, and thanx for the explanation of the no 2 clients stuff :P
>
> Dami

I'll look into it. Working on security right now. A tad more important.
Link to comment
Share on other sites

@Rose:

> So, someone tell me, should I take out the control arrays for the editors or not? Or maybe I should just release two versions of Eclipse Galaxy?

That would be more convenient for the people. Instead of debating over which one should be kept. However, it's mostly your choice since you're the one who has to take the extra time out to do it.
Link to comment
Share on other sites

@Helladen:

> I see it reduces your CPU usage. Thanks for clearing that up, I'm by no means anywhere a excellent or good programmer at that. Just expressing my opinion towards this optimization.

Just quit straddling the opinions of a few people and experiment with things as a whole. Define or discover a more general opinion. It's like listening to someone tell you the sky is green on tuesdays because you don't know any better. Ask questions, don't assume shit.
Link to comment
Share on other sites

> So, someone tell me, should I take out the control arrays for the editors or not? Or maybe I should just release two versions of Eclipse Galaxy?

I'd say keep them, It's not THAT hard to adjust to it.. And catering to the dummies while losing simplicity(just because they can't see how it makes it easier) is never a good idea.
Link to comment
Share on other sites

@Stach:

> I agree. Keep it the way it is. If they are too lazy to do 3 extra seconds to find the index then that's their problem.

I believe in using control arrays, just not combine them all into one solid control. Sometimes merging all that code together can make it a lot harder to add minor things to the controls you already have. But it's just my opinion after all, I say this every time I say something others disagree with me on.
Link to comment
Share on other sites

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...