Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - Seyon

#1
Mods / Re: Seyon┬┤s Wall Upgrader
May 09, 2019, 07:57:40 AM
I have edited my post above and added an example for the ModsConfig.xml.

The mod is a client & server mod. The server must therefore have the mod also installed.
#2
Mods / Seyon┬┤s Wall Upgrader
May 06, 2019, 06:57:50 AM
Me and a friend have decided to write some mods for Cryofall.

The first mod is ready: "Wall Upgrader"

What does the mod?

He adds a new tool ( in Tier2 / Construction2 ) which allows walls and doors to be upgraded.
No annoying demolish and re-place more! The costs correspond to a new building (but without construction stage costs). In addition, upgrading is done in a single cycle.

This mode is mainly intended for PVE. In PVP it might be a bit too powerful if you can upgrade your base so fast. But of course that's up to you.

Currently I have to say that upgrading is only for original Cryofalls walls and doors. Structures added by extensions are currently not checked. This is because we still have no reliable solution how to determine which structure should be used during the upgrade. Unfortunately there is no dependence between structures. And we have currently mapped everything manually.

Furthermore, I would like to say that we speak German and it may be that one or the other translation does not quite fit.
In that case, feel free to contact us and we will see that we are adjusting it. (Also if you want to provide some additional translations)

I hope you like the mod. Hopefully more mods will follow soon.


Mod type:

Client & Server

Download latest version:

SeyonWallUpgrade.mpk (https://github.com/seyon/cryofall_mods/blob/master/SeyonWallUpgrade/SeyonWallUpgrade.mpk)

Install:

Edit your ModsConfig.xml File in your Server and Client and add a new Line:

<mod>SeyonWallUpgrade_1.0.1</mod>

Example:
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<mods>
  <mod>core_1.0.0</mod>
  <mod>SeyonWallUpgrade_1.0.1</mod>
</mods>

#3
Modding info / Re: Translation System
May 02, 2019, 12:48:49 PM
Thanks, works great!
#4
Modding info / Re: Translation System
May 02, 2019, 07:20:47 AM
great thank you!
I did not think of that. But of course it makes sense.

I will try it as suggested with an enum, since I already have 3 error messages and probably more to come  ;D
#5
Modding info / Translation System
May 01, 2019, 11:38:35 AM
Hello, me again.

I have a little problem with translations.
I wrote a mod to upgrade walls.

Unfortunately, I have the problem that I do not get some translations.

I have the following class:



    class UpgradingSystem : ProtoSystem<UpgradingSystem>
    {

        public const string NotificationUpgrade_Title = "Cannot upgrade";

         public const string NotificationMissingTech_Message = "You lack the necessary technology.";

.....

https://github.com/seyon/cryofall_mods/blob/master/SeyonWallUpgrade/Scripts/Systems/Upgrading/UpgradingSystem.cs#L30

In the same class I have the following methods:


        public static void SharedShowCannotUpgradeNotification(
            ICharacter character,
            string errorMessage,
            IProtoStaticWorldObject proto)
        {
            if (IsClient)
            {
                Instance.ClientRemote_ClientShowNotificationCannotUpgrade(errorMessage, proto);
            }
            else
            {
                Instance.CallClient(
                    character,
                    _ => _.ClientRemote_ClientShowNotificationCannotUpgrade(errorMessage, proto));
            }
        }

        private void ClientRemote_ClientShowNotificationCannotUpgrade(string errorMessage, IProtoStaticWorldObject proto)
        {
            NotificationSystem.ClientShowNotification(
                NotificationUpgrade_Title,
                errorMessage,
                color: NotificationColor.Bad,
                icon: proto.Icon);
        }

https://github.com/seyon/cryofall_mods/blob/master/SeyonWallUpgrade/Scripts/Systems/Upgrading/UpgradingSystem.cs#L284

(I copied the methods from the Core.)

In my "ActionState" class, I call the method as follows:


            if (!this.CheckHasNeededTech(character, protoStructure))
            {
                UpgradingSystem.SharedShowCannotUpgradeNotification(character, UpgradingSystem.NotificationMissingTech_Message, protoStructure);
                return false;
            }

https://github.com/seyon/cryofall_mods/blob/master/SeyonWallUpgrade/Scripts/Systems/Upgrading/UpgradingActionState.cs#L375

and I have the following translation file


Scripts/Systems/Upgrading/UpgradingSystem@NotificationUpgrade_Title:
Upgrade fehlgeschlagen

Scripts/Systems/Upgrading/UpgradingSystem@NotificationMissingTech_Message:
Dir fehlt die n├╢tige Technologie.

.....

https://github.com/seyon/cryofall_mods/blob/master/SeyonWallUpgrade/Localization/de_de/SeyonWallUpgrade.de_de.txt


My problem now is that the "title" is translated correctly.
But the "message" remains untranslated.

In the translation file I used the class as namespace in which the constant is defined. (the same for both cases)

At first I thought the namespace might have to match the class in which the method is called and not where the constant is defined. However, it did not work out when I changed the message namespace to ActionState where the call happens.

Did I miss anything? Or how exactly do the translations work?

It's probably just a small mistake but I have no idea and would be happy about a little tip.

Thanks in advance.
#6
In any case, many thanks for the information. And I can fully understand why you do not want to allow System.Net Api.

In this case, for the time being, I only build the server installation into my web application and extend the control over RCON as soon as it is officially installed.

I'm looking forward to it, it's really fun to build Mods for this great game.
#7
First, thanks for the quick response.

My plan was to develop a web interface for my server, with which I can view server statistics (such as current players) at any time and (in the ideal case) execute certain commands in the remote to manage the server eg whitelist / blacklist etc ..

Similar to how it works in many other games via rcon. However, since I am quite new in this area (I'm from the PHP development area.), I tried to solve this for the time being over a simple socket so that the server listens to a specific IP / port.

Quoteif it fails, the game server will not run (not sure regarding your message "the error does not seem to affect the server because everything works as expected" because it cannot launch without the scripts compiled).

By that I mean that it still works!
The server starts even though the error is issued in the console and I can connect to the server as usual. Also the socket connection works.  ;D

If this is not desired by you you can check my code and see why it still works.
Of course, I have no problem if you as a developer do not want such a feature. Then I postpone the plan indefinitely until there may be an official solution.

You can find my code here: https://github.com/seyon/cryofall_mods/tree/master/SeyonWebapp
But please note that this is currently just a proof of concept and certainly elements such as security have not yet been implemented. Of course I would have planned these aspects as well. But first I wanted to test only if it would be possible in general.
#8
Hello, I have a quick question about server side mods. I have written a new mod that opens a socket connection so that I can query server information  for a website (and later send commands from the website to the server).
The whole thing is still pretty rude and there are still some features missing but the general socket connection works.

But unfortunately I have some errors "in the log" when starting the server. These look like this:

[ERR] Error compiling scripts:
XXXXX\Scripts\Bootstrappers\BootstrapperServerSocket.cs (line 9)
   Error: Namespace System.Net is forbidden


The error does not seem to affect the server because everything works as expected. I suspect that is because it happens in the [COMPILER CLIENT] area which is not important for the server? But it is not nice to always have errors in the log. Is there a way to tell the server that my classes are needed only in the server compile and are ignored in the client compile?

Currently I have implemented my code in a bootstrapper with "after BootstrapperServerCore". I had already tried to outsource it to a trigger (since they are called only on the server side and I was hoping that they are ignored by the client compile). Unfortunately, both cause the same error in the log.

Can someone here call me a possible solution? Or tell me where my mistake is?

Thanks in advance.