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 ... 6
1
This looks quite cool actually, but I imagine it doesn't really add anything to the game, or does it? :)
But either way, awesome!

Thank you Lurler  ;D

No, it doesn't change the gameplay and it probably never will.

BUT, I am onto something there, that might be a way to change the appearance of the background if the background's color is constant in ARGB. I did some tests with a constant background color, but unfortunately for the moment, the performance is not high enough and my processor cannot handle dealing with  8 294 400  bytes every frames (which is 1920p multiplied by 1080p multiplied by 4 because every pixel in the screen is 4 bytes), in fact, it could only deal with 1/4 of the screen pixels and NOT every frames and so it was useless and ugly to look at for the moment. Basically, I can loop through the bytes array that contain the image to find the bytes that correspond to the "Constant Color" and then change the colors programatically. My goal was to make the color with an alpha value of 0 (i think 0 is for transparent) so that I can add a 3d background. I will need to work more on this though, as I can't promise it will ever work.

Void Expanse already has a 3d background and although we can see the effects, it still remains a 2d image that we look at. But If I make the background invisible in Virtual Reality, I can put ANYTHING at ANY depth behind the Virtual Screen that won't Interact with the game Itself. It would just make the game very beautiful to Watch in Virtual reality with a "real" 3d background.

Also, I "might" just be able to fiddle a little bit with a "mesh" and change the depth of the vertices of the mesh to match "ships" and "stations" in the game. BUT that, I didn't try it yet because I am working this week and I am K.O. when I arrive home  ;)

2
Help section / Re: Void Expanse Tutorials right in here!
« on: Yesterday at 05:04:16 pm »
TUTORIAL 1.5 FILES

Here is the link to the files of the tutorial 1.5. Sorry, I didn't have time yesterday when I came back from work, I basically ate and went right to sleep. You can compare what you did wrong by seeing how I wrote the script.

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

Your line of code here doesn't seem to be wrong. My explanation wasn't really precise enough last time.

Code: [Select]
id = generator.AddNPCShipToSystem("Jonas Temple", "JonasTemple", 1, "special_jonas_temple", sys_id, chosenBase.coord.x, chosenBase.coord.y, { class: "agent", unique_id: "jonastemple", meta: "human", sex: "male" }); // Jonas Temple
Now you need to go Inside the generic_quests folder and open up your quest .js file. Inside of that file, you should have this function here:

Code: [Select]
function OnCheckRequirements()
{
    var npc_id = topic.GetCurrentNpcShipId();

    if (npc.GetTag(npc_id, "class") == "TUTORIALNPC")
    {
        return true;
    }
    return false;
}

As you can see, if you read between the lines it says: if the NPC Class is TUTORIALNPC, then "activate" this quest script for this NPC. So basically, if we use your code, the OnCheckRequirements that you should use should be:

Code: [Select]
function OnCheckRequirements()
{
    var npc_id = topic.GetCurrentNpcShipId();

    if (npc.GetTag(npc_id, "class") == "agent")
    {
        return true;
    }
    return false;
}

and that's because your NPC class is "agent". But if you use multiple NPC's with the class "agent", then all of those NPC's are gonna have this quest script available when you talk to them.

3
Help section / Re: Void Expanse Tutorials right in here!
« on: July 16, 2018, 07:21:18 am »
Thank you again ninekorn! Just a specific question:

The value "TUTORIALNPC", where is that pointing? Is it the ID of the NPC (the name of the xml file) from the previous part of the tutorial? I changed that while "copying" your method, so should I then change it to the ID of my NPC ("special_jonas_temple")?

Yes Wilmore. In the npcgenerator.js script, exactly where we created the npc in the tutorial, you have to use the class IF you specify to check for the class in the function ''OnCheckRequirements''!

4
Here's the Google Drive link to a video of the project! It took me 1 month and a half to code a lot of stuff Inside of the program. I am using the AB4D DXEngine Oculus Wrap and the Ab4D Oculus sample and the SharpDX libraries! The video is 500mb long approx 26min. Sorry for the bad language in the video if there is any.

Enjoy watching.

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

ninekorn

5
Help section / Re: Void Expanse Tutorials right in here!
« on: July 15, 2018, 04:05:51 pm »
TUTORIAL 1.5

Eh well... I am a bit late. It's already Sunday night. I've been working on that Virtual Reality Desktop that has customizable Oculus Touch buttons just for Void Expanse. I was able to make a Oculus Touch stabilizer for when you aim at the Virtual screen, otherwise the shakyness is terrible and you can't even double click anything... Also, I had to code a way for the program to change controls when Void Expanse is the Foreground application on the computer.

Anyway, so the tutorial part 1.5 comes with only a script (part 2 will be a video explaining the script and also making it even better because I didn't have enough time this weekend). The script is based on the Original tutorials of the Atomic Torch team for Void Expanse where you speak to an NPC and an NPC gives you a quest. In that script you will find also the way that I am coding my NPC's that have dialogue. I add a menu for "going back to the last options" and also a menu to "quit the dialogue" even though a "Goodbye" button already exists for that. I just think it is more "User Friendly" to follow what is written there on the screen and click where the NPC tells you to click.

Steps to make this work:

1. If you still have the tutorial files from part 1, use them. Otherwise, this won't work.
2. Go Inside your mod folder, then the data folder, and then create a Folder named topics.
3. Inside of that folder, create a folder named "generic_quests".
4. Inside of that folder, create a Notepad file with your right mouse button and name the file "tutorial_quest.js".
In order to do that, you also need to change the extension to .js, so if you can't see the extension of your     notepad, go in your folder "view" options at the top and then click the option "file name extension" (on Windows 10). Otherwise, you can Google "how to see file extension Windows XP-Vista-7-8" and you will find tons of articles to help you out.
5. in that same folder, create a file named "tutorial_quest.xml".
6. Remove what is Inside of the xml file if there is anything and paste the following code Inside of the XML file and then save it and close it:


Code: [Select]
<?xml version="1.0" encoding="utf-8"?>

<root>
<header>
<id>tutorial_quest</id>
<title>tutorial quest</title>
<enabled>1</enabled>
</header>

<data>
<category>quests</category>

<variables>
<var>quest_system_id</var>
<var>quest_base_id</var>
</variables>

<flags>
<flag>add_on_init</flag>
</flags>

<singleplayer>1</singleplayer>
<multiplayer>1</multiplayer>

</data>

</root>


7. Then open the created "tutorial_quest.js" file and if there is anything in there, remove it, and copy and paste the following code and then save it and close it:

Code: [Select]
using(generator);
using(items);
using(npc);
using(console);
using(ship);
using(player);
using(storage);
using(game);

function OnCheckRequirements()
{
    var npc_id = topic.GetCurrentNpcShipId();

    if (npc.GetTag(npc_id, "class") == "TUTORIALNPC")
    {
        return true;
    }
    return false;
}

var quest_system_id = 0;
var quest_base_id = 0;

function OnDialogue(args)
{
    var input = topic.GetInput();
    var state = topic.GetState();

    var npc_id = topic.GetCurrentNpcShipId();

    if (state == 0)
    {
        if (input == NO_INPUT)
        {
            topic.AddPhrase("Hello there!");
            topic.AddChoice(1, "I want to make money");
            topic.AddChoice(5, "End dialogue");
        }
   
        else if (input == 1) {
            topic.AddPhrase("So, you want to make money huh?");
            topic.AddChoice(2, "Do you want a quest?");
            topic.AddChoice(5, "End dialogue");
            topic.AddChoice(NO_INPUT,"Go back to the previous page");
        }

        else if (input == 2)
        {
            topic.AddPhrase("So? What is your choice?");
            topic.AddChoice(3, "Yes!");
            topic.AddChoice(5, "No!");
        }
         
        else if (input == 3)
        {
            topic.AddPhrase("If you want to mine minerals click on the following dialog option! This is going to give you a quest.");
            topic.AddChoice(4, "Tutorial Quest here! This is a mining tutorial quest where you need to buy 50 Glepsite Ores and come back with it so that I can give you rewards.");
            topic.AddChoice(2, "Go back to the previous page");
            topic.AddChoice(5, "If you are not interested for the moment, you can come back later. Click here to have the option to close the dialogue.");
        }

        else if (input == 4)
        {
            topic.AddPhrase("Great! That's good news! Finally, someone who wants to mine minerals. Good luck!");

            var ship_id = topic.GetCurrentNpcShipId();
            var sys_id = ship.GetSystemID(ship_id);

            quest_system_id = sys_id;
            quest_base_id = ship.GetCurrentBase(ship_id);

            topic.QuestStart("tutorial_mining_quest", "go mine for rewards");
            topic.QuestAddMark("tutorial_mining_quest", quest_system_id);
            topic.QuestAddLocalMarkObject("tutorial_mining_quest", quest_system_id, quest_base_id);
            topic.QuestAddLog("tutorial_mining_quest", "Go get a mining device and mine 50 Glepsite and go back to tutorialNPC");
            topic.SetState(100);
            topic.RefreshTopics();
        }

        else if (input == 5)
        {
            topic.AddPhrase("See you next time!");
            topic.AddChoice(6, "Click here to leave the dialogue!");
        }

        else if (input == 6)
        {
            topic.DialogueBreak();
        }
    }

    else if (state == 100)
    {     
        if (input == NO_INPUT)
        {
            topic.AddChoice(1, "How do I mine asteroids?");
            topic.AddChoice(2, "If you got the minerals, click here!");
            topic.AddChoice(3, "End dialogue");
        }
        else if (input == 1)
        {
            topic.AddPhrase("Get a civilian mining device and then when you undock from the station, find the brown/orange dots on your map and come back to me when you have a least 50 Glepsite ore. ");
            topic.AddChoice(NO_INPUT, "Go back to the previous page");
            topic.AddChoice(3, "End dialogue");
        }
        else if (input == 2)
        {
            var hasCargo = ship.HasCargoAmount(PLAYER_SHIP, "ore_glepsite", 50);

            if (hasCargo)
            {
                topic.AddPhrase("Good job! And thank you for the minerals! Here's your reward.");

                ship.RemoveCargoByType(PLAYER_SHIP, "ore_glepsite", 50);
                ship.AddItem(PLAYER_SHIP, "consumable_structure", 5);

                topic.QuestAddLog("tutorial_mining_quest", "test");
                topic.QuestSetState("tutorial_mining_quest", QuestState.Finished);
                player.AddQuestRewardExperience(PLAYER, 500);

                topic.SetState(200);
                topic.RefreshTopics();
            }
            else
            {
                topic.AddPhrase("You don't even have the minerals?! I am a busy man. Come back when you have them and don't disturb me again for no reasons.");
                topic.AddChoice(NO_INPUT, "Go back to the previous page");
                topic.AddChoice(3, "End dialogue");
            }
        }
        else if (input == 3)
        {
            topic.AddPhrase("See you next time!");
            topic.AddChoice(4, "Click here to leave the dialogue!");
        }

        else if (input == 4) {
            topic.DialogueBreak();
        }       
    }

    else if (state == 200)
    {
        if (input == NO_INPUT)
        {
            topic.AddPhrase("Hello there!");
            topic.AddPhrase("I don't need any more minerals!");
            topic.AddChoice(1, "End dialogue");
        }
        else if (input == 1)
        {
            topic.AddPhrase("See you next time!");
            topic.AddChoice(2, "Click here to leave the dialogue!");
        }

        else if (input == 2)
        {
            topic.DialogueBreak();
        }
    }
}



8. If you've done this right, you should have the same NPC from tutorial 1 that will give you a quest to go mine 50 Glepsite Ore minerals and he will reward you when you come back with a cargo of those minerals. But he will only reward you IF you choose to finish the quest, otherwise, you can still have a dialogue with him for other stuff that you can add in the future.

9. Tutorial 2 will cover this whole part but as I said, the Virtual Desktop Application pretty much shrunk my whole weekend's free time to make tutorials and so I couldn't make a video right now, but for the community and you Willmore, I really at least wanted to share an easy script for having an NPC give a quest before the next Video tutorial.

6
Help section / Re: Void Expanse Tutorials right in here!
« on: July 13, 2018, 09:40:15 am »
Hi!
There is a very high probability that I will work on a second tutorial tomorrow amongst releasing my pre-Beta Virtual Desktop (Oculus Rift only) for Void Expanse! ;)

7
Help section / Re: Void Expanse Tutorials right in here!
« on: July 10, 2018, 04:01:39 am »
It was my pleasure Wilmore! I am using this specific NPC generation example in the tutorial myself in my mods. I might change that in the future but I didn't intend to use anyone else's mod's for my mods.

I only checked the Pariah's Bane expansion scripts when I was searching for special functions with Notepad++ but never read the scripts fully. I will probably do a supplement tutorial on how to use that and where to put the variables after I study the Pariah's Bane Expansion scripts!

8
Mods / Re: Drone Mod for VoidExpanse!
« on: July 08, 2018, 05:12:04 am »
I am working on a VR DesktopScreen program for the game Void Expanse prioritarily so the mod has been pushed back. But it's still my goal to finish it.

9
Mods / Re: Drone/Follower mod // in-progress
« on: July 08, 2018, 05:11:47 am »
I am working on a VR DesktopScreen program for the game Void Expanse prioritarily so the mod has been pushed back. But it's still my goal to finish it.

10
Help section / Re: Void Expanse Tutorials right in here!
« on: July 07, 2018, 01:55:05 pm »
It's not complete though. You're gonna have to give me a little bit more time to get everything else that you asked for covered. Maybe I'll do a second part tomorrow or monday or next weekend!  ;)

11
Help section / Void Expanse Tutorials right in here!
« on: July 07, 2018, 12:18:21 pm »
FIRST TUTORIAL

Ok. The first tutorial is done. It's a bit long but it might help Modders of the Void Expanse community to setup their first custom Mod.

The first Tutorial is about setting up files and loading the Void Expanse server and also creating your first NPC Inside of the station from modifying the original script. Also you will learn how to create your first XML files for the game and where to put them for your first NPC.

The sound is a bit bad and video transitions weren't done correctly. But here it is:

https://www.youtube.com/watch?v=c-qHWtr8Om0

You can also download the project files from Google Drive in the comments below the video.

Other recommended references:
http://wiki.atomictorch.com/VoidExpanse/modding
http://wiki.atomictorch.com/VoidExpanse/scripting_api


12
Hey!

Some xml files have this:

Code: [Select]
<variables>
<var>some_variable</var>
</variables>

can we set them directly from inside the xml file for instance:

Code: [Select]
<variables>
<var>some_variable = 10</var>
</variables>


I am trying to avoid using Global Storage Variables for the market mod and having something like this below would really help.

Code: [Select]
<variables>
<var>price = 159</var>
</variables>



13
Help section / what is topic.EnableMonospaced(true)?
« on: May 18, 2018, 09:33:51 pm »
Hey!

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?

nine

14
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
nine

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.

15
Hey!

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?
nine

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









Pages: [1] 2 3 ... 6