[Questions] Modding

magnusi

Green Slime
So I et al. have made a thing which allows to load some kind of mods into SoG named in form of dll libraries which have to contain certain class which will be initialized upon load, that being the thing which really is the modding. I also reworked how commands work in SoG and the posibility to add and and remove them at will from any point of SoG or the mods and allowed the commands a bit extended access. Here is a screenshot, I am sorry that it is just 59a, but I never had money nor a chance to buy the game, even though it saddens me a lot:
d04abcc498.png


Here I show my some kind of debugging console I made to make sure everything works as I intended it to, which shows exactly what is done when each plugin is loaded. Also I am sorry the "plugins count = 0" is suppossed to say "failed plugins count = 0".

It took me many and many hours to fix all those 200+ errors created possibly by decompilation or something else, but I must admit that some of your code is funny (kaktus, some catch statements, you know what I mean) and I laughed. There is also code that can be improved, which I would gladly help with if needed. (Shoals of conditionals could be just redone, and replaced with one foreach and extra class or two, because the way it is now I never reached the end of Game1 when reading the code so far :D ). Now the only thing I need to fix is some odd saving and loading of characters which popped after decompilation.

Now for my questions, mainly directed at the developers:
1. Am I allowed to publish this thing and get permission for my modding?
2. Would be the users theoretically be allowed to make mods for my framework of your game?
3. Can I sometimes post suggestion regarding improvements of your code?
4. Do you like bananas?
5. What do you think about modding SoG?
6. One of my commands added after I reworked the command system to be more intuitive and smart allows player to trigger bUseDebugInRelease, ok for me to allow it or should I remove it?
7. Are you ok with my work?
8. Will there ever be a standalone sog server application or do you plan that only small co-op games will exist?

regards, magnusi
 

Teddy

Developer
Staff member
I don't have any problems with modding as such, which is why I've left the code unobfuscated. People have been fooling around with it ever since our initial release last year, for their own amusement.

However, I'm not sure I understand what you're talking about. With 1), are you asking for permission to publish our game as your own because you decompiled and re-compiled my non-obfuscated code with some modifications? "Your framework"?

In either case, it's not like we've got a massive legal department to hunt down pirates. If you want to mess with the game, do it at your leisure. If you're going to upload (aka pirate) the game we'd be grateful if you could do what many of the established groups do (but sadly not those who 'crack' SoG), which is point users to where they can buy the game and support development in case they're into that kind of thing.

As for the quality of the code, it's true, it probably wouldn't even pass in a basic programming class! It's easy for me to work with and the game runs just fine, though, so I'm not sure why that matters.

Good luck with your coding endeavors!
 

magnusi

Green Slime
I don't have any problems with modding as such, which is why I've left the code unobfuscated. People have been fooling around with it ever since our initial release last year, for their own amusement.

However, I'm not sure I understand what you're talking about. With 1), are you asking for permission to publish our game as your own because you decompiled and re-compiled my non-obfuscated code with some modifications? "Your framework"?

In either case, it's not like we've got a massive legal department to hunt down pirates. If you want to mess with the game, do it at your leisure. If you're going to upload (aka pirate) the game we'd be grateful if you could do what many of the established groups do (but sadly not those who 'crack' SoG), which is point users to where they can buy the game and support development in case they're into that kind of thing.

As for the quality of the code, it's true, it probably wouldn't even pass in a basic programming class! It's easy for me to work with and the game runs just fine, though, so I'm not sure why that matters.

Good luck with your coding endeavors!
No, no :D. I meant If I am allowed to publish the mod here, not the full game neither do I aim to claim it as mine or pirate it. If I will publish, I won't include the content folder, therefore requiring the users to have the game bought.
It does not matter at all, I was just pointing it out along with the fact that some of the things amused me, like some variable names or in one animation part the catch statement.

I love your game and I was just afraid if what I am doing isn't frowned upon.

Thanks for fast reply,

regards, magnusi
 

Teddy

Developer
Staff member
Oh, okay, I was a bit confused as what you meant (I thought you wanted to publish to Github or something like that) :D

Anyways, if you're clear about what the mod does, feel free to post it here or anywhere else. If people are interested in checking it out I don't see why we should stop them!
 

ark626

Moderator
Hey there, just in case you would like to do serious modding, i would also recommend to Buy the game.
It's just 15 bucks and you have the Stable and Frontline version to do the modding.

There are updates very often and most of the community just works on the most current stable or current frontline version.

Meaning there is not really a point in developing mods for versions that are too far in the past, since many features have been added since 59a, and also a lot of bugs have been hunted down.

I also appreciate mods of the game cause its awesome just wanted to point out that nearly nobody can/will play mods for outdated versions, since we had to get to pirating a game we love to support.
 

magnusi

Green Slime
Hey there, just in case you would like to do serious modding, i would also recommend to Buy the game.
It's just 15 bucks and you have the Stable and Frontline version to do the modding.

There are updates very often and most of the community just works on the most current stable or current frontline version.

Meaning there is not really a point in developing mods for versions that are too far in the past, since many features have been added since 59a, and also a lot of bugs have been hunted down.

I also appreciate mods of the game cause its awesome just wanted to point out that nearly nobody can/will play mods for outdated versions, since we had to get to pirating a game we love to support.

Aye, I'll buy it once I get back into, heh, civilized world, because I dwell in an outpost rn, far from home.
 

ark626

Moderator
Sorry didn't mean to sound as bossy as i did :D XD

What kind of mod will you write? or is it more of an API?
 

magnusi

Green Slime
Sorry didn't mean to sound as bossy as i did :D XD

What kind of mod will you write? or is it more of an API?
Lol, np. It is some kind of API or framework which allows creation of mods. The mods will have to have "main class" looking like this and will have to be compiled to a class library and placed in Mods folder which will get generated upon running the modded executable for the first time:
Code:
using SecretsOfLaurens;
using SoG;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace TestSoGPlugin
{
    [ApiVersion(0,1)]
    public class main : SoLPlugin
    {
        public main(Game1 game)
            : base(game)
        {
            Order = 1;
        }
        public override string Name
        {
            get
            {
                return "TestPlugin";
            }
        }
        public override Version Version
        {
            get
            {
                return new Version(1, 0);
            }
        }
        public override string Author
        {
            get
            {
                return "magnusi";
            }
        }
        public override string Description
        {
            get
            {
                return "testy blah blah";
            }
        }
        public override void Initialize()
        {
            Game1.cmdList.Add(new Command("testcommand", testCmd));
        }

        private void testCmd(PlayerView player, string args, Game1 sender)
        {
            sender.xNetworkInfo.xChatWindow.AddChatBubble(new ChatWindow.PlayerChatBubble(player, "Test"));
        }
    }
}
I also have some checking if it has correct version of my API (notice the attribute). I will rewrite some parts of code and change their modifier's so that they are actually extendable from the outside. I already did commands, see the part when I add a new command and it's CommandDelegate.
I also have some basic control in which order the plugins/mods are loaded, because if one plugin references another, the referenced must load before that one. It can also load any dll, so I can for example make use of Newtonsoft.Json or other libraries without any trouble
 

ark626

Moderator
Cool nice thing.
I also had some ideas about mods,
i.E. i wanted to use neuronal networks to make a learning A.I. for the game.

I have used this concept very often and wanted to try that on SoG enemies, but i don't know if it would be possible.

What i would need is => Access to the objects around the enemy (to create a rough bitmap for seeing things)
=> Access to the moves, and actions an enemy can do.

The rest is pretty much the same i had before but i don't know if you can quite get that into the API
 

magnusi

Green Slime
I will be converting most of the objects so they are accessibble and affectable from the outside.

And the neural network idea is pretty cool. I never really got into it, but it would be awesome.
 

ark626

Moderator
That would be cool, if you releas sth. for the current release let me know :D
Then ill test how long it takes to make a npc too good for me to kill :D

Would it be possible to create a template player that fights against a wave of enemies spawning?
I mean in general the spawning mobs are not the problem but the player might be.
 

magnusi

Green Slime
That would be cool, if you releas sth. for the current release let me know :D
Then ill test how long it takes to make a npc too good for me to kill :D

Would it be possible to create a template player that fights against a wave of enemies spawning?
I mean in general the spawning mobs are not the problem but the player might be.
I don't know yet, well, the program has 216086 lines (59a, because I still can't buy it) and the main class has 90k lines which is enough for my visual studio to make my computer heat up :p
I think it may be possible though. I am still in phase where I study the code a lot and don't know how many stuffs will change :D.

I am pretty sure I will need to change the player a lot, because the way it is now, there seems to be a lot things to be changed in order so it is moddable to some good extent.
 

ark626

Moderator
Yeah to have a surface someone can work as modder is a hard task.
I remember this from works.

But i also would like to write some mods for SoG because this game is super awesome.

Just for me to ask,(you dont need to answere if you dont want), what is the current problem about buying the game?
Moneylack?(i know that feeling :D as im a student i really know how hard that is)
 

magnusi

Green Slime
Yeah to have a surface someone can work as modder is a hard task.
I remember this from works.

But i also would like to write some mods for SoG because this game is super awesome.

Just for me to ask,(you dont need to answere if you dont want), what is the current problem about buying the game?
Moneylack?(i know that feeling :D as im a student i really know how hard that is)
I am a student as well :D. Lack of money, got no paypal nor credit card and it is gonna take so long until I get into some city where I can get paysafecard. So I just dwell here, in a big village or little city and am glad neighbour has unprotected internet. Actually looking for summer holidays to end so I can get back to civilization :D

All I am doing now is messing with some half-broken cracked SoG releases, managing my terraria server and writing plugins for it (actually my modding API or how the hell am I supposed to call it, I will just call it Laurens, because why not, has mod managing heavily inspired and got assitance from TShock.) one doesn't feel like saving for example. So far got to the 599italy release.

Yea, this game would be totally awesome with mods. Sadly the way it is now it will take a while to resurface some things for example spells so they can be added and loaded from the outside. But I am thrilled to do it heh :D. It's great chance for me to learn more.
 
Top