Author Topic: [MOD PACK] Galaxy Mods: Balance & Difficulty Mods  (Read 25396 times)

Cyka

  • Jr. Member
  • **
  • Status:
    Offline
    Posts:
    63
    • View Profile
on: February 03, 2018, 04:14:54 AM
That is excellent news! Thanks for all the updates!

You're welcome. Hope you enjoy it.

The changes to the size and strength of some encounters along with the increase to the hull sizes of some enemies should make a nice difference. I went a bit too hard on nerfing them after the last couple versions. But I think this may be better.

And the economy mod, like it states, is TOTALLY new so I'd recommend trying that out and tell me what you think.

Keep in mind that ONLY trading ships are impacted by this but they are pretty consistent now in terms of the amount you'll get from destroying them. If you decide to take the time to destroy an entire station you'll potentially get a lot of goods, but I don't think it's worth the time to do that and also I like to restrict my raiding to ONLY the trading ships and killing defenders. I'm not sure if you destroy a station/factory if it'll ever be rebuilt (I don't think so) so essentially you're slaughtering a "cash cow" of a trading route. LOL

i think the economy mod at is current state is too much of a grind if you limiting ALL COMMODIES to have 10-50 trade every time. This would be good for trade posts but terrible for a fully upgraded mine. It'd be better if 10-50 is applied to tradeposts or higher end commdies ONLY and implement a big range on other commodities perhaps 50-2500. This way you still get a decent steady income with investments.



Shrooblord

  • Hero Member
  • *****
  • Status:
    Offline
    Posts:
    589
    • View Profile
on: February 03, 2018, 10:45:31 AM
Having looked a tiny bit at how Wayleran modified the original code, it seems like the amount of goods Traders pick up is not currently dependent on which type of goods that is. That is to say, unlike players, the AI ships don't transaction with money of their own, so they have no limits on what to buy. Therefore: they buy a random amount every time, and that random amount is set-in-stone for the whole operation, rather than based on which type of goods it is. That's a little shoddy, I agree, but it works very well for simulation and you don't super notice at first until you start paying attention.

Anyway, I modified Wayleran's Economy code to better suit my needs. I nerfed the maximum down 30%, which is still pretty decent, but not as extreme as the original modification. I'll leave these two forum posts here for reference:

Instead of a random amount between 50-500 they'll buy/sell only 10-50 which I now know is way too low. I've adjusted it in my own scripts but haven't updated this mod yet.

Just go to shiputilty.lua line 288 and adjust those numbers but they are JUST for trading ships that are spawned for missions like distress signals or trader attacked by pirate events...

line 288: entity:addCargo(g:good(), math.max(10, math.random() * 50))   -- MOD
change the "10" and "50" to the min and max you want the ship to either buy or sell. 50 and 150 or something. But again this is only for mission trading ships not normal trading ships. Go to the next part for those.

Go to tradingutility.lua line 206 and change:

line 206: local amount = math.max(10, math.random() * 50)   -- MOD

change the 10 to something like 50 and the 50 to maybe 150-250. By default those values are 50 and 500. But these ships will always drop EXACTLY 50% of their cargo upon total destruction and salvaging wreckage. So if you select 50-200, you'll get 25-100 goods to drop.

Thanks. I changed both to range from 25 at minimum to 350 at maximum. You may think that's got a high variance, which is true, but I felt like it more accurately represented trading behaviour: sometimes they'll want a little shipment, sometimes they'll want lots and lots. Meanwhile, it's still nerfed the maximum from vanilla down 30%, which I felt was fair without impacting my income too, too much.
Shrooblord



Azerik

  • Newbie
  • *
  • Status:
    Offline
    Posts:
    47
    • View Profile
on: February 05, 2018, 01:40:43 PM
Is there any way to change the percentage of cargo that will drop from the destroyed ships?  Is there a place in there that I could specify that the cargo ships are heavily armed?

I've got a group of people that spend their entire playtime destroying the economy by hunting cargo ships, nd then complaining their stations don't get stock from npcs.  I'd kinda like hunting cargo ships to be routinely fatal for the players.



Shrooblord

  • Hero Member
  • *****
  • Status:
    Offline
    Posts:
    589
    • View Profile
on: February 05, 2018, 05:45:52 PM
For the first question, yes, absolutely. That's what we were discussing just above your post. I don't remember which of the two lines it is that controls this, but the two lines Wayleran mentions you need to edit drive the amount of goods dropped by killed traders, exactly as you request.

I don't know about defining how well-armed trader vessels are. Look at some of the trader scripts and the plan generators in the vanilla script library. I'm pretty sure there should be something in there that matches what you're looking for.
Shrooblord



Azerik

  • Newbie
  • *
  • Status:
    Offline
    Posts:
    47
    • View Profile
on: February 05, 2018, 07:57:20 PM
Do those only cover the stuff that is dropped or what the ship is carrying?  My users seemed to think that it was the latter.  While reducing the amount of stuff that they carry could deal with piracy, if it is also killing the amount that is being delivered to stations if the cargo ships are unmolested, then it's more of a problem.

Really the end-game of Avorion isn't killing the Guardian, it's setting up your commercial empire (IMO at least), so I'm trying to walk a line that discourages piracy by my players, but still allows stations to be supplied.  I'm hoping they come to realize that stations were meant to be mostly supplied by players, but until they do they are expecting npc traders to help out.

If I could leave the amount the ships are carrying reasonably high, but kill the percentage they drop when killed, it would solve the problem.  If I could ridiculously OP arm the traders, then the risk of death would also help deter piracy.  I'm pretty sure that is in the ship generation somewhere, but my coding skills are 30 years out of date.  I don't do bad with what I've done, but if someone with a better understanding of current coding and that has spent more time crawling through the code could aim me in the right direction...



Shrooblord

  • Hero Member
  • *****
  • Status:
    Offline
    Posts:
    589
    • View Profile
on: February 05, 2018, 08:11:24 PM
Do those only cover the stuff that is dropped or what the ship is carrying?  My users seemed to think that it was the latter.  While reducing the amount of stuff that they carry could deal with piracy, if it is also killing the amount that is being delivered to stations if the cargo ships are unmolested, then it's more of a problem.
Let's see what Wayleran has to say about it:

Just go to shiputilty.lua line 288 and adjust those numbers but they are JUST for trading ships that are spawned for missions like distress signals or trader attacked by pirate events...

line 288: entity:addCargo(g:good(), math.max(10, math.random() * 50))   -- MOD
change the "10" and "50" to the min and max you want the ship to either buy or sell. 50 and 150 or something. But again this is only for mission trading ships not normal trading ships. Go to the next part for those.
OK, so when it comes to "event Trader vessels" like the distress call Traders, this is the line to modify, in shiputility.lua, line 288.

Meanwhile, he says the following about actual Traders that buy and sell cargo to Stations:
Quote
Go to tradingutility.lua line 206 and change:

line 206: local amount = math.max(10, math.random() * 50)   -- MOD

change the 10 to something like 50 and the 50 to maybe 150-250. By default those values are 50 and 500. But these ships will always drop EXACTLY 50% of their cargo upon total destruction and salvaging wreckage. So if you select 50-200, you'll get 25-100 goods to drop.
So change tradingutility.lua, line 206, to change the amount that cargo ships that go to Stations to buy/sell goods carry on each trip.

According to him, these vessels always drop 50% of what they were carrying when they die, no changing it. So it would seem there is no way to modify how much they drop when killed without inherently modifying how much they buy/sell (or rather: the relationship is inverse to that - how much they buy/sell directly influences how much they'll drop).

Where did you learn this, Wayleran? Was it from experimentation? I'd love to find out.

EDIT:
Just to follow up on this, take a look at this code from civilship.lua. It details what happens if the Cargo Hauler decides to indeed dump their cargo when the player threatens to raid them:

Code: [Select]
function CivilShip.dumpCargo()
    if onClient() then
        invokeServerFunction("dumpCargo")
        return
    end

    local ship = Entity()
    local cargos = ship:getCargos()

    for good, amount in pairs(cargos) do
        for i = 1, amount, 2 do
            Sector():dropCargo(ship.translationf, Faction(callingPlayer), Faction(ship.factionIndex), good, ship.factionIndex, 2)
        end

        ship:removeCargo(good, amount)
    end
end

The part where it reads
Code: [Select]
for i = 1, amount, 2 do
    Sector():dropCargo(ship.translationf, Faction(callingPlayer), Faction(ship.factionIndex), good, ship.factionIndex, 2)
end
highly intrigues me.

What you can see happening there is that the for loop iterates from 1 up to the amount of goods the Cargo Hauler has, and drops that item of cargo on an individual basis, but does this for every second item of cargo in their cargo bays. This means they'll also always drop half even if you threaten to destroy them, and they tell you they'll give you everything they've got! And then the script just plain deletes the rest, simulating that the ship did indeed drop all their cargo, when in fact they dropped half and crammed the rest into their Fusion Generators for fuel. Hahaha, what?? It would seem the devs want us to only ever raid 50% of what Cargo Haulers carry, no change to be made. I guess there's a lesson here: piracy doesn't pay! ;D

Interesting. I will continue to investigate.
« Last Edit: February 05, 2018, 08:23:27 PM by Shrooblord »
Shrooblord



Azerik

  • Newbie
  • *
  • Status:
    Offline
    Posts:
    47
    • View Profile
on: February 07, 2018, 04:04:03 AM
Yeah, I had found those lines when you guys were discussing it and I modified them already.  The question, you just cleared up for me, was if there was any way to drop that 50% down to something else.

I wonder if that line you found, you could either replace the amount with an actual number or adjust that 2 after the "amount" to b say, 4 so they only drop every 4th good or 25%?



Shrooblord

  • Hero Member
  • *****
  • Status:
    Offline
    Posts:
    589
    • View Profile
on: February 07, 2018, 04:11:53 AM
I wonder if that line you found, you could either replace the amount with an actual number or adjust that 2 after the "amount" to b say, 4 so they only drop every 4th good or 25%?
Yup, totally. I wouldn't hard-code what is now in-code called amount, though. You could still keep the abstraction of using the variable amount, but do some Math to it. For example, replace amount with amount/2 to only process half the amount of cargo.

Alternatively, if you modify the 2 in that for loop, you'll make it skip more items of cargo than currently.

Basically, the for loop can be read as follows:
  • start the loop at index 1;
  • keep looping until the index equals the value of amount (say 500 for 500 cargo currently being carried);
  • after each iteration of the loop, increase the index by 2.

So basically, if you would change 2 into 3, it will process (i.e. drop, in this case) every third item of cargo.
Shrooblord



Azerik

  • Newbie
  • *
  • Status:
    Offline
    Posts:
    47
    • View Profile
on: February 07, 2018, 04:56:55 AM
I think that is going to be my solution, I will run the max cargo back up a bit so unmolested npcs will help supply things, and then make it so it only drops a smidgen of the available cargo when killed/robbed.

Unless someone finds a way to arm these guys and make them shoot back....that'd be the best punishment for pirates IMO.



Shrooblord

  • Hero Member
  • *****
  • Status:
    Offline
    Posts:
    589
    • View Profile
on: February 12, 2018, 11:03:44 PM
I think that is going to be my solution, I will run the max cargo back up a bit so unmolested npcs will help supply things, and then make it so it only drops a smidgen of the available cargo when killed/robbed.
Well, note that this code is specifically for when the player uses the Interaction "Give me all your cargo!"

I never found the code where it states how much a trader ship drops when blown up, and Wayleran's messages seem to suggest that he found out they always drop 50% of their cargo, no matter what you do.
Shrooblord



abrackers

  • Newbie
  • *
  • Status:
    Offline
    Posts:
    6
    • View Profile
on: February 15, 2018, 09:54:25 PM
This mod is on a couple of servers I played on, and other than the economy section I love it. However, the economy mod has made me leave both of those servers, and they were the only two English speaking populated servers I could find. My problem with the economy mod is as follows:

In my opinion is seems silly that a station that requires 2k oxygen per minute to function, gets the same delivery of 10-50 items as a research station that can only store a total of  50 proton accelerators.

It also seems silly to me that a outer rim small station with storage for only a couple of items gets the same delivery as a giant core mega station with hundreds of thousands of cargo space.

Thirdly, with player made stations in vanilla, you can increase profitability through spending credits to increase the small - XXL size of the station in the menu, and you can increase profitability by spending credits and resources to increase the physical size and therefore cargo capacity of the station. However, with this mod there is no point in building any station better than small, or with more than 1000 cargo space, at which point they're too small for endgame players to really dock with them without a lot of effort.

Finally, it seems ridiculous a giant cargo hauler at least 10x the size of my ship carries such a small amount compared to my ship.

May i suggest/request instead of applying a numerical based cap on the ammount of cargo they carry, you make the cargo ships cary a proportion of the amount needed by the station they are delivering to, as vanilla does. However vanilla's amount of I think 50-75% is too high, especially for a difficulty mod. I would suggest 25-50% seems more reasonable, but that is your choice as to how much difficulty you want this mod to add specifically to the station builder playstyle.



Azerik

  • Newbie
  • *
  • Status:
    Offline
    Posts:
    47
    • View Profile
on: February 21, 2018, 11:17:13 PM
Do these files need to be clientside as well as serverside?  I'm trying to clean some of the junk out of my modpack and only have people install what they need to rather than everything.



wele1060

  • Newbie
  • *
  • Status:
    Offline
    Posts:
    5
    • View Profile
on: February 24, 2018, 08:38:30 PM
Am I missing the link for the download? I'm really excited about adding these to the server but can't find the link.

Edit: Duh....there it is....



joemorin73

  • Newbie
  • *
  • Status:
    Offline
    Posts:
    10
    • View Profile
on: March 01, 2018, 07:00:40 PM
I've been making my own adjustments to this mod to try and adapt it to 16.  Is there any word if the original author will be working on it?