Author Topic: [MOD] Weapon Engineering (Turret Editor)  (Read 33098 times)

Shrooblord

  • Hero Member
  • *****
  • Status:
    Offline
    Posts:
    582
    • View Profile
on: January 05, 2019, 12:56:15 AM
If it's simply making the mod compliant with the 0.20.2 security update, all that needs to happen is adding callable() function calls to the appropriate functions.

Search the scripts included in this mod for the word "invoke". You should get hits that include either invokeClientFunction(), invokeServerFunction(), or both.

Then you look inside the brackets for that invoke function. For example, say you find the function call invokeServerFunction("updateTooltip"). The word enclosed in the parentheses is updateTooltip, so we're going to have to find the function called updateTooltip() in that same script.

Once you find updateTooltip(), scroll down to where its end statement is. Put the following code after that end:

Code: [Select]
callable(NAMESPACE, "updateTooltip")
where NAMESPACE is the script's namespace. In our example, the code shows:

Code: [Select]
function AncientGate.updateTooltip(ready)
in which case, the namespace is AncientGate. If the script has no namespace, your job will be a little bit harder, and I suggest you either ask for help again or try and namespace the script yourself.

Finally, add the following code at the top of the script, near the other require statements (or just place it near the top of the code if the code has no requires):

Code: [Select]
require ("callable")
-----

In summary, your changes will alter the code in the following manner:

Code: [Select]
require ("callable")

...

function NAMESPACE.x()
  invokeServerFunction("y")
end

function NAMESPACE.y()
  ...
end
callable(NAMESPACE, "y")

Good luck! There's honestly not a lot you could break performing these updates. If you get it working, do post the fruit of your labours here -- it helps the community a lot!
« Last Edit: January 05, 2019, 01:00:09 AM by Shrooblord »
Shrooblord



Daemonic

  • Newbie
  • *
  • Status:
    Offline
    Posts:
    9
    • View Profile
on: January 05, 2019, 04:52:51 AM
Thanks for the advise. Ive had a bit of a play around trying to add in the stuff you said, but no luck so far. Ill tinker a little more over the next day or two and keep you all posted.

Before any changes, the mod menu itself can be accessed in 20.2, but you are unable to see any turrets in your inventory, and all the stat boxes show up as NIL.
In my experiments, i managed to stop the mod from showing up at all, and in my second attempt it appeared to be no change to the default state that it loads in.

This is literally the first time ive ever touched LUA, or any kind of code, so ill keep playing and see how it goes.



Shrooblord

  • Hero Member
  • *****
  • Status:
    Offline
    Posts:
    582
    • View Profile
on: January 05, 2019, 12:21:52 PM
Ah, sorry. That sounds like you might be running into other issues than a simple patch-to-security-update-compliance-fix (PtSUC?) will solve.

You can access the in-game console by pressing the quote key (the one with ' and " on it). This may be displaying errors, which will help you pinpoint where things are going wrong.

If that doesn't work, reply here again and I'll see if I can take a look.

Good luck, and welcome to the modding team! ;>
Shrooblord



Daemonic

  • Newbie
  • *
  • Status:
    Offline
    Posts:
    9
    • View Profile
on: January 05, 2019, 01:20:45 PM
Wonderful haha. No worries, ill keep tinkering and see what i come up with. Will keep you posted

Edit: Have been playing around with it for a couple of days now, and no luck. Maybe someone else could take a look when they have a chance. Good Luck!
« Last Edit: January 08, 2019, 07:16:29 AM by Daemonic »



Shrooblord

  • Hero Member
  • *****
  • Status:
    Offline
    Posts:
    582
    • View Profile
on: January 09, 2019, 01:01:13 AM
Alright too bad. Reply back here if I haven't done so myself in a couple of days. (I am forgetful.)

I'll have a look and see what I can do.
Shrooblord



Daemonic

  • Newbie
  • *
  • Status:
    Offline
    Posts:
    9
    • View Profile
on: January 13, 2019, 03:34:05 AM
Bump! My bad, i also am forgetful apparently! Theres no rush, but just a reminder if/when you get some time :)



Shrooblord

  • Hero Member
  • *****
  • Status:
    Offline
    Posts:
    582
    • View Profile
on: January 14, 2019, 06:03:39 PM
Hey there! Thanks for the bump. I'll keep this tab open and as my "front tab" until I do it. ;>

I've been working some more on developing my own mod -- Gateway to the Stars -- and have been busy with other matters, but I'll reserve one of the days in this week to take a peek at what's going on with this mod.
Shrooblord



Daemonic

  • Newbie
  • *
  • Status:
    Offline
    Posts:
    9
    • View Profile
on: January 15, 2019, 11:58:44 AM
Oh snap. that looks awesome! By all means, please do focus on your own mod first! Ill be bookmarking your mod as well to keep an eye on its progress!



okken

  • Newbie
  • *
  • Status:
    Offline
    Posts:
    1
    • View Profile
on: January 16, 2019, 08:04:34 AM
fix for  0.20.2



Daemonic

  • Newbie
  • *
  • Status:
    Offline
    Posts:
    9
    • View Profile
on: January 16, 2019, 08:43:57 AM
Oh nice, thanks! Ill give it a try now :)



Shrooblord

  • Hero Member
  • *****
  • Status:
    Offline
    Posts:
    582
    • View Profile
on: January 16, 2019, 02:29:48 PM
Awesome okken!! Daemonic, please PM me if you want me to look further into this. I assume okken's fix will do what you wanted.
Shrooblord



TenshiRyu

  • Newbie
  • *
  • Status:
    Offline
    Posts:
    3
    • View Profile
on: January 16, 2019, 10:42:47 PM
Are you still working on this mod? Unfortunately it doesn't work with the latest version of the game anymore :(

NVM... I was on the wrong page and didn't see the last replies on this threat :D
« Last Edit: January 16, 2019, 10:44:19 PM by TenshiRyu »



Shrooblord

  • Hero Member
  • *****
  • Status:
    Offline
    Posts:
    582
    • View Profile
on: January 17, 2019, 01:16:37 AM
NVM... I was on the wrong page and didn't see the last replies on this threat :D
As a general rule on these forums, when the mod author doesn't seem to be updating the mod themselves, chances are someone on the latter pages of the thread has. I'll put this notice in the "What Mods Are Supported This Patch?" post I made, too.
Shrooblord



Daemonic

  • Newbie
  • *
  • Status:
    Offline
    Posts:
    9
    • View Profile
on: January 17, 2019, 08:36:21 AM
Can confirm it is fully working on the latest version of the beta branch, thanks for the update!



darkconsole

  • Full Member
  • ***
  • Status:
    Offline
    Posts:
    104
  • Halfcocked Rage Machine
    • View Profile
    • my game mods (contains nsfw stuff too)
on: January 17, 2019, 09:55:51 PM