Author Topic: Expansion of Realistic Technology by glenflet  (Read 2060 times)

Offline Mark McWire

  • Posts: 83
  • Cookies: 1010
Re: Expansion of Realistic Technology by glenflet
« Reply #20 on: March 21, 2018, 02:13:05 PM »
I think you would need to do some directory renaming and folder moving to be able to use these scripts, but they look like full projectile scripts to me

Yes. The scripts themselves are fully functional. They consist in principle of 5 parts. The method "Load" is to initialize the script. There, the WeaponHit event from the App is bound to the WeaponHit method. The WeaponHit method calls the HandleWeaponHit method. In principle, a really unnecessary chaining, but so I have copied it from the original script. The HandleWeaponHit method checks whether the event is a hull hit or a shield hit and calls the HullHit or ShieldHit methods accordingly. This then defines the behavior of the script, while still undergoing several comparisons.

The real core of the script is that I determine which projectile (torpedo or pulse weapon) triggered the hit event. Then I load its script and check if there is a specific method in the projectile script. If so, I read the return value. Then I create a sequence that performs certain actions. The possible actions I take either the MissionLib, the ShipScriptAction script or one of my own libraries.

Possible actions include: Damaging a subsystem, disabling a subsystem, uncloaking a spaceship, disabling the shields, etc.

Offline Mark McWire

  • Posts: 83
  • Cookies: 1010

Offline CMDR CHESS

  • Posts: 34
  • Cookies: 3
  • "With the first link, the chain is forged..."
Re: Expansion of Realistic Technology by glenflet
« Reply #22 on: March 21, 2018, 08:51:53 PM »
YOU Got cookied ....

Offline Mark McWire

  • Posts: 83
  • Cookies: 1010

Offline Mario

  • Senior Software Developer
  • Administrator
  • Posts: 2186
  • Cookies: 1706
  • Life is life
Re: Expansion of Realistic Technology by glenflet
« Reply #24 on: March 23, 2018, 04:18:02 PM »
I strongly recommend that you use github to share and maintain your code.
Acta, non verba.
aka USS Sovereign

Offline CMDR CHESS

  • Posts: 34
  • Cookies: 3
  • "With the first link, the chain is forged..."
Re: Expansion of Realistic Technology by glenflet
« Reply #25 on: March 23, 2018, 04:23:05 PM »
I was really wondering about that, I didn't want to just paste into the comment box the entire script. But, how?

Offline Mark McWire

  • Posts: 83
  • Cookies: 1010
Re: Expansion of Realistic Technology by glenflet
« Reply #26 on: March 24, 2018, 04:16:11 AM »
I strongly recommend that you use github to share and maintain your code.

This is just a preview, I'll post the whole package for download when it's done.


Offline Mario

  • Senior Software Developer
  • Administrator
  • Posts: 2186
  • Cookies: 1706
  • Life is life
Re: Expansion of Realistic Technology by glenflet
« Reply #28 on: April 03, 2018, 07:20:20 PM »
HTML tags are not allowed here, this forum uses BB code.

Also, never in any environment will it be allowed to directly embed scripts using script tags. Input will always be sanitized due to obvious security concerns in systems.
Acta, non verba.
aka USS Sovereign

Offline Mark McWire

  • Posts: 83
  • Cookies: 1010
Re: Expansion of Realistic Technology by glenflet
« Reply #29 on: April 03, 2018, 09:24:12 PM »
HTML tags are not allowed here, this forum uses BB code.

Also, never in any environment will it be allowed to directly embed scripts using script tags. Input will always be sanitized due to obvious security concerns in systems.

I simply used the given links from Github via Copy & Paste.

Offline Mark McWire

  • Posts: 83
  • Cookies: 1010