Author Topic: WTF possible bug since retail found  (Read 5457 times)

0 Members and 1 Guest are viewing this topic.

Offline Snail

  • SC 5
  • 214
  • Posts: ☂
WTF possible bug since retail found
There seems to be a bug in the weapons loadout thingy in FRED that has been here since retail. The maximum number of missiles that can be stored in a bank differs between FRED and FreeSpace 2.

To verify go into FRED and load up a Boanerges with full Cyclops - 2/6/6. In the in-game weapons loading screen, the same loadout gets you 3/7/7.


Is this mantis-worthy?

 

Offline FUBAR-BDHR

  • Self-Propelled Trouble Magnet
  • 212
  • Master Drunk
    • 165th Beer Drinking Hell Raisers
Re: WTF possible bug since retail found
Sounds like a rounding issue.  Since you said it's a bug and confirmed in retail even mantis should have been your first stop.
No-one ever listens to Zathras. Quite mad, they say. It is good that Zathras does not mind. He's even grown to like it. Oh yes. -Zathras

 

Offline Bobboau

  • Just a MODern kinda guy
    Just MODerately cool
    And MODest too
  • 213
Re: WTF possible bug since retail found
and since it's been in since retail, it means it cannot be fixed, or we could say it's a fred bug.
Bobboau, bringing you products that work... in theory
learn to use PCS
creator of the ProXimus Procedural Texture and Effect Generator
My latest build of PCS2, get it while it's hot!
PCS 2.0.3


DEUTERONOMY 22:11
Thou shalt not wear a garment of diverse sorts, [as] of woollen and linen together

 

Offline Mongoose

  • Rikki-Tikki-Tavi
  • Global Moderator
  • 212
  • This brain for rent.
    • Steam
    • Something
Re: WTF possible bug since retail found
If it's just a matter of FRED not displaying the correct max loadouts, though, I don't think fixing it would have any negative effects.  The correct number of missiles would still display in-game as always, right?

 

Offline FelixJim

  • 28
  • User 11092
Re: WTF possible bug since retail found
If anyone's interested, as far as I can make out the tables suggest that the Boanerges should be able to carry 2.666666.../6.6666666..../6.6666666... Cyclops bombs. Looks like a rounding error to me too.
In-Mission Techroom Script v0.4 - See information from the techroom in game
Simple Animation Script v0.2 - Make your own on-screen animations for FSO
Visible Waypoints Script - Makes waypoints visible in-game
Run From File Script - Get around the pesky 31 character limit for script-eval

 

Offline chief1983

  • Still lacks a custom title
  • Moderator
  • 212
  • ⬇️⬆️⬅️⬅️🅰➡️⬇️
    • Skype
    • Steam
    • Twitter
    • Fate of the Galaxy
Re: WTF possible bug since retail found
I thought this was brought up about six months ago and it was on Kara's list to fix at some point, since he was very familiar with the loadout screen.
Fate of the Galaxy - Now Hiring!  Apply within | Diaspora | SCP Home | Collada Importer for PCS2
Karajorma's 'How to report bugs' | Mantis
#freespace | #scp-swc | #diaspora | #SCP | #hard-light on EsperNet

"You may not sell or otherwise commercially exploit the source or things you created based on the source." -- Excerpt from FSO license, for reference

Nuclear1:  Jesus Christ zack you're a little too hamyurger for HLP right now...
iamzack:  i dont have hamynerge i just want ptatoc hips D:
redsniper:  Platonic hips?!
iamzack:  lays

 

Offline Snail

  • SC 5
  • 214
  • Posts: ☂
Re: WTF possible bug since retail found
I thought this was brought up about six months ago and it was on Kara's list to fix at some point, since he was very familiar with the loadout screen.
Oh. We'll leave it at that then.

 

Offline chief1983

  • Still lacks a custom title
  • Moderator
  • 212
  • ⬇️⬆️⬅️⬅️🅰➡️⬇️
    • Skype
    • Steam
    • Twitter
    • Fate of the Galaxy
Re: WTF possible bug since retail found
Well, if it's still a bug it probably needs to be in Mantis, if it isn't already.  Might even assign it to him.
Fate of the Galaxy - Now Hiring!  Apply within | Diaspora | SCP Home | Collada Importer for PCS2
Karajorma's 'How to report bugs' | Mantis
#freespace | #scp-swc | #diaspora | #SCP | #hard-light on EsperNet

"You may not sell or otherwise commercially exploit the source or things you created based on the source." -- Excerpt from FSO license, for reference

Nuclear1:  Jesus Christ zack you're a little too hamyurger for HLP right now...
iamzack:  i dont have hamynerge i just want ptatoc hips D:
redsniper:  Platonic hips?!
iamzack:  lays

 

Offline Goober5000

  • HLP Loremaster
  • Moderator
  • 214
    • Goober5000 Productions
Re: WTF possible bug since retail found
It's definitely a bug, but if we fix it, it should be on the FRED end, so that FRED matches what is seen in FS2.

 

Offline chief1983

  • Still lacks a custom title
  • Moderator
  • 212
  • ⬇️⬆️⬅️⬅️🅰➡️⬇️
    • Skype
    • Steam
    • Twitter
    • Fate of the Galaxy
Re: WTF possible bug since retail found
Sorry, the FRED loadout menu is what I meant by loadout screen.
Fate of the Galaxy - Now Hiring!  Apply within | Diaspora | SCP Home | Collada Importer for PCS2
Karajorma's 'How to report bugs' | Mantis
#freespace | #scp-swc | #diaspora | #SCP | #hard-light on EsperNet

"You may not sell or otherwise commercially exploit the source or things you created based on the source." -- Excerpt from FSO license, for reference

Nuclear1:  Jesus Christ zack you're a little too hamyurger for HLP right now...
iamzack:  i dont have hamynerge i just want ptatoc hips D:
redsniper:  Platonic hips?!
iamzack:  lays

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: WTF possible bug since retail found
It's definitely a bug, but if we fix it, it should be on the FRED end, so that FRED matches what is seen in FS2.

Problem with that is that based on what FelixJim said the problem is actually a rounding error in the game and not in FRED. If the Boanerges with full Cyclops has a 3/7/7 loadout that's more than the table says it should have. But we can't change that without throwing off the balance for every single missile and ship bank in the game.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]

 

Offline headdie

  • i don't use punctuation lol
  • 212
  • Lawful Neutral with a Chaotic outook
    • Skype
    • Twitter
    • Headdie on Deviant Art
Re: WTF possible bug since retail found
is it possible to copy the code that calculates the load numbers from FS2 to FRED if they are different? 

on a side note I ran a little test

I Fredded a mission with just alpha wing 2 fighters and beta wing 3 fighter
Alpha 1 - herc II
Alpha 2 - Boa with max loadout of cyclops#short
Beta 1 - Boa as Alpha 2 but with the missile banks set to 1/3/3
Beta 2 - Boa as Alpha 2 but with number of missiles reduced then added 2/6/6
Beta 3 - Boa as Alpha 2 but with the missile numbers manually set to 2/6/6 by using numeric keypad

Within FS2 loadout I got the following
Alpha 1 - I changed to Boa and loaded with cyclops#short and got 3/7/7
Alpha 2 - 3/7/7
Beta 1 - 1/3/3
Beta 2 - 3/7/7
Beta 3 - 3/7/7

the Beta wing results show this bug has implications for the Fredder being able to fine control the loadout of a given ship if using numbers near the maximum capacity.  I'm guessing fred and/or the game makes an assumption somewhere that a maximum number in fred is meant to be a maximum number in FS2 which as we have seen can be bigger and might be more than the Fredder wants
Minister of Interstellar Affairs Sol Union - Retired
quote General Battuta - "FRED is canon!"
Contact me at [email protected]
My Release Thread, Old Release Thread, Celestial Objects Thread, My rubbish attempts at art

 

Offline FelixJim

  • 28
  • User 11092
Re: WTF possible bug since retail found
It's definitely a bug, but if we fix it, it should be on the FRED end, so that FRED matches what is seen in FS2.

Problem with that is that based on what FelixJim said the problem is actually a rounding error in the game and not in FRED. If the Boanerges with full Cyclops has a 3/7/7 loadout that's more than the table says it should have. But we can't change that without throwing off the balance for every single missile and ship bank in the game.
In a sense, there isn't really a rounding error at all. Both FRED and FS are rounding perfectly correctly, but using different rounding systems. FRED is taking the floor when rounding, whilst FS is taking the nearest integer (rounding up in a tie break). Rounding down makes more sense from a realism point of view (if you only have space for two-thirds of a cyclops, no amount of pushing is going to squeeze another one in), but rounding to the nearest integer may be better from a balance point of view (a ship with a bank capacity of 19 should have roughly twice the secondary capacity of one with only 10, and working with a bomb of cargo size 10, for example, you'd hope for the second to be able to carry two).
In-Mission Techroom Script v0.4 - See information from the techroom in game
Simple Animation Script v0.2 - Make your own on-screen animations for FSO
Visible Waypoints Script - Makes waypoints visible in-game
Run From File Script - Get around the pesky 31 character limit for script-eval

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: WTF possible bug since retail found
is it possible to copy the code that calculates the load numbers from FS2 to FRED if they are different? 

It's almost certainly doable and probably a matter of a tiny little change. The problem is that it's a change in the wrong direction. Although I understand FelixJim's point above I tend to go with the realistic point of view. If I've made a weapons bay with a cargo space of 14 I shouldn't be able to squeeze 3 size 5 weapons into it. Problem is that FS2 currently allows you to do just that and always has done.

If the problem was FRED then this could be fixed in a few minutes. But the problem isn't FRED. FRED does things correctly. Changing things means making FRED make the same mistake FS2 does.

Can you post that mission BTW? I'd like to see what is actually being written into the mission file.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]

 

Offline chief1983

  • Still lacks a custom title
  • Moderator
  • 212
  • ⬇️⬆️⬅️⬅️🅰➡️⬇️
    • Skype
    • Steam
    • Twitter
    • Fate of the Galaxy
Re: WTF possible bug since retail found
AI Profiles flag to fix the bug?  Add support to FRED and FS2 to both do it either way, based on that.  Then we don't break any existing stuff but anyone who wants the bug fixed in their own campaigns can do so.
Fate of the Galaxy - Now Hiring!  Apply within | Diaspora | SCP Home | Collada Importer for PCS2
Karajorma's 'How to report bugs' | Mantis
#freespace | #scp-swc | #diaspora | #SCP | #hard-light on EsperNet

"You may not sell or otherwise commercially exploit the source or things you created based on the source." -- Excerpt from FSO license, for reference

Nuclear1:  Jesus Christ zack you're a little too hamyurger for HLP right now...
iamzack:  i dont have hamynerge i just want ptatoc hips D:
redsniper:  Platonic hips?!
iamzack:  lays

 

Offline headdie

  • i don't use punctuation lol
  • 212
  • Lawful Neutral with a Chaotic outook
    • Skype
    • Twitter
    • Headdie on Deviant Art
Re: WTF possible bug since retail found
mission is attached below loudout.fs2

here is something interesting i spotted in loudout.fs2 when i decided to open it up in an attempt to pre-empt karajorma, remember Beta 1 was the ship with the secondary banks set to about half of its capacity while Beta 2 had full banks.  The +Secondary Banks: line and the line below are the most interesting.
Code: [Select]
$Name: Beta 1 ;! Object #2
$Class: GTB Boanerges
$Team: Friendly
$Location: 45.171978, 0.000013, 5.690553
$Orientation:
1.000000, 0.000000, 0.000000,
0.000000, 1.000000, 0.000000,
0.000000, 0.000000, 1.000000
$AI Behavior: None
$Cargo 1:  XSTR("Nothing", -1)
+Initial Velocity: 33
+Initial Hull: 100
+Subsystem: Pilot
+Secondary Banks: ( "Cyclops#short" "Cyclops#short" "Cyclops#short" )
+Sbank Ammo: ( 50 50 50 )
$Arrival Location: Hyperspace
$Arrival Cue: ( false )
$Departure Location: Hyperspace
$Departure Cue: ( false )
$Determination: 10
+Flags: ( "cargo-known" )
+Flags2: ( )
+Respawn priority: 0
+Group: 0
+Use Table Score:
+Score: 10

$Name: Beta 2 ;! Object #3
$Class: GTB Boanerges
$Team: Friendly
$Location: 92.663002, -0.000000, -0.947957
$Orientation:
1.000000, 0.000000, 0.000000,
0.000000, 1.000000, 0.000000,
0.000000, 0.000000, 1.000000
$AI Behavior: None
$Cargo 1:  XSTR("Nothing", -1)
+Initial Velocity: 33
+Initial Hull: 100
+Subsystem: Pilot
+Secondary Banks: ( "Cyclops#short" "Cyclops#short" "Cyclops#short" )
$Arrival Location: Hyperspace
$Arrival Cue: ( false )
$Departure Location: Hyperspace
$Departure Cue: ( false )
$Determination: 10
+Flags: ( "cargo-known" )
+Flags2: ( )
+Respawn priority: 0
+Group: 0
+Use Table Score:
+Score: 10

now based on what i noticed above i made loadout2.fs2 changing beta 1 to 1/3/0 (I tried to get 1/5/1 but fred wouldn't let me set it like that which I think might be tied into what I will talk about below)

Code: [Select]
$Name: Beta 1 ;! Object #2
$Class: GTB Boanerges
$Team: Friendly
$Location: 45.171978, 0.000013, 5.690553
$Orientation:
1.000000, 0.000000, 0.000000,
0.000000, 1.000000, 0.000000,
0.000000, 0.000000, 1.000000
$AI Behavior: None
$Cargo 1:  XSTR("Nothing", -1)
+Initial Velocity: 33
+Initial Hull: 100
+Subsystem: Pilot
+Secondary Banks: ( "Cyclops#short" "Cyclops#short" "Cyclops#short" )
+Sbank Ammo: ( 50 66 0 )
$Arrival Location: Hyperspace
$Arrival Cue: ( false )
$Departure Location: Hyperspace
$Departure Cue: ( false )
$Determination: 10
+Flags: ( "cargo-known" )
+Flags2: ( )
+Respawn priority: 0
+Group: 0
+Use Table Score:
+Score: 10

it looks like the loadouts are being stored as percentages in the mission file and it looks like only in whole percentages which is why it wouldn't let me use the loadout I originally wanted to test .  Also anything set to 100% of the secondary capacity is not saved so the game assumes the 100% denying the fredder the opportunity to manually set it

[attachment deleted by ninja]
Minister of Interstellar Affairs Sol Union - Retired
quote General Battuta - "FRED is canon!"
Contact me at [email protected]
My Release Thread, Old Release Thread, Celestial Objects Thread, My rubbish attempts at art

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: WTF possible bug since retail found
AI Profiles flag to fix the bug?

Wouldn't work. AI_Profiles have no effect in FRED nor should they. What would happen if you loaded a mission with 100% ammo in one profile and then saved it out with a profile where you'd forgotten to define this flag? And then what would happen when you realised the issue and fixed the profile?

It would be a mess.

Quote
Add support to FRED and FS2 to both do it either way, based on that.  Then we don't break any existing stuff but anyone who wants the bug fixed in their own campaigns can do so.

I'm toying with the idea of adding a global section to the top of Ships.tbl for stuff like this. Basically anything you defined there would affect all the ships in the mod. There are too many stupid things ending up in the AI_Profiles which then have to be copied to all the other profiles you make. There's no reason for it either. Who is going to make a mod where the maximum loadout of a ship class changes from mission to mission when using the same weapons.

You should be able to fix these sort of bugs with a single entry in one table and never have to bother about them again. That suggests something loaded on game load rather than mission load to me. It also has the effect of not buggering FRED about either since both of them would get their information on what to do from the same source.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]

 

Offline chief1983

  • Still lacks a custom title
  • Moderator
  • 212
  • ⬇️⬆️⬅️⬅️🅰➡️⬇️
    • Skype
    • Steam
    • Twitter
    • Fate of the Galaxy
Re: WTF possible bug since retail found
Actually the suggestion I heard previously was to split out the nonsense AI_Profiles stuff into just a mod config file/table or something.  I don't think ships.tbl makes any more sense either really.
Fate of the Galaxy - Now Hiring!  Apply within | Diaspora | SCP Home | Collada Importer for PCS2
Karajorma's 'How to report bugs' | Mantis
#freespace | #scp-swc | #diaspora | #SCP | #hard-light on EsperNet

"You may not sell or otherwise commercially exploit the source or things you created based on the source." -- Excerpt from FSO license, for reference

Nuclear1:  Jesus Christ zack you're a little too hamyurger for HLP right now...
iamzack:  i dont have hamynerge i just want ptatoc hips D:
redsniper:  Platonic hips?!
iamzack:  lays

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: WTF possible bug since retail found
Well in this case it's something that only affects ships but I'm in favour of adding a mod config table and have been for ages. This sort of nonsense should be defined once and forgotten about.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]

 

Offline pecenipicek

  • Roast Chicken
  • 211
  • Powered by copious amounts of coffee and nicotine
    • Skype
    • Steam
    • Twitter
    • PeceniPicek's own deviantart page
Re: WTF possible bug since retail found
i throw in my vote for a mod config table as well
Skype: vrganjko
Ho, ho, ho, to the bottle I go
to heal my heart and drown my woe!
Rain may fall and wind may blow,
and many miles be still to go,
but under a tall tree I will lie!

The Apocalypse Project needs YOU! - recruiting info thread.