Weapons

A place for discussion of making game modifications.
Dragar
Posts: 119
Joined: Wed Mar 21, 2018 12:20 pm

Weapons

Postby Dragar » Mon Sep 25, 2023 9:30 pm

I'm looking at the `WEAPONS.lua` in an attempt to understand more about how to mod the game. I'm a bit puzzled by the following:

Code: Select all

  setmetatable(t.heavy, {
    __tostring=function() return string.format("%d-%d",floor(1.5*low),ceil(1.5*high)) end,
    __call=function() return random_int(floor(1.5*low),ceil(1.5*high)) end,
  })


Is this code used? It seems to imply heavy weapons have a 1.5 multiplier to damage, but this doesn't seem to be represented in the tech descriptions (e.g. on the tech tree or the ship builder, the standard weapon ranges are used).

Dragar
Posts: 119
Joined: Wed Mar 21, 2018 12:20 pm

Re: Weapons

Postby Dragar » Mon Apr 15, 2024 10:38 pm

I never figured this out. :)

I thought I'd poke around at modifying the power cost of turbolasers, as an interesting tweak. Unfortunately, modifying the `power_mult` variable in the turbolaser entry just seemed to affect the descriptions - when actually applying the weapon to the hardpoint, the ship designer suggests the old power usage is used.

Where is the correct place to modify power usage of weapons?

gaerzi
Posts: 210
Joined: Wed Jul 10, 2019 1:30 pm

Re: Weapons

Postby gaerzi » Thu Apr 18, 2024 7:12 am

Dragar wrote:Is this code used? It seems to imply heavy weapons have a 1.5 multiplier to damage, but this doesn't seem to be represented in the tech descriptions (e.g. on the tech tree or the ship builder, the standard weapon ranges are used).

The way I'd try to test if it's used would be to change the multiplier to something absurd, such as 1500 instead of 1.5, and then check in game. Make the change blatant enough to be noticeable without ambiguity!


Return to “Modding”

Who is online

Users browsing this forum: No registered users and 2 guests

cron