Mod Question Repository... Questions come in, answers go out - Page 14

Mod Question Repository... Questions come in, answers go out

Resources to get you going on your new project, or to help you over some emergent problems during your development cycle.

Moderator: Moderators

Locked
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Post by Argh »

Sorry, that's incorrect, PL. 1024+ is reserved for FX. 2048+ is for emitting a Weapon Particle (i.e., shooting stuff), and 4096+ is for emitting a weapon's relevant Explosion, which is actually a Weapon (kind've confusing, really, but that's how it works).

Here's an example, from my tank in PURE:

FBI:

Code: Select all

[SFXTypes]
	{
///////////////////////////////////////////////////////////////////////////////////////////////////////////////RESERVED
	explosiongenerator0=custom:SMOKEPUFF_FX;
///////////////////////////////////////////////////////////////////////////////////////////////////////////////END RESERVED
	explosiongenerator5=custom:TANKGUN_LAUNCH_FX;
	explosiongenerator6=custom:TANKGUN_GROUND_FLASH;
	}
BOS:

Code: Select all

#define SMOKEPUFF_FX 1024
#define TANKGUN_LAUNCH_FX 1024+5
#define TANKGUN_GROUND_FLASH 1024+6

FireWeapon1()
{
emit-sfx TANKGUN_LAUNCH_FX from flare;
}
One quick note about this... it really, really, really helps, if you keep the names the same everywhere! I've read through some of CA's stuff, and they use bizarre names that don't obviously coorespond with a given Unit, and they don't use the names within their BOS code. Must be a bear to work with, unless you're the guy who coded it, and you have an incredible memory :-/

Bad practice, all around- it's sooooo much easier to debug / modify if you have 1:1 matches for names throughout, frankly.

For many more examples on how to integrate FX, explosions, timed application of FX scripting into your games, etc., please read through NanoBlobs, it has a lot of examples :-)
User avatar
Pressure Line
Posts: 2283
Joined: 21 May 2007, 02:09

Post by Pressure Line »

i thought Snipa was having a blonde moment and forgot how to emit fx :/
User avatar
Snipawolf
Posts: 4357
Joined: 12 Dec 2005, 01:49

Post by Snipawolf »

So, 2048 is teh number I need?

BTW, I am EXTREMELY organized. The texture is the same name of the unit name. The FX's are all in their own files, and named extremely relevant to their weapon/unit.
User avatar
Snipawolf
Posts: 4357
Joined: 12 Dec 2005, 01:49

Post by Snipawolf »

Ehhh...

Is the blue value in second textures even used? >___>
User avatar
Pressure Line
Posts: 2283
Joined: 21 May 2007, 02:09

Post by Pressure Line »

nope
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Post by KDR_11k »

Not yet.
User avatar
Snipawolf
Posts: 4357
Joined: 12 Dec 2005, 01:49

Post by Snipawolf »

Alright, in Scriptor, in a move command.

What does [1] equal?
User avatar
Peet
Malcontent
Posts: 4384
Joined: 27 Feb 2006, 22:04

Post by Peet »

163840
User avatar
Snipawolf
Posts: 4357
Joined: 12 Dec 2005, 01:49

Post by Snipawolf »

Thanks, because no matter what number I entered, my move commands were abysmally small. So, I started using that, and it made them a lot larger, but more unwieldy, too.
Archangel of Death
Posts: 854
Joined: 28 Jan 2005, 18:15

Post by Archangel of Death »

Your scriptor lost its constants. There are many things that can cause this, including opening up more than one instance of scriptor (most common for me). You'll need to reset them (in Settings) to Linear 163840 and Angular 182.
User avatar
yuritch
Spring 1944 Developer
Posts: 1018
Joined: 11 Oct 2005, 07:18

Post by yuritch »

Also, a [1] in Scriptor equals 1 distance unit in 3DO Builder. However, Upspring uses different units (I don't remember exactly what the ratio to 3DO Builder ones is, but it's about 1 Upspring unit to 2.8 3DO Builder's).
User avatar
Pressure Line
Posts: 2283
Joined: 21 May 2007, 02:09

Post by Pressure Line »

yuritch wrote:Also, a [1] in Scriptor equals 1 distance unit in 3DO Builder. However, Upspring uses different units (I don't remember exactly what the ratio to 3DO Builder ones is, but it's about 1 Upspring unit to 2.8 3DO Builder's).
my calculator says 2.8125 :) but 2.8 should be good enough unless you need super presicision
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Post by KDR_11k »

Should be 2.5.

When Spring interfaces a float with COB the float's value is multiplied by 65536. 65536 = 1.0 elmos. Unless you're working with OTA content you should really use [1] = 65536.

Reminds me, the build laser on the socket in KP should move 32 elmos or so, I didn't manage to figure out how many [1] that is until after the script was handed off to Zwzsg.
User avatar
Snipawolf
Posts: 4357
Joined: 12 Dec 2005, 01:49

Post by Snipawolf »

Thanks for the help guys, learning is always a good process.
User avatar
rattle
Damned Developer
Posts: 8278
Joined: 01 Jun 2006, 13:15

Post by rattle »

Angular 182.
182.044444444444444444444444444444444...
Makes a huge difference :P
[Krogoth86]
Posts: 1176
Joined: 23 Aug 2007, 19:46

Post by [Krogoth86] »

1.)
I saw a deployable bridge on Unit Universe for OTA (which is down now so i can't link to it). Would something like this be possible in Spring or would this totally fuck up the pathed wayfinding when loading the map?

2.)
Was there any attempt yet to do a "dying animation" i.e. to get some more satisfaction when killing a Krogoth for example (-> he would fall on his knees or something before exploding just like the Colossus in Supcom)?

3.)
I recently had a look into unit development and I still have a n00b question:
I couldn't figure out how to animate anything. All I have found yet were some "funny" maths on movement for OTA units - but even here no editor or clue how this was made (please let there be a GUI or converter for this :wink: ). So maybe you could point out what to do for animating units (and which tools to use)...
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Post by KDR_11k »

1. That doesn't work
2. Yes, has been in since 72b1 or so.
3. You have to use a BOS script, animating in Spring isn't WYSIWYG.
[Krogoth86]
Posts: 1176
Joined: 23 Aug 2007, 19:46

Post by [Krogoth86] »

KDR_11k wrote:1. That doesn't work
2. Yes, has been in since 72b1 or so.
3. You have to use a BOS script, animating in Spring isn't WYSIWYG.
Thx! Concerning animating:
So there never was something like Servo (S.o. still has a working download link for this?) or another keyframe converter?
User avatar
rattle
Damned Developer
Posts: 8278
Joined: 01 Jun 2006, 13:15

Post by rattle »

Upspring has a LUA exporter for that but I'd rather do them myself.
User avatar
yuritch
Spring 1944 Developer
Posts: 1018
Joined: 11 Oct 2005, 07:18

Post by yuritch »

Servo should work with Spring just as good as with OTA, BOS language is the same (well, at least the part of it with which Servo deals).
Locked

Return to “Game Development Tutorials & Resources”