[MOD] ModLoader + ComaGlasses + GridOnSoil

Place for sharing your game modifications for Life is Feudal: Your Own

DiWorm
 
Posts: 90
Joined: 22 Sep 2014, 04:58

[MOD] ModLoader + ComaGlasses + GridOnSoil

Post by DiWorm » 05 Sep 2015, 10:26

Hello!

I found time to do a translation into English and tell you about the modification of our colleague.

GameComa.ru MOD Loader:

It's simple change in .cs files of game which gives you the ability to create simple modifications, and just put them in a folder !mods

Original post "How to create MOD LOADER"

Mod loader include some simple mods:
1. Grid On Soil
2. Coma Glasses

And some HACKs:
1. Map Coordinats [Xh/Yh XXX YYY Z.Z]
2. "*" - on "NUM" keyboard - ON/OFF FPS counter
3. "F1" - in Main Menu - connect to server (you can change server in .cs file)
4. "F1" - in Game ON/OFF GridOnSoils
5. "F2" - in Game show map with grid and coords
Image

MOD #1: Grid On Soil
Simple mod which gives you ability to see grid on soil

ImageImageImage

MOD #2: Coma Glasses
1) FOR FARMERS:
Show to farmer planted crops and growth stages
0 - sown, 1, 2 - can be collected
Image
2) FOR MINERS
Show simpled information about ore in ground
Image

Use at your own risk



>>>DOWNLOAD<<<

LiF_gamecoma_mod_v5.1.zip (5,4Mb)


TiRa
 
Posts: 1
Joined: 18 Nov 2015, 14:06

Re: [MOD] ModLoader + ComaGlasses + GridOnSoil

Post by TiRa » 18 Nov 2015, 14:14

Hey there and thanks for sharing this Mod, but....
Can you, or anyone else update this Mod to work with the Release-Version 1.0.0+?
Cuz it diesnt, right now..
Flatten Ground without this Mod is REAL PITA :sorry:

User avatar
Alex-Jackals
 
Posts: 19
Joined: 12 May 2015, 07:51

Re: [MOD] ModLoader + ComaGlasses + GridOnSoil

Post by Alex-Jackals » 20 Nov 2015, 10:06

TiRa wrote:Flatten Ground without this Mod is REAL PITA :sorry:


:shock:


Lofwyr
 
Posts: 12
Joined: 16 Dec 2015, 15:41

Re: [MOD] ModLoader + ComaGlasses + GridOnSoil

Post by Lofwyr » 19 Dec 2015, 20:51

Any way to get the source code for this?


DiWorm
 
Posts: 90
Joined: 22 Sep 2014, 04:58

Re: [MOD] ModLoader + ComaGlasses + GridOnSoil

Post by DiWorm » 23 Dec 2015, 20:44

TiRa wrote:Hey there and thanks for sharing this Mod, but....
Can you, or anyone else update this Mod to work with the Release-Version 1.0.0+?
Cuz it diesnt, right now..
Flatten Ground without this Mod is REAL PITA :sorry:

Hey! Hello!

Sorry about long time answer.

This mod not support 1.0 version but all source code can be found on our forum -- https://gamecoma.ru/forum/forums/issled ... torija.89/

And yep, we do simple mod - only for grid. It can be found here -- https://gamecoma.ru/forum/threads/lif-1 ... post-24274


Lofwyr
 
Posts: 12
Joined: 16 Dec 2015, 15:41

Re: [MOD] ModLoader + ComaGlasses + GridOnSoil

Post by Lofwyr » 25 Dec 2015, 18:46

Could you perhaps translate the source code posting and post it here? I cant read russian, so its hard to find a way through that forum ;-)


Zasdman
 
Posts: 8
Joined: 22 Feb 2015, 21:41

Re: [MOD] ModLoader + ComaGlasses + GridOnSoil

Post by Zasdman » 27 Dec 2015, 14:54

You can use Chrome and translate... only problem is you need to sign up for the forum to download the grid mod... a link to it here would be great :D


Lofwyr
 
Posts: 12
Joined: 16 Dec 2015, 15:41

Re: [MOD] ModLoader + ComaGlasses + GridOnSoil

Post by Lofwyr » 28 Dec 2015, 16:26

well, that translates just to a complet new language, using english or german words but very strange grammar. so no way to understand it.


DiWorm
 
Posts: 90
Joined: 22 Sep 2014, 04:58

Re: [MOD] ModLoader + ComaGlasses + GridOnSoil

Post by DiWorm » 29 Dec 2015, 19:20

Lofwyr wrote:well, that translates just to a complet new language, using english or german words but very strange grammar. so no way to understand it.

Latest grid is here https://gamecoma.ru/forum/threads/lif-1 ... post-24553


Lofwyr
 
Posts: 12
Joined: 16 Dec 2015, 15:41

Re: [MOD] ModLoader + ComaGlasses + GridOnSoil

Post by Lofwyr » 02 Jan 2016, 13:58

Still a mixture of english and russian after googel translate, so no way for me to find the source code. :cry:


Lofwyr
 
Posts: 12
Joined: 16 Dec 2015, 15:41

Re: [MOD] ModLoader + ComaGlasses + GridOnSoil

Post by Lofwyr » 08 Jan 2016, 08:31

Hmm still no one gets a translation and download here or better the source code?
Want to have a look at how it works, but the auto translation ... sry no way to understand something.


Swagman
 
Posts: 3
Joined: 05 Apr 2015, 07:08

Re: [MOD] ModLoader + ComaGlasses + GridOnSoil

Post by Swagman » 08 Jan 2016, 20:15

Hi.
The source code is long lost. Restore by memory can be but does not make sense.
I do not know English well. But I try to answer specific questions.


Lofwyr
 
Posts: 12
Joined: 16 Dec 2015, 15:41

Re: [MOD] ModLoader + ComaGlasses + GridOnSoil

Post by Lofwyr » 15 Jan 2016, 10:48

Well, i try to understand how the script works to learn more about the script language.
So how to get the player coordinates, write them on the screen and so on.

Any hints how u did that?


Swagman
 
Posts: 3
Joined: 05 Apr 2015, 07:08

Re: [MOD] ModLoader + ComaGlasses + GridOnSoil

Post by Swagman » 27 Jan 2016, 14:05

Lofwyr wrote:Well, i try to understand how the script works to learn more about the script language.
So how to get the player coordinates, write them on the screen and so on.

Any hints how u did that?

Hi

you must get camera object, then get position for it.
tokenize result, +offset, *scale, truncate it, and set some textlabel, which you previously create on gui form

p.s.
http://torque-3d.readthedocs.org/en/lat ... leref.html


DiWorm
 
Posts: 90
Joined: 22 Sep 2014, 04:58

Re: [MOD] ModLoader + ComaGlasses + GridOnSoil

Post by DiWorm » 30 Jan 2016, 08:26

Lofwyr wrote:Well, i try to understand how the script works to learn more about the script language.
So how to get the player coordinates, write them on the screen and so on.

Any hints how u did that?

https://gamecoma.ru/forum/threads/life- ... artu.2496/


Swagman
 
Posts: 3
Joined: 05 Apr 2015, 07:08

Re: [MOD] ModLoader + ComaGlasses + GridOnSoil

Post by Swagman » 30 Jan 2016, 14:50

Source code decompiled, thanks to @Basil
Posted for study. No rights reserved. CC0

Code: Select all
$GridOnSoils = 0;
function toggleGridOnSoils()
{
    if (!isObject(SavedOrigMaterials))
    {
        SaveOrigMaterials();
    }
    if ($GridOnSoils)
    {
        foreach ( %obj in SavedOrigMaterials)
        {
            %tmp = TerrainMaterialList.findObjectByInternalName(%obj.internalName);
            %tmp.detailMap = %obj.detailMap;
            %tmp.detailSize = %obj.detailSize;
        }
    }
    else
    {
        foreach ( %obj in SavedOrigMaterials)
        {
            %tmp = TerrainMaterialList.findObjectByInternalName(%obj.internalName);
            %tmp.detailMap = "./GridOnSoils/" @ %obj.internalName;
            %tmp.detailSize = 4.00391;
        }
        reInitMaterials();
    }
    reInitMaterials();
    $GridOnSoils = !$GridOnSoils;
}
function SaveOrigMaterials()
{
    if (!isObject(SavedOrigMaterials))
    {
        new SimGroup(SavedOrigMaterials)
        {
        };
    }
    %fileMask = "./GridOnSoils/*.dds";
    %file = findFirstFile(%fileMask);
    while (!(%file $= ""))
    {
        %intName = fileBase(%file);
        %obj = TerrainMaterialList.findObjectByInternalName(%intName);
        if (isObject(%obj))
        {
            if (!isObject(SavedOrigMaterials.findObjectByInternalName(%intName)))
            {
                SavedOrigMaterials.add(new SimObject("")
                {
                    internalName = %intName;
                    detailMap = %obj.detailMap;
                    detailSize = %obj.detailSize;
                });
                echo("Material [" @ %intName @ "] found and saved");
            }
            else
            {
                echo("Material [" @ %intName @ "] already saved");
            }
        }
        else
        {
            error("Material with internalName [" @ %intName @ "] not found in TerrainMaterialList");
        }
        %file = findNextFile(%fileMask);
    }
}
function SimpleServerConnect()
{
    if (!isObject(ServerConnection))
    {
        joinToRemoteServer("88.87.84.203:29000", "");
    }
    else
    {
        toggleGridOnSoils();
    }
}
GlobalActionMap.bindCmd(keyboard, "F1", "SimpleServerConnect();", "");

Code: Select all
if (isObject(lblSimpleCoords))
{
    lblSimpleCoords.delete();
}
new GuiTextCtrl(lblSimpleCoords)
{
    text = "sGPS";
    position = "15 35";
    extent = "150 8";
};
if (isObject(altMapControl))
{
    altMapControl.delete();
}
new GuiControl(altMapControl)
{
    profile = "GuiModelessDialogProfile";
    new GuiWindowCtrl(altMapWindow)
    {
        text = "AltMap";
        extent = "400 400";
        position = "0 0";
        resizeWidth = 0;
        resizeHeight = 0;
        canMinimize = 0;
        canMaximize = 0;
        closeCommand = "toggleAltMap(1);";
        new GuiBitmapCtrl(altMapBitmap)
        {
            bitmap = "!mods/map";
            position = "10 32";
        };
    };
};
function toggleAltMap(%val)
{
    if (!%val)
    {
        return;
    }
    if (altMapControl.getRoot() == Canvas.getId())
    {
        Canvas.popDialog(altMapControl);
    }
    else
    {
        Canvas.pushDialog(altMapControl);
    }
}
function altMapControl::onWake(%unused)
{
    %y = nextToken(Canvas.getExtent(), "x", " ") - 40;
    altMapWindow.extent = %y @ " " @ %y + 16;
    %y = %y - 20;
    altMapBitmap.extent = %y @ " " @ %y;
    altMapWindow.position = VectorScale(VectorSub(Canvas.extent, altMapWindow.extent), 0.5);
}
function altMapControl::onSleep(%unused)
{
}
GlobalActionMap.bind(keyboard, "F2", toggleAltMap);
function updateSimpleCoords()
{
    if (isObject(ServerConnection))
    {
        schedule(1000, 0, updateSimpleCoords);
        if (isObject(ServerConnection.getCameraObject()))
        {
            if (!lblSimpleCoords.controlIsChild(GuiMapWindow))
            {
                GuiMapWindow.addGuiControl(lblSimpleCoords);
            }
            %z = nextToken(nextToken(ServerConnection.getCameraObject().getPosition(), "x", " "), "y", " ");
            %z = mFloatLength((%z / 2) - 500, 1);
            %x = 3068 + %x;
            %y = 3064 - %y;
            %xt = mFloor(%x * 0.25);
            %yt = mFloor(%y * 0.25);
            %xs = mFloor(%xt / 100);
            %ys = mFloor(%yt / 100);
            lblSimpleCoords.text = getSubStr("ABCDEFGHIJKLMNOP", %ys, 1) @ strformat("%02u", %xs) TAB %xt TAB %yt TAB %z;
        }
    }
    else
    {
        schedule(10000, 0, updateSimpleCoords);
    }
}
updateSimpleCoords();

Code: Select all
$SimpleFPScounter = 0;
function toggleSimpleFPScouter()
{
    if ($SimpleFPScounter)
    {
        metrics();
    }
    else
    {
        metrics(fps);
    }
    $SimpleFPScounter = !$SimpleFPScounter;
}
GlobalActionMap.bindCmd(keyboard, "*", "toggleSimpleFPScouter();", "");

Have a nice fun.

Return to Game mods

cron