Author Topic: Can't add auto mode to weapons?  (Read 4623 times)

Offline endersblade

  • Captain
  • ***
  • Posts: 81
    • View Profile
Can't add auto mode to weapons?
« on: November 12, 2014, 07:58:41 am »
I was tinkering around in Xcom1Ruleset.rul, making some modifications to weapons as a starting point for figuring out how to mod.  (I have a backup of the original, yes).  I decided to do things like add auto mode to pistols and heavy lasers, and make auto cannons have auto mode only.  Loaded the game up, game crashed.  After much trial and error, I found that it was putting the accuracyAuto:  and tuAuto: lines into the pistol and heavy laser that was causing it.  I opened up the XcomUtil rules file that adds auto to pistol, copied the lines to Xcom1Ruleset, and the game crashes.

I know it's possible using another mod, since obviously the XcomUtil mod does it.  I will do such in my own mod, and leave the original Xcom1Ruleset alone.  But why is it when I edit Xcom1Ruleset, it causes the game to crash?

Offline yrizoud

  • Commander
  • *****
  • Posts: 1014
    • View Profile
Re: Can't add auto mode to weapons?
« Reply #1 on: November 12, 2014, 11:17:47 am »
Are you sure your text editor isn't putting TAB characters, or messing with the original file's encoding ?

Offline endersblade

  • Captain
  • ***
  • Posts: 81
    • View Profile
Re: Can't add auto mode to weapons?
« Reply #2 on: November 12, 2014, 09:10:37 pm »
I'm using notepad++, and I'm pressing tab once I make a new line to make the text line up with the others.  Is that the problem?

Offline Falko

  • Commander
  • *****
  • Posts: 802
    • View Profile
Re: Can't add auto mode to weapons?
« Reply #3 on: November 12, 2014, 09:14:57 pm »
it can be a problem sometimes notepad++ tries to be smarter than the user
copy/paste an existing line to be sure
you could upload the rul file here and we can check and avoid guessing

Offline yrizoud

  • Commander
  • *****
  • Posts: 1014
    • View Profile
Re: Can't add auto mode to weapons?
« Reply #4 on: November 12, 2014, 09:26:38 pm »
Check Display / Special characters(or symbols) / Display spaces and tabs.
TAB characters will be displayed as a horizontal arrow.

To set TAB key to insert white space instead, check Settings / Preferences, "Tabulations", "Insert spaces"

Offline endersblade

  • Captain
  • ***
  • Posts: 81
    • View Profile
Re: Can't add auto mode to weapons?
« Reply #5 on: November 12, 2014, 09:28:28 pm »
Thanks for the quick responses guys! :-)

Offline Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 11722
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
Re: Can't add auto mode to weapons?
« Reply #6 on: November 13, 2014, 08:17:19 am »
I know this will probably be unpopular, but I don't like Notepad++. Because indeed it tries doing things for me, and obviously does them wrong.

I prefer to do the indentations myself, thank you very much. And although my .rul files do contain errors, I never have problems with that particular thing.

Offline endersblade

  • Captain
  • ***
  • Posts: 81
    • View Profile
Re: Can't add auto mode to weapons?
« Reply #7 on: November 13, 2014, 10:44:35 am »
I'm not really for or against Notepad++, but a lot of the editing I do for other games like, say, Xenonauts, the XML editing and formattting is really nice.  I can shrink things or expand them, making it cleaner and easier to read.