Author Topic: Question about tables order.  (Read 2081 times)

0 Members and 1 Guest are viewing this topic.

Question about tables order.
is there any specific reason of why ship weapon and whatever tables have to follow a specific order when typed (besides those lines that have sub data), for example:

why writing

$Shields:   XXXX
$Shield Color:   XXXX
$Power Output:  XXXXX
works but

$Power Output:  XXXXX
$Shields:   XXXX
$Shield Color:   XXXX

will totally **** it all up and make the game crash?

cant it be made that the parser reads the table in whatever order is it written and then rearranges it on memory to the order it expects? it would help a lot with organization and making section tables better.

thus alowing stuf likefor example:

Xfighter

Mobility section:
glide, speed, etc etc stats
Weapons:
guns, missiles, banks, etc etc
Effects:
debris, particles, engines etc etc

you get the idea...

 

Offline The E

  • He's Ebeneezer Goode
  • Moderator
  • 213
  • Nothing personal, just tech support.
    • Steam
    • Twitter
Re: Question about tables order.
This can't be changed without making fundamental changes to the way all the tables are parsed. The parsing code we have right now is simple and easy to work with, for both sides (developers and modders). Changing it to an XML-like parsing style would increase code complexity for a relatively minor increase in user friendliness; after all, there's a reason why we maintain the documentation on the wiki.
If I'm just aching this can't go on
I came from chasing dreams to feel alone
There must be changes, miss to feel strong
I really need lifе to touch me
--Evergrey, Where August Mourns

  

Offline mjn.mixael

  • Cutscene Master
  • 212
  • Chopped liver
    • Steam
    • Twitter
Re: Question about tables order.
That and I find it easier to debug this way. If a required flag seems to be missing, it's pretty easy to just read down the list to find the one that isn't there (or is misplaced).
Cutscene Upgrade Project - Mainhall Remakes - Between the Ashes
Youtube Channel - P3D Model Box
Between the Ashes is looking for committed testers, PM me for details.
Freespace Upgrade Project See what's happening.

 

Offline Dragon

  • Citation needed
  • 212
  • The sky is the limit.
Re: Question about tables order.
Not to mention it forces modders to keep their tables ordered, making them easier to read and keeping people from makng messy, difficult to debug tables.

 

Offline Nuke

  • Ka-Boom!
  • 212
  • Mutants Worship Me
Re: Question about tables order.
if it aint broke, dont fix it
I can no longer sit back and allow communist infiltration, communist indoctrination, communist subversion, and the international communist conspiracy to sap and impurify all of our precious bodily fluids.

Nuke's Scripting SVN

 
Re: Question about tables order.
in that case is there any chance or way the order of the tables could be a little bit more organized? like a custom file to define the order of the table for the parser?

 

Offline chief1983

  • Still lacks a custom title
  • Moderator
  • 212
  • ⬇️⬆️⬅️⬅️🅰➡️⬇️
    • Skype
    • Steam
    • Twitter
    • Fate of the Galaxy
Re: Question about tables order.
No.  What if you wanted to share a tbm from one mod with another?  Then the order wouldn't work anymore.
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 Fury

  • The Curmudgeon
  • 213
Re: Question about tables order.