MOD: Planet Defenses/Weapons Rebalance. V 1.2

A forum for chatting about in-development game features.

Moderator: luciderous

stixon
Posts: 6
Joined: Thu Feb 16, 2017 9:11 am

MOD: Planet Defenses/Weapons Rebalance. V 1.2

Postby stixon » Tue Mar 14, 2017 8:49 am

UPD. V1.2 of March 23
1) Planet hardpoints now mount medium/heavy/siege weapons or missiles.
2) Introduced a special Planetary (PL) weapon MOD for all medium/heavy/siege beams that greatly increases their Range at EXTREME power cost. Due to that can be used by planets only as they have unlimited power. Serves to counter kinetics LR attacks when you have nothing but beams.

UPD. V1.1 of March 16
Balancing done as per feedback.
1) Planet defenses now have 2 Planet 6x mounts, 2 light 6x mounts for PD, 2 system (22x and 44x) mounts, 2 missile 6x racks, 2 Fighter squads x6
Each new defense slot gives SAME amount of mounts PLUS 1 extra Planet 6x mount.
The idea behind that was to make planetary defense a match for a battleship (at least)
2) Planet hardpoints can equip only Heavy and Siege weapons or Missiles/Torpedoes.
3) All Heavy mounts (beams included) now receive LR Mods. That will eliminate cases when a couple of cruisers with Hv LR kinetics fire from afar remaining at safety.
4) Harpies get 50 Armor points ))) No more '1 explosion kills them all' battles.

UPD. V1.0 of March 15 released.

As I dislike the idea of a planetary defensive structures being unable to fight against anything greater than a couple of light cruisers I tried to mod in more system and other slots. Also increased HULL points significantly to make it tougher in the face of armor/shield piercing weapons. Makes planetary assault more of a trouble now.

NOTE: for the sake of fair play I recommend using the autodesign feature (balanced) for this as the AI is uncapable of perfectly refitting its planetary designs like installing multiple shields. (Though it's up to you).
NOTE 2: despite the info panel on the star map stating NIL shielding the installed shield modules DO add up the shield points (see screens)

http://steamcommunity.com/sharedfiles/f ... =882876631

http://steamcommunity.com/sharedfiles/f ... =882876656

Somehow I was not able to add light mounts (for point defenses) - smth gets in the way while executing the autodesign procedure, I'm not a coder so this error is beyond my understanding yet.

As of now added 1 more weapon 7x slot, 2 system (55) slots, 2 missile 7x racks, 2 Fighter squads x7 to planetary defenses.

Rebalanced weapons and systems so that kinetics stop dominating the battlefield (added kinetics resistance to ALL shields starting from 50 and them going up to 70 and 100%) and changed weapons (primarily beams AND Heavy Railguns) damage.

SEMI-FIXED strike fighters. Somewhat. At least now they do attack both small targets and ships and structures with bombs.

Released.
Link
https://drive.google.com/file/d/0B65c3l ... sp=sharing

Download the mod and follow the instructions within.

https://drive.google.com/file/d/0B65c3l ... sp=sharing

Spreadsheet with current weapon rebalance

Any comments/advice appreciated.
Last edited by stixon on Thu Mar 23, 2017 2:30 pm, edited 3 times in total.

User avatar
SirDamnALot
Posts: 209
Joined: Thu Mar 10, 2016 5:10 pm
Location: Germany

Re: MOD: Planet Defenses/Weapons Rebalance. V 1.0

Postby SirDamnALot » Tue Mar 14, 2017 3:51 pm

Cool :)

Thats a lot of stuff for defense grid 1. Could you spread the weapons/Missiles/Garrisons over more grid slots? E.g. every defense grid tech gives you two slots, so you have to invest more into building the defenses until you got the whole package?

General speaking, do you guys bother with star fortresses and such? I find them highy expensive and refitting them seperatly was a hassle until mass refit.

stixon
Posts: 6
Joined: Thu Feb 16, 2017 9:11 am

Re: MOD: Planet Defenses/Weapons Rebalance. V 1.0

Postby stixon » Tue Mar 14, 2017 5:44 pm

SirDamnALot wrote:Cool :)

Could you spread the weapons/Missiles/Garrisons over more grid slots? E.g. every defense grid tech gives you two slots, so you have to invest more into building the defenses until you got the whole package?

General speaking, do you guys bother with star fortresses and such? I find them highy expensive and refitting them seperatly was a hassle until mass refit.

AFAIK every upcoming defense slot will get the same number of hardpoints + 2 extra weapons/planet mounts +1 system mount. That's a lot of stuff! No costly fortresses needed to easily defend against several Battleships.
Moreover with the introduced changes to the Shield piercing mechanics this game now plays absolutely different from the original.
I'm also thinking of giving the LR Mod to all Heavy weapons so that planets could counter distant ship attacks with return beam fire and not only fighters and missiles

User avatar
sven
Site Admin
Posts: 1129
Joined: Sat Jan 31, 2015 10:24 pm
Location: British Columbia, Canada
Contact:

Re: MOD: Planet Defenses/Weapons Rebalance. V 1.0

Postby sven » Tue Mar 14, 2017 7:41 pm

stixon wrote:Any comments/advice appreciated.


Alright! We have a real mod! I think this means it's time for me to do a little more work to setup support for modding in the main game. Balance patches, like this one, are actually a pretty easy case to support; as I can just make a folder called 'Mods' where players can unpack file edits like stixon's. Because of the nature of the changes, the odds are pretty good that the mod will keep working as intended even as I post patches in other parts of the source code.

I've also been skimming over the developer docs for Steam Workshop. Right now, I think it's probably a heavier tool than we need; but, if more people do get into modding, it looks like setting things up so that we could have some 'officially supported' mods that players can downloadable direct from the steam client would be pretty doable. Probably jumping the gun to do that right now; especially because I have a big tech tree patch I'm supposed to be working on :)

I'll get a simple Mods\ folder working ASAP though; that's a straightforward feature, and I think it will make maintaining an alternate balance mod like this one much easier.

User avatar
SirDamnALot
Posts: 209
Joined: Thu Mar 10, 2016 5:10 pm
Location: Germany

Re: MOD: Planet Defenses/Weapons Rebalance. V 1.0

Postby SirDamnALot » Tue Mar 14, 2017 7:54 pm

stixon wrote:AFAIK every upcoming defense slot will get the same number of hardpoints + 2 extra weapons/planet mounts +1 system mount. That's a lot of stuff! No costly fortresses needed to easily defend against several Battleships.
Moreover with the introduced changes to the Shield piercing mechanics this game now plays absolutely different from the original.
I'm also thinking of giving the LR Mod to all Heavy weapons so that planets could counter distant ship attacks with return beam fire and not only fighters and missiles

I see, that makes fine tuning the balance difficult. But some price increase should be done, otherwise thats alot of bang for your buck :mrgreen:
Longer range for planetary weapons would be great. So the attacker has to go all in with his attack or fire missiles at standoff range.

sven wrote:I'll get a simple Mods\ folder working ASAP though; that's a straightforward feature, and I think it will make maintaining an alternate balance mod like this one much easier.

Wohoo! Could also be a good way to try different balancing approaches and quickly change between configs.

stixon
Posts: 6
Joined: Thu Feb 16, 2017 9:11 am

Re: MOD: Planet Defenses/Weapons Rebalance. V 1.0

Postby stixon » Tue Mar 14, 2017 8:31 pm

sven wrote:Alright! We have a real mod! .

Yeah. I bumped into several issues though 1 of them being unable to add light weapon mounts (forced point defence would be great to counter missile threats) and another has to do with Marauders not able to refit their planetary defense though other races do it fine. I sent the bug report. Perhaps if you look at it and the modded file you'll help me with this. I'm not a coder, a translator actually. Though I have some modding background

User avatar
sven
Site Admin
Posts: 1129
Joined: Sat Jan 31, 2015 10:24 pm
Location: British Columbia, Canada
Contact:

Re: MOD: Planet Defenses/Weapons Rebalance. V 1.0

Postby sven » Tue Mar 14, 2017 10:01 pm

SirDamnALot wrote:
sven wrote:I'll get a simple Mods\ folder working ASAP though; that's a straightforward feature, and I think it will make maintaining an alternate balance mod like this one much easier.

Wohoo! Could also be a good way to try different balancing approaches and quickly change between configs.


Ok: as of r20006, we now have a candidate Mods\ folder that, as best as I can tell, is working fine as an alternate way of installing stixon's balance mod. There's a perhaps overly verbose MakingMods.txt instruction file in Stars in Shadow\Mods that talks through just how to create and install mods. Those of you on the private server should get r20006 next time you boot, while Steam users should be able to to opt into the hotfix_testing 'Beta Branch' via Steam's properties screen to get r20006.

Please let me know if the Mod loading feature appears to work; or if the docs are unclear/confusing.

Chasm
Posts: 429
Joined: Sat Feb 06, 2016 9:14 pm

Re: MOD: Planet Defenses/Weapons Rebalance. V 1.0

Postby Chasm » Tue Mar 14, 2017 11:53 pm

Current developers build for mods directory.
@technology directory works fine. (so my mod are going to the proper subdirectory)
Drawers/ships gives an error:
attempt to index global 'HawkAK' (a nil value)
even when the complete unmodded ships folder and subdirectories is placed in it.
If the path weren't correct nothing would happen (since the mod directory only sees things if they are in the correct folder mirror)
Last edited by Chasm on Wed Mar 15, 2017 12:11 am, edited 1 time in total.

User avatar
sven
Site Admin
Posts: 1129
Joined: Sat Jan 31, 2015 10:24 pm
Location: British Columbia, Canada
Contact:

Re: MOD: Planet Defenses/Weapons Rebalance. V 1.0

Postby sven » Wed Mar 15, 2017 12:11 am

stixon wrote:FIXED strike fighters. Truely. Tested. Now they do attack mobile small targets with beams and ships and structures with bombs.


I'm afraid the strike fighter fix isn't actually this simple. There's a real gotcha here, one that can even confuse experienced Lua programmers. One the oddnesses of Lua is that if you happen define the same variable twice in the course of a single table definition, the parser won't treat it as an error, instead, the second definition will simply overwrite the first. So, if you write:

Code: Select all

define_weapon "Strike Fighter" {
  loadout = {type = 'energy', n=1},
  loadout = {type = 'bombs', n=1},
}


The loadout definition sent to the Strike Fighter definitions will be:

Code: Select all

define_weapon "Strike Fighter" {
  loadout = {type = 'bombs', n=1},
}


i.e., the earlier energy entry is just silently overwritten. That silent overwrite, combined with the fact that weapon loadouts for fighters are currently 'baked in' when the ship is built (rather than auto-upgrading, as they should), makes testing a fix difficult. But I'm afraid simply adding an extra loadout line is not sufficient to fix the issue.

User avatar
sven
Site Admin
Posts: 1129
Joined: Sat Jan 31, 2015 10:24 pm
Location: British Columbia, Canada
Contact:

Re: MOD: Planet Defenses/Weapons Rebalance. V 1.0

Postby sven » Wed Mar 15, 2017 12:21 am

Chasm wrote:Current developers build for mods directory.
@technology directory works fine. (so my mod are going to the proper subdirectory)
Drawers/ships gives an error:
attempt to index global 'HawkAK' (a nil value)
even when the complete unmodded ships folder and subdirectories is placed in it.
If the path weren't correct nothing would happen (since the mod directory only sees things if they are in the correct folder mirror)


What's the full relative path you're using?

Copying the entire Drawers/Ships/HawkAK subdirectory to
Mods/test_mod/Drawers/Ships
should work. But if you put it in
Mods/Drawers/Ships/
you'll get an error. In the second case, the game will think you've created a 'Mod' called 'Drawers', rather than a mod that contains new Drawer definitions. Also, ship Lua files depend on other non .lua assets being stored nearby; so if you're going to mod a ship, the safest way to do so is to copy over the whole ship's drawer directory (including all the .png art assets).

It's not super pretty, but in the tests I've just done, it does appear to work.

edited by sven: On consideration, there's a needless bit of complication here for people who just want to mod ships. As of r20007, just copying one of the ship asset dirs into /Mods/TestMod/ should work; you'll still need to make a TestMod directory, but the 'Drawer' directory part should be unnecessary.

Chasm
Posts: 429
Joined: Sat Feb 06, 2016 9:14 pm

Re: MOD: Planet Defenses/Weapons Rebalance. V 1.0

Postby Chasm » Wed Mar 15, 2017 12:26 am

Stars in shadow/Lua state/@technology
Stars in shadow/Lua state/Drawers/Ships

User avatar
sven
Site Admin
Posts: 1129
Joined: Sat Jan 31, 2015 10:24 pm
Location: British Columbia, Canada
Contact:

Re: MOD: Planet Defenses/Weapons Rebalance. V 1.0

Postby sven » Wed Mar 15, 2017 12:38 am

stixon wrote:As of now added 1 more weapon 7x slot, 2 system (55) slots, 2 missile 7x racks, 2 Fighter squads x7 to planetary defenses.


Right now, all the formula's for the costs of improvements live in Orders/improvements.lua. (Internally: planetary defenses are considered to be a special improvement type). That code is not commented as of r2006, but I'm adding some comments to it now, as this seems like another place where people might be interested in experimenting with alternate balance choices. If you want to adjust planet defense costs, the line you're looking for is the place in improvements.lua that says:

Code: Select all

  return 250 + (base + inc)*50

User avatar
sven
Site Admin
Posts: 1129
Joined: Sat Jan 31, 2015 10:24 pm
Location: British Columbia, Canada
Contact:

Re: MOD: Planet Defenses/Weapons Rebalance. V 1.0

Postby sven » Wed Mar 15, 2017 2:02 am

stixon wrote:
sven wrote:Alright! We have a real mod! .

Yeah. I bumped into several issues though 1 of them being unable to add light weapon mounts (forced point defence would be great to counter missile threats) and another has to do with Marauders not able to refit their planetary defense though other races do it fine. I sent the bug report. Perhaps if you look at it and the modded file you'll help me with this. I'm not a coder, a translator actually. Though I have some modding background


I can replicate this error from your upload. The problem appears to be some ancient boilerplate code in the guts of the ship design datastructures. All the ships will implicitly populate an index number of any mount you add to their specs, for the planet design, you need to define this number by hand. And in your mod, the index numbers get tangled up. If you restructure the planet_Defense_config_table definition as follows, it should work fine:

Code: Select all

  local space=s*5
  local n=round | s * .3
  local n_planet_mounts=defenses+2
  local system_mounts=defenses+1
 
  for i=1,n_planet_mounts
    push { mtype="Planet", ..n,..space, hardpoint_type = "MaskedBeamMounts", mlocation_list={ 1, 2, 3 } }
  end

  push { ..n,..space, mtype="Berth", space = space*.5 }
  push { ..n,..space, mtype="Berth", space = space*.5 }
  push { ..n,..space, mtype="Missile", space = space*.5 }
  push { ..n,..space, mtype="Missile", space = space*.5 }

  for i=1,system_mounts
    push {mtype="System", ..n,..space, hardpoint_type = "System", space = space*.5, mlocation_list={ 1, 2, 3 } }
  end
  push {mtype="Armor", space = space*.5 }


  -- boiler-plate mount index assignment
  for i=1,#available_mounts
    insert(available_mounts[i],..i)
  end

  return {
    hull_desc_key = 'Planet Defenses',
    init_design_specs = init_planet_specs,
    required_tier=0,
    ..available_mounts,
  } 
 
 

User avatar
sven
Site Admin
Posts: 1129
Joined: Sat Jan 31, 2015 10:24 pm
Location: British Columbia, Canada
Contact:

Re: MOD: Planet Defenses/Weapons Rebalance. V 1.0

Postby sven » Wed Mar 15, 2017 2:22 am

stixon wrote:1 of them being unable to add light weapon mounts (forced point defence would be great to counter missile threats)


The problem here, I think, is that planet defenses are weird, because they don't have any visible hardpoints, but they do have set locations defined on the graphics asset where beam weapon attack should eminate from. So; if you want to add a light weapon slot to the planet defense design, you need to set the mtype to 'Light', but the hardpoint type to the special value 'MaskedBeamMounts'. This code snipit should work (I haven't fully tested it myself; let me know if you run into bugs with it):

Code: Select all

  local small_n = round(n*.5)
  push { mtype="Light", n=small_n,  hardpoint_type = "MaskedBeamMounts", mlocation_list={ 1, 2, 3 } }
  push { mtype="Light", n=small_n, hardpoint_type = "MaskedBeamMounts", mlocation_list={ 1, 2, 3 } }

stixon
Posts: 6
Joined: Thu Feb 16, 2017 9:11 am

Re: MOD: Planet Defenses/Weapons Rebalance. V 1.0

Postby stixon » Wed Mar 15, 2017 7:13 am

sven wrote: let me know if you run into bugs with it

I figured that out myself (the maskedbeems thing) and slots are added fine. But the autodesign feature refused to fill them with Balanced & Seige options. The escort one somehow worked fine. So while the player is able to do the trick by hand the AI is in trouble. I'll check with the new lines of code (that you provided above) for autodesign filling planet slots and report back


Return to “Testing”

Who is online

Users browsing this forum: No registered users and 2 guests

cron