Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

Starsector 0.95a is out! (03/26/21); Blog post: Skill Changes, Part 2 (07/15/21)

Author Topic: [0.9.1a] Combat + Campaign Rules overhaul 1.0 (DamageTypes mod)  (Read 1231 times)

UnoEE

  • Ensign
  • *
  • Posts: 3
    • View Profile
[0.9.1a] Combat + Campaign Rules overhaul 1.0 (DamageTypes mod)
« on: October 07, 2020, 03:47:36 PM »

Combat + Campaign Rules overhaul 1.0 (DamageTypes mod working with content explansions mods)
for StarSector 0.9.1a

example: fragmentation damage: 50% to shields, 35% to armor, 100% to hull

modinfo combat: makes combat more awesome = slightly faster, more balanced allowing ship designs to be more varied with the same combat performance making more weapons loadouts viable allowing players to have more design choices while indirectly nerfing some a very little (example of nerf: sabot missiles). Works with other mods because this mod is not a mod it overwrites core game lib.
AI seems to responding to these changes well using more weapons in more situations but the AI was not absolutely thoroughly tested.

changelog - combat:: DamageTypes modified, flux capacitors + , flux vents - , expanded missile racks -10% hull (storing missiles is generally
very bad at ship safety under enemy fire + it balances slighlty the fact that this trait ordinance price should be base upon amount of missile mounts, tooltip in game does not show this), expanded magazines -5% hull, reinforced bulkheads -5% (balance)
increased maximum zoom out limit in combat

modinfo campaign: makes campaign a little more interesting for players, allowing things to happen faster and more RP. Recommended to be played without save/load = do not load after fails

changelog - campaign:: 50% faster movement speed, ship sales price +, high level officers payroll - per level (high level officer is just stronger, not a moneyhungy thing),
certain items sales price+, destroyers and frigates sensor profiles -, small pricereduction of colony buildings, pirate and system bounties ++ (yes, because ship loses ARE expected in combat and they should cover these expenses)
notable: system bounty gives more reputation, more maximum bounties allowed, player command points -1, player maximum governed colonies +1 (tooltip in 1 skill in game does not match this), delivery quests bounties +
luddic bases bounty ++

install: copy starsector-core to starsector-core , overwrite
Can be copied to new existing games, does not need a new game.
starfarer.api.jar --- impotant: this mod changes only DamageTypes.class inside starfarer.api.jar =
other files can be changes at user discretion
Does not corrupt save files.

uninstall: copy files in backup data where appropriate

Recommended mods / short mod guide:
many of these mods require a new game to function properly

[0.9.1a] Hyperdrive by Sundog -- AI uses it too

[0.9.1a] Hostile Intercept (and Autopause!) by SafariJohn

[0.9.1a] Combat Chatter by Histidine

[0.9.1a] Common Radar by LazyWizard

[0.9.1a] Shadowy Broker by Matsor Browncoat

[0.9.1a] SpeedUp by Dark.Revenant

[0.9.1a] Combat Analytics by Nick XR

[0.9.1a] Console Commands by LazyWizard -- can be used to make custom start or revert rare bugged behaviours

[works with 0.9.1a, requires a new game] Automatic Orders by Blothorn -- your ship catains behave more like ship captains, tip: set config file in this mod to "default_cr_retreat_threshold": "MALFUNCTION",
"default_damage_retreat_threshold": 0.7, add Search and Destroy hullmod to your frigates and light destroyers

[0.9.1a] Mo' Weapons Mo' Ships by Bhdeale  -- increases market stocks makes adding more content expansions mods OK because planetless players can
not usually buy what they need because more content is usually more individual market items meaning lower accessibility in the long run.

[0.9.1a] Disassemble Reassemble by AxleMC131 -- this is an example of content expansion mod -- use any content expansions you wish requires:
[0.9.1a] MagicLib by Tartiflette
[0.9.1a] LazyLib by LazyWizard
« Last Edit: November 09, 2020, 03:47:13 PM by Thaago »
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 18905
    • View Profile
Re: [0.9.1a] Combat + Campaign Rules overhaul 1.0 (DamageTypes mod)
« Reply #1 on: October 07, 2020, 04:51:16 PM »

First off - hi, and welcome to the forum!

I appreciate that you did a bunch of work on this, but unfortunately I don't think this kind of approach is a good idea. For one, it's not compatible with any other mod that might want to do something else in the same way, so it's just not a sustainable approach on any scale larger than "just one mod".

I'd very much prefer API requests for features that make these kinds of things possible. (For example, in the next release, you'll be able to set damage type damage multipliers via code - I've added setter methods to the enums.) This sort of thing helps the API grow and improve for everyone, instead of ultimately creating a bunch of incompatible mods. And that is what would happen, almost without a doubt - if this sort of thing is allowed/encouraged, then you wouldn't be the only person making mods in this way.

And, finally, another problem here is that if a mod is replacing core game files, it creates enormous problems trying to debug things - imagine if a mod is crashing, and I see the problem is in vanilla code, yet that code is not what came with the game.

(It's also against the game's license, but that's a secondary point. The above is *why* it's against the license.)

Checking what you've got in the mod, it's replacing some hullmod classes and settings.json. I'm not actually sure why it's doing that - it's possible to do these things in a "proper" mod that doesn't require overwriting core game files but instead lets the game load and merge the changes in. That's actually the bigger thing, here - it seems like everything except for the DamageTypes change could be done in a more user-friendly, standard way. And this also illustrates the problem with this approach - looking at the contents of your mod, it's impossible/difficult to tell what the changes actually are, since it's replacing the api jar wholesale, and likewise with the settings file.
Logged

UnoEE

  • Ensign
  • *
  • Posts: 3
    • View Profile
Re: [0.9.1a] Combat + Campaign Rules overhaul 1.0 (DamageTypes mod)
« Reply #2 on: October 08, 2020, 08:50:04 AM »

Hi and thank you for welcoming and help and tips. This mod is doing exactly what is stated in this description.

And Alex, yes, this is not a very good approach you have it right and Im sorry to anyone who want to try this. But I believe that changes made in this mod here outweight this problem.

And most importantly I'm not willing to do research of how to do this the proper way, if a proper way exist. Well I might guess it would be possible to hoook some OnDamageTry Event thru java but it would certainly be less performance efficient and it could certainly produce more bugs than this approach. Also I see no reason to create whole .jar file and create a separate mod for 4 small changes in vanila hullmods and 1 changed setting file. Work on this mod was done primarily with thinking, calculating and testing the proper variables, and not with making it look ordinary and pretty. :D

So for anyone wanting to use just modified DamageTypes, you can just ignore modified settings.json file and hullmods directory included in this download and use only DamageTypes.class from Starfarer.jar.

Another explanation: DamageTypes.class included in Starfarer.jar changes 4 DamageTypes in game.
settings.json changes everything else which is written in this mod description, with the exception of hullmods. Hullmods change hullmods.



« Last Edit: October 08, 2020, 09:01:06 AM by UnoEE »
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 18905
    • View Profile
Re: [0.9.1a] Combat + Campaign Rules overhaul 1.0 (DamageTypes mod)
« Reply #3 on: October 08, 2020, 09:05:29 AM »

To clarify: the DamageTypes change isn't currently possible in the "proper" way, but will be in the next release.

As far as the other stuff, you can take a look here for a basic explanation of mod structure:
http://fractalsoftworks.com/forum/index.php?topic=5016.0

It's... basically the file structure you have already, along with a mod_info.json descriptor file, and removing from settings.json all the things you *didn't* change. If anything, it's simpler than what you're doing since there's no need to provide backups etc.

And Alex, yes, this is a not very good approach you have it right and Im sorry to anyone who want to try this. But I believe that changes made in this mod here outweight this problem.

Ah, my apologies, but I just can't agree. Or rather, this may be true in this one specific case if this was the only mod that ever did things this way. But, allowing it opens the door to this approach being ok in general, and you can bet that lots of assorted mods would start doing it. And, for the reasons outlined above, it's not viable long-term. I'm super not into debugging what looks like vanilla code but isn't, among the other problems, and more fundamentally mods being incompatible with each other.
Logged

UnoEE

  • Ensign
  • *
  • Posts: 3
    • View Profile
Re: [0.9.1a] Combat + Campaign Rules overhaul 1.0 (DamageTypes mod)
« Reply #4 on: October 10, 2020, 10:46:31 AM »

This mod works also with Nexerelin because it uses different Settings.json entries.

I might look at this mod again in next update then but I cannot promise anything since I m not a java user.

one thing to note: i noticed lower fps in bigger battles. Since I suspect you are a dev since you write about debugging. Do you use "frameskipping"? for example when user zooms out enough turret rotation can be updated every 3-rd frame instead of every, writing about graphical rotation, not the rotation required to aim, because this could break point defences.
this can be used for any performance demanding code in game, sensibly

its a simple feat but some devs seems to forgot about it.



Logged