Weapon Variables: what do they do?

Weapon Variables: what do they do?

Discuss game development here, from a distinct game project to an accessible third-party mutator, down to the interaction and design of individual units if you like.

Moderator: Moderators

User avatar
FoeOfTheBee
Posts: 557
Joined: 12 May 2005, 18:26

Weapon Variables: what do they do?

Post by FoeOfTheBee »

I've made a wiki page modeled on the FBI variable descriptions page. Spring weapons have diverged enough from OTA that Maestro's tutorial doesn't seem adequate anymore.

I only filled in a few variables - if you know about weapons variables, please go by and share some info.

http://taspring.clan-sy.com/wiki/Weapon ... scriptions
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Post by Argh »

Um, I could probably help with this, as I've actually read the sourcecode. There are a LOT of OTA variables that simply aren't recognized by Spring.
User avatar
Caydr
Omnidouche
Posts: 7179
Joined: 16 Oct 2004, 19:40

Post by Caydr »

I'll come back in an hour and see what you've done, then see if there's anything I can add.


~~~

scratch that, i'll do it in the morning
Last edited by Caydr on 12 Sep 2006, 07:33, edited 1 time in total.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Post by Argh »

Er, it's been a bit longer than an hour, but I had to get home from work and eat a quick dinner ;)

I'll look over the current list, and then list what I know...
SpikedHelmet
MC: Legacy & Spring 1944 Developer
Posts: 1948
Joined: 21 Sep 2004, 08:25

Post by SpikedHelmet »

The wiki is looking good but it is a giant clusterfuck and is very confusing... there are absolutely no descriptions about what kind of variable is needed (ie if the tagline is boolean and requires only a 1 for yes or 0 for no, or whether it requires a specific number, what do those numbers mean, etc)

EDIT: Yes, I meant to say 1 or 0 not 1 or 2...
Last edited by SpikedHelmet on 13 Sep 2006, 03:13, edited 1 time in total.
esteroth12
Posts: 501
Joined: 18 May 2006, 21:19

Post by esteroth12 »

spring (and C++ and C and Java) uses a 0 for no :P

also, theres a page much like this already
User avatar
Caydr
Omnidouche
Posts: 7179
Joined: 16 Oct 2004, 19:40

Post by Caydr »

OK, here goes. Nobody touch it, I'm going through it now...
SpikedHelmet
MC: Legacy & Spring 1944 Developer
Posts: 1948
Joined: 21 Sep 2004, 08:25

Post by SpikedHelmet »

You bastard! I've been going through it for half an hour!
User avatar
Snipawolf
Posts: 4357
Joined: 12 Dec 2005, 01:49

Post by Snipawolf »

Those need explanations..
User avatar
Caydr
Omnidouche
Posts: 7179
Joined: 16 Oct 2004, 19:40

Post by Caydr »

Your explanations were inaccurate or at least very lacking, assuming those were from you.

Done all the general ones, going to do the repulsor/shield ones now, then add the ones that aren't listed.
User avatar
Snipawolf
Posts: 4357
Joined: 12 Dec 2005, 01:49

Post by Snipawolf »

Hehe, I meant the one above me (if anyone got confused, not the one all the way on top of the topic)
User avatar
Caydr
Omnidouche
Posts: 7179
Joined: 16 Oct 2004, 19:40

Post by Caydr »

OK, done my editing. I've probably missed a few general tags, but I've written longish descriptions for everything and given examples. Also split it into weapon / shield sections. Prettied-up the tables too.
Hunter0000
Posts: 197
Joined: 04 Nov 2004, 00:33

Post by Hunter0000 »

If no one has done it by tomorrow afternoon I might throw up the shield intercept explanaions.. since I understand those after my extensive playing around =P
User avatar
Caydr
Omnidouche
Posts: 7179
Joined: 16 Oct 2004, 19:40

Post by Caydr »

Starting to wonder if, in most cases, Spring ignores the rendertype and just makes a best-guess based on the weapon's attributes. For instance, rendertype 0 or 1 apparently work with lasers, even though only 0 should work.
User avatar
FoeOfTheBee
Posts: 557
Joined: 12 May 2005, 18:26

Post by FoeOfTheBee »

Caydr wrote:Starting to wonder if, in most cases, Spring ignores the rendertype and just makes a best-guess based on the weapon's attributes. For instance, rendertype 0 or 1 apparently work with lasers, even though only 0 should work.
I´ve had the same experience with lasers - either 0 or 1 work.

And there's this in WeaponDefHandler.h:

Code: Select all

#define WEAPON_RENDERTYPE_MODEL 1
#define WEAPON_RENDERTYPE_LASER 2
#define WEAPON_RENDERTYPE_PLASMA 3
#define WEAPON_RENDERTYPE_FIREBALL 4
and this in WeaponDefHandler.cpp:

Code: Select all

if(weaponDefs[id].name.find("disintegrator")!=string::npos){	//fulhack
		weaponDefs[id].visuals.renderType = WEAPON_RENDERTYPE_FIREBALL;}
	else if(weaponDefs[id].visuals.modelName.compare("")!=0){
		weaponDefs[id].visuals.renderType = WEAPON_RENDERTYPE_MODEL;}
	else if(beamweapon){
		weaponDefs[id].visuals.renderType = WEAPON_RENDERTYPE_LASER;}
	else{
		weaponDefs[id].visuals.renderType = WEAPON_RENDERTYPE_PLASMA;}
Which makes me think that the correct rendertype for lasers is 2, not that I really have much comprehension of what's going on in the source here.
Last edited by FoeOfTheBee on 13 Sep 2006, 20:57, edited 2 times in total.
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Post by KDR_11k »

EDIT: Oops, misread that. So it actually reads the def to spot what it expects and then sets rendertype for you?
User avatar
FoeOfTheBee
Posts: 557
Joined: 12 May 2005, 18:26

Post by FoeOfTheBee »

Ok, on second read of WeaponDefHandler.cpp, I think it is setting the rendertype for weapons that have beamweapon=1 as 2, and ignoring the rendertype in the tdf.

Though someone more clueful than I should confirm this.
Hunter0000
Posts: 197
Joined: 04 Nov 2004, 00:33

Post by Hunter0000 »

ok.. shield intercept tags edited.. how do those look? confusing/sense making?
User avatar
Caydr
Omnidouche
Posts: 7179
Joined: 16 Oct 2004, 19:40

Post by Caydr »

Makes no sense to me yet :cry:
Hunter0000
Posts: 197
Joined: 04 Nov 2004, 00:33

Post by Hunter0000 »

I could make a much more propper diagram.. but it would not fit into that article...

EDIT: if I have time a bit later, Il make a new page (with more detailed instructions/diagrams) and link to that, unless anyone objects.

EDIT2: Links up.. how does that work?
Post Reply

Return to “Game Development”