Help needed [ADDON] Empyrion Mission Board

Discussion in 'The Hangar Bay' started by byo13, May 17, 2021.

  1. byo13

    byo13 Captain

    Joined:
    Jul 13, 2020
    Messages:
    415
    Likes Received:
    638
    Hello, guys. How is life treatin' ya?

    I'm developing a tool and an addon for Empyrion right now and I would love suggestions, contributions, feedback, constructive criticism and so forth.
    Here's the thing. The project is a Mission Board that will be available in the GIN (Galactic Information Network) as a menu option.

    upload_2021-5-16_19-27-6.png

    Inside that option we'll have 4 slots with random missions. Every slot will have a specific category like:
    Slot 1. Trading missions
    Slot 2. Farming missions
    Slot 3. Combat missions
    Slot 4. Puzzle missions

    The trading missions are already working. I'm planning an initial 24 mission pack, 6 for each category. That means that every 30 minutes the slots will show random missions for each player, meaning that each player will have his own board to browse.

    Here's the Mission Board menu:

    upload_2021-5-16_19-46-55.png

    All other slots except #1 are empty because I still haven't created missions for them. I already have 6 trading missions and since the engine is now stable I can now create other missions. That's where I need your help. But let's get to that later. :)

    To be able to accept that mission the player must be at least Level 15 and have at least a neutral reputation with the Trader's Guild.

    [ Player Statistics ] will show useful information like how many missions were completed or cancelled (for each player) or how long will it take in seconds for the mission board to refresh.

    Let's choose the first option for now.

    upload_2021-5-16_19-51-7.png

    Once you accept a mission, the slot will show as [ACTIVATED] and the mission in that slot will not change when the board gets refreshed. All other slots will. The thing is, we could have all slot missions activated at the same time. The so called "engine" already allows that.

    Unfortunately we need the PDA integration so the player doesn't get lost and doesn't need to write down information in a piece of paper (nothing wrong with that, we often used to do that in the old Lucasarts games, am I rite?). But the PDA in its current state doesn't allow more than one chapter at once. Working around that would probably be prone to error and buggy as hell.

    Here's the mission board after you accept the mission in slot #1:

    upload_2021-5-16_19-57-16.png


    See the "[ACTIVATED]" suffix there? As I said, it will lock the slot until you complete or cancel the mission.
    The PDA display now will show you the tasks you need to do in any order to complete the mission. Except the last one. You'll need to return to the GIN (the gymn? OMG I need that so bad) so you get your reward. And the GIN will actually check again if you got what it takes to finish the mission.

    upload_2021-5-16_20-0-50.png

    Once the player completes 25 missions he'll get an additional 25000 credits.
    After 50, 50k. And so on... to the infinite. :D
    Let me know if I'm making it too easier for the player to get rich. If even Bill Gates won't give a million to his sons the easy way, why should we?

    Once the player completes or cancels a missions, that given slot will be empty for 30 minutes. It was designed to have simultaneous missions. Maybe in the near future we see the PDA allowing that. Let's pray!

    If the player cancels a mission he'll get 1000 reputation points subtracted according to the contractor's faction just to teach him good. Contracts are for real.

    Right now, missions are not lore based but I'd like some help with mission creation if you think the idea is worth. The board is already working as it should. The combat missions will be a challenge though since we cannot control how many enemies we kill by dialogue or during the action. But it will be doable. If not right now, maybe someday when the PDA and mission design tools mature. @Hummel-o-War and Eleon are making wonderful progress toward this goal as I see it.

    Limitations so far:
    1. One mission at a time (I'm looking right at you, PDA).
    2. "Check Mass / Volume" must be turned off because all deals will have to be made by the inventory.

    I intend to make a tool to append the missions to PDA and dialogues without needing to deal with configuration files. Once I have all the initial 24 missions done. If you think you can contribute I'll post a template next.

    I appreciate all the help and comments. @Taelyn, @Hummel-o-War. @Kassonnade. @ravien_ff and many others that helped me through the difficult times of understanding dialogues and the PDA.
    You guys are an inspiration to many of us. I'm sure I'm not alone in this.

    Thanks a lot and I'll keep you updated.
     
    #1
    Last edited: May 17, 2021
  2. byo13

    byo13 Captain

    Joined:
    Jul 13, 2020
    Messages:
    415
    Likes Received:
    638
    If you think you can contribute to missions, please reply here.
    I have this simple template here.

    [Faction] [LevelRequired] Title (MissionType)
    OBJECTIVE:
    DESCRIPTION:
    REWARDS:
    REPUTATION:

    Something like this just so it appears in a single dialogue page:

    upload_2021-5-16_20-36-57.png

    All help appreciated. :)
    And I will credit every author.
     
    #2
    Last edited: May 17, 2021
    ravien_ff likes this.
  3. Kassonnade

    Kassonnade Rear Admiral

    Joined:
    May 13, 2017
    Messages:
    2,816
    Likes Received:
    4,111
    Looks cool. Checking PDA and dialogs a lot more on my side since a few days now... because of you !
     
    #3
    byo13 likes this.
  4. byo13

    byo13 Captain

    Joined:
    Jul 13, 2020
    Messages:
    415
    Likes Received:
    638
    @Kassonnade Haha. I'm doing the same because of your advices there.
    Oh so many workarounds. So many temptations. :D
     
    #4
    Kassonnade likes this.
  5. ravien_ff

    ravien_ff Rear Admiral

    Joined:
    Oct 22, 2017
    Messages:
    6,413
    Likes Received:
    12,015
    I have not tested this recently, but does it work if you place the items on the connected toolbar?
    If not, this could be a feature request and maybe the devs can add it. Count items on the connected toolbar if used with dialog.
     
    #5
    Sofianinho, byo13 and Kassonnade like this.
  6. byo13

    byo13 Captain

    Joined:
    Jul 13, 2020
    Messages:
    415
    Likes Received:
    638
    Indeed. I tried that before and it didn't work.
    I was trying to avoid that limitation so bad. :D
     
    #6
    ravien_ff likes this.
  7. ravien_ff

    ravien_ff Rear Admiral

    Joined:
    Oct 22, 2017
    Messages:
    6,413
    Likes Received:
    12,015
    This is a really, really cool idea, by the way! Even without the PDA integration, it will be a good addition to the game. Very creative.
     
    #7
    byo13 likes this.
  8. byo13

    byo13 Captain

    Joined:
    Jul 13, 2020
    Messages:
    415
    Likes Received:
    638
    Good news so far.
    I tested simultaneous missions and we can have multiple chapters activated in the PDA.
    The caveat is that only one chapter will be visible on screen at a time with tasks and actions.
    But once you complete the first one, the second mission will become visible and take its place.
    So the player is able to activate all 4 slots at once then return to the GIN after all or some of them are completed. I still need to see about that.

    upload_2021-5-17_2-43-8.png

    @ravien_ff Thanks for the comment. :)
     
    #8
    Last edited: May 17, 2021
  9. RexXxuS

    RexXxuS Rear Admiral

    Joined:
    Jan 31, 2016
    Messages:
    870
    Likes Received:
    1,457
    Sounds cool @byo13
    the moment we got Random(x,y), I thought about a "plug-in-play" tool/addon for eWCCT, to allow snippets that reuse stuff. One tasks less for me :D
    Looking forward to your implementation.
     
    #9
    Germanicus and ravien_ff like this.
  10. RexXxuS

    RexXxuS Rear Admiral

    Joined:
    Jan 31, 2016
    Messages:
    870
    Likes Received:
    1,457
    [UCH] [25] Head Hunter (Combat)
    OBJECTIVE: Kill 7 Zirax Commander
    DESCRIPTION: Hi, I'm a Head Hunter. No, no, no - a REAL Head Hunter! My client is a big company that hates Zirax Commander. Get rid of 7 and you get a chance for a big application.
    REWARDS: 1 Epic Assault Rifle (or whatever is legit for Vanilla)
    REPUTATION: -10000 Zrx, +5000 UCH (or whatever is legit for Vanilla)
     
    #10
  11. Myrmidon

    Myrmidon Rear Admiral

    Joined:
    Mar 26, 2016
    Messages:
    1,729
    Likes Received:
    2,058
    I have a question. Can we place GIN on CVs? If yes, even by altering ecf files, it can be used on CVs for missions. I did a small search but found nothing, or maybe I did not search in a proper way.
     
    #11
    byo13 likes this.
  12. RexXxuS

    RexXxuS Rear Admiral

    Joined:
    Jan 31, 2016
    Messages:
    870
    Likes Received:
    1,457
    On player owned or Patrol vessels (POI)?
     
    #12
    byo13 and Germanicus like this.
  13. Myrmidon

    Myrmidon Rear Admiral

    Joined:
    Mar 26, 2016
    Messages:
    1,729
    Likes Received:
    2,058
    Player's of course, for fast access.
     
    #13
  14. ravien_ff

    ravien_ff Rear Admiral

    Joined:
    Oct 22, 2017
    Messages:
    6,413
    Likes Received:
    12,015
    No you can't add dialog to player structures.
     
    #14
    byo13 likes this.
  15. Myrmidon

    Myrmidon Rear Admiral

    Joined:
    Mar 26, 2016
    Messages:
    1,729
    Likes Received:
    2,058
    Understood. Maybe we should ask this to change. If it is not already in the developer's to do list.

    Update: typo "as" to "ask"
     
    #15
    Last edited: May 17, 2021
    byo13 likes this.
  16. ravien_ff

    ravien_ff Rear Admiral

    Joined:
    Oct 22, 2017
    Messages:
    6,413
    Likes Received:
    12,015
    It would be broken unless it was preset fixed dialog.
     
    #16
    byo13 likes this.
  17. byo13

    byo13 Captain

    Joined:
    Jul 13, 2020
    Messages:
    415
    Likes Received:
    638
    I'm just adding that one, @RexXxuS. Thank you.

    I have a function declared inside the root dialogue.

    Code:
    Functions: "int getRandomMission(int slot, int min, int max) { int chosen; do { chosen = Random(min, max); if (missionSlot1 == chosen || missionSlot2 == chosen || missionSlot3 == chosen || missionSlot4 == chosen) chosen = 0; } while (chosen == 0); return chosen; }"
    I'm still trying to understand why I can't have multiple functions working and calling one another.
    The error messages are as cryptic as this:

     
    #17
    RexXxuS likes this.
  18. RexXxuS

    RexXxuS Rear Admiral

    Joined:
    Jan 31, 2016
    Messages:
    870
    Likes Received:
    1,457
    In the code you provided I only see one function (getRandomMission()).
    Calling functions inside each other should work (does for me at least).
     
    #18
    Germanicus and byo13 like this.
  19. byo13

    byo13 Captain

    Joined:
    Jul 13, 2020
    Messages:
    415
    Likes Received:
    638
    It was an example actually.
    I was trying to declare two functions inside the same block like this:

    Code:
    Functions: "int getSlotMission(int slot) { int mission = 0; switch (slot) { case 1: mission = missionSlot1; break; case 2: mission = missionSlot2; break; case 3: mission = missionSlot3; break; case 4: mission = missionSlot4; break; } return mission; }; int getRandomMission(int slot, int min, int max) { int chosen; do { chosen = Random(min, max); if (getSlotMission(slot) == chosen) chosen = 0; } while (chosen == 0); return chosen; };"
    This won't work for me although it's syntactically correct.
    The error below will be shown:

    But I managed to make it work by splitting them into separate Function blocks, one in the root dialogue and another in the next dialogue.
    There must be some limitation to using function dependency in the same block of code, I'm guessing.

    [EDIT] I see what it was now. We cannot add a ";" between functions. I don't know if it's related to function declaration in C#/Mono or not but if I leave a space between function declarations, now everything works, even with both functions declared in the same block of code. Which is great since I'm not a fan of weird limitations and cryptic error messages. :D
     
    #19
    Last edited: May 17, 2021
    Germanicus and RexXxuS like this.
  20. RexXxuS

    RexXxuS Rear Admiral

    Joined:
    Jan 31, 2016
    Messages:
    870
    Likes Received:
    1,457
    Nice.
    Was about to say that this is what I would have naturally put in :D
    (maybe I add a regex that strips it automatically away)
    upload_2021-5-17_17-23-29.png
     
    #20
    byo13 and Germanicus like this.

Share This Page