Posted: Sat Mar 17, 2012 5:35 pm Post subject:
Day Night Loop settings
Can someone tell me how the values for
72 Set ambient rate
71 Set ambient step
work?
FinalSun describes them as Float value, but these huge numbers like 1070000000 for Set ambient rate are nothing comparable to float numbers i know.
e.g.
2070000000 makes the day-night-lighting transition very fast, but for
1100000000 nothing happens.
The numbers from nod8a.map also don't make much sense
1061997772 for Set ambient rate
1032805416 for Set ambient step
Which values would i have to set to make the light transition exactly twice as fast as this?
For those which this is too much work, you can also remove the 2 actions
72 Set ambient rate
71 Set ambient step
from the day/night loop triggers and put in the map instead
All them actions do is copy the value assigned to it to RulesClass->AmbientChangeStep and RulesClass->AmbientChangeRate. it takes a float.
So if you don't want different speed for sunset and sunrise, you can simply use the global AudioVisual keys instead of the actions. _________________ SHP Artist of Twisted Insurrection: Nod buildings
yes. The action can't read/work with the double/float values.
It can only handle/store integers, due the way it loads the ini values from the map.
In the map the actions are saved as a long comma separated string, where a decimal point for a float would cause issues. That's why the inconvenient way using the integer->hex->float conversion.
For example, you want to use a value of 0.625, you have to convert it into hex which is 3f200000 and then convert it into integer (using win calculator) which is 1059061760
Then use this value for the Set ambient rate/step action in the map. _________________ SHP Artist of Twisted Insurrection: Nod buildings
Wait.... will it work in Yuri's Revenge Final Alert?
I have never seen sunset/sunrise in Ra2/YR, i did not know it is possible to change day and night. I though it is per map, if you change map to have light at night, it will be night time, if you set light value, it will morning, whatever. I did not know there is possibility of changing time/lights. _________________
AmbientChangeRate=.2 ; how many minutes between ambient light recalculations
AmbientChangeStep=.2 ;GEF old value is below, changing this to speed up nuke blast, noit sure if it will affect anything else; step rate for gradually changing ambient lighting _________________
The enemy shall be injected with toxic poison - Venom QUICK_EDIT
If the mapper doesn't adds a day/night loop, then there is no day/night loop. This is true for TS as well as RA2/YR.
Though it seems RA2 is using the global lighting values for some superweapons as well (as Craniums post shows), while TS is using these solely for the day/night transition setting.
But it's a 5min job to create a simple testmap with the day/night loop and thus best to be tested in RA2. _________________ SHP Artist of Twisted Insurrection: Nod buildings
I apology for bumping this topic, I just noticed strange cosmetic side effect when adding AmbientChangeStep or AmbientChangeRate under [AudioVisual] in map file. It changes brightness of units. Units appear bit darker. (might be useful for units to fit more into some maps, for example bright civilian vehicles in dark cities)
Are you absolutely sure about this? Please reconfirm and post seperate images for easier comparing. Also, I can't notice it, but did the structures change too? _________________ One and only developer of the Command & Conquer Dune "C&C D" mod.
m7 wrote:
I tend to release things I create so that assets are never lost to hard drive problems, accidental deletion, or me having to pretend to care about rippers taking things from my project when it is done.
Are you absolutely sure about this? Please reconfirm and post seperate images for easier comparing. Also, I can't notice it, but did the structures change too?
Yes, adding in any map one of these AmbientChangeStep or AmbientChangeRate under [AudioVisual] somehow changes also brightness of units. Even same values from vanila rules.ini does this effect. Any other objects lightning remains same (only vehicles, infantry, aircraft are affected). Blue frame (on the right) is original, without [AudioVisual] settings.
Interesting, extra light seems to be reset to 0.0 when AmbientChangeStep or AmbientChangeRate is set so these ExtraXXXLight also needs to be redefined.
Thanks. QUICK_EDIT
no, it's because you set the section [AudioVisual] in your map and thus reset all (?not sure) keys of this section to their default values.
there are several rules.ini sections, where it's not enough to copy only the keys that you want to change, but where you have to copy every single key of the section or they get reset (sometimes to bad default values).
btw, for the AmbientChange*** keys you also use the triggers (see first post) and not the AudioVisual keys if you want different fast sunrise/sunset speeds.
It seems i didn't notice the different lighting back then in my tests, because one of the first things i've done was removing the annoying bright Extra***Light values and set them 0. _________________ SHP Artist of Twisted Insurrection: Nod buildings
Not all keys are affected, this one may be a special case as those are related.
I have used map specific ExtraXXXLight, it doesn't reset to Default for say
ConditionRed or PoseDir. QUICK_EDIT
no, it's because you set the section [AudioVisual] in your map and thus reset all (?not sure) keys of this section to their default values.
Correct. I have tested this, adding only [AudioVisual] section in map doesn't have any impact, but if any any of the keys are added, it uses default ones (probably using hardcoded ones, since it ignores other [AudioVisual] keys in rules.ini)
Lin Kuei Ominae wrote:
btw, for the AmbientChange*** keys you also use the triggers (see first post) and not the AudioVisual keys if you want different fast sunrise/sunset speeds.
.
Yes, I was first searching how to set correctly these values using triggers, but after reading posts above this way seemed to be easier to change only few values [AudioVisual] section rather than converting to hex and integer value. QUICK_EDIT
yeah, if you have only a single day night loop, the keys could be easier.
But i find the trigger a bit more convenient, since you can this way have multiple light transition settings. Like a slow one for day/night and a fast one for a meteor shower or other special global map events (e.g. instant light flicker for lightning storm ambience). _________________ SHP Artist of Twisted Insurrection: Nod buildings
e.g. instant light flicker for lightning storm ambience.
Wow, awesome idea! Does fast lightning change like this make any lag? And can be light flicker action made with single trigger ? (like Action0 to change light and Action1 to set it back) or some delay is necessary? QUICK_EDIT
Bittah made a DTA test map and it didn't lag.
You need 2 (or more) trigger to have a tiny delay. Basically a simplified night/day/night setup. _________________ SHP Artist of Twisted Insurrection: Nod buildings
Like a slow one for day/night and a fast one for a meteor shower or other special global map events (e.g. instant light flicker for lightning storm ambience).
Bittah made a DTA test map and it didn't lag.
You need 2 (or more) trigger to have a tiny delay. Basically a simplified night/day/night setup.
Tried to implement this light flicker in my MP map during ion storms but sadly game logic disables changing ambient light during ion storms. I have set random lightning loop, it generally worked but after start of ion storm, changes of light didn't apply. After ion storm ended, light changing triggers continued. QUICK_EDIT
What do you mean?
There is no ExtraBuildingLight key if that is what you mean.
ExtraUnitLight=.2 ; Extra light to make units glow.
ExtraInfantryLight=.2 ; Extra light to make infantry glow.
ExtraAircraftLight=.2 ; Extra light to make aircraft glow.
Concerning map lighting, they follow it just fine.
The only exception are objects using unittem.pal/unitsno.pal. They don't follow the maps coloring (Red=, Green=, Blue=), but they follow the general lighting (Ambient=) just fine.
That's why keys like UseNormalLight can give anims that nice glow on dark maps.
they follow it just fine.
The only exception are objects using unittem.pal/unitsno.pal.
That'd be all of the buildings. Unless you make a custom palette (Ares-only), but surely the same exception would apply?
I meant something like the coloring of buildings to change according to the general lighting.
During sunset/sunrise, everything has a yellowish/orange-y tint to it.
you can't
as i wrote, unit*.pal objects don't follow the Red/Green/Blue tinting of the maps lighting. Only the Ambient value for the brightness.
And the reason WW made it this way is most likely, that the remap colors aren't obscured into an unrecognizable mess.
Again an exception however, as IonStorm lighting can change the color of unit*.pal objects via the IonRed,IonGreen,IonBlue keys.
So in theory you could change during Sunset into an IonStorm.
However, since you can't change the maps color via trigger, only the brightness, you can't make a red/yellow sunset change into blueish day in the first place. _________________ SHP Artist of Twisted Insurrection: Nod buildings
i dont really understand any of this at all! and there isnt much documentation on these trigger actions either. maby im
just stupid for asking, but can anyone make an actual explanation of how to use the three trigger actions 71,72,and 73 in conjunction,
and how to input the numbers for faster and slower ambient rate, and greater and more subtle ambient limits in a comprehensible,
and replicatable way, please? QUICK_EDIT
start FinalSun
under "Map Tools" select "Tool Scripts"
select "Day-Night-Loop.fscript"
answer all the following messagebox questions with "yes"
Open the Trigger menu and adjust all the Actions in the newly generated triggers, so they point to the right Trigger (there is a text telling you "select sunrise", which is pretty selfexplanatory)
done, you have a day night loop in your map
McPwny wrote:
and how to input the numbers for faster and slower ambient rate, and greater and more subtle ambient limits in a comprehensible,
and replicatable way, please?
all explained in the first few posts in this topic.
Lin Kuei Ominae wrote:
For example, you want to use a value of 0.625, you have to convert it into hex which is 3f200000 and then convert it into integer (using win calculator) which is 1059061760
Then use this value for the Set ambient rate/step action in the map.
again, i might just be the idiot here, but what i need is an explanation to use each of the three triggers in conjunction and to know exactly
how to adjust all parameters of the lighting manually. its important its all done manually _________________ visit my moddb profile for .shp downloads and stuff QUICK_EDIT
Action 73 gives the target ambient lighting needed. Action 72 gives the rate at which the change should happen, smaller is faster. Action 71 gives the number of steps in which the change should happen. Typically one trigger is used to darken and another to lighten and those could be put in a repeating loop, those could also disable self and enable the other. For examples, take a look at the maps that use them in a text editor.
Attaching a quick tool to convert the ambient value to decimal value and vice-versa that gets used in map actions 71 and 72.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum