Cool Pog Tricks

More
20 years 9 months ago #6725 by MajorTom
Replied by MajorTom on topic Cool Pog Tricks
This a combination of pog and ini manipulation.
It's a sort of an SFX tutorial:

You can achieve custom environmental sound effects by using a sfx .ini file for sound effect manipulation (examples in audio/sfx)and then link it through the setup.lws of a new sim that you create. The sim is then placed per pog.
with Sim.Create (<.....>) and Sim.PlaceAt( <arguments>)

For example, you want a specific area to have a hissing/static radiation-like noise in the background?

Using a sound channel you would only achieve a monotonous, single toned, constant volume sound that would abruptly start and stop when you called the Stream function per pog.

Using the following method, you will have a background sound effect that fades out with distance, changes pitch depending on the direction and speed you are flying, and is even more audible, depending on whether you point your ship at it or fly a tangent.

here's how:

Make a sim .ini. I used a modified (invisible) cargo pod .ini but it doesn't really matter which sim.
Then add a sound channel to the setup.lws that you call in that ini under [Avatar]. Put the appropriatly named setup.lws in a folder in avatars.
Copie one of the ini files in sfx and rename it appropriatly, then put the sound ( for example disruptor_loop) you want to use in the url section at the top of that ini under [Properties].
Edit the sound channel line in the setup.lws to use your new sfx .ini. If your sfx ini was named "radiation.ini", that would look something like this:
Code:
AddNullObject <node template=ini||audio|sfx|radiation>

Place the sim per pog at the location of choice.

now you can tweak the sound effects in the sfx ini, so the noise fades at more or less distance, set the base loudness of the sound ect., ect.

By setting min_range=3250 in the sfx.ini (using the disruptor_loop .wav) you will have a environmental noise that continously diminishes at a distance from 0 - 100 km. If you set the range to min_range at 15000 you can travel to around 190 km away from the sim before the sound fades out completly.

Note: The engine will cull the sound at around 210 km from the sim but you can still control the attenuation over that distance. At a min_range setting of 50000 the sound only fades to about 1/2 the original volume over a distance of 200 km.
The basic sound intensity is only minimally affected by the min_range setting.

If you wanted to cover an area of 400 km (or more) you can place 2 (or more) 'noise' sims at appropriate locations.

This method can also be used to create radio chatter in the environment 'background' around stations.









Have Gun, Will Travel

Please Log in or Create an account to join the conversation.

More
20 years 9 months ago #6726 by NathanKell
Replied by NathanKell on topic Cool Pog Tricks

Originally posted by MajorTom


{snip}
This method can also be used to create radio chatter in the environment 'background' around stations.

Cool idea(s)

Re: last part: Or you could just add the null object to the station type's setup.lws, actually. That way it's auto-created with the station.

www.battletechmodproductions.com/
Question with boldness even the existence of a God; because, if there be one, he must more approve of the homage of reason, than that of blind-folded fear.
Thomas Jefferson, Letter, 10 Aug. 1787

Question with boldness even the existence of a God; because, if there be one, he must more approve of the homage of reason, than that of blind-folded fear.
Thomas Jefferson, Letter, 10 Aug. 1787

Please Log in or Create an account to join the conversation.

More
20 years 9 months ago #6730 by MajorTom
Replied by MajorTom on topic Cool Pog Tricks
Yes, I will try that when I use pog created stations for missions.

On the game maps though: The stations are not created directly per pog in Epic and only a hand full of station.ini are used to make many. We may not want to have station chatter everywhere.


Have Gun, Will Travel

Please Log in or Create an account to join the conversation.

More
20 years 8 months ago #7036 by GrandpaTrout
Replied by GrandpaTrout on topic Cool Pog Tricks
Found a problem in Schedule Every loops. If the pog code takes more time to execute than the loop provides for, then the loop will halt for good. Recommend a while(1) with as very short task sleep for loops with small (less than a second) time values.

Discovered the hard way (ouch).

-Gtrout

Please Log in or Create an account to join the conversation.

More
20 years 8 months ago #7040 by GrandpaTrout
Replied by GrandpaTrout on topic Cool Pog Tricks
State objects and Sets. Sets do not store state objects correctly. The set will lose the state object, or all states objects are treated as identicle. Use Lists, they behave correctly.

[Edit]
Possible correction. It looks like how the object is handled may depend on how it was cast before being placed into the set. Which is odd, cause they should all just be objects?

-Gtrout

Please Log in or Create an account to join the conversation.

More
20 years 5 months ago #7556 by EricMan64
Replied by EricMan64 on topic Cool Pog Tricks
A little while ago, I came up with the idea of switching cockpit models in the game by attaching child sims to the ship. In the last couple of days, I have finally developed and researched this technique to the point where it could be used.

These are my findings:
1) Assuming that it is the null where the life_support subsim has been attached, the player's viewpoint is from the exact location of the 'crew' null. I never bothered to test whether the location of the null or the life_support subsim is used (I assume the subsim), but it didn't really matter for my purposes. The point is that the view comes from that precise spot; no offset.
2) Cockpit models have the offset from the player's viewpoint built into their setup.lws files. This means that if you attach a sim with a cockpit avatar at the exact point of the crew null, it will be positioned correctly.
3) Cheese tastes good.
4) The cockpit's shifting-around-when-the-ship-moves effect works with the child sim. This means that the movement and rotation is performed on the viewpoint, not the cockpit model.
5) Scaling cockpit models to different sizes and changing thier offset so that the perspective would be the same does not work well. It throws off the shifting effect discussed in 4.
6) There is a very visible goofiness at the front of the ship where the models has been attached. Using keybinds to the view-change buttons, I've managed to make it so that the player should never notice. The cockpit sim is hidden whenever the player pushes a button for an external view. I even had it hide the cockpit from view when you push F1 once. There's only one way that I've found now to see the goofiness that I can't find a way around. If cockpit models are changed while in an external view, I could not find a way for the scripts to see that the view is external and then hide the model. Pog'ers need to keep this limitation in mind when changing the cockpit model.

Here's a demo mod I put together to show the process and code to change the cockpit model in-game:
www.i-war2.com/pogfiles/ericman64/em64_cockpit_switch.zip

[edit]
You know, I just realized that I never stated what the keybind to change the cockpit is.

Insert this in your keybind file and set it to whatever key combo you'd like:
[em64.GenericTest]

[/edit]

Please Log in or Create an account to join the conversation.