- Post your Feature Requests in this thread -

Vote for new features, or make your own requests here.
Post Reply
User avatar
Joel
Moodkie Staff
Posts: 4826
Joined: Wed Nov 07, 2012 10:32 pm

- Post your Feature Requests in this thread -

Post by Joel »

Request a Feature

If you have a feature request, first please check that it hasn't already been requested by searching the forum.

If the feature has been requested before, please vote for it in it's thread, where you can also ask questions about the request.

If the feature hasn't been requested before, you may request it in this thread. We'll then post a thread in the main forum where people can vote for it.
Joel @ Moodkie Interactive
Purchase Easy Save | Contact | Guides | Docs | Getting started
westingtyler
Posts: 28
Joined: Tue May 10, 2016 4:00 pm

Re: - Post your Feature Requests in this thread -

Post by westingtyler »

Hello. I can't find a way to post a new topic in the feature request sub forum.

Would it be possible to have per-level save files? In other words, if my hero goes to dungeon 3 and moves a bunch of items and re-arranges furniture, I want that to be able to be saved and reset by the player. If he goes to a different dungeon, same thing.

I want players to be able to save level setups and share them and have players load them into their game without affecting the rest of their game. Is there already a way to do this, and if not, can we have it?
User avatar
Joel
Moodkie Staff
Posts: 4826
Joined: Wed Nov 07, 2012 10:32 pm

Re: - Post your Feature Requests in this thread -

Post by Joel »

Hi there,
westingtyler wrote:I can't find a way to post a new topic in the feature request sub forum.
Feature requests should be posted in this thread, so you're posting in the right place at the moment :)
westingtyler wrote:I want players to be able to save level setups and share them and have players load them into their game without affecting the rest of their game. Is there already a way to do this, and if not, can we have it?
This is already possible by simply using the name of the level as your filename, or by appending the level name to the key.

Here's a script which you can use to easily get the name of a level by calling SceneTool.GetName();
using UnityEngine;
using UnityEngine.SceneManagement;

public class SceneTool
{
    public static string GetName()
    {
        return SceneManager.GetActiveScene().name;
    }
}
All the best,
Joel
Joel @ Moodkie Interactive
Purchase Easy Save | Contact | Guides | Docs | Getting started
Gladyon
Posts: 30
Joined: Thu Sep 07, 2017 6:51 am

Re: - Post your Feature Requests in this thread -

Post by Gladyon »

In 'ES3file', the 'public T Load<T>(string key, T defaultValue)' method is fully typed, but not the 'public void Save<T>(string key, object value)' method.

That means that we have to write 'TheFile.Save<String>("KeyName", Value);'.
With a fully typed method, we could write simply: 'TheFile.Save("KeyName", Value);'.
That syntax is much more user friendly, and the modification should be fairly easy.
User avatar
Joel
Moodkie Staff
Posts: 4826
Joined: Wed Nov 07, 2012 10:32 pm

Re: - Post your Feature Requests in this thread -

Post by Joel »

Hi there,

As mentioned in my correspondence on the Unity forums here, we're currently keeping the parameter as an object rather than T for flexibility. There are certain use cases we may accommodate in the near future where it's necessary to provide a parameter which will not necessarily be assignable from T (for example, storing the properties of one class as a different class, without having to transfer those properties over to a new instance of that class).

However, if we find that users are running into problems due to the parameter not being generically constrained, we'll include the generic constraint.

All the best,
Joel
Joel @ Moodkie Interactive
Purchase Easy Save | Contact | Guides | Docs | Getting started
Gladyon
Posts: 30
Joined: Thu Sep 07, 2017 6:51 am

Re: - Post your Feature Requests in this thread -

Post by Gladyon »

Joel wrote:Hi there,

As mentioned in my correspondence on the Unity forums here, we're currently keeping the parameter as an object rather than T for flexibility. There are certain use cases we may accommodate in the near future where it's necessary to provide a parameter which will not necessarily be assignable from T (for example, storing the properties of one class as a different class, without having to transfer those properties over to a new instance of that class).

However, if we find that users are running into problems due to the parameter not being generically constrained, we'll include the generic constraint.

All the best,
Joel
I'm not sure I understand well.
You mean that it's possible to write 'TheFile.Save<String>("KeyName", Value);' where 'Value' is not a String, but a Boolean for example?
Or more generally, 'TheFile.Save<T>("KeyName", Value);' where 'Value' is not of type 'T', but how do you know what to write? There must be some constraints no?
Sorry if these questions seem dumb, but I'm not used to weak-typing, so my brain has some trouble with it...
User avatar
Joel
Moodkie Staff
Posts: 4826
Joined: Wed Nov 07, 2012 10:32 pm

Re: - Post your Feature Requests in this thread -

Post by Joel »

Think less of writing a bool as a string, and more for writing classes with similar properties without having to convert between them beforehand. We can use reflection to find out what fields on the object parameter match those found on T, and then write the available fields to the file as T.
Joel @ Moodkie Interactive
Purchase Easy Save | Contact | Guides | Docs | Getting started
Gladyon
Posts: 30
Joined: Thu Sep 07, 2017 6:51 am

Re: - Post your Feature Requests in this thread -

Post by Gladyon »

Joel wrote:Think less of writing a bool as a string, and more for writing classes with similar properties without having to convert between them beforehand. We can use reflection to find out what fields on the object parameter match those found on T, and then write the available fields to the file as T.
OK, I think I'm beginning to get it.
It could be useful for reading a structure that has been updated, with some new properties added, but not in the files saved with the previous version.

I'll have to try that a bit more, thanks for the information.
Iamsodarncool
Posts: 2
Joined: Wed Nov 22, 2017 12:34 am

Re: - Post your Feature Requests in this thread -

Post by Iamsodarncool »

I'd like the save files generated to make a new line and tab forward for items in an array or list. Would make the files far more readable, especially for deeply nested arrays.

Here's how it currently works:

Code: Select all


Array:{thing1,thing2,thing3}

Here's how I'd like it to work:

Code: Select all


Array:{
      thing1,
      thing2,
      thing3
      }

User avatar
Joel
Moodkie Staff
Posts: 4826
Joined: Wed Nov 07, 2012 10:32 pm

Re: - Post your Feature Requests in this thread -

Post by Joel »

Iamsodarncool wrote:I'd like the save files generated to make a new line and tab forward for items in an array or list. Would make the files far more readable, especially for deeply nested arrays.
Hi there,

This has already been requested as part of pretty printing: http://www.moodkie.com/forum/viewtopic.php?f=14&t=1223

All the best,
Joel
Joel @ Moodkie Interactive
Purchase Easy Save | Contact | Guides | Docs | Getting started
Post Reply