forward_weapon_type in shipyard/shippdata.plist
Moderators: winston, another_commander, Getafix
- montana05
- ---- E L I T E ----
- Posts: 1166
- Joined: Mon May 30, 2016 3:54 am
- Location: lurking in The Devils Triangle (G1)
forward_weapon_type in shipyard/shippdata.plist
Could somebody please explain to me what the forward_weapon_type or lasers in general in shipyard.plist are doing ? As discussed and tested here viewtopic.php?p=283537#p283537 shipdata.plist always overwrites the settings of shipyard.plist. Any laser in shipyard.plist is ignored as long as there is no entry in shipdata.plist so at a first look this field(s) seems pretty useless.
Scars remind us where we've been. They don't have to dictate where we're going.
Re: forward_weapon_type in shipyard/shippdata.plist
I'm assuming you are applying it to a player-only ship, in which case it is useless, but in an NPC entry it is useful. It's like what's the point of view position coords on an NPCship?montana05 wrote: ↑Sun May 01, 2022 2:13 pmCould somebody please explain to me what the forward_weapon_type or lasers in general in shipyard.plist are doing ? As discussed and tested here viewtopic.php?p=283537#p283537 shipdata.plist always overwrites the settings of shipyard.plist. Any laser in shipyard.plist is ignored as long as there is no entry in shipdata.plist so at a first look this field(s) seems pretty useless.
But the moment a playership or NPCship is a tiny brief entry drawing its bulk info from an is_template ship, it doesn't hurt to have all the parameters..
I was young, I was naïve. Jonny Cuba made me do it!
- montana05
- ---- E L I T E ----
- Posts: 1166
- Joined: Mon May 30, 2016 3:54 am
- Location: lurking in The Devils Triangle (G1)
Re: forward_weapon_type in shipyard/shippdata.plist
I might be wrong but shipyard.plist is for player-ships only, it doesn't affect any NPC as much as I know. While I usually even set default values (just to be sure) it is kind of confusing to have a seemingless useless parameter. While testing the individual shipyard, I saw several ships getting their lasers reduced because their authors believed, same like me in the past, that shipyard.plist will overwrite shipdata.plist.Old Murgh wrote: ↑Sun May 01, 2022 2:49 pmI'm assuming you are applying it to a player-only ship, in which case it is useless, but in an NPC entry it is useful. It's like what's the point of view position coords on an NPCship?montana05 wrote: ↑Sun May 01, 2022 2:13 pmCould somebody please explain to me what the forward_weapon_type or lasers in general in shipyard.plist are doing ? As discussed and tested here viewtopic.php?p=283537#p283537 shipdata.plist always overwrites the settings of shipyard.plist. Any laser in shipyard.plist is ignored as long as there is no entry in shipdata.plist so at a first look this field(s) seems pretty useless.
But the moment a playership or NPCship is a tiny brief entry drawing its bulk info from an is_template ship, it doesn't hurt to have all the parameters..
Scars remind us where we've been. They don't have to dictate where we're going.
Re: forward_weapon_type in shipyard/shippdata.plist
Sorry, my brain dyslexed your word order. Yes you're right, that' shouldn't be the case. I'll test when I get a chance.montana05 wrote: ↑Sun May 01, 2022 11:51 pmI might be wrong but shipyard.plist is for player-ships only, it doesn't affect any NPC as much as I know. While I usually even set default values (just to be sure) it is kind of confusing to have a seemingless useless parameter. While testing the individual shipyard, I saw several ships getting their lasers reduced because their authors believed, same like me in the past, that shipyard.plist will overwrite shipdata.plist.
I was young, I was naïve. Jonny Cuba made me do it!
Re: forward_weapon_type in shipyard/shippdata.plist
Pure speculation on my part but...
If the shipdata.plist designates a specific laser, lets say a Military Laser for the sake of discussion, and the shipyard.plist designates no laser at all. Does it then follow that any Shipyard could offer that ship with a less powerful laser, say a Pulse or Beam Laser, instead of the desired Military Laser from the shipdata.plist. Does that make sense of it? Basically the entry in the shipyard.plist is there only to ensure that the desired type of laser is the minimum that could be offered at a Shipyard for that specific ship. It then follows that the two entries from each .plist should match to get the desired result or that no entry should be entered in either .plist to allow any laser to be fitted at a Shipyard.
Have not even gone into the Standard Equipment versus Optional Equipment aspects of the shipyard.plist. Just trying to make sense of the entries that are under discussion here.
If the shipdata.plist designates a specific laser, lets say a Military Laser for the sake of discussion, and the shipyard.plist designates no laser at all. Does it then follow that any Shipyard could offer that ship with a less powerful laser, say a Pulse or Beam Laser, instead of the desired Military Laser from the shipdata.plist. Does that make sense of it? Basically the entry in the shipyard.plist is there only to ensure that the desired type of laser is the minimum that could be offered at a Shipyard for that specific ship. It then follows that the two entries from each .plist should match to get the desired result or that no entry should be entered in either .plist to allow any laser to be fitted at a Shipyard.
Have not even gone into the Standard Equipment versus Optional Equipment aspects of the shipyard.plist. Just trying to make sense of the entries that are under discussion here.
Humor is the second most subjective thing on the planet
Brevity is the soul of wit and vulgarity is wit's downfall
Good Night and Good Luck - Read You Soon
Brevity is the soul of wit and vulgarity is wit's downfall
Good Night and Good Luck - Read You Soon
Re: forward_weapon_type in shipyard/shippdata.plist
My first tests are like Montana says.
The shipdata overrides the standard shipyard designation. Then weirdly, when writing military laser in the shipyard and a pulse in the shipdata, the ship is sold with no laser (though ML was present in the optional list). To me it seems like something resembling a bug, but a more systematic tester might see the explanation..
The shipdata overrides the standard shipyard designation. Then weirdly, when writing military laser in the shipyard and a pulse in the shipdata, the ship is sold with no laser (though ML was present in the optional list). To me it seems like something resembling a bug, but a more systematic tester might see the explanation..
I was young, I was naïve. Jonny Cuba made me do it!
- montana05
- ---- E L I T E ----
- Posts: 1166
- Joined: Mon May 30, 2016 3:54 am
- Location: lurking in The Devils Triangle (G1)
Re: forward_weapon_type in shipyard/shippdata.plist
Good thought, but while in my test-runs I had a rear laser who wasn't defined in the shipdata.plist but in the shipyard.plist as military. The result when I bought the ship was no rear laser at all.
Scars remind us where we've been. They don't have to dictate where we're going.
- Slartibartfast
- Deadly
- Posts: 175
- Joined: Mon Jan 21, 2008 3:54 pm
Re: forward_weapon_type in shipyard/shippdata.plist
Hello
maybe ... but my eyes, that would make no sense to set a "minimum"
-- why should a "big ship" not be able to carry small lasers?
i think, only the other way round makes sense
define "max-laser_(power)" in shipdata
- shipdata (technical part) should define the ability of the "hull" to carry equipment
- shipyard should define, how a new ship is equipped and what you can buy
( regarding to the maximum, which is set in shipdata)
matthias
hmmBasically the entry in the shipyard.plist is there only to ensure that the desired type of laser is the minimum that could be offered at a Shipyard for that specific ship.
maybe ... but my eyes, that would make no sense to set a "minimum"
-- why should a "big ship" not be able to carry small lasers?
i think, only the other way round makes sense
define "max-laser_(power)" in shipdata
- shipdata (technical part) should define the ability of the "hull" to carry equipment
- shipyard should define, how a new ship is equipped and what you can buy
( regarding to the maximum, which is set in shipdata)
matthias
Oolite 1.91 / Imp. Trader ( slighly modified ) on Lubuntu 22.04 LTS on AMD64 2x 3800+ ,
ATI Radeon R7240 XFS / Samsung TV 40" 1080p
C-Media CMI8738 / Yamaha RX-V575 / DIY-Speaker
Logitech Attack3 & standard german keyboard
ATI Radeon R7240 XFS / Samsung TV 40" 1080p
C-Media CMI8738 / Yamaha RX-V575 / DIY-Speaker
Logitech Attack3 & standard german keyboard
- Slartibartfast
- Deadly
- Posts: 175
- Joined: Mon Jan 21, 2008 3:54 pm
Re: forward_weapon_type in shipyard/shippdata.plist
hi
O.K. then we need a "2nd part" for equipment in "shipdata"
-EQ , that is set fo npc-ships, (only npc! ), because you have no shipyard
( which should also fit to the "hull-data" )
---------
or ..... a "virtual" shipyard - that equips npc-ships randomly
( regarding to the hull-data " set in shipdata )
....
oh .. i see that would cause a lot of work
matthias
O.K. then we need a "2nd part" for equipment in "shipdata"
-EQ , that is set fo npc-ships, (only npc! ), because you have no shipyard
( which should also fit to the "hull-data" )
---------
or ..... a "virtual" shipyard - that equips npc-ships randomly
( regarding to the hull-data " set in shipdata )
....
oh .. i see that would cause a lot of work
matthias
Oolite 1.91 / Imp. Trader ( slighly modified ) on Lubuntu 22.04 LTS on AMD64 2x 3800+ ,
ATI Radeon R7240 XFS / Samsung TV 40" 1080p
C-Media CMI8738 / Yamaha RX-V575 / DIY-Speaker
Logitech Attack3 & standard german keyboard
ATI Radeon R7240 XFS / Samsung TV 40" 1080p
C-Media CMI8738 / Yamaha RX-V575 / DIY-Speaker
Logitech Attack3 & standard german keyboard
- montana05
- ---- E L I T E ----
- Posts: 1166
- Joined: Mon May 30, 2016 3:54 am
- Location: lurking in The Devils Triangle (G1)
Re: forward_weapon_type in shipyard/shippdata.plist
Ahem, Ahem, any news regarding this ?
Scars remind us where we've been. They don't have to dictate where we're going.
- phkb
- Impressively Grand Sub-Admiral
- Posts: 4830
- Joined: Tue Jan 21, 2014 10:37 pm
- Location: Writing more OXPs, because the world needs more OXPs.
Re: forward_weapon_type in shipyard/shippdata.plist
OK, I've had a look at what's going on, and can confirm this is a bug. The weapon info is is picked up from the shipyard data, but never actually applied into the final ship object. I have a fix, which I'll try and publish in the next few days.
If you want to compile and play yourself, add these two lines to "Universe.m" at line 8630 (if should be just below this statement:
If you want to compile and play yourself, add these two lines to "Universe.m" at line 8630 (if should be just below this statement:
OOWeaponType aftWeapon = OOWeaponTypeFromEquipmentIdentifierSloppy(aftWeaponString);
)
Code: Select all
if (fwdWeapon && fwdWeaponString) [shipDict setObject:fwdWeaponString forKey:KEY_EQUIPMENT_FORWARD_WEAPON];
if (aftWeapon && aftWeaponString) [shipDict setObject:aftWeaponString forKey:KEY_EQUIPMENT_AFT_WEAPON];
- montana05
- ---- E L I T E ----
- Posts: 1166
- Joined: Mon May 30, 2016 3:54 am
- Location: lurking in The Devils Triangle (G1)
Re: forward_weapon_type in shipyard/shippdata.plist
Thank you for your effort, phkb, I did suspect that much after my tests. Slartibartfast was right.phkb wrote: ↑Sat May 28, 2022 7:11 amOK, I've had a look at what's going on, and can confirm this is a bug. The weapon info is is picked up from the shipyard data, but never actually applied into the final ship object. I have a fix, which I'll try and publish in the next few days.
If you want to compile and play yourself, add these two lines to "Universe.m" at line 8630 (if should be just below this statement:OOWeaponType aftWeapon = OOWeaponTypeFromEquipmentIdentifierSloppy(aftWeaponString);
)Code: Select all
if (fwdWeapon && fwdWeaponString) [shipDict setObject:fwdWeaponString forKey:KEY_EQUIPMENT_FORWARD_WEAPON]; if (aftWeapon && aftWeaponString) [shipDict setObject:aftWeaponString forKey:KEY_EQUIPMENT_AFT_WEAPON];
Since you already checked the source here, another one, longtime reported but never solved:
scan_description in the shipdata.plist seems to crash the game, no hints in the log to find. When used in a script, there are no obvious problems. It could be a matter of numbers, back then I tried to create a complete new category, "navy ship", and therefore quite some ships had this description assigned when I left the station.
Scars remind us where we've been. They don't have to dictate where we're going.
- phkb
- Impressively Grand Sub-Admiral
- Posts: 4830
- Joined: Tue Jan 21, 2014 10:37 pm
- Location: Writing more OXPs, because the world needs more OXPs.
Re: forward_weapon_type in shipyard/shippdata.plist
Looks like another_commander has just checked in a fix for the scan_description bug!
- montana05
- ---- E L I T E ----
- Posts: 1166
- Joined: Mon May 30, 2016 3:54 am
- Location: lurking in The Devils Triangle (G1)
Re: forward_weapon_type in shipyard/shippdata.plist
Hurray , the last time I mentioned this bug was 2018, and I am sure I reported it the first time ways before.
Scars remind us where we've been. They don't have to dictate where we're going.