Modding Help Problem with my wired teleporter

Discussion in 'Starbound Modding' started by swefpifh, Nov 15, 2019.

  1. swefpifh

    swefpifh Void-Bound Voyager

    Hello,
    i have a problem with my mod Stargate. On 1.3 it works, but with the last 1.4 update, my wired teleporters don't works now. I have checked files many hours and nothing, i don't see an error for solve this problem.

    If a good soul want help me, i'll be really grateful because I'm going crazy ^^

    I can't upload the files on the topic, i share with a link : https://mega.nz/#!nVVggIwY!3JxsEDgOSSJV1VpNojap_lKuhWWRj5NRIAfkc0jfa7M

    Thx you very much for your help :)
     
  2. Zaakari

    Zaakari Zero Gravity Genie

    Hey, sorry for the wait.

    It turns out the issue was small (though vague).
    In the script "/scripts/playerteleport.lua" that you were patching into the "player.config" file, you had declared an "init" function.
    As far as I can tell, there can only be one 'init" function for the player. And it is contained within the asset "/stats/player_primary.lua".

    From what the way your new "init" function was coded, it looked like you were trying to overwrite the vanilla "init" function; but I guess that isn't possible (Starbound was "complaining" in my log file).
    It looked like all you were trying to do was add a message handler to the player, so I just copied the whole "player_primary.lua" file, added it to your mod, and modified the "init" function to include the new message handler.
    I then removed the "init" function from your "playerteleport.lua" file. And now it seems to work properly.

    I attached the repaired version of your mod to this post, so you can have a look at it if you want to.

    Note: I also commented out a script addition in your "player.config.patch" file, as it wasn't included the files you uploaded (so you might want to uncomment that line).

    P.S.
    The teleporter is really cool, by the way. I hope to see it in a mod one day:nuruwink:
     

    Attached Files:

  3. swefpifh

    swefpifh Void-Bound Voyager

    Hi,
    It was already part of my stargate mod. I had deactivated it because the problem caused the unlimited energy/health.

    The source files is not mine, but it is open and royalty free. You can use it to your mod by modifying the picture animated of my transport rings. ^^

    BIG thank you for your help, I will test that. :)
     
    Last edited: Nov 19, 2019

Share This Page