XCOM 2
[WotC] Create Your Own Class Templates [Old, Unsupported]
 This topic has been pinned, so it's probably important
Access DB to make class creation easier
Hey All,

I believe I am ready to release a new version of this tool It can be found on the nexus page

https://www.nexusmods.com/xcom2/mods/709?

This is a MS Access Database. You will need either full-blown MS Access, or the 260mb free download from Microsoft (The readme contains a web address for the download).


--------------------------------------------------------------------------------------------------------------------------------
Original Post:
--------------------------------------------------------------------------------------------------------------------------------
I am one of the contributors to the MyLongWar excel spreadsheet (available on NexusMods for XCOM EW Long War). I have nearly completed a excel workbook to help make modifying these custom classes easier. But I need your help!
I need to know the following:

Issues:
- Can't use templar idle stance with gauntlets. Not sure how to enable this. (gauntlets work fine, but idling around he looks like he has an invisible rifle.) Any tips would be appreciated if its possible to solve that.
- *** Excel 2007 and earlier may not be compatible with the DataValidation List Drop-downs. I recommend Excel 2010 or newer, since that is what I built the spreadsheet in.***


Sidenotes: I have modified the structure of the ini files to make it work with excel. (The original files worked well in notepad++ but they weren’t properly line separated when viewed in notepad, which is similar to how excel reads them. Not only that, but I have made some of the options ‘standard. This normalizes the classes, and unneeded lines will be commented out automatically. As such, I can only recommend using the new blank templates I provide once I publish.
Last edited by RaunchyFartBomb; 16 Jul, 2019 @ 5:12pm
< >
Showing 1-15 of 27 comments
RaunchyFartBomb 22 Sep, 2018 @ 11:30pm 
Its been a lot of work, but here is the completed spreadsheet.
https://www.nexusmods.com/xcom2/mods/709?

Please let me know of any bugs in this thread, I willl check back here atleast twice a month for a while

edit: Had to take the page down for a few days. But it is back up, and with more functionality than before.

You can now include up to a whopping 14 abilities given to your squaddie.
You can also have the randomized AWC abilities available to your class.

This sheet also takes care of stripping out any troublesome comments that would cause your abilities to not load.
Last edited by RaunchyFartBomb; 26 Sep, 2018 @ 12:18am
RaunchyFartBomb 9 Oct, 2018 @ 9:12pm 
Re-Released the spreadsheet with some additional goodies:

- You can now have 2 separate RAD decks!
- Deck_1 is for the AWC abilities (Row 4 on the New Perk Screen) (Named Deck 01 because i programmed it first)
- Deck_2 is for the Perk Tree abilities. Here you can choose up to 30 abilities to have randomized throughout your tree.
- You must set each perk to 'Random' on the rank listing in order for the game to look at Deck_2.
- This allows you to have several random perks, and several 'Hard Coded' perks, allowing you a variety of tree options!

- Revised the import functionality of the sheet.
- I improved folder detection in the file picker.
- I also gave the entire import function a look at again, and found some bugs that was causing many abilities to not import correctly.
- Based on my testing, any previously exported files (and any files you have made prior to me releasing this) should now import correctly (finally).
- When importing a XComClassData file, it will now break down how many Left and Right parenthesis are in each class!
- A missing or extra parenthesis can cause a lot of issues. And they can be painstaking to count. Now the counting is done for you!

- Revised Exports
- Cleaned up some code. Made the export process a bit easier and more consistent.

- Perk Import/Export
- This workbook wasn't the easiest thing to add perks to if you want additional perk entries (like from other mods.)
- I have added in a function to export the current list to a text file. You can rearrange the perk order, modify descriptions, or even add
perks in the sections you want to!
- Just follow the directions on the top of the text file that are provided during the export, and you should be OK.
GrimAtrament 15 Oct, 2018 @ 6:02pm 
can't open with openoffice :(
RaunchyFartBomb 16 Oct, 2018 @ 7:23pm 
@Hazarddex:
Yea, Sorry about that. This workbook was written in, and requires VBA to run. It will only work in excel.
Maybe next time around I will create an access program instead. Thats a ton more work though, so its highly unlikely.
Player 29 Oct, 2018 @ 3:09pm 
Interesting thanks might try this. Wasnt able to get it working manually
RaunchyFartBomb 29 Oct, 2018 @ 6:16pm 
Let me know if you have issues with it.
ØGThor 20 Dec, 2018 @ 5:21pm 
I get a compile error when I open the table in excel 2007, it won't let me use any of the macros.
RaunchyFartBomb 22 Dec, 2018 @ 11:05am 
I wrote it in excel 2010 if I recall correctly, it’s possible that it didn’t compile in a compatible way for the earlier VBA version.
As I don’t have Excel 2007, I won’t be able to troubleshoot it. Please follow the instructions below and let me know:

1: Open up the VBA module, you should be able to do this by following these instructions: https://www.techonthenet.com/excel/macros/visual_basic_editor2007.php

2: Use the ‘Debug>Compile’ drop down to attempt to recompile the macros. Anything not compatible should be opened up for viewing, and highlighted/underlined/something to note it isn’t compiling properly.

Please let me know which line(s) are causing problems for you. Preferably with screenshots of the problem lines.
ØGThor 28 Dec, 2018 @ 9:43am 
It's this line, PtrSafe get's highligihterd in Red, if I delete it the error goes awaym but I'm not sure if the mod will work.

' this code snippet is used to play a chime in certain circumstances
Public Declare PtrSafe Function sndPlaySound32 _
Lib "winmm.dll" _
Alias "sndPlaySoundA" ( _
ByVal lpszSoundName As String, _
ByVal uFlags As Long) As Long

Update: I tested it, I don't thik its working when I click on open mod folder, instead of taking me ot the steam workshop folder, it opens my documents. if I test the config files on the create your class folder I don't see any changes.
Last edited by ØGThor; 28 Dec, 2018 @ 2:21pm
Masafumi 29 Dec, 2018 @ 8:41am 
For some reason, I unable to choose my Squaddie skill. Also, in the training center, instead of squaddie, mine begin with Corporal
RaunchyFartBomb 2 Jan, 2019 @ 3:34am 
' this code snippet is used to play a chime in certain circumstances
Public Declare PtrSafe Function sndPlaySound32 _
Lib "winmm.dll" _
Alias "sndPlaySoundA" ( _
ByVal lpszSoundName As String, _
ByVal uFlags As Long) As Long

It appears that excel version uses an older version of VBA that does not accept that keyword. You can delete the 'PtrSafe' text without any worry. (Just leave the rest, as it still is used on some locations). (PTRSafe basically wraps the dll call to protect excel. This is a safeguard for newer versions that older versions didnt support. See here:
https://docs.microsoft.com/en-us/office/vba/language/reference/user-interface-help/ptrsafe-keyword


Update: I tested it, I don't thik its working when I click on open mod folder, instead of taking me ot the steam workshop folder, it opens my documents. if I test the config files on the create your class folder I don't see any changes.

OK, so the 'Click here to open mod folder' button, it requires a specific format. The upper cell should point to your steam workshop folder on the drive that you installed the game on. The lower cell already has the path from the workshop folder to the mod. You will have to figure out where on your system the mod folder is, and specify that workshop folder. (Alternatively, you can delete both cells and input the exact folder location into either of them and it will point properly).

For example: Mine is located at "G:\Program Files\Steam\steamapps\workshop", so that is what I put into the upper cell. Note how I don't have a '\' here, because it is already in the next cell. '\\' will error out explorer, causing it to not find the folder.

If the folder is not found, Windows opens My Documents by default when opening up the Explorer.exe, which is why that occurs.

Maybe I'll look into putting in a 'Browse for folder' to help set this correctly since its an odd setup.
Last edited by RaunchyFartBomb; 2 Jan, 2019 @ 4:03am
RaunchyFartBomb 2 Jan, 2019 @ 3:41am 
Originally posted by Masafumi:
For some reason, I unable to choose my Squaddie skill. Also, in the training center, instead of squaddie, mine begin with Corporal

I did not create the mod itself, only the spreadsheet to made it easier to build classes. In my testing, all of the squaddie skills are granted automatically upon reaching squaddie level 100% of the time (unless you have something that is conflicting possibly). (did not test with commanders choice or similar). To my knowledge, nothing I do in this spreadsheet should affect that, as the mod by Richard is what controls how the classes tie into the game.

As far as the training center goes, I thought it always began with Corporal? Even in the base game, there is only the 1 squaddie skill typically.

If its the spreadsheet output formatting causing it, and it can be figured out, I will happily fix it. Until then, sorry about the confusion, but I don't think its on my end.
Masafumi 5 Jan, 2019 @ 5:30am 
Hi, Thanks for the spreadsheet creation, I manage to identify the 2 reason why my squaddie did not have the skill shows up properly.
1. after exporting the class ini, apparently on the random ability deck 1 and deck 2 has this line ")) ; do not separate"
That is causing the issue, the fix is put "; do not seperate" into a new line
2. second thing that cause the skill not shows properly is that on every rank for skill the first line is this "+SoldierRanks=(AbilitySlots=( \\ ". the issue is that there is a single space after \\. The fix is that to remove that extra space on every rank

Thank you..
Also can I know why I cannot put shard gauntlet as secondary weapon, i can only put it as additional secondary weapon. Thank you.
RaunchyFartBomb 13 Jan, 2019 @ 11:06am 
Originally posted by Masafumi:
For some reason, I unable to choose my Squaddie skill. Also, in the training center, instead of squaddie, mine begin with Corporal
......
1. after exporting the class ini, apparently on the random ability deck 1 and deck 2 has this line ")) ; do not separate"
That is causing the issue, the fix is put "; do not seperate" into a new line

Nice find, for some reason that didn't affect any of my tests, so I wasn't concerned with the comment there. I'll go through another round of testing and push out a new update that includes this fix, and any others I find find that I may have missed.

The DoNotSeperate was used to find the last row of the ability deck. I'll modify my code and the output file to eliminate the unnecessary comment.
In the meantime, please use your workaround. You can either delete the comment from output file, or move it to the next line. But the old versions of the excel program will still look for it in the code.

Originally posted by Masafumi:
2. second thing that cause the skill not shows properly is that on every rank for skill the first line is this "+SoldierRanks=(AbilitySlots=( \\ ". the issue is that there is a single space after \\. The fix is that to remove that extra space on every rank


Once again, nice find. I'll include this in my fixes for the new update. This was all working in my testing prior to the 'Tactical Legacy Pack' release, so I'm wondering if something changed.

Easy fix you can do: View the 'NewXComClassData' sheet in the workbook, hit CTRL+F to open up the Find+Repalce window. Type
\\
(backslash backslash space) into the 'Find What' box, and
\\
(Just 2 backslashes) into the 'Replace With' box. Then just hit 'Replace All'. If it tells you its a protected sheet, just unprotect it by right-clicking on the sheet on the bottom (its not password protected).


Originally posted by Masafumi:
Also can I know why I cannot put shard gauntlet as secondary weapon, i can only put it as additional secondary weapon. Thank you.

Ok, the reasoning behind this was pretty much so that it doesn't break the game. You need additional mods in order to use the main primaries/secondaries outside their respective slots. The Primary and Secondary weapon data is used not only in the ClassData.ini, but also in the XComGameData.ini, which determines the default loadout of each class. Having the default loadout call out a weapon that isn't allowed to be in that spot may break the loadout, which is why I originally restricted it.

I will loosen up these limitations when I release the update, as there is no reason why I should limit the end user. If its configured incorrectly, that will be something that must be troubleshot on their end. I will include a note pointing out the possible problem though.

----------------------------------------------------------------------------------------------------------------------------
Edit 1: I'll be testing the modified spreadsheet in the coming days. I think I have the bugs worked out. Introduced a couple new things while I was at it.
Last edited by RaunchyFartBomb; 15 Jan, 2019 @ 10:05pm
RaunchyFartBomb 17 Jan, 2019 @ 7:05pm 
Version 2.1 has been released with the appropriate changes. You can view the update notes on the NexusMods site.
I dun goofed in the previous versions, and this new one should be much more responsive.
< >
Showing 1-15 of 27 comments
Per page: 1530 50