Author Topic: Tech room question  (Read 3761 times)

0 Members and 1 Guest are viewing this topic.

Offline Solatar

  • 211
We all know that it is hard to make whatever ships you want to be in the tech Room actually appear. This is because fs2 says "entry # 1", "entry #2", not GTF Ulysses, GTF Hercules.

Could we change this so that it WOULD say GTF Hercules, or GTF whatever?

 

Offline Goober5000

  • HLP Loremaster
  • Moderator
  • 214
    • Goober5000 Productions
:wtf: It's not supposed to do that.

Make sure you actually added the ships using either the "in tech database" flag or add-ship SEXP.

 

Offline Sesquipedalian

  • Atankharz'ythi
  • 211
It does do that.  Hades has it right.  And it sucks.  Name based tech room listing instead of entry number based would be marvellous.  This ought not to be too hard to fix, since the tech-add-ship sexp IS name based, and the code could likely be lifted from there.
Sesqu... Sesqui... what?
Sesquipedalian, the best word in the English language.

The Scroll of Atankharzim | FS2 syntax highlighting

 

Offline Solatar

  • 211
I Have it, but I have to delete all my pilots, then exit the game with shift-esc. Then restart, and create a new pilot. Then my ships are there.

 

Offline aldo_14

  • Gunnery Control
  • 213
Um.. list by 'in-tech-database' flag, surely?

 

Offline Solatar

  • 211
That barely EVER works.

 

Offline Sesquipedalian

  • Atankharz'ythi
  • 211
Actually, in-tech-database never works.  It appears that the plan, or possibly even the original code, was to use that flag, but in the end the values used were simply numerical.  Makes sense, really, when one has a set ships.tbl like V did: much easier to code.  But changing this would be good for us now that we have mods.

Reinstituting the flag could work, but it doesn't provide much flexibility.  Ships are either in or out that way.  If you want to be able to add a new ship part way through a campaign, the system has to be more complex than mere flags.
Sesqu... Sesqui... what?
Sesquipedalian, the best word in the English language.

The Scroll of Atankharzim | FS2 syntax highlighting

 

Offline Goober5000

  • HLP Loremaster
  • Moderator
  • 214
    • Goober5000 Productions
I think it's possible to add ships to the tech database reliably.  I've seen campaigns do this:

when
--true
--tech-add-ship
----

in the very first mission of the campaign.  Then the tech room works properly.

Hades, am I to understand that you tried this and it didn't work?

 

Offline Sesquipedalian

  • Atankharz'ythi
  • 211
Yes, but if a ship is removed, it messes up all the ship entries that came after it because the tech room's decision to display or not to display a ship is based on entry number, not on name.  The fact that this isn't true of tech-add-ships holds out hope that this could be changed so that the tech database could work without headaches.
Sesqu... Sesqui... what?
Sesquipedalian, the best word in the English language.

The Scroll of Atankharzim | FS2 syntax highlighting

 

Offline aldo_14

  • Gunnery Control
  • 213
Actually, um, Sesqs previosu statement implied selecting the ship to be added based on it's name trather than the flag...that's what i meant.

IIRC, the ships shown are dependant on their order in the table... but I think 'in tech database' wiorks uif they ship is after the V entires.  Unfortunately, the thrusterglows seem to default to the Terran one , regarless of species, for some reason......

 

Offline IPAndrews

  • Disgruntled Customer
  • 212
  • This site stole my work
Wow. This part of the source code really sucks doesn't it. Well, you can't have everything, I guess.
Be warned: This site's admins stole 100s of hours of my work. They will do it to you.

 

Offline aldo_14

  • Gunnery Control
  • 213
If it's parsed in during the start, then there must be a line that goes something like;

if current_entry==#sumenumberyouwant#
add to techroom

(or soforth..i think it;s a recursive algorithm to parse the ships)

so just replace it with something like

if current_entry has flag "in-tech-database"
add to techroom

or soforth.

Someone tell me where the specific ships.tbl parsing code is, and I'll have a peek tonight.

can;t actually compile anything, though... bloody inefficient 4th years hogging the VStudie disks,mumble,grumble

 

Offline Goober5000

  • HLP Loremaster
  • Moderator
  • 214
    • Goober5000 Productions
Sorry to bump this, but I'm trying to nail this bug.  Can someone post a screenshot of a messed up tech room?

 
if i'm getting this problem right, then could you also fix the kills list bug so it doesn't say you've destroyed 300  ares fighters etc etc...

 

Offline Goober5000

  • HLP Loremaster
  • Moderator
  • 214
    • Goober5000 Productions
Ugh.  Fixed it.


I'm not going to touch that 300 Ares bug, though. :)

 

Offline Sesquipedalian

  • Atankharz'ythi
  • 211
Sesqu... Sesqui... what?
Sesquipedalian, the best word in the English language.

The Scroll of Atankharzim | FS2 syntax highlighting