Jump to content

Modding details? Ask away!


Amineri

Recommended Posts

  • Replies 399
  • Created
  • Last Reply

Top Posters In This Topic

Static functions are usually accessed directly by the name of the class in the calling code and so the override trick won't work for them.

 

E.g. all the callers use class'SomeClass'.static.SomeFunction().

 

The class override scheme only works for *instances* of the classes, where Spawn() for a particular class will secretly under the covers return an instance of the subclass.

 

IOW, you can't get there from here, at least not yet. Possibly not ever, if the calls are by table entry rather than by name, as I think they are but would need to check.

Link to comment
Share on other sites

 

What is the difference between the XCom*.ini files in My Documents\My Games\XCOM2\XComGame\Config\ and Default*.ini files in Steam\steamapps\commonXCOM 2\XComGame\Config ?

 

The "Default" versions are more like the "base" version that everything else is built from.

 

The "XCom" versions in the My Games folder are the versions that are built/updated when the game launches. These are built by merging the "Default" version with any "XCom" versions of mod files in DLC or mods (functionally, DLC and mods integrate into the game in the same way).

 

One very important thing to realize is that the versions in the My Games folder are rebuilt using file timestamp information. So, if a mod applies a delta file that removes/changes a line that was in the Default, if the mod is made inactive or even deleted, the versions in the My Games won't be updated (because timestamps haven't been changed). This will result in inactive/delete mods "leaking" into cases where they shouldn't.

 

Firaxis is aware of this issue. The current workaround is to delete the config files in the My Games folder to force the game to rebuild them. This will be necessary when removing or not using a mod that makes adjustements to the Default configurations. This is actually a common problem in Unreal Engine 3, and was something that often had to be done with Long War for EU and EW.

 

 

Thanks Amineri, this was precisely my issue.

Link to comment
Share on other sites

 

... Really the only thing not randomized are the 16 regions -- their shape and location.

 

 

I've been trying to find where & how those are structured and dispatched as overlays to the HoloGlobe flat map.

 

So far the only possible hint i could gather up is that "OverworldBorder.staticmesh" (most probably an integral part of the necessary FBX scene) could define the sprites/shapes & materials for them. Problem is -- i can't for the life of me... open any SDK tool that would reliably show such stuff visually & accurately in similar methods offered in 3D programs like (free) Blender.

I'm planning to use such exact "gfx" principles in PsProX3 to create some sort of small "Continental" textures (256x256 - so precision is an absolute must) for my GeoscApps project.

 

Maybe JCLewis could shed some light on this 3d mystery for me, please?! I can't contact him -- can you?

Edited by Zyxpsilon
Link to comment
Share on other sites

 

 

I know you have not answered my first question, but another thought.

Is it possible to mod start continent?

If you go under GameData.ini, there's a series of lines that start with PossibleStartingRegions=

According to somebody else I saw answer this question somewhere, you can just remove the ones that you don't want.

 

Thx, No Russia or Europe, But nice now I can start in US;)

 

 

Do NOT remove these INI entries. It's by far preferable to just Rem'hem out by placing a simple (; semi-colon) in front of these lines. You might need the authentic stuff later if anything.

Link to comment
Share on other sites

 

A couple of days ago I released my Hidden Potential mod on Steam, which re-creates a part of the Second Wave option. But all of a sudden is has stopped working after changing some lines and recompiling stuff and I have no idea why.

 

My Troubleshooting so far:

 

Fresh recompile

Remade it from scratch

Even used a fresh XCom install

Checked all SDK settings like the install path and such....

 

It's actually just a simple ini edit and I can't figure out what I did wrong here.

 

If I replace the XcomClassData.ini under Mygames>Xcom2>XcomGame>Config and make it read-only then it works in the game the way it should. But once I pack it into a mod, the game ignores the changes and loads the default values. No red screens during testing either (at least none regarding the mod).

 

Looking at your mod ini file, it looks like you are treating it as if it were a replacement for the Default version, but that's not how Unreal Engine 3 handles config files -- and for good reason. If it were simple replacement, then only one mod/DLC could make changes to a particular config file.

 

Instead, it is a merging process. There are "command prefixes" that allow adding lines to and deleting lines from the Default version.

 

From the Epic documentation page :

 

  • + - Adds a line if that property doesn't exist yet (from a previous configuration file or earlier in the same configuration file).
  • - - Removes a line (but it has to be an exact match).
  • . - Adds a new property.
  • ! - Removes a property; but you don't have to have an exact match, just the name of the property.

 

The full page is here : https://udn.epicgames.com/Three/ConfigurationFiles.html

 

I really cannot express enough how much I appreciate it, that you invest your time to help out clueless newbies like me. You are really awesome.

 

I get it now, I don't need to replace the whole file, so it's enough if the .ini has the lines I want to change and the correct character at the beginning of the line.

 

So if I only want to add a random amount of extra Aim per level, my line would look like this with the . in front ?

 

.SoldierRanks=( aAbilityTree=( (AbilityName="SwordSlice", ApplyToWeaponSlot=eInvSlot_SecondaryWeapon) ), aStatProgression=((StatType=eStat_Offense,StatAmount=1,RandStatAmount=6), (StatType=eStat_HP,StatAmount=1), (StatType=eStat_Strength,StatAmount=0), (StatType=eStat_Hacking,StatAmount=0), (StatType=eStat_CombatSims,StatAmount=1)), )

 

 

 

@2much4l1 - You mean for testing ? if I put the default into the mod with deactivated lines it might srew with compatibility to other mods, wouldn't it ?

 

Edited by Hammerstein2k11
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

hello! for the last couple of days i've been trying like crazy to mod in a new "Not Equally Created" option, now i've found where the soldiers are initialized from but for some reason my override code dosnt fire: (all of those array stuff is hard coded right now, i'll move it to INI once i get the change going smoothly)

class XComGameState_Unit_NCE extends XComGameState_Unit;

function RandomizeStats()
{
		local int Costs[8];
		local int vfiLength;
		local int points;
		local array<int> RandomStats;
		local bool PointCheck;
		local int j;
		local int currentStat;
		local int ValuesFromINI[16];

		`log("got here");

		Costs[0]=20;
		Costs[1]=3;
		Costs[2]=6;
		Costs[3]=12;
		Costs[4]=3;
		Costs[5]=6;
		Costs[6]=6;
		Costs[7]=60;

		ValuesFromINI[0]=7;
		ValuesFromINI[1]=4;
		ValuesFromINI[2]=75;
		ValuesFromINI[3]=55;
		ValuesFromINI[4]=10;
		ValuesFromINI[5]=0;
		ValuesFromINI[6]=15;
		ValuesFromINI[7]=10;
		ValuesFromINI[8]=50;
		ValuesFromINI[9]=30;
		ValuesFromINI[10]=10;
		ValuesFromINI[11]=0;
		ValuesFromINI[12]=15;
		ValuesFromINI[13]=5;
		ValuesFromINI[14]=1;
		ValuesFromINI[15]=0;

		vfiLength=16;
		
		do
		{
			points=75;
			PointCheck=true;
			for(j=0;j<vfiLength;j++)
			{		
				currentStat= Max(Rand(ValuesFromINI[j]+1),ValuesFromINI[j+1]);
				points-=((currentStat-ValuesFromINI[j+1])*Costs[(j)/2]);
				RandomStats.addItem(currentStat);
				j++;
			}
			`log("out of forloop");
			if(ABS(points)>10)
			{
				RandomStats.remove(0,RandomStats.Length);
				PointCheck=false;
				`log("PointCheck=false" @points);
			}

		} Until(PointCheck==true);
		
		`log("Stat:HP" @RandomStats[0]);
		`log("Stat:Aim" @RandomStats[1]);
		`log("Stat:Defense" @RandomStats[2]);
		`log("Stat:Mobility" @RandomStats[3]);
		`log("Stat:Will" @RandomStats[4]);
		`log("Stat:Hacking" @RandomStats[5]);
		`log("Stat:Dodge" @RandomStats[6]);
		`log("Stat:Armor" @RandomStats[7]);
		`log("got here 2");

		SetBaseMaxStat(eStat_HP,ValuesFromINI[0]);
		SetBaseMaxStat(eStat_Offense,ValuesFromINI[2]);
		SetBaseMaxStat(eStat_Defense,ValuesFromINI[4]);
		SetBaseMaxStat(eStat_Mobility,ValuesFromINI[6]);
		SetBaseMaxStat(eStat_Will,ValuesFromINI[8]);
		SetBaseMaxStat(eStat_Hacking,ValuesFromINI[10]);
		SetBaseMaxStat(eStat_Dodge,ValuesFromINI[12]);
		SetBaseMaxStat(eStat_ArmorMitigation,ValuesFromINI[14]);
		
		SetCurrentStat(eStat_HP,RandomStats[0]);
		SetCurrentStat(eStat_Offense,RandomStats[1]);
		SetCurrentStat(eStat_Defense,RandomStats[2]);
		SetCurrentStat(eStat_Mobility,RandomStats[3]);
		SetCurrentStat(eStat_Will,RandomStats[4]);
		SetCurrentStat(eStat_Hacking,RandomStats[5]);
		SetCurrentStat(eStat_Dodge,RandomStats[6]);
		SetCurrentStat(eStat_ArmorMitigation,RandomStats[7]);

}

Now i have also tried to go to the characterPoolManager and change the stats of the soldiers from there when they are created:(RandomStats is the same thing that is shown above)

class CharacterPoolManager_NCE extends CharacterPoolManager dependson(XGTacticalGameCoreNativeBase, XGCharacterGenerator)config(Game);


event XComGameState_Unit CreateSoldier(name DataTemplateName)
{
        .......
	RandomStats(NewSoldierState);
}


Edited by Guest
Link to comment
Share on other sites

 

Hi again, can you share your experience: are there any ways to turn on "Intellisense" for *.uc scripts in the Mod Buddy or load it the Unreal Engine? I mean autocompletion and a list of available types and functions? Thanks for your attention!

 

Unfortunately I have not figured out how to do this, and will be quite happy when someone figures it out ^_^

 

 

I was able to import a third-party extensions:

http://forums.nexusmods.com/index.php?/topic/3774940-mod-buddy-intellisense-scripts/?p=34395000

 

It's awful, but it works. (=

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...