Merging Equipment

An area for discussing new ideas and additions to Oolite.

Moderators: winston, another_commander

Post Reply
User avatar
Ark
---- E L I T E ----
---- E L I T E ----
Posts: 664
Joined: Sun Dec 09, 2007 8:22 am
Location: Athens Greece

Merging Equipment

Post by Ark »

For some time now there has been an overdose of equipment oxps . That is great but also has a negative side effect in the equipment screen since there is not any more free space there.

I am thinking that merging some of the new equipment with old ones would be a simple solution.
For example the bounty scanner (excellent concept Frame!! :D ) could be integrated in the future as a standard option of the scanner targeting enhancement.
User avatar
Eric Walch
Slightly Grand Rear Admiral
Slightly Grand Rear Admiral
Posts: 5536
Joined: Sat Jun 16, 2007 3:48 pm
Location: Netherlands

Re: Merging Equipment

Post by Eric Walch »

Ark wrote:
I am thinking that merging some of the new equipment with old ones would be a simple solution.
Or just accept that your console has certain measurements and accept you can't install all of them. Maybe ships should have an explicit limit depending on its type?
User avatar
pagroove
---- E L I T E ----
---- E L I T E ----
Posts: 3035
Joined: Wed Feb 21, 2007 11:52 pm
Location: On a famous planet

Post by pagroove »

Is it an idea to introduce a sort of hardware slots. Like in your computer motherboard also a ship computer has a certain capacity?
It can create new interesting differences between ships.
For P.A. Groove's music check
https://soundcloud.com/p-a-groove
Famous Planets v 2.7. (for Povray)
Image
https://bb.oolite.space/viewtopic.php?f=4&t=13709
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5528
Joined: Thu Jun 12, 2008 6:55 pm

Post by Thargoid »

Would need an additional element of being able to sell any/all equipment as well, but that would be a nice improvement to things I think (and another nice variation from ship to ship - max equipment capacity).
User avatar
pagroove
---- E L I T E ----
---- E L I T E ----
Posts: 3035
Joined: Wed Feb 21, 2007 11:52 pm
Location: On a famous planet

Post by pagroove »

In that case you could get real specialized fighters. It's even possible that dedicated fighter ships like the ASP have more Equipment slots making it an ultimate killer machine and a trader ship have more room dedicated to cargo and can have less equipment. I think it's difficult to implement though.
For P.A. Groove's music check
https://soundcloud.com/p-a-groove
Famous Planets v 2.7. (for Povray)
Image
https://bb.oolite.space/viewtopic.php?f=4&t=13709
User avatar
Ramirez
---- E L I T E ----
---- E L I T E ----
Posts: 628
Joined: Mon Nov 07, 2005 9:52 am
Location: London, UK

Post by Ramirez »

Putting a limit on the kind of equipment a ship can install is sensible. In the past I'm sure I've altered the shipyard entries to prevent a ship from being fitted with even basic things like fuel scoops or shields (I think I did this with the Gemini and StarSeeker. I'm not sure if this only applies to the standard equipment though, and obviously it would be difficult to pre-empt new developments.

There is the incompatible_with_equipment string that can also prevent other add-ons, but you'd have to be careful explaining a ship's limitations, e.g. that you've decided a ship can have shields or fuel scoops but not both. However as Thargoid points out, you'd really need to have a method of removing equipment as well.

I don't suppose you could do a check for the player ship's tech level when you're buying equipment?

Another option that would need quite a major overhaul but you could define equipment by type, e.g. weapon, avionics, etc, and use submenus in the equipment screen
Download Resistance Commander plus many other exciting OXPs HERE
User avatar
Eric Walch
Slightly Grand Rear Admiral
Slightly Grand Rear Admiral
Posts: 5536
Joined: Sat Jun 16, 2007 3:48 pm
Location: Netherlands

Post by Eric Walch »

However as Thargoid points out, you'd really need to have a method of removing equipment as well.
This can already be done by defining an equipment like "remove fuel scoops" and define it only available when the player has the "fuel scoops". Then when the equipment gets activated, it should remove itself and the fuel scoop.

Only drawback is that the equipment currently will be removed with a delay. For a short time you will see both versions in your inventory.

Probably we also need an event handler that activates on purchasing of equipment. (Or add a start-up script with equipment). But the event handler on purchase will be the easiest to implement.
User avatar
Frame
---- E L I T E ----
---- E L I T E ----
Posts: 1477
Joined: Fri Mar 30, 2007 8:32 am
Location: Witchspace

Post by Frame »

Eric Walch wrote:
Probably we also need an event handler that activates on purchasing of equipment. (Or add a start-up script with equipment). But the event handler on purchase will be the easiest to implement.
I´m curios to what event handler that would be... since i´m using a timer ATM to detect purchase of Equipment. the timer is started at dock.. and stopped at launch
Bounty Scanner
Number 935
User avatar
Eric Walch
Slightly Grand Rear Admiral
Slightly Grand Rear Admiral
Posts: 5536
Joined: Sat Jun 16, 2007 3:48 pm
Location: Netherlands

Post by Eric Walch »

Frame wrote:
I´m curios to what event handler that would be... since i´m using a timer ATM to detect purchase of Equipment. the timer is started at dock.. and stopped at launch.
Just one that fires when equipment is bought. That way, code that needs to check this can run very selectively.

Instead of a timer you can also use the "guiScreenChanged" handler. If the last screen was the equipment screen you can check the equipment. This makes sure it is updated before the player gets a chance to see the inventory on the F5 screen. With a timer there is always a delay. And when the timer is set very fast you waist to much idle time.

An eventhandler of its own would be the most lean code. And you could even transfer the purchased equipment with a parameter.

Code: Select all

this.purchesedEquipment = function(equipment)
{
  if(equipment == "myEquipment")
  {
     (do your stuff here)
  }
}
User avatar
Frame
---- E L I T E ----
---- E L I T E ----
Posts: 1477
Joined: Fri Mar 30, 2007 8:32 am
Location: Witchspace

Post by Frame »

Eric Walch wrote:
Frame wrote:
I´m curios to what event handler that would be... since i´m using a timer ATM to detect purchase of Equipment. the timer is started at dock.. and stopped at launch.
Just one that fires when equipment is bought. That way, code that needs to check this can run very selectively.

Instead of a timer you can also use the "guiScreenChanged" handler. If the last screen was the equipment screen you can check the equipment. This makes sure it is updated before the player gets a chance to see the inventory on the F5 screen. With a timer there is always a delay. And when the timer is set very fast you waist to much idle time.

An eventhandler of its own would be the most lean code. And you could even transfer the purchased equipment with a parameter.

Code: Select all

this.purchesedEquipment = function(equipment)
{
  if(equipment == "myEquipment")
  {
     (do your stuff here)
  }
}
Ahh.. thanks...

I misread your post as in the event handler was already there...

Regarding the parameter, i think that would just be sort of a bonus since you can already do

Code: Select all

player.hasEquipment("equipment") // for 1.71.1

player.ship.hasEquipment("equipment") // for 1.72
Thanks for the tip on the GUI screen, I must admit, I did not feel much of a impact on performance on my system when I used a timer, but that is probably down to my system being relatively fast.

Cheers Frame...
Bounty Scanner
Number 935
Post Reply