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.


Topics - ninekorn

Pages: [1] 2 3 4
1
Hi,

I am wondering how to stop the aggro from the mobs. I am retrieving nodes from sccspathfind.cs and trying to move the green snake mob from nodes to nodes, but somehow, at a close distance higher than 1.4, the green snake mob hisses and goes agressive... How can i stop the agressivity from using this

Code: [Select]
                                   
                                            var character = data.GameObject;
                                            var currentStats = data.PublicState.CurrentStats;

                                            ServerCharacterAiHelper.ProcessAggressiveAi(
                                                character,
                                                targetCharacter: ServerCharacterAiHelper.GetClosestTargetPlayer(character),
                                                isRetreating: currentStats.HealthCurrent < currentStats.HealthMax / 3,
                                                isRetreatingForHeavyVehicles: this.AiIsRunAwayFromHeavyVehicles,
                                                distanceRetreat: 7,
                                                distanceEnemyTooClose: 1,
                                                distanceEnemyTooFar: 3.5,
                                                movementDirection: out var movementDirection,
                                                rotationAngleRad: out var rotationAngleRad);
                                               
                                            this.ServerSetMobInput(character, movementDirection, rotationAngleRad);


Do i need to use ServerCharacterAiHelper.Proce ssRetreatingAI to stop/stabilize the mob?

Code: [Select]
                                                               

ServerCharacterAiHelper.ProcessRetreatingAi(character, distnpctoplayersqrt, out var movementDirection, out var rotationAngleRad);




I will try using that function and see if i can stabilize/stop the mob from being aggressive.

Also i tried this already but it's as if there is an internal aggro happening. i am unsure because it didn't fix the problem, as if the moment i use ProcessAggressiveAI, i have to use another function to stop the aggressivity. I will retest:

Code: [Select]
                                   
                                            var character = data.GameObject;
                                            var currentStats = data.PublicState.CurrentStats;

                                            ServerCharacterAiHelper.ProcessAggressiveAi(
                                                character,
                                                targetCharacter: ServerCharacterAiHelper.GetClosestTargetPlayer(character),
                                                isRetreating: currentStats.HealthCurrent < currentStats.HealthMax / 3,
                                                isRetreatingForHeavyVehicles: this.AiIsRunAwayFromHeavyVehicles,
                                                distanceRetreat: 7,
                                                distanceEnemyTooClose: 1,
                                                distanceEnemyTooFar: 1.4,
                                                movementDirection: out var movementDirection,
                                                rotationAngleRad: out var rotationAngleRad);
                                               
                                            this.ServerSetMobInput(character, movementDirection, rotationAngleRad);


Thank you so much for the help
nine

2
sccspathfind => javascript void expanse mods pathfind to Cryofall c# mobs scripts RELEASED - rev 1.123 - STABLE [client + server]

rev1.123. i had made corrections to the dot product and somehow 0.45f using the dot product thinking it was close to 45 degree angle wasn't giving any good results, as the mob was trying to move at approx 45 degrees and the pathfind was resetting and the mob stopping. I fixed that. I also decided to separate the functions of the scripts sccspathfind.cs and sccspathfindactions.cs and put them in separate scripts to reduce the size of the scripts in kb as they were really high at over 90kb. (looking like this now it almost felt like i was just changing the names of functions and variables of the sebastian lague's pathfind tutorial on youtube. I understand you there. well it's years back thinking i could just name a function differently and add lots of things inside to fit my purpose and say it's my function now haha and then reference who i learned from which is pointless and ridiculous to name them differently but i wanted to release asap so i will see if i can rename some functions/scripts to try and stay true to the basic pathfind architecture and function naming of who i learned from). In order to do this, i had to create multiple scripts that do the same thing as rev1.122. but this time, the size in kb is much lower and it should help a tiny bit also for the performance during gameplay maybe. Also i cleaned the last unused using statements that i hadn't cleaned up in rev1.122.

Things i have developped differently or similarly:

1. negative/positive loops for inverted positive flatindex where supposedly flatindexing is faster than using multidimensional arrays, but sincerely using flatindexing after such a long time and never really testing/benchmarking if it's faster or not, i wouldn't be able to say if this pathfind project converted with multidimensional arrays would be better or not.
2. no check for list.contains. accessing everything by index only. I use arrays as i had done some tests way back and it felt as if accessing arrays were faster than lists or i was just using lists the wrong way. But i use 2d lists for the main pathfind data to be held within a script and i am unsure if that was a good approach but since i have to increase the size of the collection, i prefered to use a list. But i think using only lists will be something i will test also later, or dictionaries for the main lists in sccspathfindarrays.cs.
3. grid index retrieval using a spiral form of indexing if i can call it that, where i interpret the index as if when adding through a list is always added in a spiral form... And visualizing it that way, and doing trial and errors. And fetching the index in the spiral indexing of a list, only additions/substractions/multiples are required to fetch the index. no check for contains. no divisions. But my functions to fetch the grid index isn't perfect. far from it. I hadn't been able then to develop a fully customizable sizeable grid size. Also, i tried to approach the grid spiral indexing in 3d, and i am unsure how to approach that problem and tried and failed as of yet.
4. no multithreading, but useful since it's a per frame pathfind (not entirely per frame yet, because i still use 2d loops for checkallsides and for building a grid and for looping through the list of obstacles while building the grids) which aren't a per frame 2d flat loop which i will add later, and i also loop the neighboorlist entirely each frame so my pathfind isn't per frame per say yet.
5. linkable pathfind grids where it doesn't matter where the target would be in a map, what matters is, is the array/list that holds the pathfind nodes/openset/closedset/listofgrids will have enough memory available on the computer or maximum allowed memory allocated by the program? hence why i have put multiple switches and maximum allowed retracepath iterations, maximum allowed creation of grids. I will bring those variables in the sccspathfindglobals.cs the moment i release rev1.124.

I will work later on a sizeable pathfind grid if i can in my next revisions, where the nodes are smaller in size and where the pathfind is way more precise, and i will try to incorporate multithreading to have better pathfind results if i can. Also, small grids, don't make my pathfind technique better, it makes the process of pathfind smooth on the cpu where looping on too large grids can be a problem when big grids require big memory allocations, but that's how void expanse modding forced me to code like this. But looping a big grid of pathfind and having the target found on one grid, is something i couldn't do back then in void expanse modding which forced me to have to go through trying to develop my homemade pathfind project. There are still bugs. Try at the risk of losing players ranting because they die more often, otherwise if you try the pathfind project, i hope you like it.



I will stop posting many posts per day on the same projects. Only one if i really have a very decent update to the pathfind from now on. I have put my scripts in the folder "Scripts" so that the pathfind project is easy to drop into a mod that isn't already modifying the original Cryofall Mobs.  thank you for trying the project. I will try and set this up as a Cryofall mod for the steam workshop soon.



Repository:
https://github.com/ninekorn/sccspathfind2D-csharp

Path to the project:
https://github.com/ninekorn/sccspathfind2D-csharp/blob/main/Cryofall/stable

Pathfind exceptions:
Doesn't work yet on retreating mobs like chicken and starfish and others like those.
Doesn't work yet on boss mobs.
Doesn't work yet on some special mobs with abilities.

List of changes:
May 18, 2023, 01:32:37 pm » pathfind mod revision 1.05
2023-may-28 - 04:42:17 pm - RELEASE 1.063 - PATHFIND ON ALL SERVER+CLIENT MOBS. SCRIPTS INCLUDED FOR MOBS AND PATHFIND.
EDIT2023MAY28-20h11-BUG FIX: there was an annoying bug where mobs that the player had never seen before, were moving away from the player when the player was seeing them for the first time. Bug fixed. The player was null so the mob was aimlessly going wherever. REV 1.063
2023-may-29- released revision 1.1 stable. Pathfind for all mobs with exceptions. Rev 1.1 released now stable. now the pathfind is individually taken care of by my scripts and there shouldn't be any entertwining of the path in memory between any mobs anymore. This is approx my approach that i did for void expanse modding player drones back then but i never had done it for the entire server enemies before. I hope you guys enjoy it. next step in development maybe, is making it better, cleaner, and adding different settings for the different mobs as currently they all act the same way with the pathfind. The npc pathfind path currently is slow to refresh a new path. i know and i will work on improving/tweaking that part and it shouldn't affect much  the performance by making the npc try to discover a new path faster. Multiple settings are available to choose from to decide how many times per frame should the pathfind launch and a lot of other settings. I will work tomorrow on giving a better description as i am tired and need to go sleep.
2023-may-29-release rev1.11 - Rev1.11 released . The pathfind path for each Cryofall npc now restarts faster to get a new path, if the npc is heading away from the character when already moving through a path. which in turns makes the npcs more aggressive as they are getting closer to the player faster. Also i have cleaned up the mobs scripts, and moved the pathfind action logic into a new script sccspathfindaction.cs so that it's easier to work with instead of pasting all of it in the mobs scripts everytime that i do a single modification.
2023-may-29-release rev1.12
2023-may-29 - at 11:22:00 pm - 1.122.
2023-may-30-release rev1.123

developed by steve chassé aka ninekorn

3
General Discussions / I cannot set my profile picture
« on: May 05, 2023, 01:27:23 pm »
Hey guys,

I cannot set my profile picture on the forums. It says "The attachments upload directory is not writable. Your attachment or avatar cannot be saved".

It is not urgent.

thank you though,
nine

4
Help section / changing setting of alpha color of lasers?
« on: September 11, 2022, 04:43:59 pm »
Hi,

i was wondering if there is a setting that we can use for energy weapons color alpha setting, to change the alpha setting to less transparency, as they appear transparent compared to the other weapons when fired. By using a transparent background with no colors and alpha of the backgrounds nebulas/stars at zero, i am able to nullify the stars atmospheric color change when getting close to a star, and by having a transparent background, the backgrounds become white 255/255/255/255 when ingame, which makes it possible to swap the white color for black color with a shader to make the backgrounds black again, from inside of my engine. Also, using transparent background for the nebulas-generic/nebulas-special/stars, i am able to nullify the background color of those nebulas to completely white 255/255/255/255, which makes it possible inside of my engine, to completely modify the backgrounds look of void expanse... The only problem, are the weapons with transparency, which cannot be seen ingame anymore due to this. I can see the particles of the weapons and weapon hit effect, but the weapon muzzle effect and weapon ray are originally set with transparency which i can't seem to find the setting to change that. Because of that, when firing a laser, we only see the particle effects but no ray when firing with no objects/decorations underneath of the player.

Are there any settings for particle speed and ray transparency that we can change in the xml files of items/weapons?

Otherwise, i will try and develop an alternative, or scrap the idea of using transparency inside of void expanse. I will try and provide screenshots putting a visual on what i am explaining so that it's easier to understand.

thank you for the help,
nine


Edit:

screenshot of menu with transparent background and without the voxel virtual desktop. The background looks white:


screenshot of menu with transparent background and with the voxel virtual desktop. I replace the white background with black color in the shader:


screenshot during gameplay with transparent background and with the voxel virtual desktop. I replace the white background with black color in the shader:


screenshot shooting the laser over the station floor and we can see the laser:


screenshot of gameplay without the virtual desktop. The background is white:


screenshot of gameplay shooting laser in the void. Here, the background is transparent, but is showing white in game, but the laser is not 255 alpha and i cannot seem to be getting 255 alpha even when using 1.0. For instance, when setting the color of the beam to red at 1.0 and alpha at 1.0, i am not getting an opaque laser as there seems to be some internal alpha less than 1.0 in the logic of the laser ray texture.

Code: [Select]
<ray>
<width>0.65</width>
<textures>
<texture>
<diffuse>projectiles/beam_fx-mod1.png</diffuse>
<color>1.0;0;0;1.0</color>
<speed>1</speed>
</texture>
<texture>
<diffuse>projectiles/beam_fx-black.png</diffuse>
<color>1.0;0;0;1.0</color>
<speed>0.5</speed>
</texture>
</textures>
<particles>
<!--
<particle>
<color>0.0;1.0;0.0;1.0</color>
<density>5</density>
<size>0.2</size>
<diffuse>projectiles/particle_01.png</diffuse>
</particle>
-->
</particles>
</ray>

Because of this it seems, we cannot see the laser, we only see the particles from the laser that i added in xml script to see where i was firing as the particles seem to be opaque at 255 alpha or 1.0 alpha. This is the problem that i am describing. Without that laser transparency issue, my whole idea of replacing the background with living objects with physics inside of the virtual desktop would be a dream come true. Without fixing this laser transparency, i might be forced to only use the voxel mode without transparency modding:


Edit-14-september-2022: I just noticed while adding the code snippet above that i can add multiple "<texture>" to the "<textures>" section. Let me test some more here to see if i can achieve a 255 alpha or 1.0 alpha by just adding more "<texture>" section to see if i can have a more opaque laser ray when multiple textures are on top of one another.

5
Hi,

I think ai_enabled answered my question somehow on this post https://forums.atomictorch.com/index.php?topic=989.msg6198#msg6198 but i don't remember even seeing the post where he says:

Quote
Another problem with global variables - we cannot serialize them easily and write into the savegame. So even if we had global variables (shared across all the scripts), it will be very easy to write bad code (which will prevent the game from properly saving the game state). So, we have storage scripting API instead. It's also very limited, but for the most cases, it was enough to get the things done.

So, every global variables that i am creating in my scripts, cannot be serialized and saved during a savegame if i understand correctly? do i need to empty the global variables before a savegame happens, or should i just from now on use the storage API instead for storing the global variables that i need? There is a lot of global variables in the AI scripts i developed in the libs section of my mod and i am currently trying to fix my galaxy market mod, and after that i am jumping on my AI scripts logic. I am not familiar with serialization of code and will go read a bit on that soon.

Thank you for your time answering,
9

Edit: It is not just my galaxy market the issue, it might not even be. I've set my globals variables to be inside of functions instead, so they are local variables for arrays, and the rest is using storage.SetGlobal... Thank you for understanding my frustration here.



I am using storage.SetGlobal for all of my variables that i need to access from other scripts or npcs. Should i use storage.Set instead? Is there a limit to the number of variables that i can storage.SetGlobal to in Void Expanse? It is easy to debug which script or variable is causing issues when you have the source code. When you don't it's a needle in a haystack with that kind of error that doesn't point to anything precise on where to look for the issue.

For instance, i use 4 scripts for the salvaging device. 1 script for the device, 1 script for storing the salvageable items in a global variable, 1 script for checking the player inventory, 1 script for activating the device with a library on specified coordinates.

Code: [Select]

using(npc);
using(console);
using(timer);

var SC_Salvage_Object_Storage =
{
    AddSpaceObjectToStorage: function (system_id, SpaceObjectID, randomYieldToStartOff)
    {
        if (storage.IsSetGlobal("systemid_" + system_id + "_salvage"))
        {
            var toReceiveData = storage.GetGlobal("systemid_" + system_id + "_salvage");
            var objectdata = { sys_id: system_id, id: SpaceObjectID, yield: randomYieldToStartOff, GameTime: timer.GetGameTime() };
            toReceiveData.push(objectdata);

            storage.SetGlobal("systemid_" + system_id + "_salvage", toReceiveData);
            /*var someTest;
            var toReceiveData = storage.GetGlobal("drone_mining_added_" + chosenPosition);

            var droneData = { id: droneid, index: droneIndex };
            toReceiveData[droneIndex] = droneData;
            storage.SetGlobal("drone_mining_added_" + chosenPosition, toReceiveData);*/
        }
        else
        {
            var toSendData = [];
            var objectdata = { sys_id: system_id, id: SpaceObjectID, yield: randomYieldToStartOff, GameTime: timer.GetGameTime()};
            toSendData.push(objectdata);
            storage.SetGlobal("systemid_" + system_id + "_salvage", toSendData);
        }
    },
    GetSpaceObjectStorageLength: function (system_id)
    {
        if (storage.IsSetGlobal("systemid_" + system_id + "_salvage"))
        {
            var toReceiveData = storage.GetGlobal("systemid_" + system_id + "_salvage");
            return toReceiveData.length;
        }
        else
        {
            return 0;
        }
    },


    RemoveFromYield: function (system_id, SpaceObjectID, currentYieldMinus)
    {
        if (storage.IsSetGlobal("systemid_" + system_id + "_salvage"))
        {
            var toReceiveData = storage.GetGlobal("systemid_" + system_id + "_salvage");

            for (var s = 0; s < toReceiveData.length;s++)
            {
                if (toReceiveData[s].id == SpaceObjectID)
                {
                    toReceiveData[s].yield = toReceiveData[s].yield - currentYieldMinus;
                    break;
                }
            }

            storage.SetGlobal("systemid_" + system_id + "_salvage", toReceiveData);
        }
        else
        {
            console.PrintError("the space object doesn't exist in the global array and this message is never supposed to print even with a console debug_reinit. If it prints, tell me. 0");
        }
    },

    SetDepleted: function (system_id, SpaceObjectID)
    {
        if (storage.IsSetGlobal("systemid_" + system_id + "_salvage"))
        {
            var toReceiveData = storage.GetGlobal("systemid_" + system_id + "_salvage");
            var s = 0
            for (s = 0; s < toReceiveData.length; s++)
            {
                if (toReceiveData[s].id == SpaceObjectID)
                {
                    toReceiveData[s] = null;
                    break;
                }
            }

            toReceiveData.splice(s, 1);

            storage.SetGlobal("systemid_" + system_id + "_salvage", toReceiveData);
        }
        else
        {
            console.PrintError("the space object doesn't exist in the global array and this message is never supposed to print even with a console debug_reinit. If it prints, tell me. 1");
        }
    },


    GetSpaceObjectYield: function (system_id, SpaceObjectID)
    {
        if (storage.IsSetGlobal("systemid_" + system_id + "_salvage"))
        {
            var toReceiveData = storage.GetGlobal("systemid_" + system_id + "_salvage");

            for (var s = 0; s < toReceiveData.length; s++)
            {
                if (toReceiveData[s].id == SpaceObjectID)
                {
                    return toReceiveData[s].yield;
                }
            }
        }
        else
        {
            console.PrintError("the space object doesn't exist in the global array and this message is never supposed to print even with a console debug_reinit. If it prints, tell me. 2");
        }
    },
};

Code: [Select]
using(npc);
using(console);
using(timer);

var counterFrame = 0;
var counterDevice = 0;

var SC_Salvage_Object_Timer =
{
    ClearCurrentDevice: function (sys_id, device_id, ship_id, slot_id) //IsWorking
    {
        game.IsShipPlayerControlled(ship_id);

        var playerName = game.GetShipOwner(ship_id);

        if (storage.IsSetGlobal("GlobalIndex_Player_" + playerName))
        {
            var someGlobalIndex = storage.GetGlobal("GlobalIndex_Player_" + playerName);


            if (!storage.IsSetGlobal("systemid_" + sys_id + "_ship_" + ship_id + "_salvage_device_" + device_id))
            {
                storage.SetGlobal("systemid_" + sys_id + "_ship_" + ship_id + "_salvage_device_" + device_id, { swtch: 1, ship_id: ship_id, device_id: device_id, slot_id: slot_id, timer_id: null, reset: 1 });

            }
            else
            {
                var globalSalvageStorage = storage.GetGlobal("systemid_" + sys_id + "_ship_" + ship_id + "_salvage_device_" + device_id);

                if (globalSalvageStorage != null) {

                    if (globalSalvageStorage.timer_id != null)
                    {
                        //timer.AddOrUpdate("CustomOnFrame", null);
                        //timer.AddOrUpdate(0.25, "CustomOnFrame", null, 1); //

                        game.ShipStopSound(ship_id, "mining_process_" + slot_id);
                        visual.DeviceDeactivateEffect(ship_id, device_id, "mining_visual_effect");

                        timer.ClearTimer(globalSalvageStorage.timer_id);

                        var data = { swtch: 1, ship_id: ship_id, device_id: device_id, slot_id: slot_id, timer_id: null, reset: 0 };
                        storage.SetGlobal("systemid_" + sys_id + "_ship_" + ship_id + "_salvage_device_" + device_id, data);


                        //console.PrintError("cleared device timer: " + globalSalvageStorage.timer_id);
                        return 1;
                    }
                    else
                    {
                        //console.PrintError("null timer0");
                        return 0;
                    }
                }
                else
                {
                    //console.PrintError("null globalSalvageStorage");
                    return 0;
                }

            }
        }
    },

    SetDevice: function (sys_id, device_id, ship_id, timer_id) //IsWorking
    {
        game.IsShipPlayerControlled(ship_id);
        var playerName = game.GetShipOwner(ship_id);

        if (storage.IsSetGlobal("GlobalIndex_Player_" + playerName))
        {
            var someGlobalIndex = storage.GetGlobal("GlobalIndex_Player_" + playerName);

        }
    },

    AddDeviceID: function (sys_id, device_id, slot_id, ship_id, timer_id)
    {
        game.IsShipPlayerControlled(ship_id);

        var playerName = game.GetShipOwner(ship_id);

        if (storage.IsSetGlobal("GlobalIndex_Player_" + playerName))
        {
            var someGlobalIndex = storage.GetGlobal("GlobalIndex_Player_" + playerName);

            //storage.GetGlobal("systemid_" + sys_id + "_ship_" + ship_id + "_salvage_device_" + device_id); //, { swtch: 1, ship_id: ship_id, device_id: device_id, slot_id: slot_id, timer_id: timer_id}

            var globalSalvageStorage = storage.GetGlobal("systemid_" + sys_id + "_ship_" + ship_id + "_salvage_device_" + device_id);

            if (globalSalvageStorage != null) {

                if (globalSalvageStorage.timer_id != null)
                {
                    timer.ClearTimer(globalSalvageStorage.timer_id);
                    //console.PrintError("cleared device timer: " + globalSalvageStorage.timer_id);
                }
                else {
                    //console.PrintError("null timer1");
                }
            }
            else {
                //console.PrintError("null globalSalvageStorage");
            }

            var data = { swtch: 1, ship_id: ship_id, device_id: device_id, slot_id: slot_id, timer_id: timer_id, reset: 0 };

            storage.SetGlobal("systemid_" + sys_id + "_ship_" + ship_id + "_salvage_device_" + device_id, data );
        }

        var deviceArray = [];


        if (deviceArray == null)
        {
            deviceArray = [];
        }
        var objectData = { sys_id: sys_id, device_id: device_id, ship_id: ship_id };
        deviceArray.push(objectData);

        var arrayData = { index: deviceArray.length - 1, length: deviceArray.length };
        return arrayData;
    },

    AddCounterFrame: function ()
    {
        counterFrame++;
        return counterFrame;
    },

    GetCounterFrame: function () {
        return counterFrame;
    },

    ResetCounterFrame: function ()
    {
        counterFrame = 0;
        return counterFrame;
    },

    AddCounterDevice: function () {
         counterDevice++;
         return counterDevice;
    },

    GetCounterDevice: function () {
        return counterDevice;
    },

    ResetCounterDevice: function () {
        counterDevice = 0;
        return counterDevice;
    }
};




6
Help section / Setting up a Range Skeleton Archer?
« on: September 30, 2019, 12:05:49 pm »
Hi,

I am almost done setting up the Skeleton Archer, I have the animations ready for the front, the back will take me about 1-2 hours to finish but the shooting doesn't work. Im not sure in which script I would indicate that the archer actually needs to shoot arrows?

I've got 3 scripts for each MOBS data, not including the spawning of them.

*MobSkeletonArcher.cs => General Data
*SkeletonSkeletonArcher.cs => Skeleton Data
*ItemWeaponSkeletonBow.cs => Mob Weapon Data - its set as a range weapon as i checked the pistols and other range weapons but the Skeleton actually shoot anything and no damage is done to the character.


So i still would need to setup arrow projectiles to be shot from the bow and to make the scripts actually tell the SkeletonArcher to Shoot...

Please help!

nine

7
Mods / [Client+Server] Skeleton MOB Mod V0.0.1 Released!
« on: September 30, 2019, 08:41:02 am »
Skeleton MOB Mod V1.0.0



https://youtu.be/N7ud7t581Ck

Mod type: Client-Server mod.

Latest version: 0.0.1

Supported game version: Latest

https://drive.google.com/open?id=1CybqiwUU1HcPRfvs71z1iFkUwu0sRAP9

The skeleton Asset is coming from a purchase i made in Unity for the asset here:
https://assetstore.unity.com/packages/3d/characters/humanoids/dungeon-skeletons-pack-50675
https://polygonblacksmith.wixsite.com/home

The Skeleton 3d to 2d transition is achieved by using the Unity3d asset:
https://assetstore.unity.com/packages/tools/sprite-management/sprite-baking-studio-3d-to-2d-31247

EDIT: I might try and manually do better animations as i don't have InvertedKinematics targets yet in my spine esoteric version, and i zoomed in a bit too much the sprites and they don't really look that good.

8
Help section / Making JSON animations for Cryofall?
« on: September 28, 2019, 03:03:27 pm »
Hi, I am trying to make new characters for Cryofall. My goal is to make Skeleton MOBs Swordman/Axeman/Archers from 3d models that i have. There will also be different equipments on them. I can easily do the 3d to 2d conversion but how would i make the JSON files?

I've purchase the software Spine Essentials 1 day ago, yesterday, and noticed that i cant even use InvertedKinematics options on the original JSON MAleFront SkeletonBones as it says its a feature from Spine Pro? anyone knows of any alternatives? If i remove the IK, it breaks all of the animations and i would have to re-do them myself. That is my last solution coz over 200$ for what little Spine Esoteric Software does, i'd rather use my money somewhere else. I feel i got totally ripped off paying over 80$ CAD for the Spine Essential.

I still like the software though as it makes for such an easy workflow but its so overpriced that it saddens me.

EDIT: Nevermind, It seems to not be that much harder without IK. Im going to keep on making the original animations without IK so that i can use them for my characters.

9
Ideas and suggestions / Cryofall Map Modification?
« on: September 26, 2019, 09:12:27 pm »
Hi,

I am getting annoyed by my personal projects. Recently I've had a ton of "lacking knowledge" to move forward on a physics engine, on my VR Texture2d to Geometry shader for minecraft type of terrain... etc... I am getting so annoyed and the next step in Void Expanse is a pain too. Gotta create colliders out of blender made destructible station parts by calculating the width and depth of object inside of blender using Python... I didn't start writting a script for that, i got annoyed before i started.

I read the Cryofall Forums Posts and Mods a bit and wanted to get more info on the current capabilities of the Cryofall engine. The last time I tried to build a server, my goal was to remove EVERYTHING from the game except for the player and the MAP. My goal was to find a way to modify the map OR create another "instance" of the map so that players can move from map to map. My goal was to understand the Core of Cryofall before re-adding the assets. I failed and left Cryofall behind.

My questions are:
1. Do you have any plans to make Cryofall kinda "infinite 2d terrain"?
2. Do we already have access to API that modifies the terrain size?
3. Do we already have access to API were you can create a second MAP from script and have access to it from ingame?
4. I think I saw that RPG Maker MV and maybe the other engines in the RPG Maker series have maps of Limited sizes but where you have the ability to make Multiple MAPS and have access to them IN/OUT fashion and still have the ability to control the AI from different maps. Can this be achieved in Cryofall and/or if it's not incorporate yet, do you have the plan to incorporate it?

I checked the forums a bit and didn't see a similar post. Please point me to any post that could be relevant to the subject if there is already some on that subject. I want to change my hobbies a bit AKA VoidExpanse/FAil Personal project 2D Physics Engine (Lacking knowledge on Mathematical equations relating to velocity and angular velocity)/ or API of SharpDX....

Thank you for your time in answering.
nine

10
I am working on a version of AI learning/machine Learning for Void Expanse so that I can use that on the drones to make their movement better in game and also for their decision making. I am barely getting started in this though. I am currently working on a version of it based on the series by Sebastian Lague here : https://www.youtube.com/watch?v=bVQUSndDllU
He built his tutorial in Python, although that wasn't why I decided to learn a bit of Python a couple of days ago, it was actually for exporting TONS of objects and build XML files for Void Expanse all at the same time. I've decided to "try" and translate his Python tutorial of Episode 1 and 2 mathematical equations to c# inside of Unity and started playing with that. But I am encountering some "obstacles". For instance, when Sebastian Lague explains the mathematical equations in episode 1 and 2, there is something that I am missing. I don't know how he is using the "output" of the Neural Network. Is he "re-feeding" it into the neural network as inputs in order for the neural network to complete a certain number of iterations until it reaches the goal?

If anyone has any idea of how Machine Learning works, and has really good explanations that can be understood for a beginner, I would be really interested in asking questions. here is what I have so far.. Although the script is able to get to the goal whether it is closer to 1 or closer to 0 which is going to be perfect for me when using the Dot product for the movement in Void Expanse, I have no clue if this qualifies as a Neural Network.

Code: [Select]
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using System;

public class SC_Neural_Network : MonoBehaviour
{
    double[] input;
    double[] weightsOne;
    double[] hiddenLayer;
    double[] lastHiddenLayer;
    double[] biasValueOne;
    double[] biasValueTwo;
    double[] output;
    double[] lastOutput;

    double[] currentOutputError = new double[2];
    double[] lastOutputError = new double[2];

    double[] currentHiddenLayerOutputError = new double[3];
    double[] lastHiddenLayerOutputError = new double[3];
    double[] lastHiddenPercentChanged = new double[3];
    double[] currentHiddenPercentChanged = new double[3];

    double[] weightsTwo;
    System.Random rand = new System.Random();

    double[] lastPercentChanged = new double[2];
    double[] currentPercentChanged = new double[2];

    public void Start()
    {
        input = new double[2];

        weightsOne = new double[6];
        hiddenLayer = new double[3];
        lastHiddenLayer = new double[3];
        biasValueOne = new double[3];
        biasValueTwo = new double[2];
        output = new double[2];
        weightsTwo = new double[6];
        lastOutput = new double[2];


        neuralNet(0.001, 100); // right now, can only use 0.001 or 0.999
    }

    double oriGoal = 0;

    int starter = 0;
    int finisher = 0;
    int someCounter = 0;

    //right now only working for input of 2 and hidden layer of 3 and output of 2 and biasOne 3 and biasTwo 2 and WeightsOne 6 and WeightsTwo 6
    private void neuralNet(double goal,int counterMax)
    {
        oriGoal = goal;

        while (someCounter < counterMax && finisher == 0)
        {
            if (starter == 0)
            {
                input[0] = rand.NextDouble();
                input[1] = rand.NextDouble();
                for (int c1 = 0; c1 < weightsOne.Length; c1++)
                {
                    weightsOne[c1] = rand.NextDouble();
                    weightsTwo[c1] = rand.NextDouble();
                }
                for (int c1 = 0; c1 < biasValueOne.Length; c1++)
                {
                    biasValueOne[c1] = rand.NextDouble();
                }
                for (int c1 = 0; c1 < biasValueTwo.Length; c1++)
                {
                    biasValueTwo[c1] = rand.NextDouble();
                }
                starter = 1;
            }
            else
            {
                input[0] = output[0];
                input[1] = output[1];
            }

            for (int c = 0; c < hiddenLayer.Length; c++)
            {
                hiddenLayer[c] = ActivationFunction(input[0] * weightsOne[c * 2 + 0] + input[1] * weightsOne[c * 2 + 1] + biasValueOne[c]);
            }

            for (int c = 0; c < output.Length; c++)
            {
                output[c] = ActivationFunction(hiddenLayer[0] * weightsTwo[c * 3 + 0] + hiddenLayer[1] * weightsTwo[c * 3 + 1] + hiddenLayer[2] * weightsTwo[c * 3 + 2] + biasValueTwo[c]);
       
                if (output[c] <= goal && goal >= 0.999)
                {
                    currentOutputError[c] = 1 - output[c];
                    lastOutputError[c] = 1 - lastOutput[c];

                    var totalDiffInError = Math.Abs(currentOutputError[c] - lastOutputError[c]);
                    currentPercentChanged[c] = totalDiffInError / currentOutputError[c];
                    var diffToGoal = Math.Abs(goal - currentOutputError[c]);

                    if (currentOutputError[c] >= lastOutputError[c])
                    {
                        for (int c1 = 0; c1 < weightsOne.Length; c1++)
                        {
                            currentPercentChanged[c] *= 1.19;

                            double someTest = (currentOutputError[c] * currentPercentChanged[c]);
                            weightsOne[c1] = weightsOne[c1] - someTest;

                            someTest = (currentOutputError[c] * currentPercentChanged[c]);
                            currentPercentChanged[c] *= 1.19;
                            weightsTwo[c1] = weightsTwo[c1] - someTest;
                        }
                    }
                    else if (currentOutputError[c] < lastOutputError[c])
                    {
                        for (int c1 = 0; c1 < weightsOne.Length; c1++)
                        {
                            currentPercentChanged[c] *= 1.19;

                            double someTest = (currentOutputError[c] * currentPercentChanged[c]);
                            weightsOne[c1] = weightsOne[c1] + someTest;

                            someTest = (currentOutputError[c] * currentPercentChanged[c]);
                            currentPercentChanged[c] *= 1.19;
                            weightsTwo[c1] = weightsTwo[c1] + someTest;
                        }
                    }
                }
                else if(output[c] >= goal && goal <= 0.001)
                {
                    //Debug.Log("test00");
                    currentOutputError[c] = 1 - output[c];
                    lastOutputError[c] = 1 - lastOutput[c];

                    var totalDiffInError = Math.Abs(currentOutputError[c] - lastOutputError[c]);
                    currentPercentChanged[c] = totalDiffInError / currentOutputError[c];

                    var diffToGoal = Math.Abs(goal - currentOutputError[c]);


                    if (currentOutputError[c] >= lastOutputError[c])
                    {
                        for (int c1 = 0; c1 < weightsOne.Length; c1++)
                        {
                            currentPercentChanged[c] *= 1.33;
                            double someTest = (currentOutputError[c] * currentPercentChanged[c]);

                            weightsOne[c1] = weightsOne[c1] + someTest;

                            currentPercentChanged[c] *= 1.33;
                            someTest = (currentOutputError[c] * currentPercentChanged[c]);
                            weightsTwo[c1] = weightsTwo[c1] + someTest;
                        }
                    }
                    else if (currentOutputError[c] < lastOutputError[c])
                    {
                        for (int c1 = 0; c1 < weightsOne.Length; c1++)
                        {
                            currentPercentChanged[c] *= 1.33;
                            double someTest = (currentOutputError[c] * currentPercentChanged[c]);
                       
                            weightsOne[c1] = weightsOne[c1] - someTest;

                            currentPercentChanged[c] *= 1.33;
                            someTest = (currentOutputError[c] * currentPercentChanged[c]);
                            weightsTwo[c1] = weightsTwo[c1] - someTest;
                        }
                    }
                    /*else //not used but if the above variable 1.33 is less than 1.19, it breaks the script and i gotta implement this part
                    {

                    }*/
                }
                else if(output[c] <= goal && goal <= 0.001 || output[c] >= goal && goal >= 0.999)
                {
                    finisher = 1;
                    Debug.Log("FINISHED AND REACHED GOAL");
                }

                lastPercentChanged[c] = currentPercentChanged[c];
                lastOutput[c] = output[c];
               
                Debug.Log(output[c]);
            }
            someCounter++;
        }
    }

    double ActivationFunction(double x)
    {
        return (1 / (1 + Mathf.Exp((float)-x)));
    }
}



EDIT: this can hardly be qualified as a neural network except for the variable names in the script. I am far from the goal. Will keep learning and searching for more info on how to implement a working version in c# or javascript.





11
Hi, I just wanted to know if when using the generator.AddNPCShipToSystem if the position x and y are actually rounded instead of using the exact location where i want them spawned.

Below picture shows why i am asking. I am able to create destructible parts from Blender and then from the destructible parts, i am creating "turrets" without AI to drive them, and I put their weapon invisible, which makes it so that i have static Walls in place for the station and those walls are destructible. Although I set the correct pivot location for every object in Blender and double checked they were correctly aligned, they aren't spawned where i want them to in Void Expanse. Any ideas why?




EDIT: Nevermind about my question.... I just printed to console and the correct position is supposed to be set. That is confusing me.

12
9sMODs part 1 of 9 Released - IN BETA VERSION - UNSTABLE... DOWNLOAD AT YOUR OWN RISK.... REASON is the simple colliders that I am using for stations are incompatible with the farseer physics implementation. Until there is a fix, I'd have to remodel ALL of the station interiors to fit "I dont know" what type of parameters.

https://steamcommunity.com/sharedfiles/filedetails/?id=1766918802

Title: 9sMODs part 1 of 9
Author(s): ninekorn
Description: Station Interiors with the Galaxy Market
Mod version: 1.0.0
Game version: Latest
Game mode: singleplayer and multiplayer


The MOD includes:
-ALL stations INTERIORs (untextured)
-The Galaxy Market
-The ability to rebuild turrets (without a cost for now)
-The Onboard Ship Computer to access the Galaxy Market from your ship. Not really usefull for the moment unless you are a trader. It will be a MUST once the drones MOD is released though.

TODO list:
1. Correctly rotate the turrets that are defending the stations.
2. Texture the station Interiors
3. Put a price on the re-building of station turrets depending on the level of the station.
4. Check for compatibility with the Expansion Pariah's Bane. NOW COMPATIBLE AS OF PATCH 2.0
5. Placing lights inside of all stations where they are supposed to be.
6. There seems to still be a Collider Bug affecting the MOD. If you save the server each 5 minutes, you will only lose the difference because you will need to restart your server. I have made sure to modify polygon colliders to NOT touch any other polygon Colliders but the bug is still present. I will continue investigating.


EDIT:
*Quick fix for the station Interior Collider crash that doesn't even work... it seems that it might never have been the station colliders the issue but more the fact that many miner squads are spawned on top of each other and on the station colliders... I tried that and it doesn't work. I'm gonna have to keep seeking the culprit. But the bug is not reliably happening at the same time every time.

EDIT 2019-06-12
*Another quick fix - I completely removed the Polygon Colliders from the science station. Seems more stable now. Will continue testing.

EDIT 2019-06-13
*Another quick fix - All polygon Colliders of the Military Stations have been removed except 3. currently testing the server with ONLY military stations generated in the server. I will provide screenshots soon! ;)

EDIT 2019-06-14 - 01h18AM
*Latest FIX - I have completely refactored all Polygon Colliders of All station interior models so that no Polygon colliders touch any other types of Colliders. So the station interior colliders still contain Polygon Colliders, much more box colliders, as per the Physics Adjuster tool of Void Expanse. Will continue testing to see stability.

EDIT 2019-06-16 - 00h28
*Latest FIX - I thought I had completely removed the Mining Station Polygon colliders on the 12th of June but I had just refactored them to not be touching anything else and still it was crashing the server... After many attempts at trying other things I decided to go back to the mining station and remove ALL polygon colliders except one(all stations have 1 polygon collider). Finally something stable happened. I will be leaving my private server online tonight to see how stable it is.

EDIT 2019-06-16 - 02h28
*Latest FIX - NOT UPDATED ON STEAM YET - Still unstable so i removed ALL of the station Interior Polygon Colliders that ever existed in the stations interior scripts. Testing right now.

EDIT 2019-06-16 - 02h28
No polygon colliders. Increased Physics calculations to try and increase the occurrence of the bug...

Edit - 2022-august-12-18h53 - News around development of my mods:

I built my engine to play/mod Void Expanse using my mods and heightmaps as textures in void expanse... I am undone, in fact, not even started in making the heightmaps textures for use in game. I wonder if the less bright background of your mod would give a better voxel surface when playing and i can't wait to try that. Also wanted to bring in some Voice Recognition for AI commands to my drones in the mod i created. I will be testing your backgrounds at some point. You know that in the beginning, i was building my engine just for using my mods of Void Expanse and keeping on developing them. It's just that no one has been helping me whatsoever and i didn't request any help. and it was long to code. i needed a voxel level to surround the player when playing on the voxel virtual desktop to make it even cooler. I understand that my engine has been taking a long time to develop, but there was no one else that could've coded it for me anyway so i had to code it myself. Now that i am getting there, to a comfortable point where i almost have a stable voxel instancing level generator, i am hoping to get out of hiatus on modding void expanse in 2022-2023.

Anyway, i hope the community of Void Expanse has at least tried one of my meddley mods projects for Void Expanse here . nothing was perfect, but it gets someone started in modding void expanse themselves. Void Expanse is a great game with infinite possibilities already. But being entirely dedicated to modding it when you know nothing of programming, it takes more time to learn from programmer to programmers as everyones different. But my current engine doesn't make use of queues but more dedicated threads to do the work. It's pretty fast to change the heightmaps value of the voxels to make it look like embossed. But until i build deferred rendering into it, it won't have a good enough performance on old computers. So i gotta keep working on it. Then i'll return to modding void expanse.



13
Help section / Collider hangs main Thread question?
« on: June 09, 2019, 08:56:18 pm »
Hi, I got this physics issue in my server. I am trying to push for a release of a basic Station Interior Mod but right now Id be releasing with a bug that crashes the server... Im not sure exactly why it does that. If anyone can help please.


14
Help section / array of object inside objective
« on: May 09, 2019, 09:48:14 pm »
Hi,

I need some help trying to put an array of objects inside of an objective? Is it possible and if it is, how do I do it?

On the official wiki page it shows this: "npc.AddObjective(25334, "go_to_jumpgate", {jumpgate_id: 15});"

But if I put and array of objects instead inside the "object parameter", it gives me the error below?




Does anyone have any ideas?

nine

15
Bug reports / Colliders Server Thread Aborted crash?
« on: May 03, 2019, 05:02:16 pm »
Hi,

Here is the image of the current bug I am facing. Is it due to too many colliders on the same object?


Pages: [1] 2 3 4