User Tools

Site Tools


more_dts

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
more_dts [2021/12/06 11:45] – [Data Validation] hnegmore_dts [2021/12/06 12:08] (current) – ["Importing" Parameters] hneg
Line 255: Line 255:
 <WRAP important>NOTE: You can turn the data validation off in the [[ped_ui#prefs|Prefs leaf]], at your own possible peril.</WRAP> <WRAP important>NOTE: You can turn the data validation off in the [[ped_ui#prefs|Prefs leaf]], at your own possible peril.</WRAP>
 ===== "Importing" Parameters ===== ===== "Importing" Parameters =====
 +As mentioned in the Export/Import leaf explanations it was briefly mentioned that you can "paste" parameters "into" an emitter.
 +
 +Meaning that you can paste emitter parameters into the "export fields" and press **//Paste params//** button to "inject" the parameters into the selected emitter.
 +<WRAP important>NOTE that there are some limitations to this though, for example if the parameters you are going to pass include references to an object, be it as the "attachedto" parameter or via some calculations on direction or whatever __**will not work**__.</WRAP>
 +
 +Obviously each parameter "type" has to be pasted into the correct field, self-explanatory but for particles
 +  * parameters for [[https://community.bistudio.com/wiki/setParticleParams|setParticleParams]] go into **//Particle Params//** field
 +  * parameters for [[https://community.bistudio.com/wiki/setParticleRandom|setParticleRandom]] go into **//Particle//** Random field
 +  * parameters for [[https://community.bistudio.com/wiki/setParticleCircle|setParticleCircle]] go into **//Particle Circle//** field
 +  * parameters for [[https://community.bistudio.com/wiki/setParticleFire|setParticleFire]] go into **//Particle Fire//** field
 +  * parameter for [[https://community.bistudio.com/wiki/setDropInterval|setDropInterval]] go into **//Drop Interval//** field
 +
 +And for lights
 +  * parameters for [[https://community.bistudio.com/wiki/setLightColor|setLightColor]] go into **//Light Color//** field
 +  * parameters for [[https://community.bistudio.com/wiki/setLightAmbient|setLightAmbient]] go into **//Light Ambient//** field
 +  * parameters for [[https://community.bistudio.com/wiki/setLightIntensity|setLightIntensity]] go into **//Light Intensity//** field
 +  * parameter for [[https://community.bistudio.com/wiki/setLightFlare|setLightFlare]] go into **//Use Flare//** field
 +  * parameter for [[https://community.bistudio.com/wiki/setLightFlareSize|setLightFlareSize]] go into **//Flare Size//** field
 +  * parameter for [[https://community.bistudio.com/wiki/setLightFlareMaxDistance|setLightFlareMaxDistance]] go into **//Flare Max Dist.//** Field
 +  * parameter for [[https://community.bistudio.com/wiki/setLightDayLight|setLightDaylight]] go into **//Daylight//** field
 +  * parameters for [[https://community.bistudio.com/wiki/setLightAttenuation|setLightAttenuation]] go into **//Attenuation//** field
 +  * parameter for [[https://community.bistudio.com/wiki/setLightIR|setLightIR]] go into **//isIR//** field
 +  * parameters for [[https://community.bistudio.com/wiki/setLightConePars|setLightConePars]] go into **//Dir Params//** field
 +  * parameters for [[https://community.bistudio.com/wiki/setLightVolumeShape|setLightVolumeShape]] go into **//Shape Params//** field
 +
 +This works the same for both particle and light emitters. Let’s say you have something like this in your script:
 +<code>_p setParticleParams [
 + ["\A3\data_f\ParticleEffects\Universal\Universal_02", 8, 0, 1, 0],
 + "",
 + "Billboard",
 + 1,
 + 0.5,
 + [0, 0, 0],
 + [0, 0, 0],
 + 1,
 + 1.23,
 + 1,
 + 0.2,
 + [0.6, 1.8, 2.5],
 + [[0.5, 0.5, 0.5, 0.14],[0.6, 0.6, 0.6, 0.06],[0.7, 0.7, 0.7, 0.02],[0.8, 0.8, 0.8, 0.006],[0.9, 0.9, 0.9, 0.001]],
 + [5],
 + 0.1,
 + 0.1,
 + "",
 + "",
 + "",
 + 0,
 + false,
 + 0,
 + [[0, 0, 0, 0]]
 +];
 +
 +_p setParticleRandom [
 + 0.2,
 + [0.08, 0.08, 0.08],
 + [0.3, 0.3, 0.3],
 + 20,
 + 0.15,
 + [0, 0, 0, 0],
 + 0,
 + 0,
 + 1,
 + 0
 +];
 +
 +_p setDropInterval 0.0035;</code>
 +
 +To "import" that place a single particle emitter, select it and go to the [[ped_ui#export_import|Export/import leaf]].
 +There is already data because the placed emitter by default has some parameters. So wipe those off first (press the **//Clear//** button).
 +<WRAP important>NOTE: Using wrong parameters in wrong fields causes errors on "import". Only paste the parameters, nothing else.</WRAP>
 +Then copy paste the parameters only, as in the value after the scripting command (array or number), on their respective fields on the tool and once done press the **//Paste Params//** button. The "missing" parameters get automatically populated with the default values and the emitter starts emitting the effect. Including the ??;?? after the value is not an error so no need to worry about that.
 +In case of this example the "imported" effect is a smoke (values are from //ArtilleryShell1// class), you should see this kind of result:
 +{{:importpars.png|}}
 +
 +It’s exactly the same method for lights, with the only exception of the export/import leaf looking a bit different.
 +<WRAP important>NOTE: the tool uses intensity as lights brightness value as setLightBrightness is outdated command, so if you use setLightBrightness in your "imported" script you have two options:
 +  - Change setLightBrightness into setLightIntensity and multiply the value with 3000 (brightness x 3000 = intensity)
 +  - just paste the brightness value into the Intensity field and hold down ``CTRL`` while pressing the **//Import//** button and the tool will do that conversion
 +</WRAP>
more_dts.1638791135.txt.gz · Last modified: 2021/12/06 11:45 by hneg