Tutorial: How to avoid the 99.99km issue in skirmish

This forum is dedicated to sharing knowledge via guides, tutorials and any other form of how-to's. It may in time succeed the modding wiki.
Post Reply

Tutorial: How to avoid the 99.99km issue in skirmish

User avatar
JeremyaFr
XWAU Member
Posts: 3922
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Sun Mar 15, 2015 5:16 pm

How to avoid the 99.99km issue in skirmish

When you add custom crafts to the game and play a skirmish mission, a few crafts may appear far away. This happens because the SPEC.RCI file contains invalid/missing data. It is good to regenerate SPEC.RCI each time you make changes to the craft slots.

What is SPEC.RCI

SPEC.RCI is a file that contains the main characteristics of the crafts. It is used by the game engine to avoid to have to read the crafts files each time it needs those informations.

How to generate SPEC.RCI
  1. run XWA from the command line with the "generate" option:

    Code: Select all

    XWingAlliance.exe generate
    
    You can also use the command from the launcher (Alliance.exe).
    Open the launcher, select "Advanced Options" > "Run XWA with Command Line".
    In the input box, enter "generate" and click "OK".
    XwaSpecRciGenerate.png
  2. open the Tech Library
    You do not need to cycle through the crafts. You just need to enter the tech library.
You do not have the required permissions to view the files attached to this post.
Last edited by JeremyaFr on Wed Jun 22, 2022 9:27 am, edited 1 time in total.

User avatar
DARoot
Cadet 3rd Class
Posts: 38
Joined: Sun May 17, 2009 11:08 pm

Post by DARoot » Sun Mar 15, 2015 6:52 pm

Fascinating.

Thanks, JeremyFr.

Most of us have just gotten used to inserting "custom" craft in Skirmish missions BETWEEN "standard" craft (even if they are just Containers).
This new info will be beneficial.

However, Forum Members should be aware that "Spec.RCI" is NOT a text file, so they won't be able to check whether the regenerated file actually does anything, without testing in-game (unless there is something they should be looking for in a hex editor, or something).
Probably not important.

DARoot
Be yourself. Everyone else is already taken ...

User avatar
JeremyaFr
XWAU Member
Posts: 3922
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Sun Mar 15, 2015 8:20 pm

Here is a little tool to easily view the content of SPEC.RCI:
XwaSpecRciEditor.zip
You do not have the required permissions to view the files attached to this post.
Last edited by JeremyaFr on Mon Mar 16, 2015 6:00 pm, edited 1 time in total.

Bman
Lieutenant Commander
Posts: 1167
Joined: Mon Apr 05, 2004 11:01 pm

Post by Bman » Mon Mar 16, 2015 5:47 am

Great find Jeremy. THanks.

Edit: Ok looks like it's just a table that caches the basic stats of all craft models like shield strength etc. The first column (index number of each model) will be helpful when referencing models in the HangarMap.txt files.
Last edited by Bman on Wed Mar 18, 2015 3:16 am, edited 1 time in total.
W-I-P: TFTC, MC Viscount Cr., ISD-II Avenger, NL-1 Platform, Ton-Falk Esc. Cr., & Misc.

Rasalas
Cadet 2nd Class
Posts: 50
Joined: Fri Jan 17, 2014 8:09 pm

Post by Rasalas » Mon Mar 16, 2015 4:29 pm

Thanks Jeremya! Like Bman said, a great find. :thumbs:
Unfortunately your SpecRciEditor doesn't on my computer. When I try to open a RCI-file (even a newly generated one), I get this error message: "Der Index war außerhalb des Arraybereichs". This should translate as "Index out of range exception". I'm on Windows 7 Home Premium 64 bit, SP1. I also have .NET Framework 4.5.2 and Visual C++ 2013 Runtime 12.0.21005 installed.
Your older SpecRciEditor of XWAStatisticsView (version 1.0.3.11) works fine though.

Edit: This is the whole error message:

Code: Select all

  Problemereignisname:	CLR20r3
  Problemsignatur 01:	XwaSpecRciEditor.exe
  Problemsignatur 02:	1.0.0.0
  Problemsignatur 03:	5505e8c3
  Problemsignatur 04:	System.Core
  Problemsignatur 05:	4.0.30319.34209
  Problemsignatur 06:	53489a70
  Problemsignatur 07:	44a
  Problemsignatur 08:	e
  Problemsignatur 09:	System.ArgumentNullException
  Betriebsystemversion:	6.1.7601.2.1.0.768.3
  Gebietsschema-ID:	1031
  Zusatzinformation 1:	eeb4
  Zusatzinformation 2:	eeb44f5b12eb5824caf689f68f49f7a2
  Zusatzinformation 3:	57d9
  Zusatzinformation 4:	57d91b6f8e31f1201c85f4ce5c6b4634

User avatar
JeremyaFr
XWAU Member
Posts: 3922
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Mon Mar 16, 2015 6:12 pm

Rasalas wrote:When I try to open a RCI-file (even a newly generated one), I get this error message: "Der Index war außerhalb des Arraybereichs". This should translate as "Index out of range exception".
Corrected.
Bman wrote:Curious, can that file be used as a back door way to expand the craft table slots ? What if the Spec.RCI file is expanded with extra data records ?
Spec.rci can't be used to expand the craft slot table. Adding new records will not have any effect.

Rasalas
Cadet 2nd Class
Posts: 50
Joined: Fri Jan 17, 2014 8:09 pm

Post by Rasalas » Mon Mar 16, 2015 9:13 pm

Thank you for the quick fix. It works now.

ChildOfGod32798
Recruit
Posts: 4
Joined: Tue Nov 08, 2016 6:43 pm

Post by ChildOfGod32798 » Tue Nov 08, 2016 6:47 pm

Hi. I'm new to this forum. I found your solution but am unclear as to how I am to implement it? Could someone please clarify what it means to "Run from command line"? thank you.

User avatar
JeremyaFr
XWAU Member
Posts: 3922
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Wed Nov 09, 2016 2:58 pm

Hello,
  1. Open a command prompt
  2. Execute the following command:

    Code: Select all

    XWingAlliance.exe generate
    xwa_cmd_generate.png
  3. Open the Tech Library
    xwa_techlib_generate.jpg
    A file named "SPEC.RCI" is created/updated:
    xwa_spec_rci_generate.png
    For DSUCP, its size is 11 Ko.
You do not have the required permissions to view the files attached to this post.

User avatar
JeremyaFr
XWAU Member
Posts: 3922
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Sun Mar 22, 2020 11:38 am

UPDATE

Hello,
I've updated the opt limit hook.

I've added generating the "spec.rci" file.

Now, when the "spec.rci" file is missing, then it will be generated when you launch the game.

User avatar
Vince T
Fleet Admiral (Administrator)
Posts: 14045
Joined: Fri Apr 27, 2001 11:01 pm
Contact:

Post by Vince T » Wed Jun 22, 2022 8:21 am

@JeremyaFr I'll move this over to the new Guides section
Your ship, Captain. I need a drink. - Vince Trageton
Vince T's X-Wing HQ - where the bad guys get their gear

User avatar
JeremyaFr
XWAU Member
Posts: 3922
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Wed Jun 22, 2022 9:28 am

Thanks.
I've edited the first post to add infos for the new launcher.

Post Reply