Author Topic: [Manual] The Dev Tools  (Read 6155 times)

Firgof

  • BMS Administrator
  • Delusional
  • *
  • Posts: 1531
  • Karma: +175/-4
    • View Profile
[Manual] The Dev Tools
« on: December 21, 2010, 09:10:48 AM »
Given that we have these semi-functional tools laying around in all your Star Ruler executables and that some tasks are exceedingly difficult without them (e.g. creating new particle systems and adding firing, impact, and engine points to ships) I figure I should get you some info. on how to use the tools that are currently available.  Before I start, a disclaimer:

Warning:  The Developer Tools are not finished products.  As such, much of their functionality and polish is missing (buttons which do nothing, implied functions which don't exist, aggravating / non-smooth controls).  Use these tools at your own peril as they are not officially supported at this time.

All that said, I'll start writing up the manual now.  The posts that follow this post will describe briefly how to interact with and accomplish basic tasks in the Model Configurator and the Particle Editor, including how to gain access to those tools.
« Last Edit: December 21, 2010, 10:20:24 AM by Firgof »
"Now it will punish you"

Firgof

  • BMS Administrator
  • Delusional
  • *
  • Posts: 1531
  • Karma: +175/-4
    • View Profile
Enabling the Developer Tools
« Reply #1 on: December 21, 2010, 09:11:02 AM »
It's simple!

Step One: Make a Shortcut of Star Ruler


Step Two: Edit the Shortcut (right click on the Shortcut, click Properties)

Step Three: Go to the Target line (add quotation marks if your target line doesn't match the image's):


Step Four: Add +developer after the quotation marks.

Step Five: Launch the game through the Shortcut.

If you have these options in the bottom right-hand corner of the screen, you have successfully enabled the developer tools:
« Last Edit: December 21, 2010, 09:37:36 AM by Firgof »
"Now it will punish you"

Firgof

  • BMS Administrator
  • Delusional
  • *
  • Posts: 1531
  • Karma: +175/-4
    • View Profile
How to use the Model Configurator
« Reply #2 on: December 21, 2010, 09:11:11 AM »
How to use the Model Configurator

When you click on the Model Configurator button from the starting menu of the game, you'll be brought to a loading screen and then you'll see the above interface.  This is the Model Configurator (click on the image for a quick breakdown on the interface's elements).  To Load a model, double-click on its entry in the Model list.  The list it is drawing from is the normal model lists; mod lists are not loaded.  The Glow image on the ship will not be displayed in the Model Configurator; this must be checked in-game to ensure it works.

If you see a white and red cone with a stick underneath it, the game doesn't have the model you asked for or the model's file is corrupt.  If your model is purple and black that means the game can't or didn't load a texture for the model.

Controls:
Cursor Keys: Left/Right - Rotate ; Up/Down - Orbit
Mouse Controls: Mouse Wheel - Zoom, LMB - Get clicked position and normals on model, RMB - Get just the position.  When you use either click event, the data is also copied to your clipboard (ctrl+v)

Some of the buttons on the Control Bar are non-functional: Open Model, Save Model, Show Unit-Scale Sphere, Show/Hide Firing Points, Add Firing Points, Show/Hide Impact Points, Add Impact Points.

Usage:
You'll notice that the information we're collecting here is rather specific.  That's because Firing Points, Impact Points, and so forth are coded into the game with this data.  As an example, here's the procedure for adding an impact point to a model (once the prerequisite stuffs are declared):
Impact Point: [position], [normal], [angle] <-- this is what we need
(ctrl+v after LMBing:)
Impact Point: [filled in], [filled in], [angle] <-- manually type in the , and the angle (it's a cone)

The other kinds of points are listed in the big comments in the models.txt where you find Impact/Firing points and so forth.  I'll go into what kinds of data are required between impact, firing, and engine points at a later time.
« Last Edit: December 21, 2010, 10:26:49 AM by Firgof »
"Now it will punish you"

Firgof

  • BMS Administrator
  • Delusional
  • *
  • Posts: 1531
  • Karma: +175/-4
    • View Profile
How to use the Particle Editor
« Reply #3 on: December 21, 2010, 09:11:21 AM »
How to use the Particle Editor

Firstly, familiarize yourself with the interface.  Unlike the Model Configurator, all the buttons work as intended with the Particle Editor and the editor itself is nearly fully-featured.   However, it is not user-friendly at this time and requires a little bit of forethought and experimentation to get things to look right.  We do, however, have mouseover-enabled tooltips on the interface so you can get the 'lay of the land' if you've forgotten what function a button provides.

A quick guide on navigating with the camera in the Particle Editor:  RMB pans, LMB rotates, and LMB+RMB zooms.  Be nice to your camera: don't throw it around.  We do not have a 'reset camera position and angles' tool or button.


EMITTER SETTINGS
------------------------------------------------------
On the bottom left is the Emitter Settings.  The Emitter Settings control what and how the particle system you're viewing spawns particles.  Here's the meaning of the listed settings:

Spread : Spread is a slider that ranges from 0 to 360 degrees.  At 0 Degrees, the particle system will always shoot in a line and at 360 degrees the particle system will pick any angle and fire a particle in that direction.

Speed : Speed controls how fast the Particle moves.

Spawn : Spawn controls an alarm that, when it goes off, spawns a particle.  It is measured in seconds.

Life : This is the life of the particlesNot the Particle System.  This is extremely important to know as all Particle Systems default to a one second emission.  If you want Particle Systems to last more than a second, you'll need to add them to a Master Particle System which controls children Particle Systems.

Particle System List : The first grey box underneath Life is the Particle System list.  The Particle System list lists all the children particle systems of the particle system you're observing at the moment.  To the right of the list are the list's controls. 

The top box is the name box where you can put in a particle system's name and click Add Particle Sys to explicitly add a particle system by name*.  If you would rather browse and/or add a particle system with a specified duration and offset, click Pick Particle Sys.

The next grey box is a list of the materials used in the current particle system's emitter.  Materials are picked at random from this list to be spawned.  To add preference to one material over another, simply add more of that material.  You may Pick the material as with the Particle Systems, which brings up a window which allows you to visually browse all the materials in the game.  Any material added to materials.txt can be used in a particle system's emitter.  Some images may be stretched to fit the screen but should be fine when actually emitted.

Two final quirks you should be aware of:  When you add materials or particle systems you may have to do a manual Clear Particle System to get that material/particle system to be spawned.  Also, when you're working with a master particle system:  When all your children finish playing, they do not attempt to play again.  To get them to play again, clear the particle system.

(*NOTE!*: Particle Systems added this way will always have 1 second emission time



SPRITE EFFECTS
------------------------------------------------------
This small window will require a surprising amount of discussion for you to truly understand how to fully utilize it, unfortunately, as its basics are easy, but some quirks and interesting behaviors about it are necessary to understand if you wish to create more than basic on/off 1/0 transitions.  This is one of the more subtly complex parts of the interface and the part that you'll be working with most of the time, so get comfortable with it before you try to do a complex particle system.

First, let's break down the window into its components.  There are two lists of numbers in grey boxes; these are the times at which the conditions you set to the right of them are to execute.  The list can go beyond 1.000, but it is not recommended as often times this is not how you actually want the particle system to work as the system will be cleared after 1 second unless it's being spawned by a master particle system; in which case, 0.000-1.000 becomes the Timeline and the Duration you gave the Particle System will be how long it takes to get from 0 to 1.  As an example, if I had three time-stamps (0.000, 0.500, and 1.000) and spawned that particle system with a Duration of 6 seconds it would play the transitions at 0 seconds, 3 seconds, and 6 seconds after it spawned.

If I wanted the size of my Particle to be 10.0 when the particle was first spawned, I would do:  Size (10.00 | 10.00), Add at... (0.00) and press Enter.  The Enter is important because that actually commits the change to the time graph.  If you click on another timestamp before pressing enter to commit your changes, you will lose whatever unsaved numbers you typed.  If I wanted to then edit that change I made, I would click on 0.000 in the list, change the numbers to what I wanted, and press Enter after selecting the "Add at..." box. 

Important note: REALLY READ THIS:  Adding transitions to the end and beginning of a particle system may be permanent, as Remove may not actually remove the transitions correctly.  This is a known bug/quirk, so it is recommended that you do not add more than 1 transition to the beginning and end at more than 2 decimal places (e.g. 0.001 over 0.01) and not overlap times at any point.  These can cause irrecoverable changes to the particle system that may be permanent, causing you to lose time and possibly the particle system itself.

Now, an interesting thing we can do (and thus why we have two numbers that we specify) is give random sizes to things.  It's very simple:  The first box in Size controls the minimum the Size can be and the second box in Size controls the maximum.  This works the same way over on the right side, where we set colors and color ranges.

About Color Transitions:  First things first: (1) What you're seeing is hexadecimal color code and (2) The format we use is ARGB (Alpha [How transparent the particle is], Red, Green, Blue).  So if I wanted Solid White I would put in FFFFFFFF and if I wanted semi-transparent black I would put in 88000000.  The same rules with the Size Transitions applies here.  Be careful as you work and have fun but keep in mind the quirks of the editor as you do so.



APPLIED TUTORIAL
------------------------------------------------------

Alright, so now that you've got the basics of the window down let's make a quick and cheap particle system.  This particle system will be a replacement for the impact of the laser beam and will run you through the 'typical workflow' of a single-particle-system based particle emitter.  We will leave more complex particle systems with chained particle systems and emitters up to your discretion.  If you'd like to see a more complicated particle system at work, take a look at how we do the Nova (star_explode_stage2a).

First thing's first, let's open up the current laser impact effect (laser_impact).  Zoom up to it.  We'll start with a small change and work our way up to something interesting.  First thing we'll change is the color of the emitted particle.  Click on the 0.900 timestamp in the Sprite Effects box.  0FC22222-0FC22222 is its current color transition, which gives it a slightly purpley/reddish hue; we'll make it light red instead.  Give it the new color 0FFFA244 in both boxes, click on Add at...'s text box, and press Enter.  You should see your change immediately; if you accidentally added another transition at 0.000, re-open the particle system without saving it.  If your particle system did not change to a different color just before fading out, make sure that you selected 0.900's timestamp, changed both boxes to 0FFFA244, and pressed enter in "Add at...".

Now we have a uniform red whenever the particle system fades out.  But what if we want it to be somewhere between a pale blue and pure red?  Simple:  Substitute 0FFA244/0FFA244 with FFFF0000/0C2F6244.  Now, remember, it picks between these color ranges randomly so it might now show your change for the first couple of times it emits.

Click the Save button to commit your changes to the game if you'd like to see the changes in action.  That's really all there is to it.

You now know everything you need to know in order to use the Particle Editor effectively.  I look forward to seeing what sorts of crazy things you all come up with!!

BE WARNED:  It is advisable that you keep in mind how often you're spawning a particle when you create it's system as the game will slow down a lot when emitting large numbers of particles or particle effects.  It is often best to KISS than to revise later. :)
« Last Edit: February 03, 2011, 02:02:06 PM by Firgof »
"Now it will punish you"

MisterE

  • Newbie
  • *
  • Posts: 8
  • Karma: +2/-0
    • View Profile
Re: [Manual] The Dev Tools
« Reply #4 on: December 26, 2010, 04:44:46 PM »
Good stuff, looking forward to more info!

ouch

  • Distracted
  • ***
  • Posts: 216
  • Karma: +17/-1
    • View Profile
Re: [Manual] The Dev Tools
« Reply #5 on: December 26, 2010, 05:04:34 PM »
So what else are you guys hiding in the EXE?

Quote from: Firgof
If you would like to see my porn collection add +HotPorn to the Star Ruler desktop shortcut.

lol
« Last Edit: December 26, 2010, 05:07:12 PM by ouch »
My Mods:
Auto Resource Transfering Subsystems (Fuel, Power, Ammo):
http://forums.blind-mind.com/index.php?topic=1427.0
Advanced spiral universe generation:
http://forums.blind-mind.com/index.php?topic=1536.0
Currently working on: Adv Spiral Universe Map

Dadekster

  • Distracted
  • ***
  • Posts: 348
  • Karma: +9/-1
    • View Profile
Re: [Manual] The Dev Tools
« Reply #6 on: December 28, 2010, 01:53:37 PM »
 :o

Foraven

  • Delusional
  • ****
  • Posts: 1591
  • Karma: +102/-6
  • Fear the gauss weapons!
    • View Profile
Re: [Manual] The Dev Tools
« Reply #7 on: January 10, 2011, 12:24:22 PM »
I hope you get around to finish the dev tools, or at least make them more functional. They are hardly usable as they are (i want to add firing and impact points but cannot even tell where the existing ones are, let alone add new ones). Also there doesn't seem to be anything of use in models.txt; is it added after we use the dev tool or something?
Maker of FRB mod.

Keeblerdawg

  • Sentient
  • **
  • Posts: 90
  • Karma: +4/-1
    • View Profile
Re: [Manual] The Dev Tools
« Reply #8 on: April 19, 2011, 02:08:11 AM »
I just tried to activate the configurator, but since this game is ported through Steam, it seems to be impossible to change the command line to add "+developer" to it as you described. Is there another way to do it?

Thy Reaper

  • BMS Lead Developer
  • BMS Administrator
  • Hopeless
  • *
  • Posts: 3237
  • Karma: +397/-8
    • View Profile
    • Blind Mind Studios
Re: [Manual] The Dev Tools
« Reply #9 on: April 20, 2011, 01:42:54 PM »
In Steam, you can right click the game in the library window, open properties, then Set Launch Options. In there, you would put +developer.

carharttjimmy

  • Newbie
  • *
  • Posts: 41
  • Karma: +2/-4
  • The Ewok Shepherd of Star Ruler
    • View Profile
Re: [Manual] The Dev Tools
« Reply #10 on: April 24, 2011, 11:26:33 PM »
I just tried to activate the configurator, but since this game is ported through Steam, it seems to be impossible to change the command line to add "+developer" to it as you described. Is there another way to do it?

Or goto steam apps folder. Click the star ruler icon in common. Make a shortcut then add a space after last ". Next type +developer

And bam! There you go!
________________________________________________

My mods
Advanced Traits Minimod