The Feudal States
Moderators: winston, another_commander
Re: The Feudal States
Ramirez,
On ships I have working with turrets the range is in km so the value would be 3 not 3000. Not sure if it makes a difference, I will change one of mine to 3000 and see what happens.
Ironfist
On ships I have working with turrets the range is in km so the value would be 3 not 3000. Not sure if it makes a difference, I will change one of mine to 3000 and see what happens.
Ironfist
64bit Mint 10 and Win 8 64bit on E8400 at 3.6GHz - ATI HD5750 graphics.
Concentration is the ability to think of absolutely nothing when it is absolutely necessary.
Concentration is the ability to think of absolutely nothing when it is absolutely necessary.
- SandJ
- ---- E L I T E ----
- Posts: 1048
- Joined: Fri Nov 26, 2010 9:08 pm
- Location: Help! I'm stranded down here on Earth!
Re: The Feudal States
Bump!Ramirez wrote:... give the opponents a fixed ball turret ... as far as I can tell, the weapon_energy setting makes no difference. Whether it's 0.5 or 50.0, it still takes about 5 hits from an NPC to reduce my front shields to zero. Similarly, weapon_range doesn't seem to do much, at least if I set it to 3000m I'll still get an NPC firing its turret from beyond 4000m. Strangely though, fire_rate does work as expected.
The kind of entry I have in the shipdata is as follows:Is this a bug or have I not understood the documentation properly?Code: Select all
subentities = ( { type = "ball_turret"; subentity_key = "feudal-ship-turret-green"; position = (0.0, 0.0, 19.0); orientation = (1, 0, 0, 0); weapon_energy = "50.0"; fire_rate = "1.0"; weapon_range = "3000"; } );
I have spent today adding turrets to my Python and weapon_energy and weapon_range do seem to be ignored.
Flying a Cobra Mk I Cobbie 3 with nothing but Explorers Club.OXP and a beam laser 4 proper lasers for company
Dropbox referral link 2GB of free space online + 500 Mb for the referral: good for securing work-in-progress.
Dropbox referral link 2GB of free space online + 500 Mb for the referral: good for securing work-in-progress.
- CommonSenseOTB
- ---- E L I T E ----
- Posts: 1397
- Joined: Wed May 04, 2011 10:42 am
- Location: Saskatchewan, Canada
Re: The Feudal States
Umm...isn't max weapon energy for turrets 25 and range for turrets goes to 5(km), no? I could be wrong you know.SandJ wrote:Bump!Ramirez wrote:... give the opponents a fixed ball turret ... as far as I can tell, the weapon_energy setting makes no difference. Whether it's 0.5 or 50.0, it still takes about 5 hits from an NPC to reduce my front shields to zero. Similarly, weapon_range doesn't seem to do much, at least if I set it to 3000m I'll still get an NPC firing its turret from beyond 4000m. Strangely though, fire_rate does work as expected.
The kind of entry I have in the shipdata is as follows:Is this a bug or have I not understood the documentation properly?Code: Select all
subentities = ( { type = "ball_turret"; subentity_key = "feudal-ship-turret-green"; position = (0.0, 0.0, 19.0); orientation = (1, 0, 0, 0); weapon_energy = "50.0"; fire_rate = "1.0"; weapon_range = "3000"; } );
I have spent today adding turrets to my Python and weapon_energy and weapon_range do seem to be ignored.
Take an idea from one person and twist or modify it in a different way as a return suggestion so another person can see a part of it that can apply to the oxp they are working on.
CommonSense 'Outside-the-Box' Design Studios Ltd.
WIKI+OXPs
CommonSense 'Outside-the-Box' Design Studios Ltd.
WIKI+OXPs
Re: The Feudal States
I don't think they are working properly at the moment. I've had them in some of my OXPs for a while, and never seen them actually do anything to change the defaults (the 25 energy and 5km range).
I thought I'd reported it, but as I can't find such a report I obviously meant to do so but got sidetracked.
I thought I'd reported it, but as I can't find such a report I obviously meant to do so but got sidetracked.
My OXPs via Boxspace or from my Wiki pages .
Thargoid TV
Dropbox Referral Link
Thargoid TV
Dropbox Referral Link
Re: The Feudal States
I suspect you're right Thargoid. Although I've used weapon energy for turrets in the past I don't think I've ever actually analysed it properly to confirm whether it was working as expected. I've just tried the same setup in v1.75.3 and got the same results, so if it is indeed a bug it doesn't look like it's a new thing.
Download Resistance Commander plus many other exciting OXPs HERE
- SandJ
- ---- E L I T E ----
- Posts: 1048
- Joined: Fri Nov 26, 2010 9:08 pm
- Location: Help! I'm stranded down here on Earth!
Re: The Feudal States
Oh, and fire_rate.SandJ wrote:I have spent today adding turrets to my Python and weapon_energy and weapon_range do seem to be ignored.
Flying a Cobra Mk I Cobbie 3 with nothing but Explorers Club.OXP and a beam laser 4 proper lasers for company
Dropbox referral link 2GB of free space online + 500 Mb for the referral: good for securing work-in-progress.
Dropbox referral link 2GB of free space online + 500 Mb for the referral: good for securing work-in-progress.
Re: The Feudal States
I think fire_rate is ok - try setting the line to something small like in the subentity group and you should see a fairly rapid stream of plasma from the turret.
Code: Select all
fire_rate = "0.2";
Download Resistance Commander plus many other exciting OXPs HERE
- SandJ
- ---- E L I T E ----
- Posts: 1048
- Joined: Fri Nov 26, 2010 9:08 pm
- Location: Help! I'm stranded down here on Earth!
Re: The Feudal States
Nope, I'm sure it doesn't. I have a turret where I can change the plasma ball colour and the turret turn speed but I cannot get its rate of fire to change, regardless of the fire_rate setting.Ramirez wrote:I think fire_rate is ok - try setting the line to something small likein the subentity group and you should see a fairly rapid stream of plasma from the turret.Code: Select all
fire_rate = "0.2";
I have three different turrets fitted, each of a different colour so I can compare them. I cannot get the fire rate or range to vary between them.
Flying a Cobra Mk I Cobbie 3 with nothing but Explorers Club.OXP and a beam laser 4 proper lasers for company
Dropbox referral link 2GB of free space online + 500 Mb for the referral: good for securing work-in-progress.
Dropbox referral link 2GB of free space online + 500 Mb for the referral: good for securing work-in-progress.
- Eric Walch
- Slightly Grand Rear Admiral
- Posts: 5536
- Joined: Sat Jun 16, 2007 3:48 pm
- Location: Netherlands
Re: The Feudal States
weapon_energy and weapon_range for turrets are not correctly supported. Both functions were announced in the 1.75 release notes, so they should work and its a bug.Thargoid wrote:I don't think they are working properly at the moment. I've had them in some of my OXPs for a while, and never seen them actually do anything to change the defaults (the 25 energy and 5km range).
I thought I'd reported it, but as I can't find such a report I obviously meant to do so but got sidetracked.
I just opened oolites cache file and looked at a ship with turrets. Both entries never make it to the cache. During validation of the subentitie definitions at startup, both keys are yet unknown and skipped. After that everything is handled well. But when they are dropped in the beginning, we proceed with default values. So they never could have worked.
EDIT:
Adding both keys to the shipRegistry makes them both work correctly as I just tested. So the main part of the current code is correct.
Last edited by Eric Walch on Tue Mar 06, 2012 9:46 pm, edited 1 time in total.
UPS-Courier & DeepSpacePirates & others at the box and some older versions
- SandJ
- ---- E L I T E ----
- Posts: 1048
- Joined: Fri Nov 26, 2010 9:08 pm
- Location: Help! I'm stranded down here on Earth!
Re: The Feudal States
Thank you for that. Is there a definitive list of what should work for turrets, or is it just the turn rate (thrust) and colour for the time being?Eric Walch wrote:weapon_energy and weapon_range for turrets are not correctly supported. Both functions were announced in the 1.75 release notes, so they should work and its a bug.
I just opened oolite's cache file and looked at a ship with turrets. Both entries never make it to the cache. During validation of the subentity definitions at startup, both keys are yet unknown and skipped. After that everything is handled well. But when they are dropped in the beginning, we proceed with default values. So they never could have worked.
Flying a Cobra Mk I Cobbie 3 with nothing but Explorers Club.OXP and a beam laser 4 proper lasers for company
Dropbox referral link 2GB of free space online + 500 Mb for the referral: good for securing work-in-progress.
Dropbox referral link 2GB of free space online + 500 Mb for the referral: good for securing work-in-progress.
- Eric Walch
- Slightly Grand Rear Admiral
- Posts: 5536
- Joined: Sat Jun 16, 2007 3:48 pm
- Location: Netherlands
Re: The Feudal States
No fire rate is also working. There is just an inconsistency were its defined. In the old subentity declaration there was no place for customisation. That means that thrust and color are defined in the the subentity key itself and are the same for every time the subentity is used.SandJ wrote:Thank you for that. Is there a definitive list of what should work for turrets, or is it just the turn rate (thrust) and colour for the time being?
With the new subentity declaration for ships, you can do additional specifications for every time you add a subentity. That means all new keys were defined in the subentitie array of the ship. Firerate is defined here, meaning every turret on a ship can have its own firerate. That gives nice effects when defining them all slightly different. No longer synchronised bursts of plasma bolts, but all fired more individually. (I used that in the current version of the random-hits spacebar).
The two wrong keys are also defined in the subentity declaration of a ship, meaning they can be all different. (If they would work)
Anyhow, a bit confusing as there are now two places turret parameters are defined.
UPS-Courier & DeepSpacePirates & others at the box and some older versions
- SandJ
- ---- E L I T E ----
- Posts: 1048
- Joined: Fri Nov 26, 2010 9:08 pm
- Location: Help! I'm stranded down here on Earth!
Re: The Feudal States
I think I understand. I used to have the following, which did not work:Eric Walch wrote:No, fire rate is also working. There is just an inconsistency where it's defined. In the old subentity declaration there was no place for customisation. That means that thrust and color are defined in the the subentity key itself and are the same for every time the subentity is used.
With the new subentity declaration for ships, you can do additional specifications for every time you add a subentity. That means all new keys were defined in the subentity array of the ship. Fire rate is defined here, meaning every turret on a ship can have its own firerate. That gives nice effects when defining them all slightly different. No longer synchronised bursts of plasma bolts, but all fired more individually. (I used that in the current version of the random-hits spacebar).
The two wrong keys are also defined in the subentity declaration of a ship, meaning they can be all different. (If they would work)
Anyhow, a bit confusing as there are now two places turret parameters are defined.
Code: Select all
subentities = (
"SiR-Turret-M 0.0 21.0 -16.0 1 0 0 0", // Magenta, top, forward
"SiR-Turret-M 0.0 21.0 -16.0 0 0 1 0", // Magenta, top, rear
"SiR-Turret-C -40.0 0.0 -25.0 0.7071 0 0.7071 0", // Cyan, left
"SiR-Turret-C 40.0 0.0 -25.0 0.7071 0 -0.7071 0", // Cyan, right
"SiR-Turret-Y 0.0 -21.0 -21.5 1 0 0 0", // Yellow, belly, front
...
"SiR-Turret-C" = {
fire_rate = "0.2";
laser_color = "cyanColor";
model = "oolite-ball-turret.dat";
roles = "ballturret SiR-Turret-C";
setup_actions = ("initialiseTurret");
};
Code: Select all
subentities = ( {type = ball_turret; subentity_key = "SiR-Turret-M"; position = ( 0.0, 21.0, -16.0); orientation = ( 1 , 0 , 0 , 0); fire_rate = 0.25;}, // Magenta, top, forward
{type = ball_turret; subentity_key = "SiR-Turret-M"; position = ( 0.0, 21.0, -16.0); orientation = ( 0 , 0 , 1 , 0); fire_rate = 0.20;}, // Magenta, top, rear
{type = ball_turret; subentity_key = "SiR-Turret-C"; position = ( -40.0, 0.0, -25.0); orientation = ( 0.7071, 0 , 0.7071, 0); fire_rate = 0.20;}, // Cyan, left
{type = ball_turret; subentity_key = "SiR-Turret-C"; position = ( 40.0, 0.0, -25.0); orientation = ( 0.7071, 0 , -0.7071, 0); fire_rate = 0.25;}, // Cyan, right
{type = ball_turret; subentity_key = "SiR-Turret-Y"; position = ( 0.0, -21.0, -21.5); orientation = ( 1 , 0 , 0 , 0); fire_rate = 0.20;}, // Yellow, belly, front
Flying a Cobra Mk I Cobbie 3 with nothing but Explorers Club.OXP and a beam laser 4 proper lasers for company
Dropbox referral link 2GB of free space online + 500 Mb for the referral: good for securing work-in-progress.
Dropbox referral link 2GB of free space online + 500 Mb for the referral: good for securing work-in-progress.
- 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: The Feudal States
Glad that you have it sorted. It's all explained in the wiki, though.
In the first case you had code that didn't make sense, because you used the old-style subentity definition which doesn't contain the properties you wanted to use. That's the reason why the new-style subentity definition was introduced in the first place. So if you wanted to use the new-style properties you have to use the new-style subentity definition to begin with.
In the first case you had code that didn't make sense, because you used the old-style subentity definition which doesn't contain the properties you wanted to use. That's the reason why the new-style subentity definition was introduced in the first place. So if you wanted to use the new-style properties you have to use the new-style subentity definition to begin with.
- SandJ
- ---- E L I T E ----
- Posts: 1048
- Joined: Fri Nov 26, 2010 9:08 pm
- Location: Help! I'm stranded down here on Earth!
Re: The Feudal States
It was that I was going by and was causing me the confusion overCommander McLane wrote:Glad that you have it sorted. It's all explained in the wiki, though.
weapon_range
and [size=120]weapon_energy[/size]
. And it's not sorted as those parameters do not work in either format.When I thought I'd have a go at adding turrets to see what they did, I searched through all the .plists I had for the OXPs I have downloaded and come with the game to find examples to copy and adapt. Sadly, I originally had it in what you call the 'new-style' format and spent hours converting it to the 'old-style' since the parameters didn't work and the 'old-style' format is the more commonly-used for ball turrets.Commander McLane wrote:In the first case you had code that didn't make sense, because you used the old-style subentity definition which doesn't contain the properties you wanted to use. That's the reason why the new-style subentity definition was introduced in the first place. So if you wanted to use the new-style properties you have to use the new-style subentity definition to begin with.
Flying a Cobra Mk I Cobbie 3 with nothing but Explorers Club.OXP and a beam laser 4 proper lasers for company
Dropbox referral link 2GB of free space online + 500 Mb for the referral: good for securing work-in-progress.
Dropbox referral link 2GB of free space online + 500 Mb for the referral: good for securing work-in-progress.
- 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: The Feudal States
I guess that's a common side effect of a transition. The old and tried examples are of course in the old style, so in the beginning you have nothing to copy and work with. And as the old-style definition isn't deprecated and continues to work perfectly (within its known limitations) there is not a lot of pressure on scripters to switch existing OXPs to the new style.SandJ wrote:... and the 'old-style' format is the more commonly-used for ball turrets.