[WIP] [UPDATE] Weapon Rotator OXP 0.3.2
Moderators: winston, another_commander
Re: [WIP] Weapon Rotator OXP 0.1.1
What do you intend to do with the decrease in laser temperature during the rotation time ?
Both stopping the decrease and continuing will imo require an explanation/handwavium.
(No idea if it's possible to stop the decrease temporarily)
Both stopping the decrease and continuing will imo require an explanation/handwavium.
(No idea if it's possible to stop the decrease temporarily)
OS : Arch Linux 64-bit - rolling release
OXPs : My user page
Retired, reachable at [email protected]
OXPs : My user page
Retired, reachable at [email protected]
- Commander McLane
- ---- E L I T E ----
- Posts: 9520
- Joined: Thu Dec 14, 2006 9:08 am
- Location: a Hacker Outpost in a moderately remote area
- Contact:
Re: [WIP] Weapon Rotator OXP 0.1.1
Laser temperature cannot be messed with by script. I'm also curious how this one is tackled. A quick test shows that neither removing nor replacing a weapon influences the weapon temperature. In other words: rotating your weapons will not replace your overheated front laser with a cool side laser. The usual decrease just goes on as if no weapon was switched.Lone_Wolf wrote:What do you intend to do with the decrease in laser temperature during the rotation time ?
Both stopping the decrease and continuing will imo require an explanation/handwavium.
(No idea if it's possible to stop the decrease temporarily)
- Smivs
- Retired Assassin
- Posts: 8408
- Joined: Tue Feb 09, 2010 11:31 am
- Location: Lost in space
- Contact:
Re: [WIP] Weapon Rotator OXP 0.1.1
I see that as a good thing - it avoids an obvious cheat! It could easily be explained way with a bit of handwavium like all the lasers have a common componant which gets hot with use, and when switching from say a mining laser to a military laser this componant is still hot and needs to cool down.
Commander Smivs, the friendliest Gourd this side of Riedquat.
Re: [WIP] Weapon Rotator OXP 0.1.1
How about allowing the rotation of the weapons only if they are cooled down? Would make sense to me.
Re: [WIP] Weapon Rotator OXP 0.1.1
That would be a possible logical solution. I just saw that the LTs are read-only, so keeping them stuck to their appropriate laser, as I intended, will not work. Anyway, allowing rotation only, like you suggested spara, when they are cool, or maybe below a certain threshold, so that after the time they take to rotate, they will have cooled down anyway.spara wrote:How about allowing the rotation of the weapons only if they are cooled down? Would make sense to me.
A threshold sounds nice to me, as it would make sense to rotate a "handwarm" laser, but forbid to rotate a boiling hot one.
What d'you think?
Re: [WIP] Weapon Rotator OXP 0.1.1
I'm still wondering about what a good pricing would be...
If you think of it like a good tripod, which could easily exceed the costs of a medium camera. And then it should be a device that really has to be earned. So currently I'm thinking it might be better to raise the prices:
low budget device: ~3500-4500
pro device: ~ >8000
Suggestions?
If you think of it like a good tripod, which could easily exceed the costs of a medium camera. And then it should be a device that really has to be earned. So currently I'm thinking it might be better to raise the prices:
low budget device: ~3500-4500
pro device: ~ >8000
Suggestions?
Re: [WIP] Weapon Rotator OXP 0.1.1
BTW, I put the code on GitHub:
https://github.com/hmb/weapon-rotator-oxp
and created a Wiki Page:
http://wiki.alioth.net/index.php/Weapon_Rotator
https://github.com/hmb/weapon-rotator-oxp
and created a Wiki Page:
http://wiki.alioth.net/index.php/Weapon_Rotator
Re: [WIP] Weapon Rotator OXP 0.1.1
The this.playerBoughtEquipment code looks weird to me.
It almost seems as if it immediately removes the equipment everytime it's bought AND gives a full refund.
Note : i haven't looked yet at the 1.77 equipment scripts, so it's possible i misunderstand how those work together with the worldscript.
Also your this.something naming could lead to problems, check https://bb.oolite.space/viewtopic.php?f=4&t=12149 (especially page 3).
As for the pricing : I have a feeling both may be to low, and there should be a bigger gap between low budget and pro version.
Apart from a higher break down for the LB version, you could also link the breakage chance to the cost of the laser setup.
example :
pulse lasers should have a low breaking chance as they are relatively simple/cheap.
military lasers and mining lasers should have a much higher chance.
It almost seems as if it immediately removes the equipment everytime it's bought AND gives a full refund.
Note : i haven't looked yet at the 1.77 equipment scripts, so it's possible i misunderstand how those work together with the worldscript.
Also your this.something naming could lead to problems, check https://bb.oolite.space/viewtopic.php?f=4&t=12149 (especially page 3).
As for the pricing : I have a feeling both may be to low, and there should be a bigger gap between low budget and pro version.
Apart from a higher break down for the LB version, you could also link the breakage chance to the cost of the laser setup.
example :
pulse lasers should have a low breaking chance as they are relatively simple/cheap.
military lasers and mining lasers should have a much higher chance.
OS : Arch Linux 64-bit - rolling release
OXPs : My user page
Retired, reachable at [email protected]
OXPs : My user page
Retired, reachable at [email protected]
Re: [WIP] Weapon Rotator OXP 0.1.1
This is to refund an already bought WP. Suppose you have the low budget version of the WP already installed. Now you buy the expensive version. You shall not have both of them installed concurrently. So your current one is removed, and refunded. The newly bought one then is installed. Sort of like if you buy a new front laser. I'd like to subtract a percentage according to it's wearlevel, but that's not yet implemented. I'd like to store the number of invocations in the saved player file somehow, or just take the ships wearlevel.Lone_Wolf wrote:The this.playerBoughtEquipment code looks weird to me.
It almost seems as if it immediately removes the equipment everytime it's bought AND gives a full refund.
Note : i haven't looked yet at the 1.77 equipment scripts, so it's possible i misunderstand how those work together with the worldscript.
Yepp, thanks I found the page already. I've changed it, but it might not yet have been pushed to github. I check-in quite frequently but push a little less frequently.Lone_Wolf wrote:Also your this.something naming could lead to problems, check https://bb.oolite.space/viewtopic.php?f=4&t=12149 (especially page 3).
That sounds like a good idea I'll figure out a formula for the wearlevel for the next release.Lone_Wolf wrote:As for the pricing : I have a feeling both may be to low, and there should be a bigger gap between low budget and pro version.
Apart from a higher break down for the LB version, you could also link the breakage chance to the cost of the laser setup.
example :
pulse lasers should have a low breaking chance as they are relatively simple/cheap.
military lasers and mining lasers should have a much higher chance.
Holger
Re: [WIP] Weapon Rotator OXP 0.1.1
Well you're right, there actually was a bug in the code. While not noticable, once you had bought one version, it messed up the repair process and initialization. Fixed now, see Readme for details.Lone_Wolf wrote:The this.playerBoughtEquipment code looks weird to me.
It almost seems as if it immediately removes the equipment everytime it's bought AND gives a full refund.
Note : i haven't looked yet at the 1.77 equipment scripts, so it's possible i misunderstand how those work together with the worldscript.
Re: [WIP] [UPDATE] Weapon Rotator OXP 0.2.0
I released the new version 0.2.0. It comes with a bunch of new features and a few bugfixes. From the Readme:
Download (new link):
Sorry , accidentally instead of uploading a new version I uploaded a new file and removed the old file, thus invalidating the download link. Here's the new link:
https://www.box.com/s/882u5f8sah1uz4rcqm8z
Features:
Holger
Download (new link):
Sorry , accidentally instead of uploading a new version I uploaded a new file and removed the old file, thus invalidating the download link. Here's the new link:
https://www.box.com/s/882u5f8sah1uz4rcqm8z
Features:
- Add a different damage probability to the LB and HQ version, leading to the LB version getting damaged three times as othen as normal equipment. The HQ version is more stable than normal equipment.
- Add different sounds for both versions. The sounds are now split into start, loop and ending sound, thus allowing for a variable length of rotation.
- The description of the lowcost device has been altered to sound like a cheap translation of a non-native speaker, like the descriptions often to be found in cheap imitations of products.
- Add a different rotation time for both versions of the WR. The HQ device now rotates quite fast, while the LB device drags endlessly.
- Add an operation counter, remembering the number of invocations. This is currently used in the refund calculation. It will in future also determine the malfunction probability of the LB device.
- Increase the prices and add a bigger gap between both devices. Inexperienced pilots won't be able to get the original equipment to early.
- Use special crosshairs indicating the rotation direction. The new crosshairs consist of 4 arrows in a row, in either left or right direction.
- Fix the check of the equipment presence. Due to a misunderstanding the function EquipmentInfo.infoForKey("EQ_XXX") had been used to determine, whether an equipment is present. This is wrong, it justs reveals, if the equipment is known at all to Oolite. To find out whether it is attached to the ship, we have to use player.ship.equipmentStatus. This created an issue in the playerBoughtEquipment event, leading to an unwanted refund when repairing a damaged WR. It also messed up the initialization process, leading to the wrong equipment being used at startup.
- Rename custom functions to _XXX. While this is not really a bug it is still best practice and avoids future collisions with new event handlers.
- The code has been added to github: https://github.com/hmb/weapon-rotator-oxp
Holger
Re: [WIP] [UPDATE] Weapon Rotator OXP 0.3.2
Alright, just before easter there's a new release including the long awaited auto-rotator. This includes a lot of code refactoring. It should now conform to the OXP development practice.
Here's an excerpt of the changelog:
Features:
- The main feature of this new version is the added autorotator. It is sold
at a market price of 2890.0 Cr, with a damage probability of 1.0. The
autorotator when invoked with 'n', stores the current weapon rotator
position. On a red alert it automatically rotates to the stored position.
- Forbid rotating, if at least one of the lasers is too hot. The LB version
needs a temperature below 0.1, HQ below 0.25, which is the green temperature
level in the laser temp gauge.
- Account for a damaged WR in refund, when buying a new device. If the player
instead of repairing a damaged device buys the alternative WR the refund is
cut by half.
Changes
- Reorder the stopping and starting of the sound to avoid a possible gap.
The loop sound is now started before the start is stopped. The same way
the finish sound is started, before the loop is stopped. This is to avoid
a possible gap of silence.
- Change variable names to start with '_'. While this was already done for
functions, it wasn't for variables.
- Work heavily on restructuring the code to be more readable and better
documented.
Bugfixes:
- Fix the floating point calculation jitter in refund calculation. When the
usage count is 0 and the WP is exchanged (HQ<->LB) the full market value is
refunded. The calculation function returned something a little less than 1
due to floating point rounding errors. This lead to a refund just a little
less than the original value when replacing a brand new WR.
Have fun and Happy Easter!
Holger
Here's an excerpt of the changelog:
Features:
- The main feature of this new version is the added autorotator. It is sold
at a market price of 2890.0 Cr, with a damage probability of 1.0. The
autorotator when invoked with 'n', stores the current weapon rotator
position. On a red alert it automatically rotates to the stored position.
- Forbid rotating, if at least one of the lasers is too hot. The LB version
needs a temperature below 0.1, HQ below 0.25, which is the green temperature
level in the laser temp gauge.
- Account for a damaged WR in refund, when buying a new device. If the player
instead of repairing a damaged device buys the alternative WR the refund is
cut by half.
Changes
- Reorder the stopping and starting of the sound to avoid a possible gap.
The loop sound is now started before the start is stopped. The same way
the finish sound is started, before the loop is stopped. This is to avoid
a possible gap of silence.
- Change variable names to start with '_'. While this was already done for
functions, it wasn't for variables.
- Work heavily on restructuring the code to be more readable and better
documented.
Bugfixes:
- Fix the floating point calculation jitter in refund calculation. When the
usage count is 0 and the WP is exchanged (HQ<->LB) the full market value is
refunded. The calculation function returned something a little less than 1
due to floating point rounding errors. This lead to a refund just a little
less than the original value when replacing a brand new WR.
Have fun and Happy Easter!
Holger
Re: [WIP] [UPDATE] Weapon Rotator OXP 0.3.2
Hi everybody,
does anybody know, how much that equipment costs and at what TL it is possible to buy it?
does anybody know, how much that equipment costs and at what TL it is possible to buy it?
Josef
Re: [WIP] [UPDATE] Weapon Rotator OXP 0.3.2
After you download an OXP, you can use the expansion manager to extract it.
Switch the expansion manager to “list installed” mode, highlight the OXP in the list, and press ‘x’ on your keyboard. It will extract a copy of all the OXP files into your AddOns folder (the screen in the expansion manager will explain this too). This does not affect the OXP itself, it’s just a copy.
You can look in there, specifically look for an equipment.plist file in the Config sub-folder instead the OXP. You can open plist files with any text editor. It will show you the price and tech level for every piece of equipment in the OXP.
Switch the expansion manager to “list installed” mode, highlight the OXP in the list, and press ‘x’ on your keyboard. It will extract a copy of all the OXP files into your AddOns folder (the screen in the expansion manager will explain this too). This does not affect the OXP itself, it’s just a copy.
You can look in there, specifically look for an equipment.plist file in the Config sub-folder instead the OXP. You can open plist files with any text editor. It will show you the price and tech level for every piece of equipment in the OXP.
- Cholmondely
- Archivist
- Posts: 5372
- Joined: Tue Jul 07, 2020 11:00 am
- Location: The Delightful Domains of His Most Britannic Majesty (industrial? agricultural? mainly anything?)
- Contact:
Re: [WIP] [UPDATE] Weapon Rotator OXP 0.3.2
Allow me, Sir, to introduce you to the entrails of this oxp:
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<array>
<array>
<integer>7</integer>
<integer>38300</integer>
<string>Bore & Ratter Weapon Rotator</string>
<string>EQ_LB_WEAPON_ROTATOR</string>
<string>This is famus Bore & Ratter weapon rottator. It weapon clockweise or anticlockweise circles through your front, afft, coreboard and pord weapon mounds. You nedd in combat situation without it. It helps perfactly to stitch betwen your lasers, do ring mining and fighting coombat.</string>
<dict>
<key>available_to_all</key> <true/>
<key>script</key> <string>WeaponRotator-LowBudgetEquipment.js</string>
<key>damage_probability</key> <real>3.0</real>
</dict>
</array>
<array>
<integer>11</integer>
<integer>92500</integer>
<string>Bore & Ratter Weapon Rotator</string>
<string>EQ_HQ_WEAPON_ROTATOR</string>
<string>The Bore & Ratter weapon rotator circles your weapons clockwise or anticlockwise through your front, aft, storeboard and port weapon mounts. This high precision equipment will help you in combat situations, during mining or in all other situations. It ensures that you will always have the weapon of your choice up front.</string>
<dict>
<key>available_to_all</key> <true/>
<key>script</key> <string>WeaponRotator-HighQualityEquipment.js</string>
<key>damage_probability</key> <real>0.75</real>
</dict>
</array>
<array>
<integer>11</integer>
<integer>28900</integer>
<string>Emergency autorotator</string>
<string>EQ_AUTOMATIC_WEAPON_ROTATOR</string>
<string>This device plugs into your status system and your "Bore & Ratter" weapon rotator. In case of a hostile alert condition, it rotates your weapons automatically to a previously stored combat position.</string>
<dict>
<key>available_to_all</key> <true/>
<key>script</key> <string>WeaponRotator-AutoRotatorEquipment.js</string>
<key>damage_probability</key> <real>1.0</real>
<key>requires_any_equipment</key> <array>
<string>EQ_LB_WEAPON_ROTATOR</string>
<string>EQ_HQ_WEAPON_ROTATOR</string>
</array>
</dict>
</array>
<!--
<array>
<integer>11</integer>
<integer>100</integer>
<string>Weapon Rotator Shielding</string>
<string>EQ_SHIELD_WEAPON_ROTATOR</string>
<string>This additional shield system protects your "Bore & Ratter" weapon rotator from laser fire.</string>
<dict>
<key>available_to_all</key> <true/>
<key>script</key> <string>WeaponRotator-RotatorShieldEquipment.js</string>
<key>damage_probability</key> <real>0.25</real>
</dict>
</array>
-->
</array>
</plist>
Comments wanted:
•Missing OXPs? What do you think is missing?
•Lore: The economics of ship building How many built for Aronar?
•Lore: The Space Traders Flight Training Manual: Cowell & MgRath Do you agree with Redspear?
•Missing OXPs? What do you think is missing?
•Lore: The economics of ship building How many built for Aronar?
•Lore: The Space Traders Flight Training Manual: Cowell & MgRath Do you agree with Redspear?