Author Topic: Reacting to FTech events?  (Read 1926 times)

Offline Bat66wat6

  • Posts: 144
  • Cookies: 34
  • Running custom BC 1.1
Re: Reacting to FTech events?
« Reply #20 on: July 27, 2013, 09:49:18 AM »
But this will require modification of Foundation scripts. Correct?

I really do want a FTech trigger that goes off for FTech events but i'm not going to modify Foundation its self to get one.

I'm not trying to be difficult or annoy you, I just won't mod other peoples mods to get mine to work. That's a big no no.
Great men are not peacemakers! Great men are conquerors!

Offline Nighthawk

  • |______[o]_|
  • Posts: 750
  • Cookies: 18
Re: Reacting to FTech events?
« Reply #21 on: July 27, 2013, 02:08:58 PM »
you can duplicate one of the scripts from scripts/ftb/tech to keep the structure, and then replace the content with whatever you need.
you don't have to modify anything related to Foundation itself.

Offline Mario

  • Senior Software Developer
  • Administrator
  • Posts: 2186
  • Cookies: 1706
  • Life is life
Re: Reacting to FTech events?
« Reply #22 on: July 27, 2013, 05:36:27 PM »
It's been really a long time since I turned on BC and read BCs scripts. I was generally giving pointers which were on the top of my head presuming that FTech did not expose any events which can be used.

Nighthawk now that you've posted the BreenDamper source code I see what you're aiming at and generally explained a bit better what you were trying to say it is much better and up to standards to do it this way. No offense but the points you were trying to make were not very clear to me.

To oversimplify Bat66wat6 what he's aiming at is that you create your own FTech plugin which will allow you to listen for FTech "events" which are triggered internally and give you everything you'd need for your own script. This is a much better solution and up to best practices provided you get all the information you need from FTech which by seeing the code I believe you will.
Acta, non verba.
aka USS Sovereign

Offline Bat66wat6

  • Posts: 144
  • Cookies: 34
  • Running custom BC 1.1
Re: Reacting to FTech events?
« Reply #23 on: July 27, 2013, 08:34:36 PM »
I will do my best to understand these 'FTech handlers' you speak of. Somehow I suspect i'm a loooooong way off the right way of doing things in BC haha  :(

Don't be surprised if I don't post back for a while, or post back saying i'm sticking with the current implementation.
 I am attempting to build something using a language I don't fully understand in an environment I don't understand.

 :newbie:
Great men are not peacemakers! Great men are conquerors!

Offline Nighthawk

  • |______[o]_|
  • Posts: 750
  • Cookies: 18
Re: Reacting to FTech events?
« Reply #24 on: July 28, 2013, 02:54:25 PM »
No offense but the points you were trying to make were not very clear to me.

I was trying to play along with what he was telling us until I realized it wasn't going anywhere... then I got back to the "Foundation" of it XD
FTech is built to detect multiple events, ET_WEAPON_HIT included.... that's a fact.
so, simply use FTech itself.


Offline Mario

  • Senior Software Developer
  • Administrator
  • Posts: 2186
  • Cookies: 1706
  • Life is life
Re: Reacting to FTech events?
« Reply #25 on: July 28, 2013, 03:18:20 PM »
FTech is listening to multiple events only to allow the framework to function as intended. If the framework could have functioned listening to only one event it would have been done so. Remember that too much redundant code makes the code itself harder to maintain.
Acta, non verba.
aka USS Sovereign

Offline Bat66wat6

  • Posts: 144
  • Cookies: 34
  • Running custom BC 1.1
Re: Reacting to FTech events?
« Reply #26 on: July 29, 2013, 08:42:45 AM »
I have decided not to pursue implementing a custom Foundation listener to trigger my code alongside its damper onYield code.
My current implementation, although not ideal as every weapon that hits anything will trigger it, 'just works' and it would not be worth the time it would take me to learn this Foundation implementation and adapt my code.

This is not to say I like half-arsed attempts at doing things, I'm just being realistic with the real world time being put into it and the outcome.

Again thanks for all your help.
Great men are not peacemakers! Great men are conquerors!