How do I add a sun to the sky? (FAQ)

In this forum you will find and post information regarding the modding of Star Wars Battlefront 2. DO NOT POST MOD IDEAS/REQUESTS.

Moderator: Moderators

Post Reply
User avatar
[SBF]ATATFIGHTR
Chief Warrant Officer
Chief Warrant Officer
Posts: 338
Joined: Sun Mar 12, 2006 12:22 am
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: The US, in the state of UTAH

How do I add a sun to the sky? (FAQ)

Post by [SBF]ATATFIGHTR »

I want to have a Sun in the sky, I've got a the lighting, but how do I add the sun in the sky?
aYo.4.YaYo

Re: Where is the Sun!?!?

Post by aYo.4.YaYo »

i think u have to edit the skys .tga and draw one in...
User avatar
AceMastermind
Gametoast Staff
Gametoast Staff
Posts: 3284
Joined: Mon Aug 21, 2006 6:23 am
Contact:

Adding a sun to your map

Post by AceMastermind »

You need to insert some code into your ABC.fx file located in your world1 folder, this file is your world's environment effects file, if you don't have one then create one or copy one from the assets.

Insert this code into your ABC.fx file(replace ABC with your 3 letter modID):

Code: Select all

SunFlare()
{
	Angle(120.000000, -30.000000);
	Color(255, 255, 255);
	Size(5.0);
	FlareOutSize(40.0);
	NumFlareOuts(40);
	InitialFlareOutAlpha(70);
	HaloInnerRing(0.0, 255, 255, 255, 255);
	PC()
	{
		HaloMiddleRing(10.0, 255, 200, 0, 128);
	}
	HaloOutterRing(40.0, 255, 127, 0, 0);
	SpikeColor(230,230,0,128);
	SpikeSize(9.0);
}
User avatar
trainmaster611
Sith Lord
Sith Lord
Posts: 1779
Joined: Thu Aug 24, 2006 5:22 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Building a railway to Coruscant
Contact:

Re: Where is the Sun!?!?

Post by trainmaster611 »

Does the Angle line define the location of the sun on the dome model?
User avatar
[SBF]ATATFIGHTR
Chief Warrant Officer
Chief Warrant Officer
Posts: 338
Joined: Sun Mar 12, 2006 12:22 am
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: The US, in the state of UTAH

Re: Where is the Sun!?!?

Post by [SBF]ATATFIGHTR »

Do I need files from the assets folder?
User avatar
AceMastermind
Gametoast Staff
Gametoast Staff
Posts: 3284
Joined: Mon Aug 21, 2006 6:23 am
Contact:

Re: Where is the Sun!?!?

Post by AceMastermind »

No, just the code.
If you don't have a <modID>.fx file in your world1 folder then create one, and copy and paste the code into it, then munge.
User avatar
[SBF]ATATFIGHTR
Chief Warrant Officer
Chief Warrant Officer
Posts: 338
Joined: Sun Mar 12, 2006 12:22 am
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: The US, in the state of UTAH

Re: Where is the Sun!?!?

Post by [SBF]ATATFIGHTR »

It isn't working! Could it be because I copied the hoth fx file and deleted everything in it and put the sun code in it?
User avatar
trainmaster611
Sith Lord
Sith Lord
Posts: 1779
Joined: Thu Aug 24, 2006 5:22 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Building a railway to Coruscant
Contact:

Re: Where is the Sun!?!?

Post by trainmaster611 »

Did you rename it to your modID name?

And you're going to want to put back that stuff you deleted.
User avatar
[SBF]ATATFIGHTR
Chief Warrant Officer
Chief Warrant Officer
Posts: 338
Joined: Sun Mar 12, 2006 12:22 am
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: The US, in the state of UTAH

Re: Where is the Sun!?!?

Post by [SBF]ATATFIGHTR »

So I don't have to make another tread I will ask my other question here, How does Foliage Mode in Zeroeditor work? I read the documentation and it isn't really making any sense to me.
I just want to add grass to my map.

EDIT2: ok, I have fixed the snow problem and gotten the sun working.
Taivyx
2008 Best Games Related Avatar
Posts: 1706
Joined: Thu Jun 07, 2007 3:34 pm
Projects :: Terra Strife - discontinued
Games I'm Playing :: none
xbox live or psn: No gamertag set
Contact:

How to add foliage to your map

Post by Taivyx »

Ah, yeah. The foliage in zeroeditor........

Well, it's pretty complicated.

Let me see if I can lay down the basics for ya......


1) Copy the .prp file from any map (in the world1 folder) that has grass in it.
2) Open it up. In it, it should have one or more section(s) similar to this:

Code: Select all

Layer(0)
{
	SpreadFactor(0.2);
	Mesh()
	{
		GrassPatch("nab1_prop_grass_tall.odf", 80);
		File("editor_grasspatch.msh", 80);
		Frequency(100);
		Scale(1);
		Stiffness(0.0);
		ColorVariation(0.1);
		CollisionSound("");
	}
}


This basically defines the foliage for each foliage layer in the editor.
The GrassPatch("nab1_prop_grass_tall.odf", 80); line defines what odf to use for the grass.
You can change that to your liking. I dunno what the number next to it is for (the 80, in this example).
The other values I'm sure you can figure out on your own.

So, in the editor's Foliage tab, to the right of the screen, there are 4 layers, right?
Select the layer specified above (at the top of the code), and it will use the foliage you defined for that layer.

Well, that's it in a nutshell. Feel free to ask questions, but make sure to first check if it's answered in the Zeroeditor guide.
User avatar
[SBF]ATATFIGHTR
Chief Warrant Officer
Chief Warrant Officer
Posts: 338
Joined: Sun Mar 12, 2006 12:22 am
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: The US, in the state of UTAH

Re: Where is the Sun!?!?

Post by [SBF]ATATFIGHTR »

That doesn't seem so complicated when you put it that way :wink: I will try it out :D
Post Reply