Script question.

Moderator: rbodleyscott

Post Reply
Nerzalar
Lance Corporal - SdKfz 222
Lance Corporal - SdKfz 222
Posts: 27
Joined: Fri Oct 13, 2017 7:57 am

Script question.

Post by Nerzalar »

I am intending to make a global mod to exchange wich side uses wich textures when toggled on.

The only method I've found involves moving around a whole lot of textures in several folders and is a bit of work, so before I plunge into that I should probably ask:

Is there some nice script file or line of code somewhere I can change to make it load "blue" textures for side0 and vice-versa? It would make for a much smaller and
easier to make mod. x)
rbodleyscott
Field of Glory 2
Field of Glory 2
Posts: 28047
Joined: Sun Dec 04, 2005 6:25 pm

Re: Script question.

Post by rbodleyscott »

Couldn't be easier. There is absolutely no need to move textures around.

You will see that all of the reversed Epic Battle scenarios (the ones where Side A is on the right hand side) have the lines

Code: Select all

	ReSkinArmy(0, 1);
	ReSkinArmy(1, 1);
in their scenario scripts.

The 1 in the second parameter tells the game to reverse the usual texture allocations.

For custom and campaign battles, in the CustomiseUnits() function in SlithRandomMap2.BSF

You will find the lines
ReSkinArmy(0, reverse);
ReSkinArmy(1, reverse);
In your modded version, you would just need to set

Code: Select all

reverse = 1;
just prior to those lines if your reverse textures toggle is on.
Richard Bodley Scott

Image
Nerzalar
Lance Corporal - SdKfz 222
Lance Corporal - SdKfz 222
Posts: 27
Joined: Fri Oct 13, 2017 7:57 am

Re: Script question.

Post by Nerzalar »

Thank you for your time,

I'll test if this works for my use, as I want to make it a global mod if possible to activate when I want to change textures.
Post Reply

Return to “Field of Glory II: Medieval - Modding”