• Home
  • Index
  • Search
  • Download
  • Server Rules
  • House Roleplay Laws
  • Player Utilities
  • Player Help
  • Forum Utilities
  • Returning Player?
  • Toggle Sidebar
Interactive Nav-Map
Tutorials
New Wiki
ID reference
Restart reference
Players Online
Player Activity
Faction Activity
Player Base Status
Discord Help Channel
DarkStat
Server public configs
POB Administration
Missing Powerplant
Stuck in Connecticut
Account Banned
Lost Ship/Account
POB Restoration
Disconnected
Member List
Forum Stats
Show Team
View New Posts
View Today's Posts
Calendar
Help
Archive Mode




Hi there Guest,  
Existing user?   Sign in    Create account
Login
Username:
Password: Lost Password?
 
  Discovery Gaming Community Discovery Development Discovery Developers Forum Discovery Unofficial Development Discovery Mod FLHook Projects
1 2 Next »
[FLHook] Docking Module plugin, rise from your grave

Server Time (24h)

Players Online

Active Events - Scoreboard
Kusari Super Alloy Shipments - 17,150 / 2,000,000
LSF Arms Shipments - 0 / 2,000,000
LSF Munition Shipments - 2 / 2,000,000
Pirate Black Market Shipments - 0 / 1,000,000
Dragon Bounties - 1 / 10,000
KOI Bounties - 0 / 10,000
LSF Bounties - 1 / 10,000
Samura Bounties - 0 / 10,000

Latest activity

Pages (3): 1 2 3 Next »
[FLHook] Docking Module plugin, rise from your grave
Offline Invoker
06-09-2019, 06:26 PM, (This post was last modified: 08-17-2019, 07:42 PM by Invoker.)
#1
Member
Posts: 56
Threads: 7
Joined: Feb 2019

*Waits for review and approval
I finished rewriting docking modules plugin from zero.

[+]Added features
  • Save all data to files. If player goes offline, info won't be lost.
  • Support multiple modules with different parameters.
  • /dockatbase <charname> command to dock to carrier at bases. Carrier player should type /allowdock <charname> to allow docking. POB support is included.
  • Scanning carrier will display a message with all docked ships enumerated.
  • Merging undocking mechanics of forced system switch with launch packets. Ships will be jumped to carrier's system if carrier jumps, with current system value in player list also updated.
  • Cancelable docking requests.
  • Disable /renameme for docked ships or carriers with docked ships.
  • Proper handling of removing character who is part of docking modules plugin.
  • For docking module (type 1) docking radius is decreased to 300 meters and 3-second delay before docking is being set to balance out /loadsupplies feature.
  • If carrier dies, all ships are being force launched from carrier. If some docked players are offline, all their cargo will be launched in space and their ships moved to last real base they were on like after death.
  • More friendly jettisoning. Ship will just be instantly force launched without kick timeout. If ship is offline, it will be moved to carrier's current base (you can't jettison offline ships in space to avoid exploiting).
  • /jettisonallships command
  • No need of /allowdock command if players are in same group.
  • Disable notification for carrier if someone requests docking. Ask in chat instead. No request spamming.
  • Sound accompaniment for main docking module actions. Makes docking modules feel more alive.
  • POB support. If your last real base was POB, you'll respawn at it if die. If carrier is at POB now, players will be docked to the POB if they launch their ships.
  • Turn on docking lights on requesting dock to player ship.
  • Process docking ships by queue as freelancer does originally.
  • Jettison docked ship if carrier unmounts module with docked ship inside.
  • Display "Docked to <charname>" in base info for docked ships.
  • /loadsupplies command to restore ammo and regens for snubs. Requires carrier to have crew on board and some special commodities too (they will be consumed). The more crew - the faster resupplying.
  • Add exceptions and unique commodities to /loadsupplies for non-trivial IDs, like Nomads or Gammu AI. They may also use proxy bases of different styles, there definitely must be separate style for Nomads.
Reply  
Offline Laz
06-09-2019, 06:31 PM, (This post was last modified: 06-09-2019, 06:53 PM by Laz.)
#2
(Sorta) Retired Code Monkey
Posts: 1,905
Threads: 106
Joined: Jan 2014

Solid work. I feel it's worth pointing out, the infinite jump bug has never been reproduced outside the live server. Something to add as well, and I know this isn't you but more a problem with the original plugin (and all plugins made by Cannon for that matter), but you might want to adjust the hardcoded values. There are a lot of them littered throughout the plugin, and if any of them don't exist it'll cause a server/client crash.

(i'm going to keep editing this as I think of more things to add)

I would have personally checked up with devs before posting this, because if it doesn't work (and I doubt it fixes the infinite jump bug if I'm being truly honest), it gives people false hope. Even after I've stopped doing dev work I am still asked to rewrite this plugin at least once a week (I don't even see the appeal in it tbh).

You've changed some of the returncodes to nofunctioncall and this will cause plugin conflicts. You really shouldn't do that unless you are absolutely sure the action wont be used in more than once place. I.e. the dock_call function call could have a massive fit if someone tries to dock while having a pending request. LaunchPosHook can bug up with PoBs since they both use the same structure as the temp ship store.

Looking at your code, you are creating new threads. You need to do proper thread management if you go down the route of multi-threaded behaviour because this code would absolutely not scale well. Like, I really need to stress that. You need to properly terminate your threads and not create one inside a for loop! Small scale, threads work quite well and it's difficult to see where errors may appear. But I'm reasonably confident, looking at your code, that this would scale horrible on the live server, given how many threads you are creating, and how you are just letting them run, rather than properly identifying, segregating, detaching, and terminating them.

Reply  
Offline Kauket
06-09-2019, 06:32 PM,
#3
Dark Lord of the Birbs
Posts: 6,549
Threads: 506
Joined: Nov 2014
Staff roles:
Art Developer

Does this fix the infinite jump though?

[Image: kauket.gif]
Reply  
Offline Angela Williams
06-09-2019, 06:38 PM,
#4
Member
Posts: 17
Threads: 5
Joined: Jun 2019

Hm, I've read about docking module concept.
Seems fairly interesting, but, as far as I heard it's bugged. Is it fixed now? It sounds very interesting to have a thing that allows others to dock on player ship.
Reply  
Offline Skorak
06-09-2019, 06:38 PM,
#5
3x Custom User Title
Posts: 4,422
Threads: 503
Joined: Mar 2008

Cool stuff.

Hope we can just test this on the server to see if the infinite jump bug happens or not.

[Image: 4M4UTts.png]
[Image: IDgpvpG.png][Image: T5nJFSb.png] [Image: R2wbzfN.png] [Image: dAW1eot.png111] [Image: R2wbzfN.png] [Image: OECngVP.png77] [Image: R2wbzfN.png] [Image: 7ODm3kk.png33] [Image: R2wbzfN.png] [Image: RKgpLfI.png88]
Reply  
Offline Invoker
06-09-2019, 08:24 PM, (This post was last modified: 06-11-2019, 11:51 AM by Invoker.)
#6
Member
Posts: 56
Threads: 7
Joined: Feb 2019

(06-09-2019, 06:31 PM)Laz Wrote: I doubt it fixes the infinite jump bug if I'm being truly honest

I don't actually known where is the problem. I thought and decided to completely remove the function that is responsible for forced change of systems, since bugs occur during this. I want to test it at separate server with all private plugins enabled and look at result. If the bug is present after this, I will try to fix it again.


(06-09-2019, 06:31 PM)Laz Wrote: LaunchPosHook can bug up with PoBs since they both use the same structure as the temp ship store.

Maybe it is possible. Would be great if you tell me other, safe and nice way to teleport player ship to carrier.


(06-09-2019, 06:31 PM)Laz Wrote: You've changed some of the returncodes to nofunctioncall and this will cause plugin conflicts.

Codes were put back.


(06-09-2019, 06:31 PM)Laz Wrote: I.e. the dock_call function call could have a massive fit if someone tries to dock while having a pending request.

Fixed.


(06-09-2019, 06:31 PM)Laz Wrote: Looking at your code, you are creating new threads. You need to do proper thread management if you go down the route of multi-threaded behaviour because this code would absolutely not scale well.

Totally forgot about HkTimerCheckKick, all delayed actions were rewritten using this hook. Scaling problem solved.
Reply  
Offline sasapinjic
06-09-2019, 08:45 PM,
#7
Member
Posts: 1,693
Threads: 32
Joined: Apr 2015

Nice, lets hope this fix past ishues and will pass live server test.
Even little hope of seeing working modules in game is better than no hope at all.
Reply  
Offline Invoker
06-09-2019, 10:52 PM,
#8
Member
Posts: 56
Threads: 7
Joined: Feb 2019

Did some small, but important changes.
Reply  
Offline Its Raisu
06-09-2019, 11:05 PM,
#9
Member
Posts: 174
Threads: 14
Joined: Jul 2018

Hindsight: Probably would have been better to have put this on a Github that way changes could be seen easily.
Reply  
Offline Invoker
06-11-2019, 12:10 PM,
#10
Member
Posts: 56
Threads: 7
Joined: Feb 2019

(06-09-2019, 11:05 PM)Its Raisu Wrote: Hindsight: Probably would have been better to have put this on a Github that way changes could be seen easily.

The link is updated. Now it leads to repository at new GitHub account.
Note: I uploaded all files, but after putting some more changes. They are noted in readme.
Reply  
Pages (3): 1 2 3 Next »


  • View a Printable Version
  • Subscribe to this thread


Users browsing this thread:
1 Guest(s)



Powered By MyBB, © 2002-2025 MyBB Group. Theme © 2014 iAndrew & DiscoveryGC
  • Contact Us
  •  Lite mode
Linear Mode
Threaded Mode