Hammerstein2k11 Posted February 10, 2016 Share Posted February 10, 2016 (edited) Just figured out that Notepad++ also has a nice directory and in-file search for just that.Found what you meant....dang, now how to get this to work with fresh Rookies. function RandomizeStats(){ local int iMultiple; if( `GAMECORE.IsOptionEnabled( eGO_RandomRookieStats ) ) { iMultiple = 5; SetBaseMaxStat( eStat_Offense, RollStat( class'XGTacticalGameCore'.default.LOW_AIM, class'XGTacticalGameCore'.default.HIGH_AIM, iMultiple ) ); iMultiple = 1; SetBaseMaxStat( eStat_Mobility, RollStat( class'XGTacticalGameCore'.default.LOW_MOBILITY, class'XGTacticalGameCore'.default.HIGH_MOBILITY, iMultiple ) ); iMultiple = 2; SetBaseMaxStat( eStat_Will, RollStat( class'XGTacticalGameCore'.default.LOW_WILL, class'XGTacticalGameCore'.default.HIGH_WILL, iMultiple ) ); }} Edited February 10, 2016 by Hammerstein2k11 Link to comment Share on other sites More sharing options...
Deleted32045420User Posted February 10, 2016 Share Posted February 10, 2016 Just figured out that Notepad++ also has a nice directory and in-file search for just that. Found what you meant....dang, now how to get this to work with fresh Rookies. function RandomizeStats(){ local int iMultiple; if( `GAMECORE.IsOptionEnabled( eGO_RandomRookieStats ) ) { iMultiple = 5; SetBaseMaxStat( eStat_Offense, RollStat( class'XGTacticalGameCore'.default.LOW_AIM, class'XGTacticalGameCore'.default.HIGH_AIM, iMultiple ) ); iMultiple = 1; SetBaseMaxStat( eStat_Mobility, RollStat( class'XGTacticalGameCore'.default.LOW_MOBILITY, class'XGTacticalGameCore'.default.HIGH_MOBILITY, iMultiple ) ); iMultiple = 2; SetBaseMaxStat( eStat_Will, RollStat( class'XGTacticalGameCore'.default.LOW_WILL, class'XGTacticalGameCore'.default.HIGH_WILL, iMultiple ) ); }} it's getting called every time the game creates a unit anyways, my main problem is that my code dosnt override the current code for some reason, i might be trying to get all the unit creation to be a Unit_NCE creation and it will call my function there Link to comment Share on other sites More sharing options...
ElDeemas Posted February 10, 2016 Share Posted February 10, 2016 Can someone help me find where do I change days-to-scan value? I found only black market, but I'm interested in other encounters. Link to comment Share on other sites More sharing options...
shadowuk Posted February 10, 2016 Share Posted February 10, 2016 Hey, am making a class mod for myself anyone know how to make it so that the class will not come up as random and can only be trained? A bit like a psi op. Link to comment Share on other sites More sharing options...
Amineri Posted February 10, 2016 Author Share Posted February 10, 2016 I have a beginner's question.I'm reasonable experienced in OOP, mainly C++ and Python. I never worked with Unreal before.I'm very confused by the term "template". E.g. in the add weapon example they call it a template, but it seems all hard coded. Also the linelocal array<X2DataTemplate> ModWeapons; I don't get. It looks like a C++ code generation class template, but actually the class name X2Item_ModExample_Weapon is always used.I looked also in the X2Item_DefaultWeapons.uc and was even more confused. Now there is not a a single weapon but the entire class holds a list or array of weapons and all properties are set hard coded but the default ini values.So, is template class just a term or is there something more behind it. Maybe this is a unreal thing, so it would very kind to offer a link, the official online unreal documentation is rather sparse. Thanks So this use of "template" is a little more XCOM 2-centric, and not really an Unreal Engine 3 thing. It fits together something like so: Template base class (e.g. X2WeaponTemplate.uc). Extends X2DataTemplate.uc (root class) There's only one of these, and it defines all of the things that can be configured. It's a class and not just config data because templates can include delegate functions, which can't be defined in configuration files Template class instances (e.g. X2Item_DefaultWeapons). Extends X2DataSet.uc (root class) Creates a bunch of instances of X2WeaponTemplate and fills out details for each Native code runs any child class of X2DataSet to create the template instances when game is launched Not saved as part of savefile, but recreated each time game launches TemplateManager class instances (e.g. X2ItemManager.uc) Extends X2DataTemplateManager.uc (root class) Provides single access point to retrieve all data template instances created Gamestate instance (e.g. XComGameState_Item) Extends XComGameState_BaseObject.uc (root class) Creates a particular instance of something, such as a particular soldier's customized weapon Typically initialized using data from a template instance Saved as part of savefile, loaded from save when loading game There is also an XComGameStateHistory that manages all of the gamestate objects, but that's more complex and getting away from your question about templates. Link to comment Share on other sites More sharing options...
Amineri Posted February 10, 2016 Author Share Posted February 10, 2016 Does anyone know how to add multiplayer units into the single player barracks? I have looked at the .ini's for the soldier classes and there is a variable bMultiplayerOnly. How would I make this so advent troops(from multiplayer) can be loaded/recruited into them? I know they would work in the stat department as you can nickname them online. However, from what I have seen, only human soldier pawns can be added to the barracks. Any help would be super useful. Thanks. P.S I just really want an ADVENT MEC as a soldier. The game makes certain assumptions about classes, but you may be able to to what you want in the ClassData.ini. You'd need to add your new class to XComGame.X2SoldierClass_DefaultClasses section.Then create a new section for [AdvSoldier X2SoldierClassTemplate] in the same config Link to comment Share on other sites More sharing options...
Karnich Posted February 10, 2016 Share Posted February 10, 2016 @Amineri Do you have any pointers to where it would be good to hook up to something health/damage related where i could call a method on XComGameState_Unit to adjust the units aim based on the current health? Aka Red Fog.. been trying to get help for days :( Link to comment Share on other sites More sharing options...
Amineri Posted February 10, 2016 Author Share Posted February 10, 2016 Is it possible to make the Tuturial mission playeble.Like, timer, objetive go to the entracne of the facility, scout, engage, get reinforcment from explosive group,Open door, find pod, escape.And make a tight schedual like 5 or 6 turns, and more reinforcment from turn 4-6. So that you have to push to get away.? This would require heavy work in Kismet, which is where most of the mission scripting is handled. Kismet is located inside the umap files. I'm not sure which is for the tutorial. Link to comment Share on other sites More sharing options...
Amineri Posted February 10, 2016 Author Share Posted February 10, 2016 @Amineri Do you have any pointers to where it would be good to hook up to something health/damage related where i could call a method on XComGameState_Unit to adjust the units aim based on the current health? Aka Red Fog.. been trying to get help for days :sad: Sorry, I'm going to have to slow down on answering questions on how to develop specific mods -- basically only if it illustrates some general principle of modding. I wish I had the time to help everyone, but my own coding productivity that last few days has really tanked :( I'll still be dropping in once a day, but need to get back to coding myself. Plus still a lot for me to learn :) Link to comment Share on other sites More sharing options...
SpazmoJones Posted February 10, 2016 Share Posted February 10, 2016 Hi Amineri Most of the posts in this forum (including my last question) seem to have disappeared for some reason. Anyhow, I'm sure you can help me with this. I'm trying to override some of the functions in XComHumanPawn but the game crashes whenever I load a game. The soldier "lurking" in the foreground of the main menu screen also fails to appear. Even if I don't change anything the game still crashes when I override anything. If I check the launch log I get these errors appearing:Warning: SpawnActor failed because template class (XComHumanPawn) does not match spawn class (XComHumanPawn_BigHeads) It looks like I also need to modify a template class somehow but I don't know where to look to do that. What am I missing here? Thanks! Link to comment Share on other sites More sharing options...
Recommended Posts