Page 1 of 14

Switeck's Shipping v0.5 OXP - Ai, Economy, and Ship changes

Posted: Thu Jul 08, 2010 7:29 am
by Switeck
Switeck's Shipping v0.5.zip is available at:
http://www.mediafire.com/?21lh999yo46baa0
or
http://www.boxcn.net/s/14ki570x8dhv37t0mics

Now renamed to Switeck's Shipping OXP due to the large number of NPC ship AI behavior changes.

Overview:

Traders make up the biggest group of ship types in the game...it's time they start getting a little more organized!
There are multiple trader types, some with specialty behavior!

NPC ships will appear in more roles, but are typically quite rare in those new roles.

Includes very minor rebalancing of ships.
Pirate ships are now slightly more likely to have extra equipment such as ECM and Escape Pods.
Any ship that carries more than 1 missile now has a 4-10 second delay between firing each missile to prevent making it easy to ECM once and kill most/all their missiles.
Adders, Boas, and Boa 2's can now be pirates! (However Boa and Boa 2 pirates are very rare.)

NO NEW SHIPS ARE ADDED!

Savegames:

3 starting savegames are added
1.Cobra mark-1, the Medium difficulty with 100 Credits
2.Adder, the Hard difficulty with 100 Credits
3.Adder Broke Start -- no money, no witchfuel, no heat shielding, no cargo, and no missile. Good luck! :twisted:

AI changes:

NPC ships will...hopefully...behave a tiny bit more intelligently than they do in regular Oolite.
Still don't be surprised if a single enemy pirate doesn't put up much of a fight. It didn't before...and even if it's slightly more likely to have an ECM now, that doesn't make it a good shot with it. :lol:

The standard traders that appear around the witchpoint beacon will now have a bit more diversity of behavior -- some heading to the nearest station, others scooping cargo, some actively attacking pirates, and some even hyperspacing back out again.

Some traders may scoop cargo canisters and escape pods along the space lanes.

Thargoids are now more aggressive!
Thargons may now follow Thargoids around if not in combat.

Economy Changes:

Minerals will no longer be as plentiful at main stations, at least at high tech industrial worlds...which consumes them.
Alien Items (Thargons) will always be about 40-60 credits in value, since you can't buy them anywhere and destroying them would give you at least 50 credits and 1 kill towards Elite status anyway.

Rock Hermits have MUCH lower prices on average for Radioactives, Minerals, Gold, Platinum, Gem-Stones. (basically unchanged!)
Rock Hermits have slightly lower prices on average for Computers, Alloys, Furs, Alien Items. (I increased most of those to close to main station prices)

Rock Hermits have slightly HIGHER prices on average for Food, Liquor/Wines, Machinery, and Firearms (to defend against docking pirates). Selling these items to the Rock Hermit may only make a tiny bit more money than the main station.

Since Rock Hermits only have Radioactives, Alloys, Minerals, Gold, Platinum, Gem-Stones for sale...There is some profit from reselling them at the main station, but not really any more than the original Rock Hermits already gave because I intentionally kept quantities for sale low.

Conflicts and copyrights:

I run quite a few other OXPs and I haven't seen an incompatibility between this mod and any of them, but if you run across a conflict post a message about it here!
Any potential conflicts are likely to be minor or at least not prevent the game from running.

Creative Commons - Attribution-ShareAlike 3.0 United States
http://creativecommons.org/licenses/by-sa/3.0/us/

Posted: Thu Jul 08, 2010 10:42 am
by tinker
Very interesting.

I have been playing with the vagueness of commodity prices for a couple of days. I was convinced the wiki article was wrong until I found I had worn out one of my shift keys! In the constant testing I decided it was better to do it out of game and I created an Open Office calc tool to test settings which meant writing a macro to do the masking as Ooo does not provide it. I can U/L it somewhere if there is an interest.

With your commodities.plist the rock hermit section is obvious, I assume the default is for main stations but where is the section 'none' used?

Posted: Thu Jul 08, 2010 11:03 am
by JazHaz
Have added this to the wiki, here.

Posted: Thu Jul 08, 2010 1:25 pm
by Eric Walch
tinker wrote:
but where is the section 'none' used?
"none" is only used for the nova mission. In a nova system, trade won't be possible because traders have other things on their mind --> leaving the system :!:

Posted: Thu Jul 08, 2010 2:51 pm
by Switeck
Get ambushed by Thargoids in interstellar space...if you try to view the market there, it will be the "none" one you see. That happens a lot to me.

Also some dockable OXP ships/stations might have a "none" market.

The commodities.plist file was originally copied straight from the main game's Config folder. If you compare mine with the original, you will find very little changed on the default list and even the rock hermit is close or the same on many things as well. I increased most items prices at rock hermits because they were nearly pointless otherwise. Even if the prices were the same as the main station, you're only going to sell at a rock hermit if it's really convenient. Only a big trader (Python, Boa, Anaconda) have the cargo capacity to fill up the main station and need to dump to the rock hermit's secondary market. But even in their cases, stocking their cargo holds in the first place to do so is a neat trick...seeing as how rock hermits don't sell much. You'll need to blow up a lot of ships to fill a Python's cargo hold...in a single system you'll probably run out of pirates before then. I shudder at how long an Anaconda might need to fill its cargo once!

Posted: Thu Jul 08, 2010 8:56 pm
by pagroove
Looks like a nice set of changes. Will try it :)

Posted: Fri Jul 09, 2010 2:15 am
by myst.RAVEN
Looks intriguing. I particularly like the idea of "starting difficulty levels'! That's something I will certainly be trying out! Best of luck with this :)

EDIT: Incidentally, I don't know how the behind-the-scenes bits work, but is there a way to conditionally determine NPCs' use of missiles? Your idea is excellent (the added delay), but it would be even better, I think, if when a pirate is really hard-pressed, he may fire off a second missile sooner (more or less to simulate a panic reaction, let's say, with also the reasoning of "two missiles should get him off me" - or so he might think heheh)

Posted: Fri Jul 09, 2010 6:14 am
by Switeck
I think it is Random Hits that includes methods of mission-related ships having specific missile types loaded.

As for missile firing rates, I don't know of anything besides the limiter I used.

Ideally, "smarter" ai ships should always fire off 1 or even all available missiles moments before its own destruction -- as a last act of defiance. Unfortunately, the missile delay timer probably would prevent this...unless this "last act" overrode it. I currently don't have the skill to make that.

Posted: Fri Jul 09, 2010 10:13 am
by Commander McLane
Switeck wrote:
As for missile firing rates, I don't know of anything besides the limiter I used.

Ideally, "smarter" ai ships should always fire off 1 or even all available missiles moments before its own destruction -- as a last act of defiance. Unfortunately, the missile delay timer probably would prevent this...unless this "last act" overrode it. I currently don't have the skill to make that.
Having not yet looked into your OXP, I assume from your wording that you are using a timer in a generic ship script?

The basic device for determining the time interval between firing of missiles for each ship is the missile_load_time-key in shipdata.plist. However, it doesn't seem to be exposed to JS, which means that the time is fixed and cannot be changed once the ship exists. I'd make that a scripting request (edit: DONE).

Other than that you can use a JS-timer, which has the interval property. So by setting this.myTimer.interval to any positive value bigger than 0.25 in between two shots, you can delay the second shot as much or as little as you want.

Posted: Sat Jul 10, 2010 10:13 pm
by Switeck
I'm using...
missile_load_time = 10;
(values range from 8 to 15)
...in my shipdata-overrides.plist file.

Posted: Sat Jul 10, 2010 10:22 pm
by Commander McLane
Switeck wrote:
I'm using...
missile_load_time = 10;
(values range from 8 to 15)
...in my shipdata-overrides.plist file.
...which will be changeable by script in the next Oolite release. :D Which means that you can give any ship a script that allows it to fire missiles in shorter (or longer) intervals depending on the situation it is in. :wink:

Posted: Sat Jul 10, 2010 10:39 pm
by Switeck
That will likely be someone else's work. Scripting ai ships to fire missiles based on circumstances is not something I am capable of doing at this time.

On another note, I'd reduce ECM prevalence from escort "support" ships if only Oolite had group ECM capabilities -- where any ship in the group would fire its ECM if a missile was fired at another member of the group.

Next version will have further tweaks to the commodities market...I decided Rock Hermits should probably consistently have small quantities of Gem-Stones. (5-20 g) Anyone have a feel for this game-balance wise? Currently, they sometimes have none.

Lastly, I'll be updating the license so basically anyone can use or modify the mod or parts of the mod can be used in other OXPs. I think a Creative Commons license will work, but not sure of the exact one or exact wording.

Posted: Mon Sep 06, 2010 1:11 am
by Switeck
As a result of very regularly seeing hostile ships at/around the main station in v1.74.2:
https://bb.oolite.space/viewtopic.php?t=8380
...it was traced back to the escortAI.plist file:
https://bb.oolite.space/viewtopic.php?p=117297#11729

So, the next version of my mod will modify the escortAI.plist file to make that less of a problem. I found it was "easier" to also modify other AI.plist files and have them call a consistent check for changing roles.

Eric Walch also had an AI mod for police ships so they don't go straight-and-stupid immediately after launching from the station if their target is lost too quickly. This could cause Vipers to ram the beacon. I'll try to add that as well.

I have been frustrated with enemies fleeing on what I call a "straight-and-stupid" (from straight-and-level in aviation) when I'm on their tail...so caracal helped me (meaning he did most of the work :lol: ) make a modified pirateAI.plist for better pirate behavior. They will attempt a minor heading/rotation change when hit if they are already in a fleeing state.

Do "sunskim-trader" still almost always kill themselves visiting the sun to refuel? Or are they automatically given heat shielding if doing that? What of their poor escorts (Mambas and Sidewinders) -- do they still die?

Posted: Mon Sep 06, 2010 6:30 am
by Killer Wolf
"I have been frustrated with enemies fleeing on what I call a "straight-and-stupid" (from straight-and-level in aviation) when I'm on their tail"

?
whenever i'm on something's slipstream it twists and turns all over the place, and in a far more random way than Elite used to. Elite used to be a bit predictable in that you'd see a ship curving one way and you could rotate inthe opposite direction to get on it faster, whereas Oolite - to me - is extremely hard to get the fkrs to fly anything remotely resembling a straight line.

Posted: Mon Sep 06, 2010 6:41 am
by Switeck
Outside of ~4 km distance, the enemy switches to a perfectly straight path and doesn't change angles even if getting smothered with fire. As I often play a distant sniper, this works for me that they don't dodge...but not all of them can be so dumb.