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

EO2 Night and Day system and Time


Scratso
 Share

Recommended Posts

Is it possible to make an EO2 game have a Night and Day system where it will switch to night after, lets say, 30 minutes and switch back to day after, maybe, 15 minutes? And I would like for it to be Server-centered – IE, everyone sees nights and days at exactly the same time when logged on. Would this be possible?

If it is, please help me to accomplish this and not just say "yes".
Link to comment
Share on other sites

> Here you are good sir.
>
>  
>
>  
>
> [http://www.eclipseorigins.com/community/index.php?/topic/129374-dx7-daynight-system/](http://www.eclipseorigins.com/community/index.php?/topic/129374-dx7-daynight-system/)

Options.DayNight = 1 **‘New** part
    SaveOptions
    Else
    LoadOptions
    End If
    If Options.DayNight = 0 Then ‘New
    frmServer.Label8.Visible = False **‘New**

It expects an end of statement on the top and bottom line there. The bits that were highlighted are marked in **bold**.
Link to comment
Share on other sites

Public Sub CacheResources(ByVal mapNum As Long)
    Dim x As Long, y As Long, Resource_Count As Long
    Resource_Count = 0

    For x = 0 To Map(mapNum).MaxX
        For y = 0 To Map(mapNum).MaxY

            If Map(mapNum).Tile(x, y).Type = TILE_TYPE_RESOURCE Then
                Resource_Count = Resource_Count + 1
                ReDim Preserve ResourceCache(mapNum).ResourceData(0 To Resource_Count)
                ResourceCache(mapNum).ResourceData(Resource_Count).x = x
                ResourceCache(mapNum).ResourceData(Resource_Count).y = y
**                ResourceCache(mapNum).ResourceData(Resource_Count).cur_health = Resource(Map(mapNum).Tile(x, y).Data1).health**
            End If

        Next
    Next

    ResourceCache(mapNum).Resource_Count = Resource_Count
End Sub

**Bold **for highlight.
Link to comment
Share on other sites

> This might be a silly question, but did you remember to delete all your maps?  I don't remember 100%, but I think this adds something to the map file, so you have to delete them for it to work.  Try making a backup, then deleting all your maps and seeing if it works then.

I didn't see that on the tutorial but I'll try anyway.
Link to comment
Share on other sites

> This might be a silly question, but did you remember to delete all your maps?  I don't remember 100%, but I think this adds something to the map file, so you have to delete them for it to work.  Try making a backup, then deleting all your maps and seeing if it works then.

It worked! Thank you :D It wasn't a silly question cause I never knew you had to reset the maps. Thanks again :D
Link to comment
Share on other sites

For future reference, if you tamper with the data that's saved for anything you may need to delete your old versions of said data or it will cause issues like this. The engine will blindly ASSUME the right data is in the right place, and read what it wants. However this does not always work out as intended.
Link to comment
Share on other sites

> For future reference, if you tamper with the data that's saved for anything you may need to delete your old versions of said data or it will cause issues like this. The engine will blindly ASSUME the right data is in the right place, and read what it wants. However this does not always work out as intended.

For example, if something was to mess with player data the same would apply as this? Ok, I understand.
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...