Author Topic: Can't remove custom faction  (Read 124 times)

0 Members and 1 Guest are viewing this topic.

Offline DifferentlySane

Can't remove custom faction
« on: September 13, 2023, 12:50:59 PM »
Hello all, relative newbie to modding here.

I've added a custom faction, still tinkering with them a bit, so I wanted to temporarily remove them from my alphax.txt file. If I comment out their lines under #CUSTOMFACTIONS, though, the game crashes when I try to start a new game. I get as far as the 'select a faction to play' screen, but the actual faction selection options and all the buttons are missing. The only things visible are the background, and the 'faction quote' information box.

I've tested commenting/uncommenting this line, and that's the difference between being able to run the game and not.

My guess is that there's a game file somewhere that still has the custom faction listed and it's expecting it in alphax.txt, and crashing when it can't find it? I've checked Alpha Centauri.Ini, which just has the original factions as the defaults, so it's (probably) not that.

Any ideas?

Offline Buster's Uncle

  • In Buster's Orbit, I
  • Ascend
  • *
  • Posts: 49225
  • €136
  • View Inventory
  • Send /Gift
  • Because there are times when people just need a cute puppy  Soft kitty, warm kitty, little ball of fur  Someone thinks a Winrar is You!  
  • AC2 is my instrument, my heart, as I play my song.
  • Planet tales writer Smilie Artist Custom Faction Modder AC2 Wiki contributor Downloads Contributor
    • View Profile
    • My Custom Factions
    • Awards
Re: Can't remove custom faction
« Reply #1 on: September 13, 2023, 02:42:49 PM »
What you're describing is what happens when the #NAMELINE in the faction.txt doesn't quite agree with what's in alphax.txt under #CUSTOM FACTIONS.  One character off in one custom faction, and you can't start a game...

Offline DifferentlySane

Re: Can't remove custom faction
« Reply #2 on: September 13, 2023, 03:28:33 PM »
The faction works when leave the name in, it only causes a problem if I use the ; in front to make it a comment. Presumably it's not interpreting this as a comment, but as a change to the actual faction name.

I've now tried deleting the line entirely, and that works, so presumably there's more to making a line a comment than just putting a semi colon at the start?

Offline bvanevery

  • Emperor of the Tanks
  • Thinker
  • *
  • Posts: 6378
  • €659
  • View Inventory
  • Send /Gift
  • Allows access to AC2's quiz & chess sections for 144 hours from time of use.  You can't do without Leadship  Must. have. caffeine. -Ahhhhh; good.  Premium environmentally-responsible coffee, grown with love and care by Gaian experts.  
  • Planning for the next 20 years of SMACX.
  • AC2 Hall Of Fame AC Text modder Author of at least one AAR
    • View Profile
    • Awards
Re: Can't remove custom faction
« Reply #3 on: September 13, 2023, 04:01:09 PM »
You are not going to be able to interrupt a multi-line list of stuff in alphax.txt by putting a ; in front of a line.  The parser isn't smart enough to handle that.  It looks like a list with an interruption in it.  Delete lines entirely, or move them to the end of the list so that the list is not interrupted.

Remember that it's a file format, not a programming language with some kind of robustly tested commenting standard behind it.  It was done good enough to ship a game product 20+ years ago.  Not good enough to handle all possible corner cases that anyone would ever throw at it.

Always update your various counts of things too.  Like #UNITS, it has to match the number of lines.

Offline Misanthrope

Re: Can't remove custom faction
« Reply #4 on: September 14, 2023, 05:25:32 AM »
...One character off in one custom faction, and you can't start a game...

Working with a programming project, that's exactly what happened.  Massive block of programming code and everything worked fine, EXCEPT when someone tried to use it.  ANY input would break the whole thing because of ONE goof'd delimiter hidden in 20+Kb. worth of cage coding text.

....ONE character off.
- - - - - - - - - - - - - - - - - - - -
...but withall all t3h tyops and mipselled wrods.

 

* User

Welcome, Guest. Please login or register.
Did you miss your activation email?


Login with username, password and session length

Select language:

* Community poll

SMAC v.4 SMAX v.2 (or previous versions)
-=-
24 (7%)
XP Compatibility patch
-=-
9 (2%)
Gog version for Windows
-=-
103 (32%)
Scient (unofficial) patch
-=-
40 (12%)
Kyrub's latest patch
-=-
14 (4%)
Yitzi's latest patch
-=-
89 (28%)
AC for Mac
-=-
3 (0%)
AC for Linux
-=-
6 (1%)
Gog version for Mac
-=-
10 (3%)
No patch
-=-
16 (5%)
Total Members Voted: 314
AC2 Wiki Logo
-click pic for wik-

* Random quote

If our society seems more nihilistic than that of previous eras, perhaps this is simply a sign of our maturity as a sentient species. As our collective consciousness expands beyond a crucial point, we are at last ready to accept life's fundamental truth: that life's only purpose is life itself.
~Chairman Sheng-ji Yang 'Looking God in the Eye'

* Select your theme

*
Templates: 5: index (default), PortaMx/Mainindex (default), PortaMx/Frames (default), Display (default), GenericControls (default).
Sub templates: 8: init, html_above, body_above, portamx_above, main, portamx_below, body_below, html_below.
Language files: 4: index+Modifications.english (default), TopicRating/.english (default), PortaMx/PortaMx.english (default), OharaYTEmbed.english (default).
Style sheets: 0: .
Files included: 47 - 1280KB. (show)
Queries used: 43.

[Show Queries]