Synthorange Posted March 25, 2016 Author Share Posted March 25, 2016 Ugh this is stupid but... SOLVED. Shifting the skin definitions from default properties to the config.ini got it all working. Link to comment Share on other sites More sharing options...
zingfharn Posted March 25, 2016 Share Posted March 25, 2016 Sorry I wasn't able to reply in realtime - just had the longest sleep. Glad it's coming along well. I am *loving* the little avengers. Can you use them elsewhere? I'm just thinking of one buzzing around shen or something, instead of the gremlin ; ) What bugs are you left with now? And as for the UPK import, no, I've never had that. I *always* have to delete and re-add for it to pick up changes. Link to comment Share on other sites More sharing options...
Synthorange Posted March 25, 2016 Author Share Posted March 25, 2016 Well, thats kind of the last bug. I was a bit overconfident in saying that it fixed everything. It let me bring in my own meshes and materials, BUT it broke the skins that use some base game materials. :cry: Link to comment Share on other sites More sharing options...
Synthorange Posted March 25, 2016 Author Share Posted March 25, 2016 Goddammit. When referring to resources in packages:Inside a script:MaterialInstanceConstant'Package.Folder.Mat' is correct for base resources but MaterialInstanceConstant'Package.Mat' for custom ones. In the ini it's opposite. Link to comment Share on other sites More sharing options...
zingfharn Posted March 25, 2016 Share Posted March 25, 2016 Hahahaha. The joy of modding! Link to comment Share on other sites More sharing options...
Synthorange Posted March 26, 2016 Author Share Posted March 26, 2016 Okay WHAT THE HELL. I created an x2itemtemplate 'SkyrangerSkinInfo' to store and pass around info about what skins are currently in use and a few other details. Two major problems. 1. It does not persist between game sessions. Quit your game and you lose that data.2. It looks like the data is universal for all games in the same session! If you save a game with Skin A on the ranger and load a game that was saved with Skin B, the game loads up with Skin A! What the hell! Is the item template not a good way to store info? How else should I be doing it? Link to comment Share on other sites More sharing options...
zingfharn Posted March 26, 2016 Share Posted March 26, 2016 (edited) Yeah, not an ideal way to be doing it. It's for items, obviously. Like corpses, or grenade, or some cheese. The game loads up the templates at game-start and keeps them around. And, yes, kills them when you quit. I think (but I could be entirely wrong) that you need to write a state to xcomhistory to save stuff, and then load it back out when you load a game. I'd poke around in, for example, the settings screen, to see how they do that. In fact, you might be able to just jack it directly into the system settings. I haven't really dug around, but I feel like I recall someone talking about their mod having options on the settings screen. Edit: maybe look at the difficulty setting, since that's definitely per game. Edited March 26, 2016 by zingfharn Link to comment Share on other sites More sharing options...
Synthorange Posted March 26, 2016 Author Share Posted March 26, 2016 Welp time to try switch out the item template with a gamestate object. Link to comment Share on other sites More sharing options...
Synthorange Posted March 27, 2016 Author Share Posted March 27, 2016 (edited) Crud. this isnt working function CheckforRangerInfoObject(){ local X2_SkyrangerCustomSettings RangerHolder,newRangerHolder; local XComGameState NewGameState; RangerHolder=X2_SkyrangerCustomSettings(`XCOMHQ.FindComponentObject(class'X2_SkyrangerCustomSettings')); if (RangerHolder==none){ newRangerHolder = X2_SkyrangerCustomSettings(NewGameState.CreateStateObject(class'X2_SkyrangerCustomSettings')); newRangerHolder.InitComponent(); `XCOMHQ.AddComponentObject(newRangerHolder); `log("Creating Holder" @ newRangerHolder); } }Keeps returning 'Creating Holder none' class X2_SkyrangerCustomSettings extends XComGameState_HeadquartersXCom; var int CurrentSkin, TotalSkins, CurrentSong; function X2_SkyrangerCustomSettings InitComponent() { CurrentSkin=0; //current skin TotalSkins=20; //total skins CurrentSong=0; //current song return self; } This is the settings holder by the way. It's currently a xcomhq state to try troubleshoot stuff, but was baseobject before with the same results Edited March 27, 2016 by Synthorange Link to comment Share on other sites More sharing options...
Synthorange Posted March 27, 2016 Author Share Posted March 27, 2016 Uuuugh [0102.80] ScriptLog: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX[0102.80] ScriptLog: SKINNER INIT CALLED![0102.80] ScriptLog: Creating Holder X2_SkyrangerCustomSettings_0[0102.80] ScriptLog: Got item! None So creating it is fine. Either assigning it or finding it is a problem. function CheckforRangerInfoObject(){ local X2_SkyrangerCustomSettings RangerHolder,newRangerHolder; //local XComGameState NewGameState; RangerHolder=X2_SkyrangerCustomSettings(`XCOMHQ.FindComponentObject(class'X2_SkyrangerCustomSettings')); if (RangerHolder==none){ //newRangerHolder = X2_SkyrangerCustomSettings(NewGameState.CreateStateObject(class'X2_SkyrangerCustomSettings')); newRangerHolder=new class'X2_SkyrangerCustomSettings'; newRangerHolder.InitComponent(); `XCOMHQ.AddComponentObject(newRangerHolder); `log("Creating Holder" @ newRangerHolder); } } Is what it looks like now. Returns Creating Holder properly. function X2_SkyrangerCustomSettings GetHolder(){ local X2_SkyrangerCustomSettings Holder; Holder =X2_SkyrangerCustomSettings(`XCOMHQ.FindComponentObject(class'X2_SkyrangerCustomSettings')); `log("Got item!"@Holder); return Holder; } This though returns none. Link to comment Share on other sites More sharing options...
Recommended Posts