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.


Messages - ninekorn

Pages: [1] 2 3 ... 16
1
2023may30 - at 10:08:04am - bump. release 1.123 STABLE.

2
2023may29 - at 08:28:04 am - bump. release 1.11 STABLE.
2023may29 - at 07:19:00 pm - bump. release 1.121 STABLE.
2023may29 - at 11:22:00 pm - bump. release 1.122 STABLE.

3
bump. release 1.1 STABLE.

4
i think that did the trick, using ProcessRetreatingAi.

5
Rev1.122 released. I added global lists per type of mob for better memory partition (wolfs and boar and hyenas and bear and all other npcs have their pathfind data in their own respective lists in sccspathfindarrays.cs). I also had cleaned up the too many using statements i had added in all of the mobs scripts since i had created sccspathfindaction i hadn't removed them. In my earlier releases, all mobs were inside of one big list. Now it's one list per type of mob so a total of 26 + 1 lists for the original game type of mobs.

Rev1.121 released. I added global variables in the script sccspathfindglobals, for collision check or not while npc is moving, for retreat/stabilize npc on pathend or not, for type of node sort for each npc. Check script sccspathfindarrays.cs for sorting nodes pathfind options per mob type. I have modified the movement speed of multiple npcs. Wolf/boar/bear/hyena and some other minions are now using FCOST "best shortest path to the target" for the path discovery which takes a tiny bit longer to process since the pathfind tries mostly all routes nodes based on the Gcost and Hcost so that all nodes that always represent the shortest path are discovered first and in the end it is possible to retrieve the best shortest path but it takes longer to discover more nodes. Other npcs are using HCOST for "fastest path to the target" which is faster to process but in a labyrinth FCOST would be better than HCOST dependant on if no other settings are added for the hcost as it is so fast to find a short path in an environment like a jungle/forest where there are no big obstacles to go around except ingame player constructions and abandonned ingame lab sites. Let's test it this way and see if it is liked or not. Mobs are harder this way, the CryoFall worlds feels less a secure place now. But there aren't any logic implemented yet for when a mob is nearing a player base, so don't expect the AI to be that smart either for the moment just because it has pathfind. It won't change that the AI will still collide with many things without more logic added to this, and it's not coded perfectly yet so i don't understand why the npc collides with some trees as if it never found a collider there. i will investigate.

Rev1.12 released. The aggro is now different per mob types with distance settings in the script sccspathfindarrays.cs. Also i reduced the variables "pathfindimax" and "retracedpathlistcountermaxloo p" to 1, since it was lagging with not a lot of mobs but it was due to the many calls i was doing to "physics.castline" to find physics colliders so i also commented out half of the logic from the function "checkforobstaclesontheway" in the script sccspathfindaction.cs. I was checking for collisions from the direction of the npc and direction towards the next node, but also i was checking the direction of npc and direction towards the player. Currently i decided to rely only on the direction of the npc towards the next node obstacles check. So currently, higher settings might make your servers lag if you use my pathfind mod if you put "pathfindimax" and "retracedpathlistcountermaxloo p" higher than 1. If you don't care about mobs colliding more often with obstacles, than you can comment the line that calls "checkforobstaclesontheway" in the script sccspathfindaction.cs and that should make the gameplay even smoother. Also, i fixed the rotation of the npc where, when there was no players, the rotation in radians was becoming null and at every movement of the character the npcs were rotating in a random rotation... Also i fixed the npc movement when moving towards a character the animation wasn't playing and that was due to not using "ProcessAgressiveAi" or "ProcessRetreatingAi" but only updating the direction of the movement server-wise with ServerSetMobInput, so i learned that those 2 functions "ProcessAgressiveAi" and "ProcessRetreatingAi" are internally also applying animation frames or something. This is my last "burst" update, for the moment, as i think now the pathfind feels stable and smooth, although the mobs are still colliding with the world gameobjects, and that the npcs are stopping after reaching the end of the pathfind path everytime. I haven't tested with any players ingame in multiplayer. I only tested my scripts with a couple of mobs max 5 mobs but the pathfind is activated on all mobs on the server (minus the exceptions below).


revision 1.05 - May 18, 2023, 01:32:37 pm » pathfind mod

hey everyone. I have been working on retranslating my void expanse mods pathfind development to c# and i have some good results. I wanted to share them with the community until i develop a functional Cryofall mod where i would use my c# pathfind development. Currently my revision works in Unity and i made sure to not vary much the code from my development of void expanse mods, and i did try and remove the abreviations i was using for variable names to "encrypt" my scripts manually.





I have decided to release my c# pathfind development with the apache license 2.0, and decided to share my development to help with Cryofall mods. If i can successfully or not incorporate my c# pathfind development into Cryofall, which i should be able to if i start learning the cryofall c# API soon, doesn't matter anymore as i have finally released it and with the apache license 2.0 which is very permissive, so that others in the community might like my approach and use my pathfind "library/scripts" although Sebastian Lagues pathfind and other libraries are also great. Basically as far as i understand, the Apache License 2.0 all sums up to referencing my name and work (including the work of others i reference in my own work) if you use my copies in other softwares you distribute or something close to that. I am unsure if this license choice was the right license to choose though, but i read on the internet it can protect a patent better, as i have not plagiarized my creation, and that it is compatible with the MIT license. I did use as reference the knowledge and a little bit of the code as reference from Sebastian Lague's pathfind tutorial on youtube (hosted on github.com MIT licensed), but not all of the code as linking grids together is something i developed on my own and fetching the index of grids in spiral is something i developed on my own and using premade arrays of unwalkable tiles and use the index is something i developed on my own, i didn't use as reference more than 1-2 episodes of Sebastian Lague's youtube pathfind tutorial which had helped me finally understand pathfinding in programming. Don't believe me? read my code, as this is a direct translation of my void expanse mod pathfind from javascript ecmascript5 to c# and i tried to be the most truthful i could be of my own development in my mods for void expanse for this c# translation. And i repeat, the architecture of how pathfind works, is very well explained in the first tutorial of pathfind of sebastian lague on youtube, and i use quite the hierarchy explained in the first video of the tutorial of sebastian lague. And unfortunately in the beginning my goal was to do a perfect translation of Sebastian Lagues pathfind tutorial on youtube to javascript ecmascript 5 strict mode, but i didn't have multithreading, i didn't have pathfind visible path, i didn't have anything. So i had to develop an alternative solution to reduce the weight of the pathfind for each script/drone that would use the script in my void expanse mods. Now, i have finally translated that work from javascript ecmascript5 to c#. Currently, i only made the pathfind work for the station exterior outpost, models that i had built for use in void expanse mods. I do not know how fast it fares against other pathfind techniques though. But currently my revision is not multithreaded and it is not using compute shaders for faster pathfind calculations. But no, i am not developing a void expanse game in unity. What i am doing was translating my pathfind from my void expanse mods in javascript ecmascript5, to c#, in order to use my pathfind for cryofall c# modding among using it with my own c# personal projects.

But please note that i have a lot of work left to do on adding every reference to others work including references from my own work that i move left and right everywhere in the projects that i make. I will try and work on that soon.

Controls:
movements W-A-S-D and SPACE to stop

The debug.drawline is for the editor view, and this is a draft/wip project and it had to work, not be a game. The goal was to make my javascript pathfind work in c#.

download link:
https://github.com/ninekorn/sccspathfind

my original void expanse pathfind/drone/galaxymarket mod post is here:
https://forums.atomictorch.com/index.php?topic=1361.0

steve chassé aka ninekorn



6
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

7
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

8
General Discussions / Re: I cannot set my profile picture
« on: May 13, 2023, 08:25:27 pm »
thank you!

nine


9
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

10
Hi everyone. I developed a little bit more of my procedural engine generator this weekend. I was able to do a draft C# solution for generating the entire series of icon textures for the engine items for the original game. You can download my project in the below link in it's draft form, but might have to change the path of saving the files generated to your desktops. The creating of XML files to make the items work ingame isn't coded yet for these generated icons. This is an unfinished procedural icon generator, and i had to remove many random settings just to have a working version in the end, so many reactors/engines have the same sizes. But in the end, it's approximately what i want to do, and later on i will add different trail color based on the fuel color, and different armor type as right now there are only 2 armor types, which is standard plating (in white) and  armor plating in charcoal. The first time i released a bit of my engine generator, there was only 2 or 3 engines that were generated, now it generates the series of 8 engines from the original Void Expanse game.

https://github.com/ninekorn/xinvasion-9smods-Void-Expanse-Modding-Assets/tree/main/proceduralengineicons


original:


procedural:


original:


procedural:


original:


procedural:


original:


procedural:


original:


procedural:


original:


procedural:


original:


procedural:


original:


procedural:













11
Help section / Re: changing setting of alpha color of lasers?
« on: September 16, 2022, 07:45:48 am »
nevermind for my post here. as per my youtube video here https://www.youtube.com/watch?v=bw1XpB2OBKg&ab_channel=SteveChass%C3%A9 i was able to remove the stars completely from being generated at server start, so i don't have issues with internal color tempering with the background anymore when using stars with that bloom/contrast effect when getting close to one, which makes it easy to concentrate on background color change and laser color, which were really causing an issue when getting closer to a star. With the stars gone, i don't have color contrasts when getting close to no stars as there are none. But it involves changing Void Expanse generation scripts.

I just realized this after 1 week trying combinations of colors after combinations, after work, of trying to fiddle with the laser colors and nebulas/stars background colors and c# directx11.1 hlsl shader to no avail... anyway, i know where to concentrate my efforts now.

It shows that i've been out of modding void expanse for a few months, i had completely forgotten that i had developed that alternative of nostars as shown in my youtube video. I didn't remember i had given up on trying to keep the stars/nebulas. Now i can't say i didn't try with the color combinations that i have tried over a week. I just can't seem to be able to make the lasers black and opaque, it just won't work, and i needed them black since my background was white, but whatever color i put them when flying over a white background and they never were opaque and taking in the white color and because of that my sharpDX shader couldn't make the difference between both of them and it's worse near a star with the bloom/contrast effect when getting close to one it would break the color setup i had in the shader. But now i've got to find a working backup of that project as there are none that works correctly.

nine

12
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.

13
I don't want to derange/bump my posts too much. But here are news on development of my 9sMods:

I am still building my voxel virtual desktop engine to play/mod Void Expanse using my mods and heightmaps as textures in void expanse... I did release a demo of how capable it would be with a little bit more time. I am undone, in fact, not even started in making the heightmaps textures for use in game. I also wanted to bring in some Voice Recognition for AI commands to my drones in the mod i created. 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, not that there is a lack of talent on the contrary, but more like who to ask and who would find the time and the money to develop this for me so that i can mod more of Void Expanse with it. So anyway, so i had to code it myself. Also, it just happened to be a much bigger project than i had anticipated at first.

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 and having a few scripted ideas on how to mod Void Expanse in the most basic form (but they are tutorial drafts, and you can tell by my lack of comments - call them my good waypoints as i develop my scripts that i have left myself and the community to have a basic idea of "how does it work/how to script it/tutorial" when they would Mod Void Expanse). Void Expanse is a great game with infinite possibilities already. But being entirely dedicated to modding it when you know nothing of programming, is difficult and i can't multiply time to work more in programming to achieve more. It takes more time to learn from programmer to programmers as everyones different.

My current engine doesn't make use of a thread pool working on data coming from queues but more like dedicated threads working instantly on arrays passed from the UI thread without queuing (i am trying somewhat of a mechanical gears program architecture by frame - clock-work or more like frame-work? - where all dedicated threads are started once from inside any function and keep working on the data that the UI thread passes on top of it where the thread never misses a single frame that the UI thread is working on, just like the sequence of a gear train/transmission) . 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. Now that i am getting there, to a comfortable point where i am trying to develop chunked voxel instancing with deferred rendering, i am hoping to get out of hiatus on modding void expanse in 2022-2023.

Also, i apologize for my recent 3 posts in other threads for intermittent requests to Atomic Torch for help for my Void Expanse savegame error that happens in my 9sMods series. I am unsure about why the salvaging device mod that i made that uses storage.global seems to be causing an issue that i will investigate while i rebuild my mod from scratch. Using the salvaging device once, only once, makes the automatic savegame crash and has been for me. Maybe it's something that i don't understand about Javascripts EcmaScript 5 functions hierarchy where i have too many scripts intertwined within each other that it causes an issue with the memory or the data in my arrays or something... And this error has been plaguing my mods from ever since i started modding Void Expanse, it's happened to me in my galaxy market release, my interior station release, my drone release, etc... It comes and goes, when i start getting that error, i have to revert sometimes a lot of code parts to older backups and restart from scratch because i never found/pinpointed the true culprit of that error in my scripts... But the more that i would mod Void Expanse, the more i would want to mod it without stopping and my Virtual Desktop project that englobes moddable games would fall behind (englobes? for being a template on how to use an external engine with a moddable game) .
My voxel heightmaps Virtual Desktop overlay, where you can see Void Expanse in Voxels can be downloaded here:
https://github.com/ninekorn/sccs-heightmaps-virtualdesktop-SharpDX11.1/blob/main/README.md

You can see yourself play Void Expanse, in voxels... if that makes more sense? Or let's say, your video game has it's screen copied into my engine and from there, i apply voxel displacement values based on the color data that i receive from the screen copy (where with time i could incorporate more logic to simply using the color values and dividing the rgb by 3), but doing this still gives good result (i used as reference an article on the web about using color values rgb for heightmaps if we have no other alternatives that i will put here some other time, and also the rastertek C# samples have a heightmaps example)

Void Expanse on this Virtual Desktop Voxel Instancing Directx11.1 software:


steve chassé aka ninekorn


Edit-2022-september-09th-11h55am: As per my post on the forums a long time ago here: https://forums.atomictorch.com/index.php?topic=1361.msg9628#msg9628
I mentioned my transparent backgrounds tests in void expanse using my virtual desktop engine. But back then in March 31 2021, it wasn't like my recent successes in making a better voxel virtual desktop. I succeeded this year and released my first revision 1.0 in march/april 2022. This is release 1.17932 of my idea on draft for using the voxel instancing virtual desktop engine (my engine, this one, the only, the original, the first on the opensourced market, homemade, genuine, legit), with a moddable game like Void Expanse to mod backgrounds images and much more. This is a draft. playable with keyboard and mouse clicks in revision 1.17920 below but without transparent backgrounds. It's also now working great using the GraphicsCapture type with microsoft edge and having voxel heightmaps activated at the beginning of a capture because of my newly developed F11 fullscreen browser logic but it's not perfect yet. Currently, i am not signing my binaries as i do not know how to do that yet and that is something i will try and do in a near future. Mouse clicks and keyboard clicks get straight through to the game or browser without any interference as i use my engine as an overlay transparent to let microsoft's internal mouse and keyboard clicks go through. This makes sure that it's not required to use pinvoke to send keyboard clicks or mouse clicks to a game or browser.

Compatibility tested:
OS: Microsoft Windows 11
GPU: MSI RX570 and EVGA GTX 960
CPU: Ryzen 2600
Ram: 8GB

My void expanse transparent background mod clean startup:
https://github.com/ninekorn/sccs-heightmaps-virtualdesktop-SharpDX11.1/tree/main/Void%20Expanse/9zModz

or my 9smods/invasion draft google download link is here but you need to disable the DLC to make this work if it works for you as it doesn't work properly for me now.
https://drive.google.com/file/d/1VefBUM3YC4zeJGGVyN_aS5DzZYOJneAH/view?usp=sharing

My voxel instancing virtual desktop engine revision 1.17932. It is a draft, there are some artifacts and the menu UI pixels color is all messed up, i know and i will try and work on that:
https://github.com/ninekorn/sccs-heightmaps-virtualdesktop-SharpDX11.1/tree/main/sccsr14-heightvd-wgrids-1.17932-win11v48%20-%20ve%20modding%20draft
https://github.com/ninekorn/sccs-heightmaps-virtualdesktop-SharpDX11.1/tree/main/sccsr14-heightvd-wgrids-1.17932-win11v48%20-%20ve%20modding%20draft%20backup

My revision 1.17920 with enabled mouse/keyboard clicks for games and browsers. I didn't include transparent backgrounds in this revision but it can be done easily with a few modifications in the shader:
https://github.com/ninekorn/sccs-heightmaps-virtualdesktop-SharpDX11.1/tree/main/sccsr14-heightmapsvirtualdesktop-allinone-wgrids-1.17920-win11v48
https://github.com/ninekorn/sccs-heightmaps-virtualdesktop-SharpDX11.1/tree/main/sccsr14-heightmapsvirtualdesktop-allinone-nogrids-1.17920-win11v48

please understand that this is a concept/prototype/experimental mod for when playing Void Expanse. I am not done developing this yet.


Edit-2023feb21: Hello everyone. I am sad to say that i quit developing my heightmaps voxel virtual desktop for using with Void Expanse. I streamed the reason why and you can read the reasons for my decision here:

https://www.patreon.com/posts/79005918?pr=true

I might keep working on modding void expanse in the future, but not void expanse's background with my current heightmaps voxel virtual desktop solution. My original Voxel heightmap virtual desktop should work for when playing Void Expanse but i won't develop more in terms of background modification. It just doesn't work as well as i thought that it would for the moment. Thank you for understanding. I will keep on trying to mod void expanse's icon for the onboard computer icon recognition that works well, and maybe for the station's interiors virtual desktop screens.

EDIT-2023April23: current revision of my voxel virtual desktop is rev13131 and is available here https://github.com/ninekorn/sccs-vvd-hd/tree/main/Releases/revision13131/sccsvvdhd-rev13131-BACKUP . Please be careful as there was an antivirus Avira HEUR/APC malware detection when compiling my solution. I don't know why and where that there could be a malware. Maybe it's because i didn't binary sign my files. In this revision you have access to a better program than before. The menu is more responsive and accessible from pressing F9, and the camera during gameplay can only be moved and rotated when the menu is enabled. Also, you now have "dashboard figurines" that point towards the mouse cursor and when the left mouse button is pressed, the voxel human ik rig hands are clenching and the index finger is pointing towards the voxel virtual desktop. I hope you like this new revision.



14
I thought it was all of my obj files that were causing issues. As for as far as i remember, i had been exporting from blender and deleting the .mtl file forever. Which in turn was causing issues in Void Expanse as the material file (.mtl) wasn't found for all of my objs. I found that out by testing an opengl c# tutorial obj file loader that wouldn't load the file when the .mtl file was deleted. Void expanse still loads the file but a debug error shows only in the keyboard key ~ console debugger within the game itself and not on the console. I corrected that for the destroyed ship parts re-exporting everything but removing the material file from the setting options. The same bug still happens in singleplayer and multiplayer. I have a couple of things left to test. I am wondering if maybe, it could be the fact that i was using an empty object as a weapon for NPCs that are stationed static in-base, in order to not spawn them a ship when they remain in base. So i added a tiny face for my 'invisible weapons' so that it is barely visible, and i have yet to also do the same thing for the "no ship" inbase NPC characters. Maybe an empty obj file from blender exported inside of Void Expanse is causing the issue but in this case, there are no errors in the game keyboard key ~ console and neither in the server console. Except for that, i have no clue what else could be causing the issue.

I have removed the galaxy market and drones and interior stations from my mod to test it as an almost blank mod but the issue persists when only using the salvaging mod. So i have put the logs of singleplayer and multiplayer and the mod i was using here. Note that the bug starts after salvaging destroyed ship parts, going in a station after or before the savegame happens, then undocking saves the game automatically and the bug happens in singleplayer. In multiplayer, i used the console save option multiple times as per the log and everytime the serialization bug happened but in multiplayer it doesn't crash the server. In singleplayer it crashes the server. That serialization error makes it impossible to save the game even if it doesn't crash the server in multiplayer. The bug happens in the first system. Not sure if the other systems also create the bug.

https://drive.google.com/file/d/1Gife7v5alAeKyesJcDRY9zi5sjOwL_jz/view?usp=sharing,
https://drive.google.com/file/d/1inacD1WRWmBDdGRgog_tiSghwth3mtes/view?usp=sharing,
https://drive.google.com/file/d/1k1fWQl_cChvGJfVwXnvdowfp-1ZK7iAr/view?usp=sharing

there is also one other thing. For as far as i remember i have been using PNG instead of JPG and i know JPG is less heavy in harddrive usage but the PNG file is different than the JPG file. Could it be the PNG files the issue? There is nothing debugging in the consoles though for any errors relating to the extension of those images. Void Expanse loads both PNGs and JPGs but could the PNGs be causing a serialization issue? Also i was wondering, if my mod isn't released on the Steam Workshop, would it be causing that security transparency issue?

I barely read on this, but reading on it, i've found that this error can be avoided in C# when using a header [assembly:AllowPartiallyTrustedCallers] . But i can't use that in javascript EcmaScript5. So if i would release my mod from the Steam Workshop, would my files/scripts be added that header automatically from Steam and redistributed with somehow security transparency embedded somewhere that doesn't crash my program?

https://stackoverflow.com/questions/12092435/system-methodaccessexception-attempt-by-security-transparent-method-to-access-s
https://stackoverflow.com/questions/20252500/attempt-by-security-transparent-method-to-access-security-critical-method-failed
https://docs.microsoft.com/en-us/dotnet/api/system.security.securitytransparentattribute?view=net-6.0
https://docs.microsoft.com/en-us/dotnet/api/system.security.allowpartiallytrustedcallersattribute?view=net-6.0

Thank you for the help,
nine




15
I might be onto something here. I noticed that the original core.cpk devices JS scripts don't have for any of them a single reference to include another lib. I noticed also that the ai JS scripts only include the NpcLib.js script from the libraries. And from the NpcLib.js, there aren't any includes. That might be where i have been going wrong where in my device script i am using include on 4 different libraries.

include(SC_Utilities.js);
include(SC_Salvage_Object_Storage.js);
include(SC_Salvage_Object_Timer.js);
include(SC_Salvaging_Utilities.js);

but none of those libraries have inner includes statements so i always thought that a "single layer of depth" to the include statement wouldn't cause that much issues.  About 30++ minutes and the multiplayer server running and no crash today and i did use the salvaging device a bit... I will test in singleplayer again but most importantly, i will probably remove those libraries and include the utility functions inside of the device script instead to remove that depth of included libraries. I will repost here once i have results.

Edit: meh, the second save on a singleplayer game and the serialization error happened. I did salvage a couple of times... where is the issue?

Edit: i thought maybe it was my cargo check function that really was to try and bypass using GetFinalCache or GetCurrentValue functions. Earlier i was checking the cargo by adding items inside of it and removing it. I thought maybe the sheer amount of items i was trying to add might have been the issue. My old function was:

Code: [Select]
function AIIsPlayerCargoFull(playerID)
{
    for (var i = 0; i < 1; i++) {
        var totalSizeOfPlayerStorage = 0;
        var initialQuantityOfItemsInPlayerStorage = 0;
        var emptySpaceToRemovePlayer = 0;

        var PlayerContainerID = items.GetGameObjectContainerId(playerID);
        var itemsInCargoOfPlayer = items.GetItemsAndCargo(PlayerContainerID);
        if (itemsInCargoOfPlayer != null) {
            if (itemsInCargoOfPlayer.length > 0) {
                if (itemsInCargoOfPlayer[0] != null) {
                    for (var i = 0; i < itemsInCargoOfPlayer.length; i++) {
                        initialQuantityOfItemsInPlayerStorage += itemsInCargoOfPlayer[i].quantity;
                    }
                }
                else {
                    initialQuantityOfItemsInPlayerStorage = 0;
                }
            }
            else {
                initialQuantityOfItemsInPlayerStorage = 0;
            }
        }
        else {
            initialQuantityOfItemsInPlayerStorage = 0;
        }


        items.AddItem(PlayerContainerID, "goods_emptyspace", 100000);
        var itemsInCargoOfPlayerAfterAddingEmptySpace = items.GetItemsAndCargo(PlayerContainerID);

        if (itemsInCargoOfPlayerAfterAddingEmptySpace != null) {
            if (itemsInCargoOfPlayerAfterAddingEmptySpace.length > 0) {
                if (itemsInCargoOfPlayerAfterAddingEmptySpace[0] != null) {
                    for (var i = 0; i < itemsInCargoOfPlayerAfterAddingEmptySpace.length; i++) {
                        totalSizeOfPlayerStorage += itemsInCargoOfPlayerAfterAddingEmptySpace[i].quantity;
                    }
                }
                else {
                    totalSizeOfPlayerStorage = 0;
                }
            }
            else {
                totalSizeOfPlayerStorage = 0;
            }
        }
        else {
            totalSizeOfPlayerStorage = 0;
        }


        var emptySpaceToRemovePlayer = totalSizeOfPlayerStorage - initialQuantityOfItemsInPlayerStorage;
        items.RemoveCargo(PlayerContainerID, "goods_emptyspace", emptySpaceToRemovePlayer);

        if (emptySpaceToRemovePlayer > 1) {
            var someData = { swtc: 0, space: emptySpaceToRemovePlayer };
            return someData;
        }
        else {
            var someData = { swtc: 1, space: emptySpaceToRemovePlayer };
            return someData;
        }
    }
}

my new function is:

Code: [Select]

function AIIsPlayerCargoFull(playerID)
{
    var value = ship.GetTotalCargoAmount(playerID); 
    var somefinalcval = ship.GetFinalCacheValue(playerID, "cargo_capacity");

    var emptyspace = somefinalcval - value;
    if (value < somefinalcval)
    {
        var someData = { swtc: 0, space: emptyspace };
        return someData;
    }
    else
    {
        var someData = { swtc: 1, space: emptyspace };
        return someData;

    }
}

But this change didn't stop the error from happening. Then i noticed this at the top of a device script:

Quote
/*
 Script can contain following functions:
 OnUpdateCache - called when device is equipped or initialized, or some values are changed
 OnStart - called when device is activated (for all)
 OnFrame - called every frame (only for "per frame" mode)
 OnFinished - called when device effect should be applied (only for "per frame" and "on complete")
 */

I am creating my own functions inside of a device script. Custom functions to accomodate the logic for a salvaging device that i developed. Could it be that the devices scripts don't allow any other types of functions that those mentioned above?

Pages: [1] 2 3 ... 16