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 ... 9 10 [11] 12 13 ... 15
Help section / what is topic.EnableMonospaced(true)?
« on: May 18, 2018, 09:33:51 pm »

I am trying to finish the market mod for release before the end of this month. As I had thought, the market mod was nearly completed months ago but beeing a little bit "egocentric" thinking about doing all my mods before releasing anything was just a bad idea... For the community, I will release them one by one if I can, starting with the Galaxy Market.

Before I stopped working on that mod like 7 months ago or something, I am not sure if the game was blocking me or not from the player buying items when he doesn't have enough money. I obviously now noticed the Console debugging me that "money that the player doesn't have is trying to be removed " -_-, but the items are still beeing transfered in the players storage. So it's one of the last things that needs fixing for the "buy" section of the market and I am working on it right now.

But looking at my script, I noticed I just copied the line topic.EnableMonospaced(true) without even knowing what it does. I didn't find any info in the scripting section of Void Expanse Wiki about this.

Anyone knows what it is?


Awesome! Thanks for the clarification ai_enabled!

I now understand... And for the record, there is no such thing as a "maximum number of else if statements" in ECMA script 5 (It was quite dumb to even mention that lol). I just didn't have any other clues why it wasn't working.  ::)

I'm gonna work again on the drone AI Mining/formation AI tonight hoping It will move forward... Lol I think I lost 3 nights in a row just thinking it was global variables of my custom Libraries that were causing the issues... Anyway, I prefer my current version of the Drone AI since it doesn't even lag at spawn even if it's already 1800 lines long. It's starting to get exciting ;) I just can't wait to have a full drone formation that I can send to mine and I am almost there.

thank you

EDIT: Wow... yeah, both patrol.js and trader.js have super easy to understand objectives setuped... I can't believe I missed this the first time around.


This post is old but I still need some clarifications... So I have 6 scripts that were for the drone AI... 5 of those were libraries. I thought this became an issue since 2 drones seemed to be sharing the same variables... I thought, here we again with the script instances stuff... So I decided to combine the 5 scripts together (except the direction calculations which remains a library).

The AI script that is used by the drone or created at the same time as the drone with generator.addnpcshiptosystem is supposed to be a different "instance" from drone to drone right? So that script contains all functions now and shouldn't those functions be independant from npc to npc?

But my drones still share variables. I don't get it. Aren't they supposed to be different instances?

The main "update" function of the npc "AI" is "function Decision(args)".  I've decided to go crazy and put all I needed inside of there but still it's not working...

So I've found the main culprit. I use an "integer" to go from functions to functions. Example:

Code: [Select]
if(switchFunction == 0)
  //fetch list of asteroids
else if(switchFunction == 1)
    //check inventory if full or not
else if(switchFunction == 2)
   //Does asteroid still exist and if it does, MOVE to asteroid. check for distance... if distance is reached, switchFunction = 3.
else if(switchFunction == 3)
   //start mining

I don't understand why this really really tiny piece of code is not working... The moment that one drone is within the distance of the asteroid, the second drone that is NOT even near the asteroid stops and starts mining too?! I'm just baffled, we are talking about completely individual instances of scripts here... two drones with their own AI.

Are there limitations in ECMA Script 5 to the number of "else if" statements that can be used in a row?

Anyway... I've done the test "without" that type of "function switches" and my drones are acting normally... I just can't pinpoint why two different instances are somehow "linked"...

Any thoughts on this?

EDIT: The reason I use those "switches" is to avoid "fetching the asteroid list at every frame" or "checking if inventory is full at every frame" (my mining "lasers" take 40 frames approx to mine something and so for 40 frames I am free to "disable" the inventory check) etc.... I don't wanna overload the script or make functions run that don't need to run hence why I use those "switches".

Bug reports / Re: Some bugs/issues Reports!
« on: March 11, 2018, 06:22:41 pm »
Cool! I might play again by the end of the week like next friday or saturday with my brother if he still wants to. The game is fun!

Bug reports / Re: Some bugs/issues Reports!
« on: March 10, 2018, 10:56:51 am »
Hi, the following images are screenshots of In-Game bugs/issues that we've found while playing.

1. Here the fireplace is showing in front of the player. Something with the layer system.

1. At the corner of Sand and Water, the "sand sprites" are "stepping" over the water. They are too large or maybe they just shouldn't be spawned in corners.

1. Same example as the one before but just showing that the sand is stepping over the water in a different view.

Bug reports / Some bugs/issues Reports!
« on: March 09, 2018, 11:40:43 pm »

News and Updates / Re: VoidExpanse - Patch notes v2.1.x
« on: March 06, 2018, 10:42:31 am »
Thank you for this update!

Ok about the energy and fuel. I'm gonna have to start looking in the CalculateShip.js to fiddle around with the "Too High" fuel consumption of the ship. I've already been able to stabilize the fuel consumption. So right now it stays at 100% almost all the time. I'll fiddle some more inside the script to get to understand where the functions are.

Here's a better view of the message. It has started 3 servers ago and now it won't stop.

There is a message in the console that is beeing displayed ever since I've created my test server today. It's never happened as much as it was doing so today. The message says
"[ERR] Ship not found: 0"
I think in the past, AI_enabled fixed one debug message like that but it was for Asteroids, if I remember correctly.
How does the fuel work in VoidExpanse?
Somehow, it feels like both the energy consumption and fuel consumption are linked together? I'm not sure if I'm wrong there.

Help section / Re: Is there a IMCache.GetValue and IMCache.SetValue?
« on: February 04, 2018, 10:35:57 pm »
yes I did. I put include(IMCache.js); right there at the top of the script!  ;D

did I miss anything?


The channel is free. I am not there to show that I am good at scripting nor to make money... I don't think I am that good. In fact I believe I have a LOT left to learn. But I made a mistake starting those mods. And that was to "disregard" the "haste" that is pretty much required for keeping an audience interested... I am talking about the community of course. It's been 6 months that I've release a video of my Galaxy Market in Void Expanse and 3 months later I had received 2 responses of the community on youtube here . Also someone was interested in my drones mod here and I didn't respond. I have been working hours upon hours trying to make the best thing possible but I've just hit a wall of reality this weekend. I mean, I wasn't focusing on the right project, my idea was wrong from the start for the Drone Formation. I mean it's still a good idea that I will "convert" for other projects but it wasn't going to be effective for Drone Formations. And so this weekend I've decided to "burn" my whole Drone Formation project V1 and start with V2. It took me 1 day to create V2 and 3-4 months to make V1. So my whole project was taking too long. The tiny pathfind got me distracted. And the function StickToPoint wasn't giving me the perfect position at the right of the player and that's why I wasn't using it. In fact, I was using my own trigonometry functions to get the formation points. I am now using StickToPoint to make the drone Formations work and I will just offset the points a little bit to increase the number of formation points near the player. I am now starting V2 with StickToPoint and the V2 project is already way more advanced than V1. This is a good sign. Here's approx my current goals and a LOT of those functions already work, if not ALL OF them:

In the Drone Formation V1: worked 30 days just on the pathfind and the rest took 3-4 months
1. All different behaviors of the drones were separated and weren't even working together yet.
2. I worked 1 whole month for the AI Simple Pathfind and was able to make it work but it was completely USELESS for the project for what I wanted to use it for. The work on it is done
    though and so I will reuse it later anyway.
3. In that month, I was also able to put the drone in formation by following the best path it found from the pathfind it generated. The path was extra small and very effective. But as I
    said I was using this whole stuff the wrong way.
4. I had made a basic "Drone Go Mine" script that was working and don't remember where I put it in 2.5 terabyte of folders and projects and backups and whatnot....
5. I had made a basic "Drone Evade Projectiles" script that was working and don't remember where I put it in 2.5 terabyte of folders and projects and backups and whatnot....

In the Drone Formation V2: worked 1 day on it and it's already better than V1

      1.1 - AI Pick Formation:
         1.1.1 - The drone can follow the player. (coded)
         1.1.1 - If the drone is too far from the player it will go back to the player.
         1.1.2 - If the drone is getting in range of the player, it will get in formation.
         1.1.3 - If the drone is In formation but is ordered to go mine or attack, it will do so. (but V2 had a bug here where you could only send it mine once, after that it bugged)
         1.1.4 - If the drone is in formation but the player is "docking", it will dock with the player.
         1.1.5 - If the drone is in formation but the player is entering a jumpgate, the drone will jump with the player. (I might switch that later so if the drones are too far from the player
                    to remove their jumping capabilities)

      1.2 - AI Go Mine.
         1.2.1 - If the drone is commanded to go mining, it will go mine.
         1.2.2 - When the drone is mining, it gets a 2 seconds delay for each mining laser activation. For the moment, each mining laser activation gives them a minimum of 10 "Glepsite".
                    To be modified later.
         1.2.3 - Each 2 seconds, the mining laser yield is full and so the drone deposits the minerals in it's own cargo. Once it's own cargo is full, it will move towards the player and dropoff
                    it's own cargo unless the player's inventory is full.
         1.2.4 - If the player's cargo is full, the drone will not "try" to empty it's mining laser "yield" on the player. It will just stop mining once it's inventory is full and then go back to
                    formation instead of mining again.
         1.2.5 - If the player's cargo is NOT full, it will stop mining, and move towards the player until it hits a certain distance from the player to where it would stop.
         1.2.6 - Once the drone is stopped near the player, it will droppoff it's materials and then BAM it returns mine...
         1.2.7 - As long as there is space in the players cargo and an asteroid to find in the system, the drone will keep mining.
         1.2.8 - The drone is stopping it's mining operation if the player is too far, and if that happens, the drone returns near the player in Formation, instead of going back to mine.

      1.3 - AI Go Pick Containers.
         1.3.1 - to fill soon.

     1.4 - AI Go Combat.
         1.4.1 - to fill soon.

I will be trying to code all nights from 09h00pm to 01h00am every night of the week and more in the weekends. I might also in the weekends. I have a job during the afternoon and so I can't work there for the moment. At some point, I might switch from night to morning.

If you people have any ideas as to how I could "better" my mods please feel free to contact me. You can also come in the TwitchTV channel and just give me a flurry of "swears" or a flurry of "you suck buddy" and that's gonna make my day!  ;D

Anyhow, it's free, and it's for Void Expanse's Community!

Help section / Is there a IMCache.GetValue and IMCache.SetValue?
« on: February 03, 2018, 06:13:03 am »

In the CaculateShip.js there is a bunch of IMCache.AddValue like:

Code: [Select]
IMCache.AddValue("maneuvering_value", 1 + lerp * 0.1);
Can we also access and modify those values IN-Game with the .js scripts?  I am trying to get more control over the drones NPC basic "settings". I've tried

Code: [Select]

var allEffects = ship.GetAllEffects();
var defaults = ship.GetDefaultEffects();
var invCache = ship.GetEquipmentCache(SHIP_ID);
var skillCache = ship.GetSkillsCache(SHIP_ID);
var buffsCache = ship.GetBuffsCache(SHIP_ID);

But only the ship.GetAllEffects() works... As in it doesn't debug an empty array. When I tried to debug the others, I get "undefined". So modifying the equipment values or skill values IN-Game doesn't seem to work for me right now. Even states that we can use SetEquipmentValue like:

Code: [Select]
ship.SetEquipmentCacheValue(SHIP_ID, "maneuvering_value", 10);
var invCache = ship.GetEquipmentCache(SHIP_ID);

But even that debugs me "undefined" so I am not sure what else to try. There doesn't seem to be a template as to how to get access to those values anywhere on the web and the wiki page.  I've searched all the other Big Mods contents with Notepad++ and no other Modders used those settings in their scripts either.

Thanks in advance for the help!

    I'd love to say that I am nearing my personal deadline to release my full mod of the game. But that would also be the first game I mod and I don't have any specific deadline. The only thing I've got are goals, as in, multiple different mods that I need to finish individually and when put together, they will make something awesome. As long as I can keep working on them, I know that I will finish them. I just don't know when. Just coding the formation stuff is awefully long, because it's the first time that I code that stuff with 1 year and 9 months of coding experience overall. But the more I code, the better I become. That's what's nice about coding, as long that we have the memory to handle what we've coded in the past, nothing is ever lost.

    Some people might say that I've planified too much for Void Expanse and it could take forever to finish all those projects but the thing is I understand javascript and c#. So as long as you guys support Void Expanse, I will keep working on those mods and as a main goal, to release the full package.

    And if someday you stop supporting Void Expanse, I will just convert what I've learnt coding Javascript for Void Expanse to c# because I know that I can do it. Hopefully, you won't have plans to stop supporting Void Expanse anytime soon. As I said once to AI_enabled, Void Expanse is just a sleeper.

    Once you guys are finally having a breather from Cryofall, I will have some requests for new API functions. Easy ones. Stuff like:

    • ship.GetForwardDirection (outputs Vector2 x and y) I could get the other directions just by switching the x and y components myself. This function will increase the potency of the drone formation. because right now I am using 2 frames to capture the direction by putting the first frame coordinates and second frame coordinates in variables... The problem is when the ship doesn't move... bam, i've got no direction except the last direction that is saved in a variable.
    • ship.GetSpeed (outputs true Void Expanse speed of the ships)
    • ship.GetCurrentRotation
    would output in radians or degrees.
    • ship.IsShipStrafingLeft and ship.IsShipStrafingRight
    would output a boolean. this will make me able to code a "mimic" function for the drones to completely "mirror" the player's movements when they get into formation. I would just need the current "real ship speed" and true "ship.GetForwardDirection" to perfectly match the player's movement, but it would be more fun if the drones strafe when the player strafes.
    • ship.IsPlayerFrontLeaping
    that's when the player is pressing the key "W" twice and the player blinks/leaps to the front. which leads to the next obvious API function.
    • ship.LeapFront

    So when you've got that tiny breather please give me a shout in private, you or AI_enabled. Until then, I will behave and won't ask for new API functions. I'm just gonna keep working with what I have  ;D

EDIT: lol i reread myself and thought that my post was rude. Sorry about that. Anyway, the moment I played the game, i just fell in love with it. Hopefully when I release the mods, it will get attention from some people, just a couple people that create servers with my mods will make me happy. I just cant wait to finish everything I have planned and release it. ;)

hmm. Ok. That's exactly the issue I had with the drone market then, until i fixed it by just fractionning the market mod in like 30 scripts instead of just 1 script. I'm gonna try stuff to see if it's gonna fix it. What I'm not sure to understand then is why the drone mod scripts would lag when there is only 8 scripts for the moment and those 8 are just for the formation behavior. 2 out of those have almost no code inside of them.

-_- lol and I was so proud to have found an alternative. awww man. It wasn't even this causing my lag issue anyway. It's a tiny lag spike just when the AI's pathfind activates the first time and then it doesn't lag at all. I've kept a backup of the whole sqrt script but it was actually 6 Math.sqrt per 20 decisions per second per drones. It wasn't activating all sqrt per decisions, but maybe half so 10 * 6 = 60 Math.sqrt calls per drones per second. Maybe it's my "sort" function or "contains" function. I'm gonna test some more before I head into the drone "control drift" stuff.

Thanks AI

Pages: 1 ... 9 10 [11] 12 13 ... 15