Booface Posted December 1, 2013 Share Posted December 1, 2013 (edited) So I thought it'd be fun to learn a little bit about programming and modding by jumping straight into making a fun little X-Com mod. My intention for my first jump was to find the functions or tables where the game decides how to create a super soldier (ex. Sid Meier) and change it to one of my own design. Fair warning, I am a total novice at this sort of thing. I have a book on Java, for example, but I've only cracked it open once. I'm not intimidated by any of this stuff, but I am new and just wanted to learn by diving into the deep end. So I unpacked the XComStrategyGame.upk and looked through it in UE Explorer. Finding the statistics for changing was easy, they were in XGCustomizeUI.CreateEasterEggSoldier. I found that there is a table (I just learned what an array is, so I am learning; mission accomplished) where it stores the names of the soldiers--SuperSoldierFirstNames and SuperSoldierLastNames. I found those folders after unpacking the UPK file. So I figure I need to go into these files and change the values for "Sid Meier" to "Richard Riddick" or whatever. I downloaded myself a hex editor and jumped in. Now I'm at a roadblock. When I was looking at CreateEasterEggSoldier, it was easy enough to find a value like "200" (their aim value) by just looking for the hex equivalent of 200 and changing it to 60. Changed the rank to 0 so Sid can level up with everybody else, and so on. But when I look at SuperSoldierFirstNames in XcomStrategyGame.upk, I can't find anything that looks like "Sid." In fact, I can't figure out the file at all. I'm probably doing something silly or going about it the wrong way, does anyone want to offer some advice for a total newbie? Edited December 1, 2013 by Booface Link to comment Share on other sites More sharing options...
Amineri Posted December 1, 2013 Share Posted December 1, 2013 Most of the naming is done via the localization files (they end in .int). In particular the easter egg character string data is definied in XComStrategyGame.int: SuperSoldierFirstNames[0]=Sid SuperSoldierLastNames[0]=Meier SuperSoldierNickNames[0]=Godfather SuperSoldierFirstNames[1]=Ken SuperSoldierLastNames[1]=Levine SuperSoldierNickNames[1]=Big Daddy SuperSoldierFirstNames[2]=Joe SuperSoldierLastNames[2]=Kelly SuperSoldierNickNames[2]=Archangel SuperSoldierFirstNames[3]=Otto SuperSoldierLastNames[3]=Zander SuperSoldierNickNames[3]=Unbreakable SuperSoldierFirstNames[4]=William SuperSoldierLastNames[4]=Carter SuperSoldierNickNames[4]=Old Timer SuperSoldierFirstNames[5]=Chris SuperSoldierLastNames[5]=Kluwe SuperSoldierNickNames[5]=Loate In the upk the strings are defined in XGCustomizeUI via: const localized array<localized string> SuperSoldierFirstNames const localized array<localized string> SuperSoldierLastNames const localized array<localized string> SuperSoldierNickNames This means that these arrays are dynamic arrays not static arrays so it is possible to add additional super soldier namesets by simply adding them in the localization file. However the code that handles re-organizing the soldier class/stats/etc upon finding a valid match would have to be reworked to support the extra character(s). Link to comment Share on other sites More sharing options...
Booface Posted December 1, 2013 Author Share Posted December 1, 2013 (edited) Thanks, that was quick! I won't even lose momentum this afternoon. I might still overwrite Sid first just to make sure I can get everything to work, then start playing around with adding new ones. I haven't written code before, so it'll be fun to figure it all out. Do you think it'd be possible to make Sectoid and Muton and other alien special characters this way? EDIT: Ha, scratch that question. You were a ton of help, I'm going to try to have fun figuring it out on my own until I hit another roadblock. Can't learn if I already know. Edited December 1, 2013 by Booface Link to comment Share on other sites More sharing options...
Recommended Posts