Fractal Softworks Forum

Starsector => Mods => Topic started by: Darloth on November 01, 2014, 07:44:06 PM

Title: [0.65.1a] Tradewinds II
Post by: Darloth on November 01, 2014, 07:44:06 PM
Scrapmetal Boogaloo!

So this is a development and eventually release thread for a trading and economy focussed mod which should add a few new features and skills, intended to make non-combat professions more interesting and something you can specialize in, along with enabling other non-combat professions other than trading (most notably scavenging at present).

Right now all it does is makes fleets drop a cloud of debris containing the excess loot if you don't take all the loot after fighting them.  This happens with AI fleets as well, and you can come and scavenge the remnants if you get there quickly enough.  Debris clouds dissipate into the endless void and are too cold to discriminate on sensors after approximately three stellar days.  

I've tested it for about a week or two of campaign time and it certainly functions as intended for that long - source is included (zipped into jar file), do what you will!

Inclusion/Exclusion:
It ought to work on a previous unmodded save as well as a new game, it's supposed to be removable in the same way (though you might get left with a couple of unsightly floating debris fields you're no longer able to interact with if you do, I have not tested it yet), and there aren't any known incompatibilities with faction mods.

Tradewinds II is currently incompatible with Starsector+, as we both modify the same core files.

Known Issues:

DOWNLOAD (https://dl.dropboxusercontent.com/u/3869309/Tradewinds2.zip) - v0.3

Change Log:
Title: Re: Tradewinds II
Post by: Sundog on November 01, 2014, 08:09:00 PM
Oh, neat! I was curious about what you were working on. Didn't think I'd find out so soon. This could turn out to be really cool  :)
Title: Re: Tradewinds II
Post by: Tartiflette on November 04, 2014, 04:45:46 AM
I have to say I very much appreciate this mod. I wanted to do something a bit similar but I don't have the coding skills required. Maybe it will gives you some new ideas for your mod:

My idea was to make salvaging time consuming: you win a battle, you select what you want to salvage as usual, but it won't get instantly teleported in your cargo. Instead, a cloud of debris is spawned and you have a progress bar to show the salvaging operation going. As the bar fill, you get a steady income of supplies and item, and sometimes a weapon you selected, the larger ones having a greater chance to be picked last. Only if you wait until the end you are guaranteed to get all the loot.

The speed of the salvaging could be proportional to the extra crew you have, and the number of marines, giving you an incentive to bring in extras even if it cost more in daily supplies consumption. Another option could be to suspend CR recovery to accelerate the salvage, though I suspect we don't have the right modding API to do that...

If you didn't picked everything, the remains would drift toward the nearest planet, star, wormhole or disperse after some time, whatever comes first. Of course there would clouds generated by AI battlers too, and other salvagers that can could poach them.

This could remove the need for the very artificial "boost if you loose"... If the victor want some loot, he has to stay in place for a moment. Also, battles in enemy space could be more difficult since you have to stay aware of other fleets while salvaging.

That's pretty much it, I hope it will gives you ideas for your mod, and I hope to see it pan out!
Title: Re: Tradewinds II
Post by: Nanao-kun on November 04, 2014, 10:19:55 AM
Definitely gonna try this when I get home.
Title: Re: Tradewinds II
Post by: Darloth on November 06, 2014, 01:13:33 PM
Found out why I almost never see AI fleets actually dropping any wreckage (it was working, but verrrrrry rare) - sometimes their cargoAPI is bugged and reports that it has 1000 capacity so they just take everything, but usually, it's because AI fleets do not track supplies or fuel in the same way, and the way they do track it doesn't take up any 'cargo', plus loot isn't generated as much for them.  I'm going to probably limit them to half their actual cargo capacity in loot and force a full loot gen, which should mean they run out of space more and drop more things.

It also means pirates will get more plunder, and defeating successful combat fleets will generally produce more loot for you the player as well, since their cargo holds will actually be filled with the remnants of all the other fleets they've destroyed over time.

Expect an update in the next few days.
Title: Re: Tradewinds II
Post by: Darloth on November 06, 2014, 02:11:16 PM
Or expect an update now! That was easier than I thought!

Version 0.3 brings regular scrap clouds from NPC battling, though they don't stay around for very long so you'll need to be quick to take your pick of the previously passed over plunder!

Could someone move this to the Mods forum please, I think it's ready for use - it's proved quite stable in my testing so far. 

There may be a slight performance hit because I've reduced the abstraction applied to NPC autoresolve, and it takes a teeny bit longer each time now.  If anyone notices infrequent juddering with this mod running, please let me know and I will attempt to cheat more heavily (and more importantly, faster) in the autoresolve code.

I have also started a poll, because I would like to know whether people think debris clouds should show up on the Map tab.  At the moment, they do, but I'd like to know other people's opinions.

Finally, I may split this out into a library and a vanilla implementation - that way other people can use my debris code in their own large campaign mods without having to mess about unregistering my various campaign plugins.  Any interest for that?
Title: Re: [0.65.1a] Tradewinds II
Post by: CrashToDesktop on November 06, 2014, 03:04:20 PM
Oh, interesting mod.  Going to try this out now, gonna love becoming the vulture that roams the sector. :D

I'd make the debris clouds not visible on the tactical map unless you have some high enough character skill on Technology or something.  I'll admit that I've influenced by Okim's view on his new "exploration system" where things won't show up on the map until they've been discovered - it's a good idea and I'd like to keep these debris clouds off the map.
Title: Re: [0.65.1a] Tradewinds II
Post by: superhotdogzz on November 06, 2014, 11:46:32 PM
THE SCAVENGING  :o
YES!!!!!!!!!!!!
Funny I was thinking about this days back, but now it is almost here ;D
Title: Re: [0.65.1a] Tradewinds II
Post by: Morrigi on November 07, 2014, 01:10:42 PM
Oh, interesting mod.  Going to try this out now, gonna love becoming the vulture that roams the sector. :D

I'd make the debris clouds not visible on the tactical map unless you have some high enough character skill on Technology or something.  I'll admit that I've influenced by Okim's view on his new "exploration system" where things won't show up on the map until they've been discovered - it's a good idea and I'd like to keep these debris clouds off the map.
It'd make no sense for ships not to have long-range scanners.
Title: Re: [0.65.1a] Tradewinds II
Post by: CrashToDesktop on November 07, 2014, 02:13:12 PM
It'd make no sense for ships not to have long-range scanners.

It's not the point of a ship not having long-range sensors - it's gameplay.  You'd have to search for these little piles of loot instead of just looking at your minimap and clicking it - right now, it's a lot easier to just go to a system where there's a ton of combat and poof, you'll become richer than ever because you know the exact location of every debris field.
Title: Re: [0.65.1a] Tradewinds II
Post by: Tartiflette on November 07, 2014, 03:05:26 PM
It'd make no sense for ships not to have long-range scanners.
If you want a good example why this is a bat idea, just play X Rebirth with it's loot-long-range-scan-minigame-that-broke-the-game-economy
Title: Re: [0.65.1a] Tradewinds II
Post by: Darloth on November 07, 2014, 03:22:16 PM
right now, it's a lot easier to just go to a system where there's a ton of combat and poof, you'll become richer than ever because you know the exact location of every debris field.

At the moment this doesn't happen because debris fields have such a short duration - around 3 days, and unless you're in a set of burn 12 frigates that really doesn't actually get you all that far :)

Plus debris is usually the stuff people didn't want... it has to be a major fleet battle with tons of casualties on both sides to drop anything worthwhile.

If the lifetime on the fields ever goes up this might be an issue, so it's worth thinking about.  
Title: Re: [0.65.1a] Tradewinds II
Post by: CrashToDesktop on November 07, 2014, 05:34:48 PM
Debris fields still hold a ton of commodities, like Metals and Heavy Machinery, which most stations purchase for a pretty good price.  It IS totally free money, anyways (minus the supply cost to get there and back but that's usually minimal and covered by the supplies picked up).

Anyways, would it be possible to have Debris fields change size depending on how much stuff is in it?  There's already different debris field textures, but telling which ones are the biggest and yield the most would be nice.
Title: Re: [0.65.1a] Tradewinds II
Post by: TartarusMkII on November 07, 2014, 08:00:18 PM
Heya, I just wanted to leave my feedback on this mod!

Of course, I realize it's a new mod, and of course I am impressed with it! Also, I am bad at this game. Simple as that. It's hard for me to get very far.

I spend a lot of time in the 'early game' because I collapse so often, and so my fleet often has a lower burn speed. I am noticing that more and more as I play with Tradewinds II enabled, the more I am just ignoring the icons on the minimap. I have already learned that I am unable to catch the debris field in time , so I don't even bother- that is, unless I am waiting to attack the loser of a fight happening right in front of me.

I am fine with the debris field containing only lowly scraps (your reasoning makes sense), but I did want to mention that I feel like they still don't persist long enough.

Thanks!
Title: Re: [0.65.1a] Tradewinds II
Post by: Darloth on November 08, 2014, 04:32:42 AM
Making them bigger when they contain more stuff is already on my to-do list, but I don't think they'll be dynamic - that is, they'll spawn at a specific size and stay that way even if partially looted.

I might make them last longer as well if everyone is finding it too fast, or perhaps make bigger fields last longer.  Balance tuning is a work in progress, so please keep giving me feedback like this.

Title: Re: [0.65.1a] Tradewinds II
Post by: Nanao-kun on November 08, 2014, 09:48:07 AM
If the two sides fighting are military fleets of two major factions, I could see them leaving behind more than usual because they wouldn't need it as much as a pirate fleet would.
Title: Re: [0.65.1a] Tradewinds II
Post by: CopperCoyote on November 08, 2014, 11:28:51 AM
I like having the debris field on the map. It's useful to see if 2 fleets are actually fighting or just near each other.

Would it be hard to make it so there is a random chance of an item being lost per time so that a field simply degrades away? That way you could have a more organic feel to their disappearance.
Title: Re: [0.65.1a] Tradewinds II
Post by: Barracuda on November 11, 2014, 08:52:21 AM
While crusing around in my freighter, some pirates attacked me... or they didn't because the game crashed. The part about "PersistantDebris" made me think this mod might have caused it. Im not that good with code so i don't reallly know whats going on here  :-\

Spoiler
11448982 [Thread-5] ERROR com.fs.starfarer.combat.O0OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO  - java.lang.NullPointerException
java.lang.NullPointerException
   at campaign.PersistantDebrisFleetEncounterContext.SyncFleetCargo(PersistantDebrisFleetEncounterContext.java:170)
   at campaign.PersistantDebrisFleetEncounterContext.generateLoot(PersistantDebrisFleetEncounterContext.java:161)
   at campaign.PersistantDebrisFleetInteractionDialogPlugin.losingPath(PersistantDebrisFleetInteractionDialogPlugin.java:949)
   at campaign.PersistantDebrisFleetInteractionDialogPlugin.goToEncounterEndPath(PersistantDebrisFleetInteractionDialogPlugin.java:846)
   at campaign.PersistantDebrisFleetInteractionDialogPlugin.updateMainState(PersistantDebrisFleetInteractionDialogPlugin.java:1404)
   at campaign.PersistantDebrisFleetInteractionDialogPlugin.optionSelected(PersistantDebrisFleetInteractionDialogPlugin.java:505)
   at com.fs.starfarer.ui.String.P$1.o00000(Unknown Source)
   at com.fs.starfarer.ui.String.A.actionPerformed(Unknown Source)
   at com.fs.starfarer.ui.thisnew.super(Unknown Source)
   at com.fs.starfarer.ui.null.processInput(Unknown Source)
   at com.fs.starfarer.ui.O0Oo.o00000(Unknown Source)
   at com.fs.starfarer.B.void.class$super(Unknown Source)
   at com.fs.A.oOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOO.Ò00000(Unknown Source)
   at com.fs.starfarer.combat.O0OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO.super(Unknown Source)
   at com.fs.starfarer.StarfarerLauncher$2.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)
[close]

The other mods I'm running are:
Starsector +
All ships in refit battles
Common Radar
Console Commands
LazyLib
Random Sector
The Mayorate
Yours(TradeWinds II)
Version Checker
ShaderLib

Hope something comes from this and if you need anything else ask  :-[
Title: Re: [0.65.1a] Tradewinds II
Post by: cardgame on November 11, 2014, 02:40:31 PM
Whoa, the voting is split dead-even.

Seems to me the best thing is to have it be toggle-able, if possible.
Title: Re: [0.65.1a] Tradewinds II
Post by: nonomo4 on November 11, 2014, 09:34:15 PM
Whoa, the voting is split dead-even.

Seems to me the best thing is to have it be toggle-able, if possible.

I agree, while some people would like the whole idea of using observation skill to find loot, others may just want a casual way to gain resources without having to do a lot of looking.
Title: Re: [0.65.1a] Tradewinds II
Post by: Darloth on November 12, 2014, 05:18:18 AM
An interesting poll result, yeah.

It could be made togglable but not cleanly or easily and I don't believe that's the best option here.

Well, since this idea came about as an alternative solution, what better than an alternative solution!
Since people already think the fields go away too quickly, I'll add about a day to the current ones and keep those showing up on radar.

Then I will change the decay behaviour so that any decaying debris field randomly destroys about half the loot, adding the other half to a much larger, much longer lasting, invisible to radar field called something like "Dispersed debris cloud".  Ideally I'll do a range check and add any decaying debris from multiple fields to just the one large dispersed field.

It can sit there for a month or so, but only be found by coming across it.

Later on (though this will take quite a lot more work) interacting with these dispersed fields should be more complicated, perhaps an interaction dialog and/or some industry skill checks, with variable loot returned and taking a considerable amount of campaign time to trawl through them, perhaps about a week of searching before you get a loot screen.  All that will need to wait for the future mind you, and I hope to implement a basic version of mining (in the sense of: drop off mining crawler, return later) before doing that.

-------------------------- BUG DIAGNOSIS FOLLOWS ---------------------------

Sorry to say Hiigaran, but Tradewinds II is entirely incompatible with Starsector+.  (I updated the initial post to say so a while back, but it's easy not to notice.)

The error you're getting is because Starsector+ has overwritten Tradewinds' plugins and implementation code - and it needs to, because otherwise most of Starsector+'s campaign level features wouldn't be working instead.

Before I do anything else in terms of features, I'm going to put in some work to have TWII's code be a library and then have the mod call that library.  Then it should at least be plausible for Dark.Revenant and other authors of large modpacks to support Tradewinds.  It's never going to be trivial though, so I'm not going to actually push for its inclusion or even permission to release my own inclusion patch until I have a 100% guaranteed step by step method for getting it to work together myself that I can put in front of authors.  If it's at all a pain, I wouldn't expect most people to want to put in the effort integrating it (there aren't enough cool features yet) but I'm hoping if I do all of the work and make it nice and easy, D.R and others will be okay about conditionally including it or letting me release an inclusion version.

Unfortunately I've been ill lately, which is why you're getting this post about what I plan to do instead of me having actually done anything about it :(
Title: Re: [0.65.1a] Tradewinds II
Post by: Nanao-kun on November 12, 2014, 11:05:14 AM
It is? I haven't had any problem though.

Then again, I haven't actually had much combat at all.
Title: Re: [0.65.1a] Tradewinds II
Post by: Dark.Revenant on November 12, 2014, 12:13:25 PM
I have not looked at this mod, due to lack of time.  How have you set up your internals?
Title: Re: [0.65.1a] Tradewinds II
Post by: Nanao-kun on November 13, 2014, 08:58:23 PM
I've done some combat with both Starsector+ and Tradewinds enabled, and haven't had any technical problems.

On the other hands, I've earned tons simply by following the Templars around and picking up the debris left behind when they attack planets and stations, since I can just immediately sell it off. :P
Title: Re: [0.65.1a] Tradewinds II
Post by: LB on November 15, 2014, 11:49:48 AM
You can see the technical problems when you encounter a fleet in a neutral posture and decide to disengage.
Title: Re: [0.65.1a] Tradewinds II
Post by: Lord0Trade on June 25, 2016, 11:52:44 AM
Can someone PLEASE revive this mod and update it?!
Title: Re: [0.65.1a] Tradewinds II
Post by: Darloth on September 18, 2016, 01:34:48 PM
Feel free, but I think it'd be better to wait until the next update - this sort of thing will fit much better with the new campaign stuff Alex has been working on, and he might in fact implement a better version of it.

I stopped working on it seriously when I realized it would be really, really fiddly to get it working well with Starsector+ or any of the other large scale enhancement mods that I didn't really want to play without.