Dynamic Fog Color

Help bring our custom Ages to life! Share tips and tricks, as well as code samples with other developers.

Re: Dynamic Fog Color

Postby D'Lanor » Sun Mar 23, 2008 1:17 pm

Yes, the avatar light code was in the userKI. Unfortunately neither the light code nor object parenting can be netforced. That is why you would never see admins use those tricks in UU.

It would require some extra Python work to implement it properly in multiplayer mode.
"It is in self-limitation that a master first shows himself." - Goethe
User avatar
D'Lanor
 
Posts: 1980
Joined: Sat Sep 29, 2007 4:24 am

Re: Dynamic Fog Color

Postby Goofy » Sat Apr 26, 2008 12:04 pm

Umm I could use some things clarified about this.

Where exactly do you need to put these?(file names and such)

Where do you put self.ColorBlender(ColRate, 1) what file and what area in said file or does it matter?

Also where do you find this:
Make sure to turn on fog in the *.fni file for your age


Noticed in one area there was an entry of testobj, what is that and what can it be used for or does it matter?

Last, but not least what effects the thickness of the fog?

I'll probley have more questions, so don't be surprized if I come back ;) :roll:
We keep moving forward,
openning up new doors and doing new things,
Because we're curious... and curiosity keeps
leading us down new paths

Walt Disney

Keep moving forward
Goofy
 
Posts: 162
Joined: Mon Oct 01, 2007 8:51 pm

Re: Dynamic Fog Color

Postby D'Lanor » Sat Apr 26, 2008 3:39 pm

Goofy wrote:Umm I could use some things clarified about this.

Where exactly do you need to put these?(file names and such)

Not sure I understand your question. The SDL file has the same name as your age and goes into the SDL folder. You can make or edit SDL files with PlasmaShop or UruFun.
The Python file has the same name as your age. The class name is the same here as the filename, without the .py extension. The Python file goes into the Python folder. After being compiled and packed that is, for which you can use PlasmaShop or UruPython.

Important: You need to turn on the age SDL hook in Blender in the Book script.
Code: Select all
config:
    agesdlhook: True


Goofy wrote:Where do you put self.ColorBlender(ColRate, 1) what file and what area in said file or does it matter?

The code posted is the entire Python file minus the glue section which comes at the end (and which you can copy from any other Uru CC Python file). Unless you know enough about Python you probably shouldn't change the order.

Goofy wrote:Also where do you find this:
Make sure to turn on fog in the *.fni file for your age

Fog can be set in the Blender init script. It is the Graphics.Renderer.Fog.SetDefLinear setting. The values are in this order: start, end and density. PyPRP will create the fni file from this setting.

Goofy wrote:Noticed in one area there was an entry of testobj, what is that and what can it be used for or does it matter?

The test object is for testing game ownership as explained under The game owner mechanism. In single player mode it will always return true since there is only one owner there: you.

Goofy wrote:Last, but not least what effects the thickness of the fog?

The third value is the density. See above.
"It is in self-limitation that a master first shows himself." - Goethe
User avatar
D'Lanor
 
Posts: 1980
Joined: Sat Sep 29, 2007 4:24 am

Previous

Return to Scripting

Who is online

Users browsing this forum: No registered users and 0 guests

cron