OpenXcom Forum

Modding => Work In Progress => Topic started by: endersblade on November 12, 2014, 07:58:41 am

Title: Can't add auto mode to weapons?
Post by: endersblade 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?
Title: Re: Can't add auto mode to weapons?
Post by: yrizoud 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 ?
Title: Re: Can't add auto mode to weapons?
Post by: endersblade 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?
Title: Re: Can't add auto mode to weapons?
Post by: Falko 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
Title: Re: Can't add auto mode to weapons?
Post by: yrizoud 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"
Title: Re: Can't add auto mode to weapons?
Post by: endersblade on November 12, 2014, 09:28:28 pm
Thanks for the quick responses guys! :-)
Title: Re: Can't add auto mode to weapons?
Post by: Solarius Scorch 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.
Title: Re: Can't add auto mode to weapons?
Post by: endersblade 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.