aft_weapon_type doesn't work in shipyard.plist

For test results, bug reports, announcements of new builds etc.

Moderators: winston, another_commander, Getafix

Post Reply
User avatar
Commander McLane
---- E L I T E ----
---- 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:

aft_weapon_type doesn't work in shipyard.plist

Post by Commander McLane »

This is an issue of which I'm not sure whether it was supposed to be in the functionality of the game at all. However I think it should be, so I call it a bug.

Sometimes a scripter would like to construct a ship that has a default weapon not only at the front, but also at its back. So rather than this

Code: Select all

		<key>standard_equipment</key>
		<dict>
			<key>extras</key>
			<array>
				<string>EQ_FUEL_SCOOPS</string>
				<string>EQ_FUEL_INJECTION</string>
			</array>
			<key>forward_weapon_type</key>
			<string>EQ_WEAPON_MILITARY_LASER</string>
			<key>missiles</key>
			<integer>4</integer>
		</dict>
the shipyard.plist would look like this

Code: Select all

		<key>standard_equipment</key>
		<dict>
			<key>aft_weapon_type</key>
			<string>EQ_WEAPON_TWIN_PLASMA_CANNON</string>
			<key>extras</key>
			<array>
				<string>EQ_FUEL_SCOOPS</string>
				<string>EQ_FUEL_INJECTION</string>
			</array>
			<key>forward_weapon_type</key>
			<string>EQ_WEAPON_MILITARY_LASER</string>
			<key>missiles</key>
			<integer>4</integer>
		</dict>
(example taken from Dragon.oxp by Cmdr Wyvern).

The <key>aft_weapon_type</key> is supposed to work analogous to <key>forward_weapon_type</key>, assigning the specified weapon to the ship. It doesn't do so, however, and hasn't at 1.65 as well.

The matter is a little bit more complicated, as <key>aft_weapon_type</key> isn't documented, so one could argue that it isn't supposed to work. However it does work for NPC ships in shipdata.plist (although undocumented as well), and so I felt safe to assume that it would work for the player in shipyard.plist as well. I was wrong with that assumption.

So my request is: If this is a broken functionality, I ask it to be repaired. If it wasn't supposed to be a functionality, I ask it to be added. (In the latter case: What about analogous keys for the port and starboard weapons?)

Thanks!
User avatar
JensAyton
Grand Admiral Emeritus
Grand Admiral Emeritus
Posts: 6657
Joined: Sat Apr 02, 2005 2:43 pm
Location: Sweden
Contact:

Post by JensAyton »

There’s no particular reason to assume that the presence of a key in shipdata.plist would mean that it would work in shipyard.plist too.

Anyway, supporting this would be quite easy, but the question is whether there are balance issues. My immediate response is “no”, but some community feedback would be helpful.
User avatar
Commander McLane
---- E L I T E ----
---- 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:

Post by Commander McLane »

Ahruman wrote:
My immediate response is “no”,
"No" as in: "There is no balance issue, so no problem." or "no" as in: "I'm not going to do it."?

As for the presence of a key in shipyard.plist I mentioned that I was working on an assumption here (although an assumption that made sense and in itself was logic). Actually not even me, the OXP in question is by Cmdr Wyvern.

And anyway, as I said, aft_weapon_type is not even officially present in shipdata.plist. It's not documented in the wiki.
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6628
Joined: Wed Feb 28, 2007 7:54 am

Post by another_commander »

I don't see a problem with balance if this gets implemented. I would say, lets go on and do it.
User avatar
TGHC
---- E L I T E ----
---- E L I T E ----
Posts: 2157
Joined: Mon Jan 31, 2005 4:16 pm
Location: Berkshire, UK

Post by TGHC »

There seem to be very few ships that I come up against that have rear lasers fitted, I would expect a lot more, particularly traders, who will always want to defend themselves, and blinged up pirates and bounty hunters, so I think it would improve the game balance. It would certainly make a change to jousting duels and to sneaking up the exhaust of an Anaconda or Boa
The Grey Haired Commander has spoken!
OK so I'm a PC user - "you know whats scary? Out of billions of sperm I was the fastest"
User avatar
JensAyton
Grand Admiral Emeritus
Grand Admiral Emeritus
Posts: 6657
Joined: Sat Apr 02, 2005 2:43 pm
Location: Sweden
Contact:

Post by JensAyton »

Commander McLane wrote:
Ahruman wrote:
My immediate response is “no”,
"No" as in: "There is no balance issue, so no problem." or "no" as in: "I'm not going to do it."?
“No” as in I don’t see a problem. I’ll leave it until next week, then do it if no-one’s come up with a reason it would be a problem. (I’ll be away sat–tues.)
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 »

McLaine wrote:
And anyway, as I said, aft_weapon_type is not even officially present in shipdata.plist. It's not documented in the wiki.
But it should have been listed, I'll add it there. NPC ship having them will sometimes use it when they fly away from the target in the attack proces.

NPC ships don't have port weapons. For the player it is very difficult to aim with these. The same counts for programming a aiming routine for NPC ships. So it is never done. (I sometimes see NPC ships having these port weapons listed in shipdata.plist but it will do nothing)
TGHC wrote:
There seem to be very few ships that I come up against that have rear lasers fitted, I would expect a lot more, particularly traders, who will always want to defend themselves, ....... It would certainly make a change to jousting duels and to sneaking up the exhaust of an Anaconda or Boa
With Anaconda's or Boa's it will hardly make a difference. The first mission Boa you see in my ups-courier.oxp has an aft-laser. I think I only have seen it once in action. Ships with escorts always send their escorts to the attacker and do a flee themselves. And lasers are not used in the process of fleeing, only during an attack. But other ships that more readily attack may benefit from it.
But the original question was not giving NPC ships the lasers, but let some of the the ships in shipyard having them. And that does not change the balance as the player otherwise would buy them.
User avatar
Cmdr James
Commodore
Commodore
Posts: 1357
Joined: Tue Jun 05, 2007 10:43 pm
Location: Berlin

Post by Cmdr James »

Does anyone have any objection to me adding support for aft weapons that will become available on ships in the shipyard?

It will allow oxp authors to add default weapons, and make it possible for a "random upgrade" like the other things that you sometimes get added to ships in the shipyard?

I have tested my code with a modification of the cobra clipper SE (its what was there in the shipyard, so I hacked the oxp) and mounted a rear pulse laser. Clearly I am not suggesting that the cobra clipper be modified, thats just what I did for testing.

If no one complains Ill add it to trunk in a couple of days (give you some time to think of reasons to hate it 8) ) and of course it will not be in a stable version for a long while.

Im interested to hear if anyone thinks port/starboard weapons should also be available in this way. It is more complex to have all 4 possible, as we should probably mount the best fore, the next aft, and then anything else to the side. It doesnt make much sense to have a ship with front pulse laser, and military port and starboard. My preference is not to complicate things, and just have for and aft.
User avatar
TGHC
---- E L I T E ----
---- E L I T E ----
Posts: 2157
Joined: Mon Jan 31, 2005 4:16 pm
Location: Berkshire, UK

Post by TGHC »

I have no objections, I made my comments earlier in this thread.
The Grey Haired Commander has spoken!
OK so I'm a PC user - "you know whats scary? Out of billions of sperm I was the fastest"
User avatar
Commander McLane
---- E L I T E ----
---- 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:

Post by Commander McLane »

Please, go ahead! :D
User avatar
Cmdr James
Commodore
Commodore
Posts: 1357
Joined: Tue Jun 05, 2007 10:43 pm
Location: Berlin

Post by Cmdr James »

Right, anyone brave enough to build trunk from source will find they can now add rear facing lasers to ships in their oxps.

So now you can build the ship of your dreams, all engines and a big gun pointing the wrong way, so you can run away and fight all at the same time :)
Post Reply