About Store Forum Documentation Contact
Donations:
327$/mo



Post Reply 
Load environment settings from WE in the Game.
Author Message
Dynad Offline
Member

Post: #1
Load environment settings from WE in the Game.
Hey,

Ive been busy with the environments tools in the WE but i don't know how u can load the settings from the WE in the game.


Thnx,
~Dynad

There is always evil somewhere, you just have to look for it properly.
08-06-2010 01:06 AM
Visit this user's website Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #2
RE: Load invironment settings from WE in the Game.
The environment options are integrated with Gui's and Windows filled with Properties,
You can use this source code - http://www.esenthel.com/community/showth...p?tid=2620
and modify it somehow to be able to load the settings
08-07-2010 12:08 PM
Find all posts by this user Quote this message in a reply
Dynad Offline
Member

Post: #3
RE: Load environment settings from WE in the Game.
Thnx grin

There is always evil somewhere, you just have to look for it properly.
08-07-2010 03:45 PM
Visit this user's website Find all posts by this user Quote this message in a reply
dragonfly3 Offline
Member

Post: #4
RE: Load environment settings from WE in the Game.
I've been searching for an answer to this same question but when I click on the link it says that my account has been suspended and I don't have access to it.

Is there some method used to pull the settings from the environment text document? Or must it be manually done?

We are designing our own server architecture and are trying to figure out how the environment is displayed and where these settings are stored (server side or client side) so that we know what we need to change (if anything) to ensure it is stored on the client side.
08-10-2011 10:46 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Driklyn Offline
Member

Post: #5
RE: Load environment settings from WE in the Game.
Copy Editor.environment.txt from EE's Tools folder into your Data folder and add this code:

Code:
Bool Init()
{
    Edit::EnvironmentOptions environment;
    environment.create();
    environment.loadTxt("Data/Editor.environment.txt");
    
    // ...
}

If you make any changes to your environment via code, you may save the changes in the same fashion:

Code:
Bool Update()
{
    if (Kb.bp(KB_F2))
    {
        Edit::EnvironmentOptions environment;
        environment.create();
        environment.saveTxt("Data/Editor.environment.txt");
    }
    
    // ...
}

The next time your game loads, it will restore the changes. You may then copy the Editor.environment.txt from your Data folder back into EE's Tools folder and have World Editor reflect your changes as well.

----------

I discovered this while working on the Events Editor for EEDevTools.
08-11-2011 02:17 AM
Find all posts by this user Quote this message in a reply
dragonfly3 Offline
Member

Post: #6
RE: Load environment settings from WE in the Game.
Showed this to my programmer and he said it was very useful! Thanks! smile
08-20-2011 05:32 AM
Visit this user's website Find all posts by this user Quote this message in a reply
Driklyn Offline
Member

Post: #7
RE: Load environment settings from WE in the Game.
Cool smile

As a side note: Edit::EnvironmentOptions is actually the same class used in the World Editor itself. This means if you add it to the Gui, you will be able to edit the environment in your game just as you would inside World Editor.

Code:
Edit::EnvironmentOptions environment;

Bool Init()
{
    Gui += environment.create();
    // ...
}

Bool Update()
{
    if (Kb.bp(KB_F9)) environment.visibleToggle();
    // ...
}

Now, you will be able to edit your in-game environment in real-time.
08-20-2011 06:40 PM
Find all posts by this user Quote this message in a reply
b1s Offline
Member

Post: #8
RE: Load environment settings from WE in the Game.
This for some reason after the new engine update is crashing the game.
Anyone else?
09-04-2011 01:37 PM
Find all posts by this user Quote this message in a reply
Driklyn Offline
Member

Post: #9
RE: Load environment settings from WE in the Game.
Just tried both code snippets on the latest update. No crash here.

Is this related to your other thread? Seems like Edit::EnvironmentOptions would be using Property's. Esenthel said he changed that class a bit. Perhaps that is why this is crashing for you?
09-05-2011 08:55 AM
Find all posts by this user Quote this message in a reply
b1s Offline
Member

Post: #10
RE: Load environment settings from WE in the Game.
Yeah.. It was. I managed to get everything working by removing this one and replacing it with my old manual environment settings loader.
09-05-2011 09:49 AM
Find all posts by this user Quote this message in a reply
JonathonA Offline
Member

Post: #11
RE: Load invironment settings from WE in the Game.
(08-07-2010 12:08 PM)Esenthel Wrote:  The environment options are integrated with Gui's and Windows filled with Properties,
You can use this source code - http://www.esenthel.com/community/showth...p?tid=2620
and modify it somehow to be able to load the settings

I am unable to access this link, appears to be a permissions issue?
11-02-2011 07:49 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #12
RE: Load environment settings from WE in the Game.
11-02-2011 08:50 PM
Find all posts by this user Quote this message in a reply
JonathonA Offline
Member

Post: #13
RE: Load environment settings from WE in the Game.
Got an interesting problem, when I start the game I load the environment settings of my choice (I am using the Esenthel MMO code) and it all looks great when I enter the game, fantastic! However, when I exit the character select world or window also appears to be affected by the same options even though they are deleted prior to entering the select window.

How I can stop this from happening? I have tried toggling visibility, deactivating options etc but no joy.
11-20-2011 07:02 PM
Visit this user's website Find all posts by this user Quote this message in a reply
knalldose Offline
Member

Post: #14
RE: Load environment settings from WE in the Game.
can anyone give me a step by step tutorial "how to change and add the line of code"

i had copy the esenthil source into the sdk folder
C:\Program Files (x86)\EsenthelEngineSDK\Installation\EsenthelEngine\Edit\Environment Options.cpp

what is the next option? i have read a quick tutorial from this thread

http://www.esenthel.com/community/showth...nvironment
but I have no plan how and where to change it, this with the Editor.environment.txt sounds great.

christian
01-08-2012 03:12 PM
Find all posts by this user Quote this message in a reply
wARmAcH1n3 Offline
Member

Post: #15
RE: Load environment settings from WE in the Game.
(08-11-2011 02:17 AM)Driklyn Wrote:  Copy Editor.environment.txt from EE's Tools folder into your Data folder and add this code:

Code:
Bool Init()
{
    Edit::EnvironmentOptions environment;
    environment.create();
    environment.loadTxt("Data/Editor.environment.txt");
    
    // ...
}

If you make any changes to your environment via code, you may save the changes in the same fashion:

Code:
Bool Update()
{
    if (Kb.bp(KB_F2))
    {
        Edit::EnvironmentOptions environment;
        environment.create();
        environment.saveTxt("Data/Editor.environment.txt");
    }
    
    // ...
}

The next time your game loads, it will restore the changes. You may then copy the Editor.environment.txt from your Data folder back into EE's Tools folder and have World Editor reflect your changes as well.

----------

I discovered this while working on the Events Editor for EEDevTools.

it crashes if i use this command
environment.create();
08-09-2012 11:58 PM
Find all posts by this user Quote this message in a reply
Post Reply