Fractal Softworks Forum

Please login or register.

Login with username, password and session length

Author Topic: Weapon Creation and TwigLib questions.  (Read 2848 times)

174gjc

  • Ensign
  • *
  • Posts: 18
    • View Profile
Weapon Creation and TwigLib questions.
« on: October 16, 2015, 09:11:14 PM »

So, as a start I have played around with some settings files and the ship_data.csv in the Blackrock and created some new ships with Trylobot's editor from old unused BRDY sprites.

After doing that, I was looking into weapons creation and TwigLib, but I really don't quite understand where to start on these particular two subjects. Any advice on where to begin would be much appreciated.

~174
Logged

174gjc

  • Ensign
  • *
  • Posts: 18
    • View Profile
Re: Weapon Creation and TwigLib questions.
« Reply #1 on: October 16, 2015, 09:15:02 PM »

I'm been looking around in this thread for some information on how to design a weapon, but I'm unsure I'll be able to figure it out.
Logged

Debido

  • Admiral
  • *****
  • Posts: 1183
    • View Profile
Re: Weapon Creation and TwigLib questions.
« Reply #2 on: October 16, 2015, 11:54:43 PM »

Yeah I started on a powerpoint presentation for TwigLib, never got around to it.

Plug me your questions and either myself or Tartiflette will have a good idea how to help you with them. I'm going to be busy the next couple of days, but post them here and I'll get back to you.

There is nothing special with weapons in TwigLib but there are a few ways in which they are brought into the game.

In method A the weapons are on whatever the child ship is, whatever is in that variant file is loaded - guns and all - and effectively it runs under it's own AI by the computer. Useful for parts that only have defensive weapons. This is the default behavior. There is a special AI if you want to use it called "Slave AI" in the AI types that will automatically target whatever the player is targetting if it has no other target.

                        "AIType": "SLAVE_AI",

If you have no weapons on the twig there is an AI for that too

                        "AIType": "NO_AI",

Useful if the part is just a slab of armour and doesn't do anyting

In the second method is where you add weapon slots on the root ship in the position they will be in on the sub-ship. Then when the subship dies or is destroyed/falls off the Twig code goes and disables these weapons permanently and makes them transparent.

If you have a look at the Stheno_Armored file you will note two extra attributes:
                        "onDeathHostWeaponAlpha":"WS0010,WS0020",
                        "onDeathHostWeaponDisable":"WS0010,WS0020"

This attributes tells the twig lib code to disable and make transparent any weapons in these weapon slots and removes them from the weapon groupings IIRC when the sub-ship is gone.

Any other questions?

Or are you looking for information about weapons as a seperate topic to twiglib?
Logged

174gjc

  • Ensign
  • *
  • Posts: 18
    • View Profile
Re: Weapon Creation and TwigLib questions.
« Reply #3 on: October 17, 2015, 07:34:35 AM »

Both are separate questions, but you answered my question about TwigLib fairly thoroughly. Is there a specific way to install it so Trylobot's editor will recognize it and use it, or will it do so automatically when installed into the mods directory?
Logged

Debido

  • Admiral
  • *****
  • Posts: 1183
    • View Profile
Re: Weapon Creation and TwigLib questions.
« Reply #4 on: October 17, 2015, 11:52:30 PM »

Yeah sorry buddy, it isn't integrated with Trylobot's editor. If it the editor were written in Java I'd have a crack at it, but yeah, no. In the next couple of days I'll see if I can't do a good write up of TwigLib, but Tartiflette has a great picture that shows how it all goes together.

I would suggest though that you get really familiar with ship construction before moving on to TwigLib.

Anyway here is a handy picture done by Tartiflette

Logged